redis_advisor
Analyze Redis health by checking for large keys, expired keys missing TTL, eviction pressure, and fork latency risks with severity and actionable fixes.
Instructions
Rolled-up Redis health lint pass -- one call returns four categories of findings, each with a severity and an actionable fix:
big_keys: sampled keys whose memory footprint or element count is large enough to make operations O(N) and risk blocking the event loop on delete/expire.
missing_ttls: share of sampled keys with no expiry -- the classic 'cache fills up and OOMs' setup.
eviction_pressure: used/maxmemory ratio, active evictions, and the dangerous
noeviction+ no-TTL combination that turns a full instance into failed writes.fork_latency_risk: long last-fork time, large dataset + active persistence, and failed background saves -- the causes of periodic latency spikes and durability gaps. Keys are sampled via SCAN (never KEYS), so it is safe on a large production instance; the big-key / missing-TTL findings are over the SAMPLE, not the whole keyspace.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sampleSize | No | How many keys to SCAN-sample for big-key / missing-TTL checks (default 200, 0 to skip key sampling). | |
| bigKeyBytes | No | Flag a key at or above this many bytes (default 1 MiB = 1048576). | |
| usedPctWarn | No | Warn when used/maxmemory reaches this ratio (default 0.8 = 80%). | |
| forkUsecWarn | No | Warn when the last fork took at least this many microseconds (default 100000 = 100ms). | |
| bigKeyElements | No | Flag a collection with at least this many elements (default 5000). | |
| largeDatasetBytes | No | Treat the dataset as large (fork-risk) at or above this many bytes (default 1 GiB = 1073741824). | |
| missingTtlFraction | No | Flag when this fraction of the sample lacks a TTL (default 0.5 = 50%). |