As an in memory database, redis is fast,So how to judge whether redis is slowing down? What is the standard of slowing downBecause the configuration environment of the machine is different, we can’t simply compare the response time.
This paper introduces the above problems.
Determine redis performance baseline
The redis cli command provides the — intrinsic latency option, which can be used to count the data during the testMaximum delayThis delay can be used as the performance baseline of redis.
src/redis-cli --intrinsic-latency 120
120 represents run 120 seconds. Generally, running 120 seconds is enough to detect the maximum delay
The maximum delay of the test is 2.1414 MS, which can be used as the baseline.
Judge if it slows down
In general,When the response of redis is more than twice the baselineIt can be said that redis is slowing down.
- The response is 2.5 ms, not slow
- Five milliseconds, more than twice, slower.