Databases 7 min read

Master Redis Monitoring: Key Metrics, Commands, and Performance Tips

This article explains how to monitor Redis by categorizing essential performance, memory, activity, persistence, and error metrics, provides detailed tables of metric names and descriptions, lists common monitoring tools, shows configuration snippets, and demonstrates useful Redis CLI commands for real‑time insight.

Programmer DD
Programmer DD
Programmer DD
Master Redis Monitoring: Key Metrics, Commands, and Performance Tips

Monitoring Metrics

Performance

Memory

Basic activity

Persistence

Error

Memory Metrics

Name

Description

used_memory

Used memory

mem_fragmentation_ratio

Memory fragmentation ratio

evicted_keys

Number of keys evicted due to maxmemory limit

blocked_clients

Clients blocked by BLPOP, BRPOP, or BRPOPLPUSH

Basic Activity Metrics

Name

Description

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

Name

Description

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

Name

Description

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 (seconds) of master‑slave disconnection

Monitoring Methods

redis-benchmark

redis-stat

redis-faina

redislive

redis-cli

monitor

showlog

get (slow‑query log)

len (slow‑query log entry count)

reset (reset slow‑query log)

Relevant Configuration

slowlog-log-slower-than 1000   # set slow‑query threshold in microseconds
slowlog-max-len 100           # set length of slow‑query log (number of commands)

Info Command Usage

info (retrieve all information or specific sections)

server: server environment parameters

clients: client‑related information

memory: memory statistics

persistence: persistence information

stats: general statistics

replication: master‑slave replication details

cpu: CPU usage

cluster: cluster information

keyspace: key‑value statistics

Performance Monitoring Example

redis-cli info | grep ops   # operations per second

Memory Monitoring Example

# used_memory_human: 2.99M  # total memory allocated by allocator
# used_memory_rss_human: 8.04M  # memory seen by OS (top)
# used_memory_peak_human: 7.77M  # peak memory consumption
# used_memory_lua_human: 37.00K  # memory used by Lua engine

Redis Performance Test Command

./redis-benchmark -c 100 -n 5000   # 100 connections, 5000 requests
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

CLIdatabaseredismetrics
Programmer DD
Written by

Programmer DD

A tinkering programmer and author of "Spring Cloud Microservices in Action"

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.