ppop123 发表于 2012-11-12 21:01

ats的ram_cache相关参数

proxy.process.cache.ram_cache.total_bytes
proxy.config.cache.ram_cache_cutoff

这2个参数需要改嘛?还是用系统默认合适。
我的机器是64G内存,硬盘1T空间。



aaaaaa 发表于 2012-11-12 23:48

   # default the ram cache size to AUTO_SIZE (-1) based on cache size
   #   (approximately 1 MB of RAM cache per GB of disk cache)
   # alternatively, set to a fixed value such as 20971520 (20MB)
CONFIG proxy.config.cache.ram_cache.size INT -1
CONFIG proxy.config.cache.ram_cache_cutoff INT 4194304



对你的配置,默认的CONFIG proxy.config.cache.ram_cache.size = -1 == 1TB * 1/1000 == 1GB, 这个肯定不是你想要的吧? 那就自己设置一个吧。先建议用50%的内存测试。

cuteoff是一个线,大约这个线的内容,永远不会让它进ram_cache。这个可得根据你的情况来设置

ppop123 发表于 2012-11-13 11:23

我的线上的一个正向代理的,内存命中率只有0...
proxy.node.bandwidth_hit_ratio=0.162774
proxy.node.bandwidth_hit_ratio_int_pct=16
proxy.node.hostdb.hit_ratio=0.104159
proxy.node.hostdb.hit_ratio_int_pct=10
proxy.node.proxy_running=1
proxy.node.cache.percent_free=0.868574
proxy.node.cache_hit_ratio=0.210684
proxy.node.cache_hit_ratio_int_pct=21
proxy.node.cache_hit_ratio_avg_10s_int_pct=21
proxy.node.cache_hit_mem_ratio=0.000000
proxy.node.cache_hit_mem_ratio_int_pct=0
proxy.node.cache_hit_mem_ratio_avg_10s_int_pct=0
proxy.node.bandwidth_hit_ratio_avg_10s_int_pct=26
proxy.node.bandwidth_hit_ratio_avg_10s=0.257511
proxy.node.http.cache_hit_fresh_avg_10s=79.000000
proxy.node.http.cache_hit_mem_fresh_avg_10s=0.000000
proxy.node.http.cache_hit_revalidated_avg_10s=10.000000
proxy.node.http.cache_hit_ims_avg_10s=8.000000
proxy.node.http.cache_hit_stale_served_avg_10s=0.000000
proxy.node.http.cache_miss_cold_avg_10s=356.000000
proxy.node.http.cache_miss_changed_avg_10s=2.000000
proxy.node.http.cache_miss_not_cacheable_avg_10s=0.000000
proxy.node.http.cache_miss_client_no_cache_avg_10s=0.000000
proxy.node.http.cache_miss_ims_avg_10s=8.000000
proxy.node.http.cache_read_error_avg_10s=0.000000
proxy.node.cache_total_hits_avg_10s=97.000000
proxy.node.cache_total_hits_mem_avg_10s=0.000000
proxy.node.cache_total_misses_avg_10s=366.000000
proxy.node.cache_hit_ratio_avg_10s=0.209503
proxy.node.cache_hit_mem_ratio_avg_10s=0.000000
proxy.node.hostdb.total_lookups_avg_10s=868.000000
proxy.node.hostdb.total_hits_avg_10s=781.000000
proxy.node.hostdb.hit_ratio_avg_10s=0.899770

yychn 发表于 2012-12-06 15:01

本帖最后由 yychn 于 2012-12-07 15:38 编辑

回复 3# ppop123


    加上CONFIG proxy.config.http.record_tcp_mem_hit INT 1 看看,默认不统计内存命中的
页: [1]
查看完整版本: ats的ram_cache相关参数