Redis Slowlog Test
The Redis Slow Log is a system to log queries that exceeded a specified execution time. The execution time does not include I/O operations like talking with the client, sending the reply and so forth, but just the time needed to actually execute the command (this is the only stage of command execution where the thread is blocked and can not serve other requests in the meantime).
As slow commands are one of the key causes for latencies in the Redis server, it is important that administrators swoop down on such commands and figure out what is ailing them. This is where the Slowlog test helps! This test captures and reports the count and complete details of slow commands, along with the duration per command, thus enabling administrators to quickly identify the command that is the slowest. Additionally, the test helps administrators review the maximum length configuration of the slow log, and the threshold set for capturing slow commands, so that the administrators can determine if these settings need to be tweaked.
Target of the test :A Redis server
Agent deploying the test : An internal agent (recommended)
Outputs of the test : One set of results for the target Redis server
Parameters | Description |
---|---|
Test period |
How often should the test be executed |
Host |
The host for which the test is to be configured. |
Port |
The port at which the specified HOST listens. |
Redis Password and Confirm Password |
In some high security environments, a password may have been set for the Redis server, so as to protect it from unauthorized accesses/abuse. If such a password has been set for the monitored Redis server, then specify that password against REDIS PASSWORD. Then, confirm the password by retyping it against CONFIRM PASSWORD. If the Redis server is not password protected, then do not disturb the default setting of this parameter. To determine whether/not the target Redis server is password-protected, do the following:
|
Detailed Diagnosis |
To make diagnosis more efficient and accurate, the eG Enterprise suite embeds an optional detailed diagnostic capability. With this capability, the eG agents can be configured to run detailed, more elaborate tests as and when specific problems are detected. To enable the detailed diagnosis capability of this test for a particular server, choose the On option. To disable the capability, click on the Off option. The option to selectively enable/disable the detailed diagnosis capability will be available only if the following conditions are fulfilled:
|
Measurement | Description | Measurement Unit | Interpretation |
---|---|---|---|
Slow command executions |
Indicates the count of slow commands. |
Number |
The value 0 is desired for this measure. A high value could mean one/both the following:
In the case of the former, use the detailed diagnosis of this measure to identify the slow commands, when each command was executed, and how long every command took to run. This will lead you to the slowest command. In the case of the latter, take a look at the value of the Maximum slowlog command threshold measure. You may want to decrease this threshold setting by changing the slowlog-log-slower-than configuration parameter. |
Average command duration |
Indicates the average time it took for commands to execute. |
Microseconds |
If this value is abnormally high, you may want to check the detailed diagnosis of the Slow command executions measure to identify the slowest command. |
Slowlog maximum length |
Indicates the maximum number of commands that can be logged. |
Number |
The slowlog-max-len configuration setting governs the length of the slow log. The minimum value is 0. When a new command is logged and the slow log is already at its maximum length, the oldest one is removed from the queue of logged commands in order to make space. If you want more slow commands to be logged in the slowlog, increase the value of the slowlog-max-len configuration setting. |
Maximum slow log command threshold |
Indicates the execution time, in microseconds, to exceed in order for the command to get logged in the slowlog. |
Microseconds |
The slowlog-log-slower-than configuration setting governs the value of this measure. Note that a negative number disables the slow log, while a value of zero forces the logging of every command. If the value of the Slow command executions measure is abnormally high, you may want to review the slowlog-log-slower-than configuration setting to see if it needs to be fine-tuned to capture only those commands that are genuinely slow. |