Skip to main content
InterviewHubPRO
Section Overview
Q29

Question 29 of 50

Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

58%
Redis & Caching (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

How do you troubleshoot Redis Latency and High CPU?

senior LevelredisAdvanced Internals

In Simple Words:

  1. Check the Slowlog: SLOWLOG GET 20 (identifies commands exceeding slowlog-log-slower-than).
  2. Run redis-cli --latency and redis-cli --intrinsic-latency to differentiate network vs engine latency.
  3. Check CPU profile with INFO commandstats (detects heavy commands like KEYS, SMEMBERS, or large HGETALL).
  4. Inspect used_memory_rss vs used_memory (ratio > 1.5 indicates severe memory fragmentation; trigger MEMORY PURGE or active defragmentation).