I need help regarding dragonfly db, particularly benchmarking.
So here is the story, I tried benchmarking dragonfly as a cache to replace redis. I got the expected result when testing single node; it performed slow on redis-benchmark utility and fast on memtier benchmark. This is expected, but what was unexpected was when I repeated the same test on cluster. I beefed up dragonfly to 6 nodes (3 master and 3 replica, thats how I did it with redis too). Now redis-benchmark did improve but it was still slower than redis, same trend as single node. But when I redid memtier, it ran slower than everything, even when compared to itself (single node).
This is my memtier benchmark command
memtier_benchmark -p <port> -t 4 -c 50 --ratio=1:1 --requests=100000
Edit: The cluster was running on the same machine, Ubuntu (WSL). No errors on logs, pretty barebone logs for program startup and cluster acknowledgement only.
Tldr; Why dragonfly performed worse on memtier benchmark when running as a cluster.
Single node benchmark
Cluster Benchmark
I need help regarding dragonfly db, particularly benchmarking.
So here is the story, I tried benchmarking dragonfly as a cache to replace redis. I got the expected result when testing single node; it performed slow on redis-benchmark utility and fast on memtier benchmark. This is expected, but what was unexpected was when I repeated the same test on cluster. I beefed up dragonfly to 6 nodes (3 master and 3 replica, thats how I did it with redis too). Now redis-benchmark did improve but it was still slower than redis, same trend as single node. But when I redid memtier, it ran slower than everything, even when compared to itself (single node).
This is my memtier benchmark command
memtier_benchmark -p <port> -t 4 -c 50 --ratio=1:1 --requests=100000
Edit: The cluster was running on the same machine, Ubuntu (WSL). No errors on logs, pretty barebone logs for program startup and cluster acknowledgement only.
Tldr; Why dragonfly performed worse on memtier benchmark when running as a cluster.
Single node benchmark
Cluster Benchmark
Share Improve this question edited Mar 13 at 7:41 amzshow asked Mar 13 at 6:24 amzshowamzshow 488 bronze badges1 Answer
Reset to default 0I got my own answer. Turns out, dragonfly tries to use 6 threads per program, and with 6 nodes, dragon fly used 36 threads, and my cpu cores were being maxed out on htop. When I reduced threads using --proactor_threads (2 for master and 1 for slave), the performance easily improved.
ops/sec: 165,611
latency: 3.62 ms
throughput: 9.11 MB/sec
edit: so issue was running on the same machine, if it was actual different machines, performance would have improved.