what is the difference between slab, page and chunk in memcached? If we set -m 128, then how many slab, page, chunk we have? What is the benefit of slab?
Tell me more
×
Server Fault is a question and answer site for
professional system and network administrators. It's 100% free, no registration required.
|
|
|||
|
|
|
This page provides good explanation of memcached terms. The basic relation among them is this: a slab has many pages which has many chunks. Here, I am quoting the following paragraph: When you ask memcached to store a value, it looks up the “slab” associated with that value. A slab holds values within a particular size range. Slabs are composed of 1MB pages, which are broken into chunks of the slab’s size. Let’s say your value is 1001 bytes; memcached will look up the slab which holds values between 1000 and 2000 bytes. It then finds a page with an empty chunk and inserts the value into that chunk. Note that a chunk is fixed in size – it must be 2000 bytes in order to store the largest value for the slab. |
|||
|
|