🔴 Redis
Intermediate
What is the Redis slow log?
Answer
The Redis slow log records commands that exceed a configurable execution time threshold (slowlog-log-slower-than, in microseconds, default 10,000 = 10ms; set to 0 to log all, -1 to disable). SLOWLOG GET [count] retrieves the most recent slow entries, showing the command, arguments, timestamp, and execution duration. SLOWLOG LEN shows the number of entries; SLOWLOG RESET clears it. The slow log is essential for diagnosing performance issues — common findings include: KEYS * or SMEMBERS on huge sets blocking the server, unindexed range scans, or excessive Lua script execution time. Unlike application-level logging, the slow log measures pure server-side processing time, excluding network I/O.
More Redis Questions
View all →- Intermediate What is Redis Cluster and how does it shard data?
- Intermediate What is the difference between Redis Sentinel and Redis Cluster?
- Intermediate How do MULTI and EXEC work in Redis transactions?
- Intermediate What is WATCH and optimistic locking in Redis?
- Intermediate What is Lua scripting in Redis and when should you use it?