Spec-Zone .ru
спецификации, руководства, описания, API

15.6.4.1. memcached General Statistics

The output of the general statistics provides an overview of the performance and use of the memcached instance. The statistics returned by the command and their meaning is shown in the following table.

The following terms are used to define the value type for each statistics value:

Statistic Data type Description Version
pid 32u Process ID of the memcached instance.
uptime 32u Uptime (in seconds) for this memcached instance.
time 32u Current time (as epoch).
version string Version string of this instance.
pointer_size string Size of pointers for this host specified in bits (32 or 64).
rusage_user 32u:32u Total user time for this instance (seconds:microseconds).
rusage_system 32u:32u Total system time for this instance (seconds:microseconds).
curr_items 32u Current number of items stored by this instance.
total_items 32u Total number of items stored during the life of this instance.
bytes 64u Current number of bytes used by this server to store items.
curr_connections 32u Current number of open connections.
total_connections 32u Total number of connections opened since the server started running.
connection_structures 32u Number of connection structures allocated by the server.
cmd_get 64u Total number of retrieval requests (get operations).
cmd_set 64u Total number of storage requests (set operations).
get_hits 64u Number of keys that have been requested and found present.
get_misses 64u Number of items that have been requested and not found.
delete_hits 64u Number of keys that have been deleted and found present. 1.3.x
delete_misses 64u Number of items that have been delete and not found. 1.3.x
incr_hits 64u Number of keys that have been incremented and found present. 1.3.x
incr_misses 64u Number of items that have been incremented and not found. 1.3.x
decr_hits 64u Number of keys that have been decremented and found present. 1.3.x
decr_misses 64u Number of items that have been decremented and not found. 1.3.x
cas_hits 64u Number of keys that have been compared and swapped and found present. 1.3.x
cas_misses 64u Number of items that have been compared and swapped and not found. 1.3.x
cas_badvalue 64u Number of keys that have been compared and swapped, but the comparison (original) value did not match the supplied value. 1.3.x
evictions 64u Number of valid items removed from cache to free memory for new items.
bytes_read 64u Total number of bytes read by this server from network.
bytes_written 64u Total number of bytes sent by this server to network.
limit_maxbytes 32u Number of bytes this server is permitted to use for storage.
threads 32u Number of worker threads requested.
conn_yields 64u Number of yields for connections (related to the -Roption). 1.4.0

The most useful statistics from those given here are the number of cache hits, misses, and evictions.

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.