Categories




PreviousNext
Why are items limited to 1 megabyte in size in Memcache?    
 Send mail Views:272
Belongs to : PHP
Facebook Bookmarkbookmark this pageStumbleupon Bookmark 

Memcached's memory storage engine, uses a slabs approach to memory management. Memory is broken up into slabs chunks of varying sizes, starting at a minimum number and ascending by a factorial up to the largest possible value.

Say the minimum value is 400 bytes, and the maximum value is 1 megabyte, and the factorial is 1.20:

slab 1 - 400 bytes slab 2 - 480 bytes slab 3 - 576 bytes ... etc.

The larger the slab, the more of a gap there is between it and the previous slab. So the larger the maximum value the less efficient the memory storage is. Memcached also has to pre-allocate some memory for every slab that exists, so setting a smaller factorial with a larger max value will require even more overhead.

funny pictures and videos
funny pictures and videos
online games
embed code


By - Rekha, On - 2010-04-24
Send This
PreviousNext

User Comments


Add NEW Feedback:

Name :     Email :

Website Monitoring Web hosting by Hiox India Contact Us   Privacy Policy   Terms and Conditions