<div>Hi Brad:</div>
<div>&nbsp;</div>
<div>I think the following is the detail :)</div>
<div>&nbsp;</div>
<div>/memcached-1.1.12/doc/memory_management.txt</div>
<div>&nbsp;</div>
<div>'In general,<font style="BACKGROUND-COLOR: #ffff66"> if your system starts producing a different pattern of common <br>object sizes, the memcached servers will become less efficient</font>, unless <br>you restart them. Slabs reassignment, which is the next feature being 
<br>worked on, will ensure the server's ability to reclaim a slab (1Mb of <br>memory) from one size&nbsp; class and put it into another class size, where <br>it's needed more.'<br>&nbsp;</div>
<div>For example, when you insert blocks of 8k into memcached,<br>and make it full, after a while, a large number of items of 8k expired,<br>and some slabs in 8k clsid got free.<br>At that time, I am trying to insert a block of 16k, it fails with 'out of
<br>memory'.<br>Actually the free slabs contain items of 8k cannot be moved from 8k clsid to<br>16 clsid.<br><br>So I make a 'global_free_slab_list' to contain all free slabs by runing<br>'slabs_reclaim()' every 5 seconds.
<br>&nbsp;</div>
<div>Thanks,</div>
<div>Henry<br>&nbsp;</div>
<div><span class="gmail_quote">On 9/6/06, <b class="gmail_sendername">Brad Fitzpatrick</b> &lt;<a href="mailto:brad@danga.com">brad@danga.com</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Henry,<br><br>Major patches for 1.1.x aren't being accepted, as that's the stable<br>branch.&nbsp;&nbsp;Also, I've never had any problems with what you describe --- I'd
<br>need more details on how it fails for you before I'd consider any fix.<br><br>- Brad<br><br><br>On Wed, 6 Sep 2006, Henry Lu wrote:<br><br>&gt; Hi guys:<br>&gt;<br>&gt; Slab class reassignment is a big problem for memcached of the latest
<br>&gt; version(1.1.12).<br>&gt; After working around memcached for weeks, I made a function called<br>&gt; 'slabs_reclaim()' to reclaim free slabs positively.<br>&gt; A free slab meants all items in it are expired.<br>&gt; Then I add 'slabs_reclaim()' to function 'delete_handler()' before return,
<br>&gt; so it can be called every 5 seconds.<br>&gt;<br>&gt; Pls check the attachment for 'slabs.c' which I modified.<br>&gt;<br>&gt; Thanks,<br>&gt; Henry<br>&gt;<br></blockquote></div><br>