first time user with out of memory question

Nikolas Coukouma atrus at atrus.org
Mon Jun 12 20:00:05 UTC 2006


Paul T wrote:
> --- Ivan Krstic <krstic at fas.harvard.edu> wrote:
>
>> Paul T wrote:
>>>  You're right. What is implemented in memcached
>> should
>>> be called "Lazy Garbage Collection".
>> No, it shouldn't. Memcached doesn't do GC. It does
>> LRU ejection.
>
>  Unfortunately, as per google, such a thing exists
> only in your head :
>
> http://www.google.com/search?hl=en&lr=&q=%22LRU+ejection%22&btnG=Search
LRU is "Least Recently Used" and it's a basic algorithm. I'll grant that
the verb used is usually "eviction", not "ejection"

http://en.wikipedia.org/wiki/Least_recently_used
http://en.wikipedia.org/wiki/Page_replacement_algorithms#Least_Recently_Used

>>> Unfortunately, memcached is an asynchronous
>>> application (based on libevent).
>> How is this unfortunate?
>
>  For example, because one can not apply automated
> tools, such as valgrind, to debug such an application.
I can see how it's more difficult, but certainly not impossible. I just
ran it under valgrind massif and memcheck. The only problematic thing
was the maximum number of connections, which I had to drop. Is there
something I'm missing?

Valgrind memcheck did produce some interesting results on
memcached-1.1.13-pre:

==12723== Conditional jump or move depends on uninitialised value(s)
==12723==    at 0x804BA8E: drive_machine (memcached.c:1228)
==12723==    by 0x4052740: event_base_loop (event.c:256)
==12723==    by 0x40529F8: event_loop (event.c:305)
==12723==    by 0x804CF9D: main (memcached.c:1740)
==12723==
==12723== Conditional jump or move depends on uninitialised value(s)
==12723==    at 0x804BF84: drive_machine (memcached.c:1206)
==12723==    by 0x4052740: event_base_loop (event.c:256)
==12723==    by 0x40529F8: event_loop (event.c:305)
==12723==    by 0x804CF9D: main (memcached.c:1740)
==12723==
==12723== Conditional jump or move depends on uninitialised value(s)
==12723==    at 0x804BF0D: drive_machine (memcached.c:1248)
==12723==    by 0x4052740: event_base_loop (event.c:256)
==12723==    by 0x40529F8: event_loop (event.c:305)
==12723==    by 0x804CF9D: main (memcached.c:1740)

Cheers,
-Nikolas



More information about the memcached mailing list