O'Reilly logo

Redis 4.x Cookbook by Zuofei Wang, Pengcheng Huang

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it...

The first action is to do the baseline latency measurement:

  1. Before you put the Redis service online, run an intrinsic-latency test on the host where the Redis Server is running:
$ bin/redis-cli --intrinsic-latency 60
Max latency so far: 1 microseconds.
Max latency so far: 8 microseconds.
Max latency so far: 21 microseconds.
Max latency so far: 29 microseconds.
Max latency so far: 38 microseconds.
Max latency so far: 39 microseconds.
Max latency so far: 40 microseconds.
Max latency so far: 44 microseconds.
Max latency so far: 56 microseconds.
    
1867256801 total runs (avg latency: 0.0321 microseconds / 32.13 nanoseconds per run).
Worst run took 1743x longer than the average latency.  
  1. Another form of latency you should measure ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required