memory fragmentation issues in 1.2?

Timo Ewalds timo at tzc.com
Thu Dec 7 08:03:50 UTC 2006


Paul T wrote:
> You are saying that your copy of memcached is leaking
> memory to the point of going from 800Mb to 2Gb+ per
> memcached process. That is certainly wrong and should
> not be happening. It could be that you are the only
> person on a planet observing this behaviour. 
I have seen this before as well, though not recently. I never managed to 
figure out the reason, though I can try to describe the circumstances. 
This was on a fairly recent debian install, being netbooted to about 50 
identical machines. They all had 256mb worth of memcached configured, 
with 8 of them in one pool and the rest in another. The big pool was 
used as a general purpose object cache (average size of under 1kb, high 
read to write load). The pool of 8 was used as a page cache, so every 
page served was pushed there. That gave it a very write heavy load of 
fairly big objects (ie average size of about 20-30kb?), but with very 
low read load (about 5% read, as most pages weren't pulled from cache). 
The memcached daemons on the main pool stayed under 300mb, but the ones 
in the page cache stabalized around 350mb. Every so often the page cache 
ones would increase in size to 500+mb before being killed by the OOM 
(sometimes taking down the machine as the OOM killed the wrong process). 
I never managed to figure out why that happens, but it was consistently 
those machines. It is either related to writes to the cache, large 
objects, or to forceful expiry. Since those machines didn't have a 
higher write/s count than the other machines, I doubt it's related to 
the amount of writes. Since it was pushing objects out of the cache at a 
very substantial rate, maybe it's related to that? I haven't seen this 
behaviour in quite a while though, so maybe it's fixed?

Timo


More information about the memcached mailing list