eG Monitoring
 

Measures reported by RedisCmdStatsTest

Redis commands that clients issue on the target Redis server can sometimes hog server resources. Consequently, server performance may suffer. To avoid this, administrators need to track how much CPU is consumed by each command, identify the resource-intensive commands, and see how to reengineer the client applications so as to reduce the usage of such commands. The RedisCmdStatsTest helps with this!

This test auto-discovers the commands running on the Redis server and reports the number of times each command was called. Additionally, the test reports the total and average CPU time consumed by every command. By quickly comparing the CPU consumption across commands, you can quickly identify the command that is hogging the server resources.

Outputs of the test : One set of results for the target Redis server

The measures made by this test are as follows:

Measurement Description Measurement Unit Interpretation
usec_per_call Indicates how much CPU time was used by a single call of this command. Microseconds Compare the value of this measure across commands to know which command has been consistently overutilizing CPU resources.
calls Indicates the number of times this command was called. Number  
usec Indicates the total CPU time used by this command. Microseconds If this measure reports an abnormally high value for any command, it implies that that command is hogging CPU resources.

However, before branding the command as ‘expensive’, you must try to ascertain whether the command steadily hogs CPU or sporadically. For that, take a look at the value of the usec_per_call measure for that command. If the usec_per_call measure reports a very high value for that command, you can conclude that the command is indeed CPU-intensive. On the other hand, if the usec_per_call measure reports a low value for the command, then you can attribute the high CPU usage of the command to one or all of the following:

  • If the command had been called numerous times during a short period, then the overall CPU usage may increase. So, it would make sense to keep an eye on the value of the Total number of calls measure to determine how many times the command was called.

  • If the command had consumed CPU excessively during very few of its executions, the overall CPU consumption of the command will increase, without impacting the average consumption of the command.