Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bizarre benchmarking result while it generates TLS workloads to Redis #210

Open
eecheng87 opened this issue Mar 16, 2023 · 0 comments
Open

Comments

@eecheng87
Copy link

eecheng87 commented Mar 16, 2023

Hi, recently I tried to benchmark Redis with TLS loads. The server is built with the following commands:

# in redis-7.0.5
make BUILD_TLS=yes

# generate certificate
./utils/gen-test-certs.sh

memtier_benchmark is built with:

git clone https://github.com/RedisLabs/memtier_benchmark.git
cd memtier_benchmark/
autoreconf -ivf
./configure
make -j32

The server is launched by (I'm using OpenSSL 3.0.0) :

 ./src/redis-server --tls-port 6379 --port 0 \
                                       --tls-cert-file ./tests/tls/redis.crt \
                                       --tls-key-file ./tests/tls/redis.key \
                                       --tls-ca-cert-file ./tests/tls/ca.crt

The memtier_benchmark is executed as:

taskset --cpu-list 12-31 ./memtier_benchmark -p 6379 --protocol=redis --test-time=3 --hide-histogram --tls  \
--cert=/path/to/redis-7.0.5/tests/tls/redis.crt \
--key=/path/to/redis-7.0.5/tests/tls/redis.key \
--cacert=/path/to/redis-7.0.5/tests/tls/ca.crt

Then, I got the result like:

[RUN #1] Preparing benchmark client...
[RUN #1] Launching threads now...
[RUN #1 20%,   0 secs]  4 threads:           0 ops,       0 (avg:       0) ops/sec, 0.00KB/sec (avg: 0.00KB/sec),
[RUN #1 53%,   1 secs]  4 threads:       17658 ops,   17652 (avg:   11125) ops/sec, 753.52KB/sec (avg: 474.93KB/s
[RUN #1 86%,   2 secs]  4 threads:       50440 ops,   32771 (avg:   19494) ops/sec, 1.36MB/sec (avg: 828.86KB/sec
[RUN #1 100%,   3 secs]  0 threads:       71808 ops,   32771 (avg:   23920) ops/sec, 1.36MB/sec (avg: 1015.90KB/sec),  6.10 (avg:  8.36) msec latency

4         Threads
50        Connections per thread
3         Seconds

Is no request completed in 0 secs normal? I did not observe this behavior with non-TLS loads. Additionaly, if I increases the concurrency, the result becomes more weird. Here is another configuration for memtier_benchmark:

# memtier_benchmark
taskset --cpu-list 12-31 ./memtier_benchmark -p 6379 --protocol=redis --clients 25 --threads=20 --ratio=1:9 --key-pattern=R:R --key-minimum=1 --key-maximum=500 --data-size=32 --test-time=3 --hide-histogram --tls \
--cert=/path/to/redis-7.0.5/tests/tls/client.crt \
--key=/path/to/redis-7.0.5/tests/tls/client.key \
--cacert=/path/to/redis-7.0.5/tests/tls/ca.crt

# Result
[RUN #1] Preparing benchmark client...
[RUN #1] Launching threads now...
[RUN #1 10%,   0 secs] 20 threads:           0 ops,       0 (avg:       0) ops/sec, 0.00KB/sec (avg: 0.00KB/sec
[RUN #1 41%,   1 secs] 20 threads:           0 ops,       0 (avg:       0) ops/sec, 0.00KB/sec (avg: 0.00KB/sec
[RUN #1 74%,   2 secs] 20 threads:           0 ops,       0 (avg:       0) ops/sec, 0.00KB/sec (avg: 0.00KB/sec
[RUN #1 101%,   3 secs] 20 threads:       11611 ops,   14314 (avg:    3835) ops/sec, 660.57KB/sec (avg: 176.99K
[RUN #1 104%,   3 secs]  0 threads:       26266 ops,   14314 (avg:    8443) ops/sec, 660.57KB/sec (avg: 389.15KB/sec), 130.31 (avg: 59.20) msec latency
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant