memcached 命中率及状态说明

printf "stats\r\n" | nc 127.0.0.1 11211
STAT pid 2529
STAT uptime 1078133
STAT time 1241415864
STAT version 1.2.4
STAT pointer_size 64
STAT rusage_user 489.302614
STAT rusage_system 6850.564555
STAT curr_items 2537
STAT total_items 872539
STAT bytes 9939637
STAT curr_connections 17
STAT total_connections 6166911
STAT connection_structures 110
STAT cmd_get 68414905
STAT cmd_set 872539
STAT get_hits 67605437
STAT get_misses 809468
STAT evictions 0
STAT bytes_read 921056148171
STAT bytes_written 2323979209207
STAT limit_maxbytes 134217728
STAT threads 4 END


一、缓存命中率 = get_hits/cmd_get * 100%
二、get_misses的数字加上get_hits应该等于cmd_get
三、total_items == cmd_set == get_misses,当可用最大内存用光时,memcached就会删掉一些内容,等式就会不成立

你可能感兴趣的:(memcached)