Add function slabs_reclaim() to reclaim free slabs positively
henrylu21 at gmail.com
Wed Sep 6 02:46:11 UTC 2006
I think the following is the detail :)
'In general, if your system starts producing a different pattern of common
object sizes, the memcached servers will become less efficient, unless
you restart them. Slabs reassignment, which is the next feature being
worked on, will ensure the server's ability to reclaim a slab (1Mb of
memory) from one size class and put it into another class size, where
it's needed more.'
For example, when you insert blocks of 8k into memcached,
and make it full, after a while, a large number of items of 8k expired,
and some slabs in 8k clsid got free.
At that time, I am trying to insert a block of 16k, it fails with 'out of
Actually the free slabs contain items of 8k cannot be moved from 8k clsid to
So I make a 'global_free_slab_list' to contain all free slabs by runing
'slabs_reclaim()' every 5 seconds.
On 9/6/06, Brad Fitzpatrick <brad at danga.com> wrote:
> Major patches for 1.1.x aren't being accepted, as that's the stable
> branch. Also, I've never had any problems with what you describe --- I'd
> need more details on how it fails for you before I'd consider any fix.
> - Brad
> On Wed, 6 Sep 2006, Henry Lu wrote:
> > Hi guys:
> > Slab class reassignment is a big problem for memcached of the latest
> > version(1.1.12).
> > After working around memcached for weeks, I made a function called
> > 'slabs_reclaim()' to reclaim free slabs positively.
> > A free slab meants all items in it are expired.
> > Then I add 'slabs_reclaim()' to function 'delete_handler()' before
> > so it can be called every 5 seconds.
> > Pls check the attachment for 'slabs.c' which I modified.
> > Thanks,
> > Henry
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the memcached