Slab Allocator question

2011-08-24 Thread Oktaka Com
Hi all, I am currently fiddling with the slab allocator and one thing messes my understanding of the concept. Think about the following scenario: 1) start memcached with ./memcached -m 1 (with 1 Mb of memory limit) 2) set mykey 0 0 11 --> allocates a 1 Mb slab and a chunk is returned for about th

Re: Slab Allocator question

2011-08-24 Thread dormando
> I am currently fiddling with the slab allocator and one thing messes > my understanding of the concept. Think about the following scenario: > > 1) start memcached with ./memcached -m 1 (with 1 Mb of memory limit) > 2) set mykey 0 0 11 --> allocates a 1 Mb slab and a chunk is returned > for about

Re: Slab Allocator question

2011-08-24 Thread Sumer Cip
I see. Just to clarify what I understand from Trond's proposal: - If given mem limit satisfies each slab class then preallocate everything(all slabs, chunks...etc..). - If given mem limit does not satisfy all slab classes then fallback to system malloc. Is this correct? Thanks, On Aug 25, 1:17 

Re: Slab Allocator question

2011-08-25 Thread dormando
> - If given mem limit satisfies each slab class then preallocate > everything(all slabs, chunks...etc..). > - If given mem limit does not satisfy all slab classes then fallback > to system malloc. > > Is this correct? sorta. I wouldn't try to understand the proposals too hard as we may end up wit

回复: Slab Allocator question

2011-08-24 Thread 然 安
I think there is a  restriction of the smallest value of  the -m option. --- 11年8月25日,周四, Oktaka Com 写道: 发件人: Oktaka Com 主题: Slab Allocator question 收件人: "memcached" 日期: 2011年8月25日,周四,上午2:12 Hi all, I am currently fiddling with the slab allocator and one thing messes my unders