I'm using Memcached on RHEL/CentOS 5/6 and found that memory size inconsistency between limit_maxbytes and maxbytes taken from "stats" and "stats settings" respectively.
I have compiled memcached-1.4.15 from the source and set the limit_maxbytes value to 5GB but maxbytes shows only 904MB.
# ./memcached -l 127.0.0.1 -p 11211 -m 5000 -u nobody -vv
# echo "stats " | nc 127.0.0.1 11211 | grep limit_maxbytes
STAT limit_maxbytes 5242880000
# echo "stats settings" | nc 127.0.0.1 11211 | grep maxbytes
STAT maxbytes 947912704
Eviction happens when it hits the maxbytes value and do not grow. Any reason for this behavior..?
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.4 (Santiago)
# uname -rop
2.6.32-358.14.1.el6.x86_64 x86_64 GNU/Linux
# file memcached
memcached: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped
I have 48GB installed on this box. Note that I have used binary packages as well but it is still the same.
Best Answer
On my Memcached box it works fine (1.4.5-1), but I think this is related to this bug: http://code.google.com/p/memcached/issues/detail?id=319