Memcached Statistics Slabs Test
Applications that run for long periods of time, like Memcached caching system, run into memory fragmentation issues the longer the service runs. On top of that caching applications have the added issue that there are pieces of memory that have been cached for long periods of time as well as newer pieces of memory that were recently allocated.
Memcached caching system has a "slab" allocator that attempts to reduce memory fragmentation in the Memcached process. At a high level a slab is a 1MB piece of memory that contains the values of the key-value pairs you store in Memcached caching system. There are also different slabs for different value sizes. There might be a slab for 16B values, a a slab for 32B values, a slab for 1024B values, etc. When a new key-value pair is added Memcached caching system puts the value in the smallest slab that will hold the value. By allocating memory like this Memcached caching systemis able to reduce memory fragmentation and as a result reduce the overall amount of memory used by Memcached caching system.
For Memcached caching system to work efficiently, the Slabs and Slab allocator have to work efficiently, which is why it is important to collect the slab statistics, so that administrators can identify any issues and fix them before it affects slab performance.
This test monitors every Slab statistics and collects key metrics like number of get hits, command sets etc. These metrics help administrators understand the current performance of the system and alerts when it requires intervention to fix the problems.
Target of the test : Memcached caching system
Agent deploying the test : An internal/remote agent
Outputs of the test : One set of results for Memcached caching system
Parameter | Description |
---|---|
Test period |
How often should the test be executed. |
Host |
The IP address of the target server that is being monitored. |
Port |
The port number through which the Memcached communicates. |
Measurement | Description | Measurement Unit | Interpretation |
---|---|---|---|
Command set |
Indicates the average number of set commands received by slab class in Cache in a second. |
Sets/sec |
Initially the high number of set commands will be good as the cache prepares the data but later on the number should come down. |
Get hits |
Indicates the number of times in a second the data reads from this slab class were successful. |
Hits/sec |
A high number of get hits is a good sign of high performance of the cache. |
Delete hits |
Indicates the average number of delete requests received in the slab class which were successful. |
Hits/sec |
A high number of hits is a good sign of high performance of the cache. |
Increase hits |
Indicates the number of requests to increase the slab size in a second. |
Hits/sec |
If the number of hist are increasing that means the data in cache is being used at a high rate. |
Decrease hits |
Indicates the number of requests to decrease the slab size in a second. |
Hits/sec |
If the number of hits is decreasing, that means the cache is no longer having data needed for UI application. Administrators may need to investigate if cache needs to refresh. |
Compare and Swap misses |
Indicates the number of times in a second the compare and swap operations received by this slab failed. |
Misses/sec |
A high number of cache miss is not a good sign and it means cache is not able to serve its purpose. |
Compare and Swap bad value |
Indicates the number of times in a second the compare and swap operations received in this slab but had a bad value. |
Hits/Sec |
|
Used chunks |
Indicates the total number of chunks used in Memcached caching system instance. |
Number |
A high number of used chucks might mean not enough chunks will be available for new cache entries. |
Chunk size |
Indicates the size of each of the chunk in current Memcached caching system instance. |
MB |
chunk size should be optimal to allow most of the items to be stored without wasting. too much space on each chunk |
Chunks per page |
Indicates the number of chunks per page in current Memcached caching system instance. |
Number |
Number of chunks per page should be restricted to a value which allows for efficient use of memory resources. |
Total pages |
Indicates the total number of memory pages in current Memcached caching system instance. |
Number |
Total number of memory pages should be high enough to allow for good cache experience but should avoid the overhead of page switch. |
Total chunks |
Indicates the total number of chunks in current Memcached caching system instance. |
Number |
|
Free chunks end |
Indicates the number of free chunks in the last allocated page in current Memcached caching system instance. |
Number |
|
Active slabs |
Indicates the total number of active allocated slabs Indicates the total number of memory pages in current Memcached caching system instance. |
Number |
|
Total memory allocated |
Indicates the total allocated memory Indicates the total number of memory pages in current Memcached caching system instance. |
MB |
|