info commandstats
- collect throughput metric values for all the commands run on the Redis server
info memory
- collect all memory utilization metrics data for a Redis instance
Memory RSS (Resident Set Size) is the number of bytes that the operating system
has allocated to Redis. If the ratio of ‘memory_rss’ to ‘memory_used’ is greater
than ~1.5, then it signifies memory fragmentation. The fragmented memory can be
recovered by restarting the server.
info stats
- provides keyspace_hits
& keyspace_misses
metric data to further calculate cache hit ratio
If the cache hit ratio is lower than ~0.8 then a significant amount of the
requested keys are evicted, expired, or do not exist at all. It is crucial
to watch this metric while using Redis as a cache. Lower cache hit ratio results
in larger latency as most of the requests are fetching data from the disk.
It indicates that you need to increase the size of Redis cache to improve
your application’s performance.
Further readings: