[jira] [Commented] (TS-1212) can not limit ram cache

2012-04-19 Thread Zhao Yongming (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-1212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13258003#comment-13258003
 ] 

Zhao Yongming commented on TS-1212:
---

when you traffic_line -L restart the server, the total_bytes whill change:
{code}
[yonghao@cache177 ~]$ links -dump http://localhost:8080/stat/ | grep ram
 proxy.config.cache.ram_cache.size=10737418240
 proxy.config.cache.ram_cache_cutoff=131072
 proxy.config.cache.ram_cache.algorithm=1
 proxy.config.cache.ram_cache.compress=0
 proxy.config.cache.ram_cache.ssd_percent=25
 proxy.config.cache.ram_cache.compress_percent=90
 proxy.process.cache.ram_cache.total_bytes=10737418239
 proxy.process.cache.volume_0.ram_cache.total_bytes=-79456895011
 proxy.process.cache.ram_cache.bytes_used=0
 proxy.process.cache.ram_cache.hits=0
 proxy.process.cache.ram_cache.misses=0
 proxy.process.cache.ram.read.success=0
 proxy.process.cache.volume_0.ram_cache.bytes_used=0
 proxy.process.cache.volume_0.ram_cache.hits=0
 proxy.process.cache.volume_0.ram_cache.misses=0
 proxy.process.cache.volume_0.ram.read.success=0
[yonghao@cache177 ~]$ links -dump http://localhost:8080/stat/ | grep ram
 proxy.config.cache.ram_cache.size=10737418240
 proxy.config.cache.ram_cache_cutoff=131072
 proxy.config.cache.ram_cache.algorithm=1
 proxy.config.cache.ram_cache.compress=0
 proxy.config.cache.ram_cache.ssd_percent=25
 proxy.config.cache.ram_cache.compress_percent=90
 proxy.process.cache.ram_cache.total_bytes=10737418239
 proxy.process.cache.volume_0.ram_cache.total_bytes=-85899345956
 proxy.process.cache.ram_cache.bytes_used=0
 proxy.process.cache.ram_cache.hits=0
 proxy.process.cache.ram_cache.misses=0
 proxy.process.cache.ram.read.success=0
 proxy.process.cache.volume_0.ram_cache.bytes_used=0
 proxy.process.cache.volume_0.ram_cache.hits=0
 proxy.process.cache.volume_0.ram_cache.misses=0
 proxy.process.cache.volume_0.ram.read.success=0
{code}

 can not limit ram cache
 ---

 Key: TS-1212
 URL: https://issues.apache.org/jira/browse/TS-1212
 Project: Traffic Server
  Issue Type: Bug
  Components: Cache
Affects Versions: 2.1.3
 Environment: we are on v3.0.x but maybe affected v3.1 and later too.
Reporter: Zhao Yongming

 ram cache limit is not activate at sometime:
 {code}
 [yonghao@cache177 ~]$ links -dump http://localhost:8080/stat/ | grep ram
  proxy.config.cache.ram_cache.size=10737418240
  proxy.config.cache.ram_cache_cutoff=131072
  proxy.config.cache.ram_cache.algorithm=1
  proxy.config.cache.ram_cache.compress=0
  proxy.config.cache.ram_cache.ssd_percent=25
  proxy.config.cache.ram_cache.compress_percent=90
  proxy.process.cache.ram_cache.total_bytes=12884901886
  proxy.process.cache.volume_0.ram_cache.total_bytes=-7301066
  proxy.process.cache.ram_cache.bytes_used=11840122880
 {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (TS-1212) can not limit ram cache

2012-04-19 Thread Zhao Yongming (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/TS-1212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13258033#comment-13258033
 ] 

Zhao Yongming commented on TS-1212:
---

in the codes:
{code}
static void reg_int(const char *str, int stat, RecRawStatBlock *rsb, const char 
*prefix, RecRawStatSyncCb sync_cb=RecRawStatSyncSum) {
  char stat_str[256];
  snprintf(stat_str, sizeof(stat_str), %s.%s, prefix, str);
  RecRegisterRawStat(rsb, RECT_PROCESS, stat_str, RECD_INT, 
RECP_NON_PERSISTENT, stat, sync_cb);
  DOCACHE_CLEAR_DYN_STAT(stat)
}
#define REG_INT(_str, _stat) reg_int(_str, (int)_stat, rsb, prefix)

// Register Stats
void
register_cache_stats(RecRawStatBlock *rsb, const char *prefix)
{
  char stat_str[256];

  // Special case for this sucker, since it uses its own aggregator.
  reg_int(bytes_used, cache_bytes_used_stat, rsb, prefix, 
cache_stats_bytes_used_cb);

  REG_INT(bytes_total, cache_bytes_total_stat);
  snprintf(stat_str, sizeof(stat_str), %s.%s, prefix, 
ram_cache.total_bytes);
  RecRegisterRawStat(rsb, RECT_PROCESS, stat_str, RECD_INT, RECP_NULL, (int) 
cache_ram_cache_bytes_total_stat, RecRawStatSyncSum);
  REG_INT(ram_cache.bytes_used, cache_ram_cache_bytes_stat);
  REG_INT(ram_cache.hits, cache_ram_cache_hits_stat);
  REG_INT(ram_cache.misses, cache_ram_cache_misses_stat);
  REG_INT(pread_count, cache_pread_count_stat);
{code}

the ram_cache.total_bytes with prefix, is registered with RECP_NULL, while 
others are  RECP_NON_PERSISTENT, what does that mean?

from the codes, I think
  RECP_NULL,
  RECP_PERSISTENT,
are treat as RECP_PERSISTENT, and will be persistent between restart. why we 
put here a RECP_NULL ??


 can not limit ram cache
 ---

 Key: TS-1212
 URL: https://issues.apache.org/jira/browse/TS-1212
 Project: Traffic Server
  Issue Type: Bug
  Components: Cache
Affects Versions: 2.1.3
 Environment: we are on v3.0.x but maybe affected v3.1 and later too.
Reporter: Zhao Yongming

 ram cache limit is not activate at sometime:
 {code}
 [yonghao@cache177 ~]$ links -dump http://localhost:8080/stat/ | grep ram
  proxy.config.cache.ram_cache.size=10737418240
  proxy.config.cache.ram_cache_cutoff=131072
  proxy.config.cache.ram_cache.algorithm=1
  proxy.config.cache.ram_cache.compress=0
  proxy.config.cache.ram_cache.ssd_percent=25
  proxy.config.cache.ram_cache.compress_percent=90
  proxy.process.cache.ram_cache.total_bytes=12884901886
  proxy.process.cache.volume_0.ram_cache.total_bytes=-7301066
  proxy.process.cache.ram_cache.bytes_used=11840122880
 {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira