1.2.x svn372 and object size

Steven Grimm sgrimm at facebook.com
Tue Sep 5 16:53:13 UTC 2006


Mathias Herberts wrote:
> Hi,
>
> the definition of POWER_LARGEST in slabs.c is set to 200, shouldn't 
> this be 20?

No, because you can now specify mantissas other than 2 (the default is 
1.25). If you specify "-f 1.05" you will get quite a few slab classes! 
That is simply the maximum possible value now. The actual largest power 
in use is now held in the "power_largest" variable in slabs.c. (If you 
say "Well, change POWER_LARGEST to some other name, then!" I guess I 
wouldn't disagree.)

> When changing the max block size, items_stats_sizes in items.c should
> be fixed so num_buckets depends on POWER_LARGEST (and for that we need
> to move the define for POWER_LARGEST into memcached.h).

Agreed, that really ought to be dynamic, but it should be based on 
slabs.c:power_largest (maybe make that global, or add a getter function 
for it.)

-Steve


More information about the memcached mailing list