Hi @dsmythies ! Thanks for the info. I have also been using redis-benchmark
to see the difference between Ubuntu 24.04 LTS and Ubuntu 20.04 LTS, as follows:
Commands I used on both VMs:
$ cat <<'EOF' > watch-redis-benchmark.sh ; chmod +x watch-redis-benchmark.sh
redis-benchmark -h localhost -p 6379 -c $CONNECTIONS -a $a -q -t get -r 100000 -n 1000000 & timeout 17 top -d 1 -b | perl -lane 'while(m~ ([\d\.]+) us,\s+([\d\.]+) sy,\s+([\d\.]+) ni,\s+([\d\.]+) id,\s+([\d\.]+) wa,\s+([\d\.]+) hi,\s+([\d\.]+) si,\s+([\d\.]+) st~g){ ($us, $sy, $ni, $id, $wa, $hi, $si, $st) = ($1, $2, $3, $4, $5, $6, $7, $8); $tus += $us; $tsy += $sy; $tni += $ni; $tid += $id; $twa += $wa; $thi += $hi; $tsi += $si; $tst += $st; $|++; printf qq[%u seconds: %s # %.1f us, %.1f sy, %.1f ni, %.1f id, %.1f wa, %.1f hi, %.1f si, %.1f st\n], (++ $secs), $_, $tus, $tsy, $tni, $tid, $twa, $thi, $tsi, $tst; }' | egrep '13 seconds'; wait
EOF
On Ubuntu 24:
$ export CONNECTIONS=50; ./watch-redis-benchmark.sh; ./watch-redis-benchmark.sh; ./watch-redis-benchmark.sh; export CONNECTIONS=500; ./watch-redis-benchmark.sh; ./watch-redis-benchmark.sh; ./watch-redis-benchmark.sh; export CONNECTIONS=1000; ./watch-redis-benchmark.sh; ./watch-redis-benchmark.sh; ./watch-redis-benchmark.sh;
13 seconds: %Cpu(s): 27.5 us, 41.5 sy, 0.0 ni, 16.1 id, 0.0 wa, 0.0 hi, 15.0 si, 0.0 st # 370.5 us, 544.4 sy, 1.0 ni, 185.5 id, 0.0 wa, 0.0 hi, 198.3 si, 0.0 st
GET: 65227.32 requests per second, p50=0.367 msec
13 seconds: %Cpu(s): 28.1 us, 41.3 sy, 0.0 ni, 13.8 id, 0.0 wa, 0.0 hi, 16.8 si, 0.0 st # 371.3 us, 550.4 sy, 0.5 ni, 172.3 id, 0.0 wa, 0.0 hi, 205.4 si, 0.0 st
GET: 64641.24 requests per second, p50=0.375 msec
13 seconds: %Cpu(s): 29.0 us, 44.0 sy, 0.0 ni, 13.5 id, 0.0 wa, 0.0 hi, 13.5 si, 0.0 st # 375.2 us, 558.7 sy, 1.0 ni, 172.5 id, 0.5 wa, 0.0 hi, 191.9 si, 0.0 st
GET: 65867.48 requests per second, p50=0.367 msec
13 seconds: %Cpu(s): 26.9 us, 40.6 sy, 0.0 ni, 15.7 id, 0.0 wa, 0.0 hi, 16.8 si, 0.0 st # 327.9 us, 493.8 sy, 1.0 ni, 304.3 id, 0.0 wa, 0.0 hi, 173.1 si, 0.0 st
GET: 54106.70 requests per second, p50=4.503 msec
13 seconds: %Cpu(s): 28.1 us, 40.2 sy, 0.0 ni, 17.6 id, 0.0 wa, 0.0 hi, 14.1 si, 0.0 st # 335.3 us, 494.6 sy, 1.5 ni, 298.7 id, 0.0 wa, 0.0 hi, 169.7 si, 0.0 st
GET: 53347.56 requests per second, p50=4.567 msec
13 seconds: %Cpu(s): 26.9 us, 41.1 sy, 0.0 ni, 16.2 id, 0.0 wa, 0.0 hi, 15.7 si, 0.0 st # 330.4 us, 491.4 sy, 1.5 ni, 303.1 id, 0.0 wa, 0.0 hi, 173.6 si, 0.0 st
GET: 52991.36 requests per second, p50=4.607 msec
13 seconds: %Cpu(s): 26.4 us, 39.8 sy, 0.5 ni, 18.9 id, 0.0 wa, 0.0 hi, 14.4 si, 0.0 st # 312.2 us, 478.5 sy, 1.0 ni, 345.1 id, 0.0 wa, 0.0 hi, 163.1 si, 0.0 st
GET: 49925.11 requests per second, p50=9.775 msec
13 seconds: %Cpu(s): 28.1 us, 40.9 sy, 0.0 ni, 17.7 id, 0.0 wa, 0.0 hi, 13.3 si, 0.0 st # 309.7 us, 480.5 sy, 1.5 ni, 348.7 id, 0.0 wa, 0.0 hi, 159.5 si, 0.0 st
GET: 48393.34 requests per second, p50=10.063 msec
13 seconds: %Cpu(s): 27.9 us, 42.3 sy, 0.0 ni, 16.4 id, 0.0 wa, 0.0 hi, 13.4 si, 0.0 st # 315.1 us, 477.0 sy, 1.0 ni, 349.3 id, 0.0 wa, 0.0 hi, 157.7 si, 0.0 st
GET: 49200.49 requests per second, p50=9.983 msec
On Ubuntu 20:
$ export CONNECTIONS=50; ./watch-redis-benchmark.sh; ./watch-redis-benchmark.sh; ./watch-redis-benchmark.sh; export CONNECTIONS=500; ./watch-redis-benchmark.sh; ./watch-redis-benchmark.sh; ./watch-redis-benchmark.sh; export CONNECTIONS=1000; ./watch-redis-benchmark.sh; ./watch-redis-benchmark.sh; ./watch-redis-benchmark.sh;
13 seconds: %Cpu(s): 31.9 us, 43.6 sy, 0.0 ni, 11.3 id, 0.0 wa, 0.0 hi, 13.2 si, 0.0 st # 387.3 us, 574.0 sy, 0.5 ni, 151.8 id, 0.0 wa, 0.0 hi, 186.3 si, 0.0 st
GET: 72379.85 requests per second, p50=0.327 msec
13 seconds: %Cpu(s): 36.6 us, 40.1 sy, 0.0 ni, 9.4 id, 0.0 wa, 0.0 hi, 13.9 si, 0.0 st # 424.3 us, 547.8 sy, 1.5 ni, 143.7 id, 0.0 wa, 0.0 hi, 182.7 si, 0.0 st
GET: 72077.27 requests per second, p50=0.335 msec
13 seconds: %Cpu(s): 27.8 us, 48.5 sy, 0.0 ni, 10.1 id, 0.0 wa, 0.0 hi, 13.6 si, 0.0 st # 404.8 us, 577.6 sy, 1.0 ni, 142.6 id, 0.0 wa, 0.0 hi, 174.3 si, 0.0 st
GET: 73088.73 requests per second, p50=0.327 msec
13 seconds: %Cpu(s): 31.9 us, 38.2 sy, 0.5 ni, 13.7 id, 0.0 wa, 0.0 hi, 15.7 si, 0.0 st # 360.8 us, 489.9 sy, 1.5 ni, 277.5 id, 0.0 wa, 0.0 hi, 170.5 si, 0.0 st
GET: 59045.82 requests per second, p50=4.143 msec
13 seconds: %Cpu(s): 33.5 us, 38.1 sy, 0.0 ni, 15.2 id, 0.0 wa, 0.0 hi, 13.2 si, 0.0 st # 360.6 us, 492.1 sy, 1.0 ni, 270.8 id, 0.0 wa, 0.0 hi, 175.6 si, 0.0 st
GET: 58534.30 requests per second, p50=4.167 msec
13 seconds: %Cpu(s): 31.7 us, 39.7 sy, 0.0 ni, 13.6 id, 0.0 wa, 0.0 hi, 15.1 si, 0.0 st # 354.6 us, 501.0 sy, 0.5 ni, 268.6 id, 0.0 wa, 0.0 hi, 175.6 si, 0.0 st
GET: 58934.46 requests per second, p50=4.143 msec
13 seconds: %Cpu(s): 28.6 us, 41.4 sy, 0.0 ni, 15.3 id, 0.0 wa, 0.0 hi, 14.8 si, 0.0 st # 333.9 us, 478.4 sy, 0.5 ni, 326.5 id, 0.0 wa, 0.0 hi, 160.9 si, 0.0 st
GET: 55493.89 requests per second, p50=8.855 msec
13 seconds: %Cpu(s): 27.8 us, 42.4 sy, 0.0 ni, 16.2 id, 0.0 wa, 0.0 hi, 13.6 si, 0.0 st # 338.3 us, 486.9 sy, 2.0 ni, 315.5 id, 0.0 wa, 0.0 hi, 157.1 si, 0.0 st
GET: 54662.73 requests per second, p50=9.039 msec
13 seconds: %Cpu(s): 27.1 us, 42.2 sy, 0.5 ni, 15.1 id, 0.0 wa, 0.0 hi, 15.1 si, 0.0 st # 332.8 us, 479.7 sy, 1.0 ni, 326.0 id, 0.0 wa, 0.0 hi, 160.7 si, 0.0 st
GET: 53653.82 requests per second, p50=9.095 msec
Note: I’m adding up the total user and system CPU (as reported by top
) and showing it after 13 seconds, as an arbitrary milestone. And I’m also showing the requests per second
at the end of the benchmark as reported by redis-benchmark
.
Yes, it is a bit noisy, but Ubuntu 20 is clearly consistently faster for Redis get
operations, or?