Memory capacity overflow of memcached
Hi, My team try to use memcached to provide PHP caching recently but we find out there is a memory overflow problem. Here is the steps we have tested. (1)Create memcached with the max. memory is 4MB . (2)Add 900KB data from web to memcached 3 times. (3)Add 700KB data from web to memcached. (4)Add 500KB data from web to memcached. (5)Add 300KB data from web to memcached. (6)The new data still can transfer to memcached when new data size is greater than memcached remaining space size. We use "stats" to check "bytes" and it shows the memory size is over 4MB. Could you help to clarify what is going on? Thank you. Regards, Yashushi
Re: Memory capacity overflow of memcached
> Hi, > > My team try to use memcached to provide PHP caching recently but we > find out there is a memory overflow problem. > > Here is the steps we have tested. > (1)Create memcached with the max. memory is 4MB . > (2)Add 900KB data from web to memcached 3 times. > (3)Add 700KB data from web to memcached. > (4)Add 500KB data from web to memcached. > (5)Add 300KB data from web to memcached. > (6)The new data still can transfer to memcached when new data size is > greater than memcached remaining space size. > > We use "stats" to check "bytes" and it shows the memory size is over > 4MB. > Could you help to clarify what is going on? > Thank you. The lowest the memory limit can go is about 48M. It ignores anything lower. -Dormando
Re: Memory capacity overflow of memcached
Hi Dormando, We have tried the setting with 48MB and 64MB, but the same problem still comes out. Please kindly help to clarify. Thank you. -Yashushi On 10月18日, 下午4時50分, dormando wrote: > > Hi, > > > My team try to use memcached to provide PHP caching recently but we > > find out there is a memoryoverflowproblem. > > > Here is the steps we have tested. > > (1)Create memcached with the max. memory is 4MB . > > (2)Add 900KB data from web to memcached 3 times. > > (3)Add 700KB data from web to memcached. > > (4)Add 500KB data from web to memcached. > > (5)Add 300KB data from web to memcached. > > (6)The new data still can transfer to memcached when new data size is > > greater than memcached remaining space size. > > > We use "stats" to check "bytes" and it shows the memory size is over > > 4MB. > > Could you help to clarify what is going on? > > Thank you. > > The lowest the memory limit can go is about 48M. It ignores anything > lower. > > -Dormando
Re: Memory capacity overflow of memcached
Uhh, try 128MB? or higher? Are you adjusting the slab factor size? The minimum amount of memory memcached uses is 1MB * the number of slab classes + some misc stuff (the hash table, buffers, etc). 48M should be enough tho... Just in case; if you're asking if you set the memory limit to 128M, and you store 256M of data, what happens? That should work, and you should see 'evictions' increasing in the 'stats' output. As it'll eject the oldest data to make room for newer data. You can start it with -M I think if you want to have it get pissed off once it's full. On Wed, 20 Oct 2010, yashushi wrote: > Hi Dormando, > > We have tried the setting with 48MB and 64MB, but the same problem > still comes out. > Please kindly help to clarify. > Thank you. > > -Yashushi > > > On 10月18日, 下午4時50分, dormando wrote: > > > Hi, > > > > > My team try to use memcached to provide PHP caching recently but we > > > find out there is a memoryoverflowproblem. > > > > > Here is the steps we have tested. > > > (1)Create memcached with the max. memory is 4MB . > > > (2)Add 900KB data from web to memcached 3 times. > > > (3)Add 700KB data from web to memcached. > > > (4)Add 500KB data from web to memcached. > > > (5)Add 300KB data from web to memcached. > > > (6)The new data still can transfer to memcached when new data size is > > > greater than memcached remaining space size. > > > > > We use "stats" to check "bytes" and it shows the memory size is over > > > 4MB. > > > Could you help to clarify what is going on? > > > Thank you. > > > > The lowest the memory limit can go is about 48M. It ignores anything > > lower. > > > > -Dormando >