<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -116,7 +116,7 @@ void slabs_init(const size_t limit, const double factor, const bool prealloc) {
 
     memset(slabclass, 0, sizeof(slabclass));
 
-    while (++i &lt; POWER_LARGEST &amp;&amp; size &lt;= settings.item_size_max / 2) {
+    while (++i &lt; POWER_LARGEST &amp;&amp; size &lt;= settings.item_size_max / factor) {
         /* Make sure items are always n-byte aligned */
         if (size % CHUNK_ALIGN_BYTES)
             size += CHUNK_ALIGN_BYTES - (size % CHUNK_ALIGN_BYTES);</diff>
      <filename>slabs.c</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>95c8220d6900d95a84ee4033ac4ff75265fe7979</id>
    </parent>
  </parents>
  <author>
    <name>Colin Pitrat</name>
    <email>colin.pitrat@amadeus.com</email>
  </author>
  <url>http://github.com/trondn/memcached/commit/780a257b007e34423f0e87f40d45133fdd7e7e1f</url>
  <id>780a257b007e34423f0e87f40d45133fdd7e7e1f</id>
  <committed-date>2009-10-30T16:18:53-07:00</committed-date>
  <authored-date>2009-10-29T18:39:42-07:00</authored-date>
  <message>Use slab class growth factor for slab size limit

Re Colin:
&quot;When using a growth factor smaller than 2.0, the normal growth stops once
the chunk size reach half the page size (1 MB by default).&quot;

This adds two more slab classes by default, but makes memcached a little
more efficient for larger values. This will create a *lot* more slabs if
you are increasing the page limit via -I

However, if you're lowering the memory limit, this helps keep things
efficient.
-Dormando</message>
  <tree>e1c783df2f1b284f976b89c79b7bb6ade7efa8b7</tree>
  <committer>
    <name>Dustin Sallings</name>
    <email>dustin@spy.net</email>
  </committer>
</commit>
