Redis CPU Test

CPU contentions on the Redis server can significantly degrade the performance of the server. To avoid this, administrators must track the CPU usage of the server over time, proactively detect potential CPU contentions, and accurately isolate what is causing excessive CPU usage on the server - main/background system processes? main/background user processes? This can be achieved using the Redis CPU test.

This test monitors the CPU usage of the Redis server and alerts administrators to erratic usage patterns on the server and what is causing them. This way, the test helps administrators isolate and pre-empt CPU contentions on the server, and thus improve server performance.

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

Configurable parameters for the test
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:

  • Login to the system hosting the Redis server.

  • Open the redis.conf file in the <REDIS_INSTALL_DIR>.

  • Look for the requirepass parameter in the file.

  • If this parameter exists, and is not preceded by a # (hash) symbol, it means that password protection is enabled for the Redis server. In this case, the string that follows the requirepass parameter is the password of the Redis server. For instance, say that the requirepass specification reads as follows:

    requirepass red1spr0

    According to this specification, the Redis server is protected using the password red1spr0. In this case therefore, you need to specify red1spr0 against REDIS PASSWORD.

  • On the other hand, if the requirepass parameter is prefixed by the # (hash) symbol as shown below, it means password protection is disabled.

    # requirepass red1spr0

    In this case, leave the REDIS PASSWORD parameter with its default setting.

Measurements made by the test
Measurement Description Measurement Unit Interpretation

CPU utilization of Redis server

Indicates the percentage of CPU resources used by the target server.

Percent

A value close to 100% is a cause for concern, as it implies that the server is using CPU resources excessively. If the situation persists, the server may soon not have enough processing power to process requests to it.

System CPU consumed by the Redis server

Indicates the duration for which system processes utilized CPU.

Seconds

This is the sum of system CPU consumed by main threads and background threads of the server process.

By comparing the value of this measure with that of the User CPU consumed by Redis server measure, you can instantly determine whether system processes are CPU-hungry or user processes.

System CPU consumed by background processes

Indicates the period of time for which background system processes hogged the CPU.

Seconds

If the value of the System CPU consumed by Redis server measure is abnormally high, you may want to determine what type of system processes are CPU-intensive - background processes? main processes? 

While the value of this measure will indicate how much CPU was used by background system processes, you can quickly compute the CPU usage of main system processes using this formula:

System CPU consumed by Redis server (-) System CPU consumed by background processes

Then, compare the value of this measure with the result of the above computation to figure out the root-cause of the excessive CPU usage by system processes.

User CPU consumed by Redis server

Indicates the duration for which user processes hogged CPU resources.

Seconds

This is the sum of user CPU consumed by main threads and background threads of the server process.

By comparing the value of this measure with that of the System CPU consumed by Redis server measure, you can instantly determine whether system processes are CPU-hungry or user processes.

User CPU consumed by the background processes

Indicates the period of time for which background user processes hogged the CPU.

Seconds

If the value of the User CPU consumed by Redis server measure is abnormally high, you may want to determine what type of users rocesses are CPU-intensive - background processes? main processes? 

While the value of this measure will indicate how much CPU was used by background user processes, you can quickly compute the CPU usage of main user processes using this formula:

User CPU consumed by Redis server (-) User CPU consumed by background processes

Then, compare the value of this measure with the result of the above computation to figure out the root-cause of the excessive CPU usage by user processes.