Essential Redis Monitoring Metrics Every Engineer Should Know
This guide outlines the key Redis monitoring metrics—including performance, memory, activity, persistence, and error indicators—provides detailed descriptions, command examples, and practical tips for using tools like redis-cli, redis-benchmark, and info commands to effectively track and troubleshoot your Redis instances.
Monitoring Metrics
Performance
Memory
Basic activity
Persistence
Error
Performance Metrics
latency : Redis response time for a request.
instantaneous_ops_per_sec : Average number of operations processed per second.
hi rate (calculated) : Calculated cache hit rate.
Memory Metrics
used_memory : Amount of memory currently used.
mem_fragmentation_ratio : Memory fragmentation ratio.
evicted_keys : Number of keys evicted due to maxmemory limit.
blocked_clients : Clients blocked by BLPOP/BRPOP/BRPOPLPUSH.
Basic Activity Metrics
connected_clients : Number of client connections.
connected_slaves : Number of slave replicas.
master_last_io_seconds_ago : Seconds since last master‑slave interaction.
keyspace : Total number of keys in the database.
Persistence Metrics
rdb_last_save_time : Timestamp of the last RDB persistence to disk.
rdb_changes_since_last_save : Number of changes since the last persistence.
Error Metrics
rejected_connections : Connections rejected because maxclients limit was reached.
keyspace_misses : Number of key look‑ups that missed (no hit).
master_link_down_since_seconds : Duration (in seconds) that the master‑slave link has been down.
Monitoring Methods
redis-benchmark
redis-stat
redis-faina
redislive
redis-cli
monitor
showlog
slowlog commands (get, len, reset)
Configuration Snippets
slowlog-log-slower-than 1000 # set slow‑query threshold in microseconds</code>
<code>slowlog-max-len 100 # set max number of slow‑query log entriesUsing the INFO Command
Info can retrieve all sections at once or specific sections such as server, clients, memory, persistence, stats, Replication, CPU, cluster, and Keyspace.
./redis-cli info | grep ops # operations per secondPerformance Monitoring
redis-cli info | grep opsMemory Monitoring
./redis-cli info | grep used_memory_human</code>
<code>used_memory_human:2.99M # memory allocated from OS</code>
<code>used_memory_rss_human:8.04M # memory seen by OS (top)</code>
<code>used_memory_peak_human:7.77M # peak memory consumption</code>
<code>used_memory_lua_human:37.00K # Lua engine memory ./redis-cli info | grep blocked_clients</code>
<code>blocked_clients:0 ./redis-cli info | grep evicted_keys</code>
<code>evicted_keys:0 ./redis-cli info | grep mem_fragmentation_ratio</code>
<code>mem_fragmentation_ratio:2.74 ./redis-cli info | grep used_memory</code>
<code>used_memory:3133624Basic Activity Monitoring
./redis-cli info | grep connected_clients</code>
<code>connected_clients:1</code>
<code>connected_slaves:1Persistence Monitoring
./redis-cli info | grep rdb_last_save_time</code>
<code>rdb_last_save_time:1591876204</code>
<code>./redis-cli info | grep rdb_changes_since_last_save</code>
<code>rdb_changes_since_last_save:0Error Monitoring
./redis-cli info | grep rejected_connections</code>
<code>rejected_connections:0 ./redis-cli info | grep keyspace_misses</code>
<code>keyspace_misses:0 ./redis-cli info | grep master_link_down_since_seconds</code>
<code>master_link_down_since_seconds:0Redis Performance Test Command
./redis-benchmark -c 100 -n 5000Runs a benchmark with 100 concurrent connections and 5,000 total requests.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
