Getting
memcached
Statistics
1385
A large number of
get_misses
may just be an indication that the cache is still being populated
with information. The number should, over time, decrease in comparison to the number of cache
get_hits
. If, however, you have a large number of cache misses compared to cache hits after an
extended period of execution, it may be an indication that the size of the cache is too small and you
either need to increase the total memory size, or increase the number of the
memcached
instances to
improve the hit ratio.
A large number of
evictions
from the cache, particularly in comparison to the number of items stored
is a sign that your cache is too small to hold the amount of information that you regularly want to keep
cached. Instead of items being retained in the cache, items are being evicted to make way for new
items keeping the turnover of items in the cache high, reducing the efficiency of the cache.
15.6.4.2.
memcached
Slabs Statistics
To get the
slabs
statistics, use the
stats slabs
command, or the API equivalent.
The slab statistics provide you with information about the slabs that have created and allocated for
storing information within the cache. You get information both on each individual slab-class and total
statistics for the whole slab.
STAT 1:chunk_size 104
STAT 1:chunks_per_page 10082
STAT 1:total_pages 1
STAT 1:total_chunks 10082
STAT 1:used_chunks 10081
STAT 1:free_chunks 1
STAT 1:free_chunks_end 10079
STAT 9:chunk_size 696
STAT 9:chunks_per_page 1506
STAT 9:total_pages 63
STAT 9:total_chunks 94878
STAT 9:used_chunks 94878
STAT 9:free_chunks 0
STAT 9:free_chunks_end 0
STAT active_slabs 2
STAT total_malloced 67083616
END
Individual stats for each slab class are prefixed with the slab ID. A unique ID is given to each allocated
slab from the smallest size up to the largest. The prefix number indicates the slab class number in
relation to the calculated chunk from the specified growth factor. Hence in the example, 1 is the first
chunk size and 9 is the 9th chunk allocated size.
The parameters returned for each chunk size and a description of each parameter are provided in the
following table.
Statistic
Description
Version
chunk_size
Space allocated to each chunk within this slab class.
chunks_per_page
Number of chunks within a single page for this slab class.
total_pages
Number of pages allocated to this slab class.
total_chunks
Number of chunks allocated to the slab class.
used_chunks
Number of chunks allocated to an item..
free_chunks
Number of chunks not yet allocated to items.
free_chunks_end
Number of free chunks at the end of the last allocated page.
get_hits
Number of get hits to this chunk
1.3.x
cmd_set
Number of set commands on this chunk
1.3.x
delete_hits
Number of delete hits to this chunk
1.3.x
incr_hits
Number of increment hits to this chunk
1.3.x
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...