Find keys that use the most memory

Sample keys and rank them by real memory usage, not element count, to find what eats your RAM

redis-cli --memkeys

tool
redis32 commands
tags
redisperformancemonitoringdebug

More redis commands

  • redis-cli MEMORY USAGE <name> SAMPLES 0

    Bytes used by one key, including overhead; SAMPLES 0 gives an exact number for collections

  • redis-cli SLOWLOG GET 10; redis-cli SLOWLOG RESET

    Show the last 10 slow commands with arguments and duration, then clear the log

  • redis-cli LATENCY DOCTOR

    Readable latency report with likely causes, use it together with LATENCY HISTORY <event>

  • redis-cli CLIENT LIST | tr ' ' '\n' | grep -E 'addr=|age=|idle=' | paste - - - | sort -t= -k3 -rn | head

    Find long-lived or idle connections that leak sockets, sorted by age

  • redis-cli --cluster check <host>:<port>

    Check slot coverage, node consistency and open slots across the cluster

all 32 redis commands