<div>Hi Brad:</div>
<div> </div>
<div>I think the following is the detail :)</div>
<div> </div>
<div>/memcached-1.1.12/doc/memory_management.txt</div>
<div> </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 class and put it into another class size, where <br>it's needed more.'<br> </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> </div>
<div>Thanks,</div>
<div>Henry<br> </div>
<div><span class="gmail_quote">On 9/6/06, <b class="gmail_sendername">Brad Fitzpatrick</b> <<a href="mailto:brad@danga.com">brad@danga.com</a>> 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. 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>> Hi guys:<br>><br>> Slab class reassignment is a big problem for memcached of the latest
<br>> version(1.1.12).<br>> After working around memcached for weeks, I made a function called<br>> 'slabs_reclaim()' to reclaim free slabs positively.<br>> A free slab meants all items in it are expired.<br>> Then I add 'slabs_reclaim()' to function 'delete_handler()' before return,
<br>> so it can be called every 5 seconds.<br>><br>> Pls check the attachment for 'slabs.c' which I modified.<br>><br>> Thanks,<br>> Henry<br>><br></blockquote></div><br>