redis-cli info memory
used_memory and used_memory_rss metrics to understand the current memory usage.MEMORY USAGE command for keys (if you have an idea of your key patterns) or a script to iterate through keys to report their sizes. This will help identify which keys are consuming the most memory:redis-cli --scan --pattern '*' | xargs -L 1 -I{} sh -c 'echo -n "{}: " ; redis-cli memory usage "{}"'
redis-cli config get maxmemory
redis-cli config get maxmemory-policy
redis-cli slowlog get 10
vmstat 1
free -m
redis-cli del <key_name>
redis-cli config set maxmemory <new_limit>
redis-cli config set maxmemory-policy <policy_name>
volatile-lru, allkeys-lru, etc.redis-cli shutdown
redis-cli info memory
Take these actions step by step to identify and mitigate the root cause of excessive swap usage in Redis.





