# DragonFly vs Redis Performance Benchmark Replication

**URL:** <https://dragonfly.discourse.group/t/dragonfly-vs-redis-performance-benchmark-replication/138>\
**Category:** Dragonfly Technical\
**Created:** [February 19, 2024, 7:59pm UTC](https://dragonfly.discourse.group/t/dragonfly-vs-redis-performance-benchmark-replication/138 "2024-02-19T19:59:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![positive-camel](https://avatars.discourse-cdn.com/v4/letter/p/a587f6/32.png) [@positive-camel](https://dragonfly.discourse.group/u/positive-camel)\
**Post date:** [February 19, 2024, 7:59pm UTC](https://dragonfly.discourse.group/t/dragonfly-vs-redis-performance-benchmark-replication/138/1 "2024-02-19T19:59:21Z")

</div>

Installed DragonFly on `n2-standard-8` (8 vCPU, 32GB Memory) Arch: `x86/64` GCP Machine using binary.

Generating load from another GCP instance 62 vCPU, 64GB Memory using `memtier_benchmark` benchmarking tool.

Installed the Redis(Version: 7.2) on similar GCP Machine.

After tuning threads(–threads) and clients(–clients), I didn’t get significant DragonFly performance over Redis.

Redis:

```auto
Type Ops/sec Hits/sec Misses/sec Avg. Latency p50 Latency p99 Latency p99.9 Latency KB/sec
----------------------------------------------------------------------------------------------------------------------------
Sets 129430.41 --- --- 0.61780 0.59900 1.27100 1.82300 38410.60

```

DragonFly:  
Result: 1  
\*\*CPUAffinity=0-3 \*\* (Using 4 vCPU)

```auto
Type Ops/sec Hits/sec Misses/sec Avg. Latency p50 Latency p99 Latency p99.9 Latency KB/sec
----------------------------------------------------------------------------------------------------------------------------
Sets 266886.94 --- --- 0.29965 0.29500 0.51900 0.76700 79203.099

```

Result: 2  
CPUAffinity=0-7 (Using only 8 vCPU)

```auto
Type Ops/sec Hits/sec Misses/sec Avg. Latency p50 Latency p99 Latency p99.9 Latency KB/sec
----------------------------------------------------------------------------------------------------------------------------
Sets 262463.29 --- --- 0.30471 0.26300 0.76700 1.41500 77890.29

```

**Observation** Performance of dragonfly got saturated after 4CPU (Ran dragonfly with CPUAffinity) and performance didn’t scale with increased CPU.

Please help with the steps to achieve the claimed performance of Dragonfly and point out if anything wrong with above steps??  
What should be max CPU% or load at which we should run DF and Redis in Prod?

---

<div class="post-metadata">

**Author:** ![inclusive-numbat](https://avatars.discourse-cdn.com/v4/letter/i/9f8e36/32.png) [@inclusive-numbat](https://dragonfly.discourse.group/u/inclusive-numbat)\
**Post date:** [February 19, 2024, 8:01pm UTC](https://dragonfly.discourse.group/t/dragonfly-vs-redis-performance-benchmark-replication/138/2 "2024-02-19T20:01:38Z")

</div>

Please refer to the following issue for the initial guideline  
[https://github.com/dragonflydb/dragonfly/issues/113](https://github.com/dragonflydb/dragonfly/issues/113)
