Jdesk / memcached

Automatically exported from code.google.com/p/memcached
0 stars 0 forks source link

Incorrect used_chunks in stats slabs #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
From colin.pitrat@gmail.com         

Still playing with slabs allocation, I found another strange result.
Storing only one small value in memcached, I end up with this output
for stats slabs:

STAT 1:chunk_size 104
STAT 1:chunks_per_page 10082
STAT 1:total_pages 1
STAT 1:total_chunks 10082
STAT 1:used_chunks 10082
STAT 1:free_chunks 0
STAT 1:free_chunks_end 10081
STAT active_slabs 1
STAT total_malloced 1048528

It is strange that whereas I store only one value, used_chunks report
10082. However, after deleting the value, free_chunks increase to 1,
and used_chunks decrease to 10081. Why are chunks in free_chunks_end
also considered as used_chunks ?

Original issue reported on code.google.com by dsalli...@gmail.com on 17 Mar 2009 at 9:49

GoogleCodeExporter commented 9 years ago
I've got some code for this up here.  Please review -- particularly the test.  
Is it
comprehensive enough?

http://github.com/dustin/memcached/tree/issue_29

Original comment by dsalli...@gmail.com on 17 Mar 2009 at 10:10

GoogleCodeExporter commented 9 years ago

Original comment by dsalli...@gmail.com on 18 Mar 2009 at 7:17

GoogleCodeExporter commented 9 years ago
I went ahead and did this since I got no feedback and it seems to make more 
sense.

Original comment by dsalli...@gmail.com on 24 Mar 2009 at 4:42

GoogleCodeExporter commented 9 years ago
http://github.com/dustin/memcached/commit/2b40d72c04e523d44d46d44e62d416bcf9216c
8e

Original comment by dsalli...@gmail.com on 24 Mar 2009 at 4:44