-
Notifications
You must be signed in to change notification settings - Fork 24.5k
Description
Describe the bug
After enabling TLS, we meet a big performance downgrade.
To reproduce
Setup a Redis6 server with the default setting but enable
port 6379: no TLS
port 6380: TLS
Use memtier_benchmark:
- a single thread
- a single client
- 100000 requests
- get/set 1:1
without TLS
memtier_benchmark -s localhost -p 6379 -t 1 -c 1 -R -n 100000 --ratio=1:1 --hide-histogram
ALL STATS
=========================================================================
Type Ops/sec Hits/sec Misses/sec Latency KB/sec
-------------------------------------------------------------------------
Sets 6137.11 --- --- 0.07900 472.79
Gets 6137.11 31.42 6105.68 0.07700 389.50
Waits 0.00 --- --- 0.00000 ---
Totals 12274.21 31.42 6105.68 0.07800 862.29
with TLS
memtier_benchmark -s localhost -p 6380 --tls --tls-skip-verify -t 1 -n 100000 -c 1 -R --ratio=1:1 --hide-histogram
ALL STATS
=========================================================================
Type Ops/sec Hits/sec Misses/sec Latency KB/sec
-------------------------------------------------------------------------
Sets 4735.50 --- --- 0.10300 364.81
Gets 4735.50 24.25 4711.26 0.10100 185.27
Waits 0.00 --- --- 0.00000 ---
Totals 9471.00 24.25 4711.26 0.10200 550.08
The throughput is only 77% and the latency is 1.28x after enabling TLS.
Expected behavior
From my experience, TLS may introduce additional overhead. But comparing to other systems, like RDBMS or web server, Redis's performance is impacted too much.
I'd like to confirm with the Redis team if it's expected or my misconfiguration. And it's better if there's an official benchmark about TLS on Redis 6
A description of what you expected to happen.
Additional information
Redis server v=6.0.6 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=97204d6a2bf74d2c