Proactively monitor the health and performance of business-critical Memcached servers.
Memcached is a free and open-source, general purpose distributed memory caching system. Analyze the performance of your Memcached server and take informed troubleshooting descisions by keeping track of critical metrics.
This document details how to configure the Memcached plugin and the monitoring metrics for providing in-depth visibility into the performance, availability, and usage stats of Memcached servers.
Memcached performance monitoring metrics:
The Various out-of-the-box metrics we support are:
"bytes" metric counts and records the total number of bytes currently used by the server to store items. I.e., the number of bytes currently used for caching items.
"bytes_read" metric counts and records the total number of bytes read by the server from network.
The total number of bytes sent over the network by the server is recorded using the metric "bytes_written". It has no bearing or connection on the total size of the data you're storing.
The metric "connections_current" records the total number of connected clients. If this value is very high or low, then the chances of system failure are high. Ideally, the number of open connections to the Memcached server should be the same value on all servers.
The metric "connections_total" records the total number of connections opened since the server started running. Ideally, the total number of connections should be lesser than the total number of get/set commands.
Get the total number of worker threads requested with the metric "threads". This metric represents the total number of threads used to process incoming requests. Ideally, this should'nt be higher than the totala number of CPU cores on the server.
Use the metric "evictions" and get the total number of evictions made in your Memcached server. An eviction occurs when an object that has time to live is removed from the cache because a brand new item needs to be allocated.
Limit maximum bytes
The total number of bytes the server is permitted to use for storage is recorded using the metric "limit_maxbytes".
How it works?
Log-in to your Site24x7 account. Sign up here if you don't have one.
The agent will execute the Memcached plugin and push the data to the Site24x7 server
Site24x7 Memcache plugin uses "memcache" module to get the performance metrics of Memcached server
Note: Site24x7 Linux agent will automatically try to install "memcache" using the "pip" command. If the installations fails, users can manually install the module following the steps mentioned under the section "How to install memcache?".
How to install memcache?
Execute the following command in your server to to install memcache
pip install memcache
Use "pip" to install pymongo
Note: pip is a package management system that is used to install and manage software packages written in Python.
For CentOS, Fedora, RHEL:
yum install python-devel
yum install python-pip (or)
For Debian, Ubuntu:
apt-get -y install python-pip
Memcached plugin installation:
Create a directory with the name "memcached", under Site24x7 Linux Agent plugin directory - /opt/site24x7/monagent/plugins/