Mastering Redis Monitoring: Key Metrics, Commands, and Performance Tips
This guide details Redis monitoring metrics across performance, memory, activity, persistence, and error categories, explains how to retrieve them with the INFO command, outlines useful monitoring tools, provides slowlog configuration examples, and includes command‑line snippets for performance testing and metric inspection.
Monitoring Metrics
Redis provides several categories of monitoring metrics: Performance, Memory, Basic activity, Persistence, and Error.
Performance Metrics
latency : Time Redis takes to respond to a request.
instantaneous_ops_per_sec : Average number of operations processed per second.
hit_rate (calculated) : Cache hit rate.
Memory Metrics
used_memory : Amount of memory 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 last master‑slave interaction.
keyspace : Total number of keys in the database.
Persistence Metrics
rdb_last_save_time : Timestamp of the last RDB save.
rdb_changes_since_last_save : Number of changes since the last save.
Error Metrics
rejected_connections : Connections rejected because maxclients limit was reached.
keyspace_misses : Number of key lookups that missed.
master_link_down_since_seconds : Duration of master‑slave link down.
Monitoring Tools
Common Redis monitoring utilities include redis‑benchmark, redis‑stat, redis‑faina, redislive, redis‑cli, monitor, and showlog.
Slowlog Configuration
slowlog-log-slower-than 1000 # set slow query threshold in microseconds
slowlog-max-len 100 # set number of entries to keepUsing the INFO Command
The redis-cli info command can retrieve all sections or specific sections such as server, clients, memory, persistence, stats, replication, CPU, cluster, and keyspace.
Example Commands
redis-cli info | grep ops # operations per second
redis-cli info memory | grep used_memory_human
redis-cli info stats | grep ops
./redis-benchmark -c 100 -n 5000 # performance test: 100 connections, 5000 requestsSigned-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.
