first time user with out of memory question
Stephen Woodbridge
woodbri at swoodbridge.com
Sun Jun 11 18:46:33 UTC 2006
timeless wrote:
> Ivan Krstic wrote:
>> Janning Vygen wrote:
>>
>>> and stats slab produced "out of memory" message, too. At this time it was
>>> impossible for many users to login to our web application.
>>>
>> If memcached failure means your users can't log in, then you're using it
>> incorrectly.
>>
> Janning is using the PHP Memcached session store. This is a fairly
> common way to use Memcached. It does have the side effect that if a
> session can't be created, the user can't log in.
>
> I'm not convinced it's being used incorrectly. If a set() fails
> regularly on out-of-memory in *ANY* usage, nasty things will occur.
>>> but i am concerned about it. As i have 3,5 GB dedicated to memached (-m 3584)
>>> it should not run out of memory.
>>>
>> I recommend compiling a new binary from the Facebook branch; it contains
>> a bunch of patches that generally make memcached saner.
>>
> Apparently the Facebook patches include a fix to this very type of
> problem, where even though you have more memory available to allocate,
> you can't allocate any slabs of the size you need, and so get the "out
> of memory" errors. Here we quote Steven Grimm:
>
> "I changed slabs.c so that it never gets those out-of-memory errors
> (at the cost of exceeding the maximum memory setting if you fill up
> your cache before you've allocated a slab of a particular class). "
When I was running my stress test, we gave memcached 1 GB of memory and
it grew to 1.5 GB and then started throwing a lot of out of memory
errors. I have not idea how the internals of this work, but based on
some reading of the archives, I think this might be a symptom of memory
fragmentation. But hey, I know not!
-Steve
More information about the memcached
mailing list