Blog, Development, Technology

Memcached – Pages/Chunks and Rebalancing

It’s important to know how Memcached organizes the available memory and how Objects are saved to understand “strange” effects.

Memcached has Pages that have a size of 1Mb (in newer version you can configure them from 1Mb to 128Mb), these Pages are divided in Chunks. The size of the Chunks is created dynamically after start, depending on the size of the Objects you are saving. Memcached tries to save a Object in a Chunk were the basted space is minimal (An 49Kb Object will be saved in an 50Kb Chunk)

Continue reading