[
https://issues.apache.org/jira/browse/TS-1266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13449052#comment-13449052
]
Leif Hedstrom commented on TS-1266:
-----------------------------------
To avoid changing the storage layout of the CLFUS RAM cache objects (might be
safe, but only jplevyak would know), I'm suggesting this patch:
{code}
diff --git a/iocore/cache/RamCacheCLFUS.cc b/iocore/cache/RamCacheCLFUS.cc
index becf2fb..69feb42 100644
--- a/iocore/cache/RamCacheCLFUS.cc
+++ b/iocore/cache/RamCacheCLFUS.cc
@@ -289,7 +289,7 @@ RamCacheCLFUSEntry
*RamCacheCLFUS::destroy(RamCacheCLFUSEntry *e) {
if (!e->flag_bits.lru) {
objects--;
bytes -= e->size + ENTRY_OVERHEAD;
- CACHE_SUM_DYN_STAT_THREAD(cache_ram_cache_bytes_stat, -e->size);
+ CACHE_SUM_DYN_STAT_THREAD(cache_ram_cache_bytes_stat, -(int64_t)e->size);
e->data = NULL;
} else
history--;
@@ -510,7 +510,7 @@ int RamCacheCLFUS::put(INK_MD5 *key, IOBufferData *data,
uint32_t len, bool copy
return 0;
}
bytes -= victim->size + ENTRY_OVERHEAD;
- CACHE_SUM_DYN_STAT_THREAD(cache_ram_cache_bytes_stat, -victim->size);
+ CACHE_SUM_DYN_STAT_THREAD(cache_ram_cache_bytes_stat,
-(int64_t)victim->size);
victims.enqueue(victim);
if (victim == compressed)
compressed = 0;
{code}
> RAM cache stats looks wrong
> ---------------------------
>
> Key: TS-1266
> URL: https://issues.apache.org/jira/browse/TS-1266
> Project: Traffic Server
> Issue Type: Bug
> Components: Stats
> Affects Versions: 3.1.4
> Reporter: Leif Hedstrom
> Assignee: Leif Hedstrom
> Fix For: 3.3.1
>
>
> E.g.
> {code}
> proxy.process.cache.volume_0.bytes_used=73639936
> proxy.process.cache.volume_0.bytes_total=299840634880
> proxy.process.cache.volume_0.ram_cache.total_bytes=536870912
> proxy.process.cache.volume_0.ram_cache.bytes_used=279175598080
> proxy.process.cache.volume_0.ram_cache.hits=254
> proxy.process.cache.volume_0.ram_cache.misses=179
> {code}
> I'm obviously not using 279GB of RAM cache (I wish I did). Or
> {code}
> proxy.process.cache.ram_cache.total_bytes=536870912
> proxy.process.cache.ram_cache.bytes_used=279175598080
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira