Stackstate-Memcached Integration

Overview

Connect Memcached to Stackstate in order to:

  • Visualize its performance
  • Correlate the performance of Memcached with the rest of your applications

For more details about configuring this integration refer to the following file(s) on GitHub:

Configuration

  1. Configure the Agent to connect to the Memcached server. Edit conf.d/mcache.yaml:

    init_config:
    
    instances:
      - url: localhost  # url used to connect to the memcached instance
      #   socket: /socket/path # if url missing; 'sts-agent' user must have read/write permission
      #   port: 11211 # If this line is not present, port will default to 11211
        tags:
          - optional_tag
    
        options:
          items: false  # set to true if you wish to collect items memcached stats.
          slabs: false  # set to true if you wish to collect slabs memcached stats.
    
  2. Restart the Agent

Validation

Execute the info command and verify that the integration check has passed. The output of the command should contain a section similar to the following:

Checks
======

  [...]

  mcache
  ------
    - instance #0 [OK]
    - Collected 8 metrics & 0 events

Metrics

To learn more details about the different metrics, go to this blog entry.

memcache.avg_item_size
(gauge)
The average size of an item.
shown as byte
memcache.bytes
(gauge)
Current number of bytes used by this server to store items.
shown as byte
memcache.bytes_read_rate
(gauge)
Rate of bytes read from the network by this server.
shown as byte/second
memcache.bytes_written_rate
(gauge)
Rate of bytes written to the network by this server.
shown as byte/second
memcache.cas_badval_rate
(gauge)
Rate at which keys are compared and swapped where the comparison (original) value did not match the supplied value.
shown as key/second
memcache.cas_hits_rate
(gauge)
Rate at which keys are compared and swapped and found present.
shown as hit/second
memcache.cas_misses_rate
(gauge)
Rate at which keys are compared and swapped and not found present.
shown as miss/second
memcache.cmd_flush_rate
(gauge)
Rate of "flush_all" commands.
shown as command/second
memcache.cmd_get_rate
(gauge)
Rate of "get" commands.
shown as command/second
memcache.cmd_set_rate
(gauge)
Rate of "set" commands.
shown as command/second
memcache.connection_structures
(gauge)
Number of connection structures allocated by the server.
memcache.curr_connections
(gauge)
Number of open connections to this server.
shown as connection
memcache.curr_items
(gauge)
Current number of items stored by the server.
shown as item
memcache.delete_hits_rate
(gauge)
Rate at which delete commands result in items being removed.
shown as hit/second
memcache.delete_misses_rate
(gauge)
Rate at which delete commands result in no items being removed.
shown as miss/second
memcache.evictions_rate
(gauge)
Rate at which valid items are removed from cache to free memory for new items.
shown as eviction/second
memcache.fill_percent
(gauge)
Amount of memory being used by the server for storing items as a percentage of the max allowed.
shown as percent
memcache.get_hit_percent
(gauge)
Percentage of requested keys that are found present.
shown as percent
memcache.get_hits_rate
(gauge)
Rate at which keys are requested and found present.
shown as hit/second
memcache.get_misses_rate
(gauge)
Rate at which keys are requested and not found.
shown as miss/second
memcache.limit_maxbytes
(gauge)
Number of bytes this server is allowed to use for storage.
shown as byte
memcache.listen_disabled_num_rate
(gauge)
Rate at which the server has reached the max connection limit.
shown as event/second
memcache.pointer_size
(gauge)
Default size of pointers on the host OS (generally 32 or 64)
shown as bit
memcache.rusage_system_rate
(gauge)
Fraction of user time the CPU spent executing this server process.
shown as fraction
memcache.rusage_user_rate
(gauge)
Fraction of time the CPU spent executing kernel code on behalf of this server process.
shown as fraction
memcache.threads
(gauge)
Number of threads used by the current Memcached server process.
shown as thread
memcache.total_connections_rate
(gauge)
Rate at which connections to this server are opened.
shown as connection/second
memcache.total_items
(gauge)
Total number of items stored by this server since it started.
shown as item
memcache.uptime
(gauge)
Number of seconds this server has been running.
shown as second
memcache.items.evicted_rate
(gauge)
Rate st which items had to be evicted from the LRU before expiring
shown as eviction/second
memcache.items.evicted_nonzero_rate
(gauge)
Rate at which nonzero items which had an explicit expire time set had to be evicted from the LRU before expiring
shown as eviction/second
memcache.items.expired_unfetched_rate
(gauge)
Rate at which expired items reclaimed from the LRU which were never touched after being set
shown as eviction/second
memcache.items.evicted_unfetched_rate
(gauge)
Rate at which valid items evicted from the LRU which were never touched after being set
shown as eviction/second
memcache.items.outofmemory_rate
(gauge)
Rate at which the underlying slab class was unable to store a new item
shown as error/second
memcache.items.tailrepairs_rate
(gauge)
Rate at which memcache self-healed a slab with a refcount leak
shown as operation/second
memcache.items.moves_to_cold_rate
(gauge)
Rate at which items were moved from HOT or WARM into COLD
shown as item/second
memcache.items.moves_to_warm_rate
(gauge)
Rate at which items were moved from COLD to WARM
shown as item/second
memcache.items.moves_within_lru_rate
(gauge)
Rate at which active items were bumped within HOT or WARM
shown as item/second
memcache.items.reclaimed_rate
(gauge)
Rate at which entries were stored using memory from an expired entry
shown as operation/second
memcache.items.crawler_reclaimed_rate
(gauge)
Rate at which items freed by the LRU Crawler
shown as operation/second
memcache.items.lrutail_reflocked_rate
(gauge)
Rate at which items found to be refcount locked in the LRU tail
shown as item/second
memcache.items.direct_reclaims_rate
(gauge)
Rate at which worker threads had to directly pull LRU tails to find memory for a new item
shown as operation/second
memcache.items.number
(gauge)
Number of items presently stored in this slab class
shown as item
memcache.items.number_hot
(gauge)
Number of items presently stored in the HOT LRU
shown as item
memcache.items.number_warm
(gauge)
Number of items presently stored in the WARM LRU
shown as item
memcache.items.number_cold
(gauge)
Number of items presently stored in the COLD LRU
shown as item
memcache.items.number_noexp
(gauge)
Number of items presently stored in the NOEXP class
shown as item
memcache.items.age
(gauge)
Age of the oldest item in the LRU
shown as second
memcache.items.evicted_time
(gauge)
Seconds since the last access for the most recent item evicted from this class
shown as second
memcache.slabs.get_hits_rate
(gauge)
Rate at which get requests were serviced by this slab class
shown as hit/second
memcache.slabs.cmd_set_rate
(gauge)
Rate at which set requests stored data in this slab class
shown as command/second
memcache.slabs.delete_hits_rate
(gauge)
Rate at which delete commands succeeded in this slab class
shown as operation/second
memcache.slabs.incr_hits_rate
(gauge)
Rate at which incrs commands modified this slab class
shown as operation/second
memcache.slabs.decr_hits_rate
(gauge)
Rate at which decrs commands modified this slab class
shown as operation/second
memcache.slabs.cas_hits_rate
(gauge)
Rate at which CAS commands modified this slab class
shown as operation/second
memcache.slabs.cas_badval_rate
(gauge)
Rate at which CAS commands failed to modify a value due to a bad CAS id
shown as key/second
memcache.slabs.touch_hits_rate
(gauge)
Rate of touches serviced by this slab class
shown as operation/second
memcache.slabs.used_chunks_rate
(gauge)
Rate at which chunks have been allocated to items
shown as buffer/second
memcache.slabs.chunk_size
(gauge)
The amount of space each chunk uses
shown as byte
memcache.slabs.chunks_per_page
(gauge)
How many chunks exist within one page
shown as buffer
memcache.slabs.total_pages
(gauge)
Total number of pages allocated to the slab class
shown as page
memcache.slabs.total_chunks
(gauge)
Total number of chunks allocated to the slab class
shown as buffer
memcache.slabs.used_chunks
(gauge)
How many chunks have been allocated to items
shown as buffer
memcache.slabs.free_chunks
(gauge)
Chunks not yet allocated to items or freed via delete
shown as buffer
memcache.slabs.free_chunks_end
(gauge)
Number of free chunks at the end of the last allocated page
shown as buffer
memcache.slabs.mem_requested
(gauge)
Number of bytes requested to be stored in this slab
shown as byte
memcache.slabs.active_slabs
(gauge)
Total number of slab classes allocated
shown as occurrence
memcache.slabs.total_malloced
(gauge)
Total amount of memory allocated to slab pages
shown as byte