Essential Redis Monitoring Metrics Every Engineer Should Know
This guide outlines the key Redis monitoring metrics—including performance, memory, basic activity, persistence, and error indicators—explains their meanings, shows how to retrieve them with Redis commands, and provides practical tips for effective performance and health tracking.
Monitoring Metrics
Performance
Memory
Basic activity
Persistence
Error
Performance Metrics
latency : Time Redis takes to respond to 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 connections.
master_last_io_seconds_ago : Seconds since the last master‑slave interaction.
keyspace : Total number of keys in the database.
Persistence Metrics
rdb_last_save_time : Timestamp of the last RDB persistence.
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.
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)
Key
infocommand can retrieve all sections or specific blocks such as
server,
clients,
memory,
persistence,
stats,
replication,
cpu,
cluster,
keyspace.
slowlog-log-slower-than 1000 # set slow‑query threshold (µs) slowlog-max-len 100 # max number of slow‑query entriesExample commands:
# Get all info and filter
redis-cli info | grep ops
# Memory usage (human readable)
redis-cli info | grep used | grep human
# Blocked clients
redis-cli info | grep blocked_clients
# Evicted keys
redis-cli info | grep evicted_keys
# Memory fragmentation ratio
redis-cli info | grep mem_fragmentation_ratio
# Used memory
redis-cli info | grep used_memoryPerformance Testing
redis-benchmark -c 100 -n 5000 # 100 connections, 5000 requestsResulting chart illustrates operations per second:
Original source: blog.51cto.com/yht1990/2503819
Open Source Linux
Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.
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.