Show
Ignore:
Timestamp:
03/07/08 08:12:47 (21 months ago)
Author:
dsallings
Message:

Merge commit 'trunk' into lbinary as of r750

Conflicts:

server/memcached.c

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/binary/server/doc/protocol.txt

    r722 r751  
    410410 
    411411 
     412Item statistics 
     413--------------- 
     414CAVEAT: This section describes statistics which are subject to change in the 
     415future. 
     416 
     417The "stats" command with the argument of "items" returns information about 
     418item storage per slab class. The data is returned in the format: 
     419 
     420STAT items:<slabclass>:<stat> <value>\r\n 
     421 
     422The server terminates this list with the line 
     423 
     424END\r\n 
     425 
     426The slabclass aligns with class ids used by the "stats slabs" command. Where 
     427"stats slabs" describes size and memory usage, "stats items" shows higher 
     428level information. 
     429 
     430The following item values are defined as of writing. 
     431 
     432Name                   Meaning 
     433------------------------------ 
     434number                 Number of items presently stored in this class. Expired 
     435                       items are not automatically excluded. 
     436age                    Age of the oldest item in the LRU. 
     437evicted                Number of times an item had to be evicted from the LRU 
     438                       before it expired. 
     439outofmemory            Number of times the underlying slab class was unable to 
     440                       store a new item. This means you are running with -M or 
     441                       an eviction failed. 
     442 
     443Note this will only display information about slabs which exist, so an empty 
     444cache will return an empty set. 
     445 
     446 
     447Item size statistics 
     448-------------------- 
     449CAVEAT: This section describes statistics which are subject to change in the 
     450future. 
     451 
     452The "stats" command with the argument of "sizes" returns information about the 
     453general size and count of all items stored in the cache. 
     454WARNING: This command WILL lock up your cache! It iterates over *every item* 
     455and examines the size. While the operation is fast, if you have many items  
     456you could prevent memcached from serving requests for several seconds. 
     457 
     458The data is returned in the following format: 
     459 
     460<size> <count>\r\n 
     461 
     462The server terminates this list with the line 
     463 
     464END\r\n 
     465 
     466'size' is an approximate size of the item, within 32 bytes. 
     467'count' is the amount of items that exist within that 32-byte range. 
     468 
     469This is essentially a display of all of your items if there was a slab class 
     470for every 32 bytes. You can use this to determine if adjusting the slab growth 
     471factor would save memory overhead. For example: generating more classes in the  
     472lower range could allow items to fit more snugly into their slab classes, if 
     473most of your items are less than 200 bytes in size. 
     474 
     475 
     476Slab statistics 
     477--------------- 
     478CAVEAT: This section describes statistics which are subject to change in the 
     479future. 
     480 
     481The "stats" command with the argument of "slabs" returns information about 
     482each of the slabs created by memcached during runtime. This includes per-slab 
     483information along with some totals. The data is returned in the format: 
     484 
     485STAT <slabclass>:<stat> <value>\r\n 
     486STAT <stat> <value>\r\n 
     487 
     488The server terminates this list with the line 
     489 
     490END\r\n 
     491 
     492Name                   Meaning 
     493------------------------------ 
     494chunk_size             The amount of space each chunk uses. One item will use 
     495                       one chunk of the appropriate size. 
     496chunks_per_page        How many chunks exist within one page. A page by 
     497                       default is one megabyte in size. Slabs are allocated per  
     498                       page, then broken into chunks. 
     499total_pages            Total number of pages allocated to the slab class. 
     500total_chunks           Total number of chunks allocated to the slab class. 
     501used_chunks            How many chunks have been allocated to items. 
     502free_chunks            Chunks not yet allocated to items, or freed via delete. 
     503free_chunks_end        Number of free chunks at the end of the last allocated 
     504                       page. 
     505active_slabs           Total number of slab classes allocated. 
     506total_malloced         Total amount of memory allocated to slab pages. 
     507 
    412508 
    413509Other commands