• /
  • EnglishEspañol日本語한국어Português
  • EntrarComeçar agora

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.

Dica

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.

Guided install

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

HOST

Hostname of the memcached instance.

localhost

M/I

PORT

Port memcached is running on.

11211

M/I

USERNAME

Memcached SASL username. Only required if authentication is enabled.

N/A

M/I

PASSWORD

Memcached SASL password. Only required if authentication is enabled.

N/A

M/I

METRICS

Set to true to enable Metrics-only collection.

false

INVENTORY

Set to true to enable Inventory-only collection.

false

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

avgItemSizeInBytes

The average size of an item.

bytesReadServerPerSecond

Rate of bytes read from the network by this server.

bytesUsedServerInBytes

Current number of bytes used by this server to store items.

bytesWrittenServerPerSecond

Rate of bytes written to the network by this server.

casHitRatePerSecond.

Rate at which keys are compared and swapped and found present.

casMissRatePerSecond

Rate at which keys are compared and swapped and not found present.

casWrongRatePerSecond

Rate at which keys are compared and swapped where the original value did not match the supplied value.

cmdFlushRatePerSecond

Rate of flushall commands.

cmdGetRatePerSecond

Rate of get commands.

cmdSetRatePerSecond

Rate of set commands.

connectionRateServerPerSecond

Rate at which connections to this server are opened.

connectionStructuresAllocated

Number of connection structures allocated by the server.

currentItemsStoredServer

Current number of items stored by the server.

deleteCmdNoneRemovedPerSecond

Rate at which delete commands result in no items being removed.

deleteCmdRemovedPerSecond

Rate at which delete commands result in items being removed.

evictionsPerSecond

Rate at which valid items are removed from cache to free memory for new items.

executionTime

Fraction of user time the CPU spent executing this server process.

getHitPercent

Percentage of requested keys that are found present since the start of the memcache server.

getHitPerSecond

Rate at which keys are requested and found present.

getMissPerSecond

Rate at which keys are requested and not found.

limitBytesStorage

Number of bytes this server is allowed to use for storage.

openConnectionsServer

Number of open connections to this server.

pointerSize

Default size of pointers on the host OS (generally 32 or 64).

serverMaxConnectionLimitPerSecond

Rate at which the server has reached the max connection limit

storingItemsPercentMemory

Amount of memory being used by the server for storing items as a percentage of the max allowed.

threads

Number of threads used by the current Memcached server process.

totalItemsStored

Total number of items stored by this server since it started.

uptimeInMilliseocnds

Number of seconds this server has been running.

usageRate

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

activeItemsBumpedPerSecond

Rate at which active items were bumped within HOT or WARM.

activeSlabs

Total number of slab classes allocated.

casBadValPerSecond

Rate at which Check-And-Set (CAS) commands failed to modify a value due to a bad CAS ID.

casModifiedSlabPerSecond

Rate at which CAS commands modified this slab class.

chunkSizeInBytes

The amount of space each chunk uses.

chunksPerPage

How many chunks exist within one page.

cmdSetRateSlabPerSecond

Rate at which set requests stored data in this slab class.

decrsModifySlabPerSecond

Rate at which decrs commands modified this slab class.

deleteRateSlabPerSecond

Rate at which delete commands succeeded in this slab class.

entriesReclaimedPerSecond

Rate at which entries were stored using memory from an expired entry.

evictionsBeforeExpirationPerSecond

Rate at which items had to be evicted from the Least Recently Used (LRU) before expiring.

evictionsBeforeExplicitExpirationPerSecond

Rate at which nonzero items which had an explicit expire time set had to be evicted from the LRU before expiring.

expiredItemsReclaimedPerSecond

Rate at which expired items reclaimed from the LRU which were never touched after being set.

freeChunksEnd

Number of free chunks at the end of the last allocated page.

freedChunks

Chunks not yet allocated to items or freed via delete.

getHitRateSlabPerSecond

Rate at which get requests were serviced by this slab class.

incrsModifySlabPerSecond

Rate at which incrs commands modified this slab class.

itemsCold

Number of items presently stored in the COLD LRU.

itemsColdPerSecond

Rate at which items were moved from HOT or WARM into COLD.

itemsDirectReclaimPerSecond

Rate at which worker threads had to directly pull LRU tails to find memory for a new item.

itemsFreedCrawlerPerSecond

Rate at which items freed by the LRU crawler.

itemsHot

Number of items presently stored in the HOT LRU.

itemsOldestInMilliseconds

Age of the oldest item in the LRU.

itemsRefcountLockedPerSecond

Rate at which items found to be refcount locked in the LRU tail.

itemsSlabClass

Number of items presently stored in this slab class.

itemsTimeSinceEvictionInMilliseconds

Seconds since the last access for the most recent item evicted from this slab class, shown as milliseconds.

itemsWarm

Number of items presently stored in the WARM LRU.

itemsWarmPerSecond

Rate at which items were moved from COLD to WARM.

memAllocatedSlabsInBytes

Total amount of memory allocated to slab pages.

memRequestedSlabInBytes

Number of bytes requested to be stored in this slab.

outOfMemoryPerSecond

Rate at which the underlying slab class was unable to store a new item shown as error.

selfHealedSlabPerSecond

Rate at which memcache self-healed a slab with a refcount leak.

totalChunksSlab

Total number of chunks allocated to the slab class.

totalPagesSlab

Total number of pages allocated to the slab class.

touchHitSlabPerSecond

Rate of touches serviced by this slab class.

usedChunksItems

Number of chunks allocated to items.

usedChunksPerSecond

Rate at which chunks have been allocated to items.

validItemsEvictedPerSecond

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

auth_enabled_sasl

Indicates whether SASL authentication is enabled.

binding_protocol

Sets the default protocol support for client connections. Options: ascii, binary, or auto/. Default: Auto

cas_enabled

Indicates whether Check-And-Set (CAS) is enabled.

chunk_size

The amount of space each chunk uses. One item will use one chunk of the appropriate size.

detail_enabled

Indicates whether stats detail is enabled.

domain_socket

The path to the UNIX socket to listen on.

dump_enabled

Indicates whether stats cachedump and lru_crawler metadump is enabled.

evictions

Indicates whether evictions are enabled. If so, returns an error on memory exhausted instead of evicting.

flush_enabled

Indicates whether flush_all command is enabled.

growth_factor

The chunk size growth factor.

hash_algorithm

The hash table algorithm.

hashpower_init

An integer multiplier for how large the hash table should be. Normally grows at runtime.

hot_lru_pct

Percent of slab memory to reserve for HOT LRU.

hot_max_factor

Set idle age of HOT LRU to COLD age multiplied by this value.

idle_timeout

Timeout for idle connections.

inline_ascii_response

Save up to 24 bytes per item.

inter

The interface to listen on.

item_size_max

The maximum size for an item.

lru_crawler

Enable the LRU crawler background thread.

lru_crawler_sleep

Microseconds to sleep between items.

lru_crawler_tocrawl

Max items to crawl per slab per run.

lru_maintainer_thread

Split LRU mode and background threads.

lru_segmented

Enable segmented LRU mode.

maxbytes

The maximum number of bytes allowed in the cache.

maxconns

The maximum number of clients allowed.

maxconns_fast

Immediately close new connections after limit is reached.

num_threads

Number of threads to use.

num_threads_per_udp

Number of threads to use per UDP.

oldest

The age of the oldest honored object.

reqs_per_event

Maximum number of requests per event.

slab_automove

Indicates whether slab page automover is enabled.

slab_automove_ratio

Ratio limit between young/old slab classes.

slab_automove_window

Internal algorithm tunable for automove.

slab_chunk_max

Specifies the maximum size of a slab. Items larger than the set max are split over multiple slabs.

slab_reassign

Enable or disable slab reassignment.

stat_key_prefix

The prefix used for stats keys.

tail_repair_time

Time in seconds for how long to wait before forcefully killing LRU tail item.

tcp_backlog

The backlog queue limit.

tcpport

The TCP port to listen on.

temp_lru

Boolean value, indicates if temporary_ttl uses temp_lru.

temporary_ttl

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.

track_sizes

Enable dynamic reporters for 'stats sizes' command.

udpport

The UDP port to listen on.

umask

Access mask for UNIX socket, in octal.

verbosity

Set the verbosity level of the logging output. 0 = none, 1 = some, 2 = lots.

warm_lru_pct

Percent of slab memory to reserve for WARM LRU.

warm_max_factor

Set idle age of WARM LRU to COLD age multiplied by this value.

watcher_logbuf_size

Size in kilobytes of per-watcher write buffer.

worker_logbuf_size

Size in kilobytes of per-worker-thread buffer.

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.