Memcached monitoring integration
Our Memcached integration collects and sends inventory and metrics from your Memcached instance. Once instrumented, you can use New Relic to aggregate and visualize key performance metrics at the instance and slab levels.
To get the most out of this page, select the installation method that fits your environment. You need a New Relic account before starting the installation process.
Sugerencia
Use guided install to quickly see your data in the UI
The guided install is a single CLI command you can run to monitor your Memcached instance. It's a good option for small organizations, or for anyone who wants to test out New Relic.
For a more permanent and scalable solution, we recommend the standard manual install of the agent: keep reading for how to do that.
Memcached instance settings
The Memcached integration collects both Metrics(M) and Inventory(I) information. Check the Applies To column to find which settings can be used for each collection:
Setting | Description | Default | Applies To |
---|---|---|---|
| Hostname of the memcached instance. |
| M/I |
| Port memcached is running on. |
| M/I |
| Memcached SASL username. Only required if authentication is enabled. | N/A | M/I |
| Memcached SASL password. Only required if authentication is enabled. | N/A | M/I |
| Set to |
| |
| Set to |
|
The values for these settings can be defined in several ways:
- Add the value directly in the config file.
- Replace the values from environment variables using the
{{}}
notation. This requires infrastructure agent version 1.14.0 or higher. Read more here or see example below. - Use secrets management to protect sensitive information, such as passwords, from being exposed in plain text in the configuration file. For more information, see how to use secrets management.
Metric data
The Memcached integration collects the following metric data attributes.
Memcached sample metrics
These attributes are attached to this MemcachedSample
event type:
Metric | Description |
---|---|
| The average size of an item. |
| Rate of bytes read from the network by this server. |
| Current number of bytes used by this server to store items. |
| Rate of bytes written to the network by this server. |
| Rate at which keys are compared and swapped and found present. |
| Rate at which keys are compared and swapped and not found present. |
| Rate at which keys are compared and swapped where the original value did not match the supplied value. |
| Rate of |
| Rate of |
| Rate of |
| Rate at which connections to this server are opened. |
| Number of connection structures allocated by the server. |
| Current number of items stored by the server. |
| Rate at which delete commands result in no items being removed. |
| Rate at which delete commands result in items being removed. |
| Rate at which valid items are removed from cache to free memory for new items. |
| Fraction of user time the CPU spent executing this server process. |
| Percentage of requested keys that are found present since the start of the memcache server. |
| Rate at which keys are requested and found present. |
| Rate at which keys are requested and not found. |
| Number of bytes this server is allowed to use for storage. |
| Number of open connections to this server. |
| Default size of pointers on the host OS (generally 32 or 64). |
| Rate at which the server has reached the max connection limit |
| Amount of memory being used by the server for storing items as a percentage of the max allowed. |
| Number of threads used by the current Memcached server process. |
| Total number of items stored by this server since it started. |
| Number of seconds this server has been running. |
| Fraction of time the CPU spent executing kernel code on behalf of this server process. |
Memcached slab sample metrics
These attributes are attached to the MemcachedSlabSample
event type:
Metric | Description |
---|---|
| Rate at which active items were bumped within |
| Total number of slab classes allocated. |
| Rate at which Check-And-Set (CAS) commands failed to modify a value due to a bad CAS ID. |
| Rate at which CAS commands modified this slab class. |
| The amount of space each chunk uses. |
| How many chunks exist within one page. |
| Rate at which set requests stored data in this slab class. |
| Rate at which decrs commands modified this slab class. |
| Rate at which delete commands succeeded in this slab class. |
| Rate at which entries were stored using memory from an expired entry. |
| Rate at which items had to be evicted from the Least Recently Used (LRU) before expiring. |
| Rate at which nonzero items which had an explicit expire time set had to be evicted from the LRU before expiring. |
| Rate at which expired items reclaimed from the LRU which were never touched after being set. |
| Number of free chunks at the end of the last allocated page. |
| Chunks not yet allocated to items or freed via delete. |
| Rate at which get requests were serviced by this slab class. |
| Rate at which incrs commands modified this slab class. |
| Number of items presently stored in the |
| Rate at which items were moved from |
| Rate at which worker threads had to directly pull LRU tails to find memory for a new item. |
| Rate at which items freed by the LRU crawler. |
| Number of items presently stored in the |
| Age of the oldest item in the LRU. |
| Rate at which items found to be refcount locked in the LRU tail. |
| Number of items presently stored in this slab class. |
| Seconds since the last access for the most recent item evicted from this slab class, shown as milliseconds. |
| Number of items presently stored in the |
| Rate at which items were moved from |
| Total amount of memory allocated to slab pages. |
| Number of bytes requested to be stored in this slab. |
| Rate at which the underlying slab class was unable to store a new item shown as error. |
| Rate at which memcache self-healed a slab with a refcount leak. |
| Total number of chunks allocated to the slab class. |
| Total number of pages allocated to the slab class. |
| Rate of touches serviced by this slab class. |
| Number of chunks allocated to items. |
| Rate at which chunks have been allocated to items. |
| Rate at which valid items evicted from the LRU which were never touched after being set. |
Inventory data
The Memcached integration captures the configuration parameters of the memcached instance. The data is available on the Inventory page, under the config/memcached source. For more about inventory data, see Understand integration data.
The integration captures data for the following Memcached configuration parameters:
Memcached Inventory
Metric | Description |
---|---|
| Indicates whether SASL authentication is enabled. |
| Sets the default protocol support for client connections. Options: |
| Indicates whether Check-And-Set (CAS) is enabled. |
| The amount of space each chunk uses. One item will use one chunk of the appropriate size. |
| Indicates whether stats detail is enabled. |
| The path to the UNIX socket to listen on. |
| Indicates whether stats cachedump and |
| Indicates whether evictions are enabled. If so, returns an error on memory exhausted instead of evicting. |
| Indicates whether |
| The chunk size growth factor. |
| The hash table algorithm. |
| An integer multiplier for how large the hash table should be. Normally grows at runtime. |
| Percent of slab memory to reserve for HOT LRU. |
| Set idle age of HOT LRU to COLD age multiplied by this value. |
| Timeout for idle connections. |
| Save up to 24 bytes per item. |
| The interface to listen on. |
| The maximum size for an item. |
| Enable the LRU crawler background thread. |
| Microseconds to sleep between items. |
| Max items to crawl per slab per run. |
| Split LRU mode and background threads. |
| Enable segmented LRU mode. |
| The maximum number of bytes allowed in the cache. |
| The maximum number of clients allowed. |
| Immediately close new connections after limit is reached. |
| Number of threads to use. |
| Number of threads to use per UDP. |
| The age of the oldest honored object. |
| Maximum number of requests per event. |
| Indicates whether slab page automover is enabled. |
| Ratio limit between young/old slab classes. |
| Internal algorithm tunable for automove. |
| Specifies the maximum size of a slab. Items larger than the set max are split over multiple slabs. |
| Enable or disable slab reassignment. |
| The prefix used for stats keys. |
| Time in seconds for how long to wait before forcefully killing LRU tail item. |
| The backlog queue limit. |
| The TCP port to listen on. |
| Boolean value, indicates if |
| Items set with a TTL lower than this value will go into TEMP_LRU and be unevictable until they expire or are deleted or replaced. If TTL is set to zero, TEMP_LRU is disabled. |
| Enable dynamic reporters for 'stats sizes' command. |
| The UDP port to listen on. |
| Access mask for UNIX socket, in octal. |
| Set the verbosity level of the logging output. |
| Percent of slab memory to reserve for WARM LRU. |
| Set idle age of WARM LRU to COLD age multiplied by this value. |
| Size in kilobytes of per-watcher write buffer. |
| Size in kilobytes of per-worker-thread buffer. |