Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/sync-benchmarks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Sync Benchmark Data

on:
schedule:
# Daily at 07:00 UTC
- cron: '0 7 * * *'
workflow_dispatch: # Allow manual trigger

permissions:
contents: write
pull-requests: write

jobs:
sync-benchmarks:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Sync benchmark data from dragonflydb/benchmarking
run: yarn sync-benchmarks
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Open PR if anything changed
uses: peter-evans/create-pull-request@v6
with:
commit-message: 'Sync benchmark data from dragonflydb/benchmarking'
title: 'Sync benchmark data from dragonflydb/benchmarking'
body: |
Automated update of `## Benchmark` sections on command-reference
pages, regenerated from the latest results in
[dragonflydb/benchmarking](https://github.com/dragonflydb/benchmarking).

Generated by `.github/workflows/sync-benchmarks.yml` running
`yarn sync-benchmarks`. Review the diff before merging.
branch: sync-benchmarks
delete-branch: true
24 changes: 24 additions & 0 deletions docs/command-reference/generic/del.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ description: "Learn how to use Redis DEL command to delete a key."
---

import PageTitle from '@site/src/components/PageTitle';
import Benchmark from '@site/src/components/Benchmark';

# DEL

Expand Down Expand Up @@ -33,3 +34,26 @@ OK
dragonfly> DEL key1 key2 key3
(integer) 2
```

<!-- benchmark:start -->
## Benchmark

<Benchmark
command="DEL"
dragonflyOps={10250000}
valkeyOps={2380000}
redisOps={1960000}
hardware="Server: m7g.8xlarge (arm64) · Client: c6gn.8xlarge (arm64)"
tool="dfly_bench"
client="32 threads, 5 connections, pipeline 30"
dataset="100M keys, 128B values, uniform key distribution"
duration="300s (10s warmup), 1 trial"
measuredOn="2026-07-28"
harnessPath="benchmarks/DEL/dfly_bench/DEL_reproduce.md"
results={[
{ engine: "Dragonfly", throughput: "10.25M ops/s", p50: "0.445 ms", p99: "0.822 ms", p999: "1.131 ms", avgLatency: "0.456 ms" },
{ engine: "Valkey", throughput: "2.38M ops/s", p50: "1.759 ms", p99: "3.992 ms", p999: "4.461 ms", avgLatency: "2.008 ms" },
{ engine: "Redis", throughput: "1.96M ops/s", p50: "2.255 ms", p99: "6.612 ms", p999: "7.977 ms", avgLatency: "2.439 ms" },
]}
/>
<!-- benchmark:end -->
24 changes: 24 additions & 0 deletions docs/command-reference/generic/expire.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ description: "Learn Redis EXPIRE command that sets a key's time-to-live in secon
---

import PageTitle from '@site/src/components/PageTitle';
import Benchmark from '@site/src/components/Benchmark';

# EXPIRE

Expand Down Expand Up @@ -86,6 +87,29 @@ dragonfly> TTL mykey
(integer) -1
```

<!-- benchmark:start -->
## Benchmark

<Benchmark
command="EXPIRE"
dragonflyOps={8510000}
valkeyOps={1100000}
redisOps={777500}
hardware="Server: m7g.8xlarge (arm64) · Client: c6gn.8xlarge (arm64)"
tool="dfly_bench"
client="32 threads, 5 connections, pipeline 30"
dataset="100M keys, 128B values, uniform key distribution"
duration="300s (10s warmup), 1 trial"
measuredOn="2026-07-29"
harnessPath="benchmarks/EXPIRE/dfly_bench/EXPIRE_reproduce.md"
results={[
{ engine: "Dragonfly", throughput: "8.51M ops/s", p50: "0.452 ms", p99: "2.705 ms", p999: "9.896 ms", avgLatency: "0.551 ms" },
{ engine: "Valkey", throughput: "1.10M ops/s", p50: "3.997 ms", p99: "7.949 ms", p999: "11.370 ms", avgLatency: "4.373 ms" },
{ engine: "Redis", throughput: "777.5K ops/s", p50: "5.777 ms", p99: "13.012 ms", p999: "15.763 ms", avgLatency: "6.162 ms" },
]}
/>
<!-- benchmark:end -->

## Pattern: Navigation Session

Imagine you have a web service and you are interested in the latest N pages
Expand Down
24 changes: 24 additions & 0 deletions docs/command-reference/generic/ttl.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ description: "Learn the Redis TTL command to get remaining time-to-live of a key
---

import PageTitle from '@site/src/components/PageTitle';
import Benchmark from '@site/src/components/Benchmark';

# TTL

Expand Down Expand Up @@ -37,3 +38,26 @@ dragonfly> EXPIRE mykey 10
dragonfly> TTL mykey
(integer) 10
```

<!-- benchmark:start -->
## Benchmark

<Benchmark
command="TTL"
dragonflyOps={10630000}
valkeyOps={2330000}
redisOps={1940000}
hardware="Server: m7g.8xlarge (arm64) · Client: c6gn.8xlarge (arm64)"
tool="dfly_bench"
client="32 threads, 5 connections, pipeline 30"
dataset="100M keys, 128B values, uniform key distribution"
duration="60s (10s warmup), 1 trial"
measuredOn="2026-07-29"
harnessPath="benchmarks/TTL/dfly_bench/TTL_reproduce.md"
results={[
{ engine: "Dragonfly", throughput: "10.63M ops/s", p50: "0.411 ms", p99: "0.851 ms", p999: "1.076 ms", avgLatency: "0.439 ms" },
{ engine: "Valkey", throughput: "2.33M ops/s", p50: "2.225 ms", p99: "2.495 ms", p999: "2.499 ms", avgLatency: "2.049 ms" },
{ engine: "Redis", throughput: "1.94M ops/s", p50: "2.325 ms", p99: "2.980 ms", p999: "3.000 ms", avgLatency: "2.462 ms" },
]}
/>
<!-- benchmark:end -->
24 changes: 24 additions & 0 deletions docs/command-reference/hashes/hget.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ description: "Learn how to use Redis HGET command to retrieve the value of a has
---

import PageTitle from '@site/src/components/PageTitle';
import Benchmark from '@site/src/components/Benchmark';

# HGET

Expand Down Expand Up @@ -33,3 +34,26 @@ dragonfly> HGET myhash field1
dragonfly> HGET myhash field2
(nil)
```

<!-- benchmark:start -->
## Benchmark

<Benchmark
command="HGET"
dragonflyOps={9310000}
valkeyOps={791800}
redisOps={744400}
hardware="Server: m7g.8xlarge (arm64) · Client: c6gn.8xlarge (arm64)"
tool="dfly_bench"
client="32 threads, 5 connections, pipeline 30"
dataset="100M keys, 128B values, uniform key distribution"
duration="60s (10s warmup), 1 trial"
measuredOn="2026-07-29"
harnessPath="benchmarks/HGET/dfly_bench/HGET_reproduce.md"
results={[
{ engine: "Dragonfly", throughput: "9.31M ops/s", p50: "0.468 ms", p99: "0.875 ms", p999: "1.163 ms", avgLatency: "0.489 ms" },
{ engine: "Valkey", throughput: "791.8K ops/s", p50: "6.483 ms", p99: "6.990 ms", p999: "6.999 ms", avgLatency: "6.044 ms" },
{ engine: "Redis", throughput: "744.4K ops/s", p50: "6.522 ms", p99: "9.979 ms", p999: "13.329 ms", avgLatency: "6.429 ms" },
]}
/>
<!-- benchmark:end -->
24 changes: 24 additions & 0 deletions docs/command-reference/hashes/hset.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ description: "Learn how to use Redis HSET command to set the value of a hash fie
---

import PageTitle from '@site/src/components/PageTitle';
import Benchmark from '@site/src/components/Benchmark';

# HSET

Expand Down Expand Up @@ -46,3 +47,26 @@ dragonfly> HGETALL myhash
5) "field3"
6) "World"
```

<!-- benchmark:start -->
## Benchmark

<Benchmark
command="HSET"
dragonflyOps={7990000}
valkeyOps={704000}
redisOps={638500}
hardware="Server: m7g.8xlarge (arm64) · Client: c6gn.8xlarge (arm64)"
tool="dfly_bench"
client="32 threads, 5 connections, pipeline 30"
dataset="100M keys, 128B values, uniform key distribution"
duration="300s (10s warmup), 1 trial"
measuredOn="2026-07-29"
harnessPath="benchmarks/HSET/dfly_bench/HSET_reproduce.md"
results={[
{ engine: "Dragonfly", throughput: "7.99M ops/s", p50: "0.507 ms", p99: "1.985 ms", p999: "7.332 ms", avgLatency: "0.583 ms" },
{ engine: "Valkey", throughput: "704.0K ops/s", p50: "6.573 ms", p99: "13.470 ms", p999: "17.760 ms", avgLatency: "6.804 ms" },
{ engine: "Redis", throughput: "638.5K ops/s", p50: "6.839 ms", p99: "11.613 ms", p999: "18.655 ms", avgLatency: "7.503 ms" },
]}
/>
<!-- benchmark:end -->
24 changes: 24 additions & 0 deletions docs/command-reference/lists/lpop.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
description: Learn how to use the Redis LPOP command for removing and getting the first element in the list.
---
import PageTitle from '@site/src/components/PageTitle';
import Benchmark from '@site/src/components/Benchmark';

# LPOP

Expand Down Expand Up @@ -45,3 +46,26 @@ dragonfly> LRANGE mylist 0 -1
1) "four"
2) "five"
```

<!-- benchmark:start -->
## Benchmark

<Benchmark
command="LPOP"
dragonflyOps={10250000}
valkeyOps={1690000}
redisOps={1330000}
hardware="Server: m7g.8xlarge (arm64) · Client: c6gn.8xlarge (arm64)"
tool="dfly_bench"
client="32 threads, 5 connections, pipeline 30"
dataset="1M keys, 100 preloaded items each, 128B values, uniform key distribution"
duration="300s (10s warmup), 1 trial"
measuredOn="2026-07-29"
harnessPath="benchmarks/LPOP/dfly_bench/LPOP_reproduce.md"
results={[
{ engine: "Dragonfly", throughput: "10.25M ops/s", p50: "0.432 ms", p99: "0.871 ms", p999: "3.507 ms", avgLatency: "0.456 ms" },
{ engine: "Valkey", throughput: "1.69M ops/s", p50: "1.535 ms", p99: "10.042 ms", p999: "11.804 ms", avgLatency: "2.822 ms" },
{ engine: "Redis", throughput: "1.33M ops/s", p50: "1.562 ms", p99: "11.894 ms", p999: "13.783 ms", avgLatency: "3.588 ms" },
]}
/>
<!-- benchmark:end -->
24 changes: 24 additions & 0 deletions docs/command-reference/lists/lpush.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
description: Learn how to use Redis LPUSH command to insert an element at the start of a list.
---
import PageTitle from '@site/src/components/PageTitle';
import Benchmark from '@site/src/components/Benchmark';

# LPUSH

Expand Down Expand Up @@ -42,3 +43,26 @@ dragonfly> LRANGE mylist 0 -1
1) "hello"
2) "world"
```

<!-- benchmark:start -->
## Benchmark

<Benchmark
command="LPUSH"
dragonflyOps={6020000}
valkeyOps={866300}
redisOps={661900}
hardware="Server: m7g.8xlarge (arm64) · Client: c6gn.8xlarge (arm64)"
tool="dfly_bench"
client="32 threads, 5 connections, pipeline 30"
dataset="100M keys, 128B values, uniform key distribution"
duration="300s (10s warmup), 1 trial"
measuredOn="2026-07-29"
harnessPath="benchmarks/LPUSH/dfly_bench/LPUSH_reproduce.md"
results={[
{ engine: "Dragonfly", throughput: "6.02M ops/s", p50: "0.525 ms", p99: "5.972 ms", p999: "11.560 ms", avgLatency: "0.778 ms" },
{ engine: "Valkey", throughput: "866.3K ops/s", p50: "5.416 ms", p99: "11.628 ms", p999: "15.410 ms", avgLatency: "5.528 ms" },
{ engine: "Redis", throughput: "661.9K ops/s", p50: "7.110 ms", p99: "11.702 ms", p999: "18.645 ms", avgLatency: "7.239 ms" },
]}
/>
<!-- benchmark:end -->
24 changes: 24 additions & 0 deletions docs/command-reference/lists/rpop.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
description: Discover how to use Redis RPOP command to remove and fetch the last element of a list.
---
import PageTitle from '@site/src/components/PageTitle';
import Benchmark from '@site/src/components/Benchmark';

# RPOP

Expand Down Expand Up @@ -45,3 +46,26 @@ dragonfly> LRANGE mylist 0 -1
1) "one"
2) "two"
```

<!-- benchmark:start -->
## Benchmark

<Benchmark
command="RPOP"
dragonflyOps={10670000}
valkeyOps={1810000}
redisOps={1490000}
hardware="Server: m7g.8xlarge (arm64) · Client: c6gn.8xlarge (arm64)"
tool="dfly_bench"
client="32 threads, 5 connections, pipeline 30"
dataset="1M keys, 100 preloaded items each, 128B values, uniform key distribution"
duration="300s (10s warmup), 1 trial"
measuredOn="2026-07-29"
harnessPath="benchmarks/RPOP/dfly_bench/RPOP_reproduce.md"
results={[
{ engine: "Dragonfly", throughput: "10.67M ops/s", p50: "0.416 ms", p99: "0.792 ms", p999: "3.282 ms", avgLatency: "0.437 ms" },
{ engine: "Valkey", throughput: "1.81M ops/s", p50: "1.532 ms", p99: "9.645 ms", p999: "11.570 ms", avgLatency: "2.639 ms" },
{ engine: "Redis", throughput: "1.49M ops/s", p50: "1.550 ms", p99: "11.361 ms", p999: "11.985 ms", avgLatency: "3.217 ms" },
]}
/>
<!-- benchmark:end -->
24 changes: 24 additions & 0 deletions docs/command-reference/lists/rpush.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
description: Learn how to use Redis RPUSH command for appending a value at the end of a list.
---
import PageTitle from '@site/src/components/PageTitle';
import Benchmark from '@site/src/components/Benchmark';

# RPUSH

Expand Down Expand Up @@ -42,3 +43,26 @@ dragonfly> LRANGE mylist 0 -1
1) "hello"
2) "world"
```

<!-- benchmark:start -->
## Benchmark

<Benchmark
command="RPUSH"
dragonflyOps={5990000}
valkeyOps={893500}
redisOps={698800}
hardware="Server: m7g.8xlarge (arm64) · Client: c6gn.8xlarge (arm64)"
tool="dfly_bench"
client="32 threads, 5 connections, pipeline 30"
dataset="100M keys, 128B values, uniform key distribution"
duration="300s (10s warmup), 1 trial"
measuredOn="2026-07-29"
harnessPath="benchmarks/RPUSH/dfly_bench/RPUSH_reproduce.md"
results={[
{ engine: "Dragonfly", throughput: "5.99M ops/s", p50: "0.531 ms", p99: "5.922 ms", p999: "11.373 ms", avgLatency: "0.782 ms" },
{ engine: "Valkey", throughput: "893.5K ops/s", p50: "5.197 ms", p99: "11.570 ms", p999: "15.476 ms", avgLatency: "5.359 ms" },
{ engine: "Redis", throughput: "698.8K ops/s", p50: "6.573 ms", p99: "11.298 ms", p999: "17.824 ms", avgLatency: "6.856 ms" },
]}
/>
<!-- benchmark:end -->
Loading
Loading