Strange memory management behavior

Brad Fitzpatrick brad at danga.com
Sat Feb 12 14:00:35 PST 2005


What are the memcached memory stats like?

My guess is that top is only showing allocated OS-level pages (4kb) and
even though we anonymous-mmap malloced 1MB, we're not yet touching all
that MB, so while we have address space allocated to memcached, some of it
isn't backed by pages yet?

But that's just a guess.  I'd need to see more numbers.


On Fri, 11 Feb 2005, Ivan Krstic wrote:

> All,
>
> I've recently run into some strange memcached behavior, and didn't see
> it mentioned in the list archives. I have an 800 MB memcached process
> which is taking up about a gig of ram, but only using ~577MB:
>
> nobody   12704  1.8 45.8 958100 951160 ?     S<   Feb10  26:05
>   (/usr/local/bin/memcached -d -m 800 -p 11000 -u nobody)
>
> STAT uptime 85218
> STAT version 1.1.11
> STAT rusage_user 613:800688
> STAT rusage_system 951:754311
> STAT curr_items 544412
> STAT total_items 3407507
> STAT bytes 577981537
> STAT curr_connections 1136
> STAT total_connections 765713
> STAT connection_structures 11546
> STAT cmd_get 12278259
> STAT cmd_set 3407554
> STAT get_hits 11407497
> STAT get_misses 870762
> STAT bytes_read 4137592615
> STAT bytes_written 18351838993
> STAT limit_maxbytes 838860800
>
> New sets seem to push old keys out of LRU queues, even though there
> should still be plenty of RAM to go around. Does someone have an idea
> why this is so?
>
> Cheers,
> Ivan
>
>


More information about the memcached mailing list