Understanding Delays Using Redis-Cli

I am using the redis-cli to monitor the delay of the repeated server. Here is an example:

 ubuntu:~$ redis-cli --latency -h 127.0.0.1 -p 6379 min: 0, max: 15, avg: 0.12 (2839 samples) 

The question is, what do these meanings mean? I am struggling to find documentation on this subject, other than what is available through my toolโ€™s own help document.

+7
redis redis-cli
source share
2 answers

The redis-cli --latency -h -p is a tool to help you troubleshoot and understand the latency issues you may be experiencing with Redis. It does this by measuring the time that the Redis server responds to the Redis PING command in milliseconds.

In this context, the delay is the maximum delay between the client issues the command and the response time of the response to the client command. Typically, Redis processing time is extremely low, microseconds, but there are certain conditions that lead to increased latency.

- Redis Latency Troubleshooting

So, when we run the redis-cli --latency -h 127.0.0.1 -p 6379 command, Redis enters a special mode in which it continuously processes the delay (by running PING).

Now let's break down what data it returns: min: 0, max: 15, avg: 0.12 (2839 samples)

What (2839 samples) ? This is the number of times a redis-cli issued a PING command and received a response. In other words, these are your sample data. In our example, we recorded 2839 requests and responses.

What is min: 0 ? The min value represents the minimum delay between the CLI PING release time and the response time. In other words, it was the absolute best response time for our data.

What is max: 15 ? The value of max opposite of min . It represents the maximum delay between the CLI PING release time and the command response time. This is the longest response time of our data. In our example, out of 2839 samples, the longest transaction took 15ms .

What is avg: 0.12 ? The avg value is the average millisecond response time for all of our data. So, on average, from our 2839 samples, the response time took 0.12ms .

Basically, higher numbers for min , max and avg are a bad thing.

Some good materials on how to use this data:

+11
source share

The --latency switch places redis-cli in a special mode, which is designed to measure the delay between the client and the Redis server. During this time, it starts in node, redis-cli pings (using the Redis PING command) on the server and tracks the average / minimum / maximum response time it received (in milliseconds).

This is a useful tool for troubleshooting network problems when using a remote Redis server.

+1
source share

All Articles