Skip to content

Commit

Permalink
Update stat documentation to reflect allocation strategy.
Browse files Browse the repository at this point in the history
The documentation stated that memory allocation was always in chunks
of 1MB.  In practice, this gets less effecient as you get into larger
slabs.

The 1MB thing (which can be controlled by -I) is both the maximum size
and allocation unit so a single allocate event will attempt to get as
many items for a particular slab as it can as long as the allocation
itself doesn't exceed the maximum item size.
  • Loading branch information
dustin committed Nov 2, 2009
1 parent 655a3a8 commit 9b8ef80
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions doc/protocol.txt
Original file line number Diff line number Diff line change
Expand Up @@ -542,8 +542,8 @@ END\r\n
| chunk_size | The amount of space each chunk uses. One item will use |
| | one chunk of the appropriate size. |
| chunks_per_page | How many chunks exist within one page. A page by |
| | default is one megabyte in size. Slabs are allocated per |
| | page, then broken into chunks. |
| | default is less than or equal to one megabyte in size. |
| | Slabs are allocated by page, then broken into chunks. |
| total_pages | Total number of pages allocated to the slab class. |
| total_chunks | Total number of chunks allocated to the slab class. |
| get_hits | Total number of get requests serviced by this class. |
Expand All @@ -565,9 +565,9 @@ END\r\n

* Items are stored in a slab that is the same size or larger than the
item. mem_requested shows the size of all items within a
slab. (total_pages * 1MB) - mem_requested shows memory wasted in a
slab class. If you see a lot of waste, consider tuning the slab
factor.
slab. (total_chunks * chunk_size) - mem_requested shows memory
wasted in a slab class. If you see a lot of waste, consider tuning
the slab factor.

Other commands
--------------
Expand Down

0 comments on commit 9b8ef80

Please sign in to comment.