Skip to content

Commit 9cd8b12

Browse files
committed
Add Redis Streams XREAD/XREADGROUP benchmark test suites
Adds test coverage for Redis Streams operations including: - XREAD with COUNT 100 on 200K pre-loaded entries - XREADGROUP consumer group testing with COUNT 100 - Concurrent XADD/XREADGROUP workloads (70/30 ratio) with dual consumers
1 parent 2ae2ae4 commit 9cd8b12

File tree

3 files changed

+124
-0
lines changed

3 files changed

+124
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
version: 0.4
2+
name: memtier_benchmark-stream-10M-entries-xread-count-100
3+
description: 'Runs memtier_benchmark, pre-loading Redis with 10M stream entries using XADD, then testing XREAD performance with COUNT 100.'
4+
dbconfig:
5+
configuration-parameters:
6+
save: '""'
7+
check:
8+
keyspacelen: 1
9+
preload_tool:
10+
run_image: redislabs/memtier_benchmark:edge
11+
tool: memtier_benchmark
12+
arguments: '"--data-size" "100" --command "XADD stream-key * field __data__" --command-key-pattern="P" -n 50000 -c 50 -t 4 --hide-histogram'
13+
resources:
14+
requests:
15+
memory: 4g
16+
dataset_name: 1M-stream-entries
17+
dataset_description: This dataset contains 1 stream key with 1M entries, each with a field containing 100 bytes of data.
18+
tested-commands:
19+
- xread
20+
redis-topologies:
21+
- oss-standalone
22+
build-variants:
23+
- gcc:15.2.0-amd64-debian-bookworm-default
24+
- gcc:15.2.0-arm64-debian-bookworm-default
25+
- dockerhub
26+
clientconfig:
27+
run_image: redislabs/memtier_benchmark:edge
28+
tool: memtier_benchmark
29+
arguments: --command="XREAD COUNT 100 STREAMS stream-key 0" --hide-histogram -n 1000 -c 25 -t 4
30+
resources:
31+
requests:
32+
cpus: '4'
33+
memory: 2g
34+
tested-groups:
35+
- stream
36+
priority: 95
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
version: 0.4
2+
name: memtier_benchmark-stream-10M-entries-xreadgroup-count-100
3+
description: 'Runs memtier_benchmark, pre-loading Redis with 10M stream entries using XADD, creating a consumer group, then testing XREADGROUP performance with COUNT 100.'
4+
dbconfig:
5+
configuration-parameters:
6+
save: '""'
7+
check:
8+
keyspacelen: 1
9+
preload_tool:
10+
run_image: redislabs/memtier_benchmark:edge
11+
tool: memtier_benchmark
12+
arguments: '"--data-size" "100" --command "XADD stream-key * field __data__" --command-key-pattern="P" -n 50000 -c 50 -t 4 --hide-histogram'
13+
init_commands:
14+
- XGROUP CREATE stream-key test-group 0 MKSTREAM
15+
resources:
16+
requests:
17+
memory: 4g
18+
dataset_name: 1k-stream-entries-with-consumer-group
19+
dataset_description: This dataset contains 1 stream key with 10M entries, each with a field containing 100 bytes of data, and a consumer group named 'test-group'.
20+
tested-commands:
21+
- xreadgroup
22+
redis-topologies:
23+
- oss-standalone
24+
build-variants:
25+
- gcc:15.2.0-amd64-debian-bookworm-default
26+
- gcc:15.2.0-arm64-debian-bookworm-default
27+
- dockerhub
28+
clientconfig:
29+
run_image: redislabs/memtier_benchmark:edge
30+
tool: memtier_benchmark
31+
arguments: --command="XREADGROUP GROUP test-group consumer1 COUNT 100 STREAMS stream-key >" --hide-histogram -n 1000 -c 25 -t 4
32+
resources:
33+
requests:
34+
cpus: '4'
35+
memory: 2g
36+
tested-groups:
37+
- stream
38+
priority: 94
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
version: 0.4
2+
name: memtier_benchmark-stream-concurrent-xadd-xreadgroup-70-30
3+
description:
4+
Starting with a pre-loaded stream of 500K entries, the benchmark tests concurrent stream operations with a consumer group for distributed processing.
5+
70% of commands produce messages with XADD, while 30% consume with XREADGROUP COUNT 10.
6+
500K initial entries plus 200K * 70% minus 200K * 10 * (15% + 15%) ≈ 40K left in the stream at the end.
7+
dbconfig:
8+
configuration-parameters:
9+
save: '""'
10+
check:
11+
keyspacelen: 1
12+
preload_tool:
13+
run_image: redislabs/memtier_benchmark:edge
14+
tool: memtier_benchmark
15+
arguments: '"--data-size" "100" --command "XADD stream-key * field __data__" --command-key-pattern="P" -n 2500 -c 50 -t 4 --hide-histogram'
16+
init_commands:
17+
- XGROUP CREATE stream-key producer-consumer-group 0 MKSTREAM
18+
resources:
19+
requests:
20+
memory: 4g
21+
dataset_name: stream-concurrent-producer-consumer-500k-seed
22+
dataset_description: This dataset starts with 500K pre-loaded stream entries, then tests concurrent stream operations with a consumer group for distributed processing.
23+
tested-commands:
24+
- xadd
25+
- xreadgroup
26+
redis-topologies:
27+
- oss-standalone
28+
build-variants:
29+
- gcc:15.2.0-amd64-debian-bookworm-default
30+
- gcc:15.2.0-arm64-debian-bookworm-default
31+
- dockerhub
32+
clientconfig:
33+
run_image: redislabs/memtier_benchmark:edge
34+
tool: memtier_benchmark
35+
arguments: >
36+
--data-size 100
37+
--command="XADD stream-key * field __data__" --command-key-pattern="P" --command-ratio=70
38+
--command="XREADGROUP GROUP producer-consumer-group consumer1 COUNT 10 STREAMS stream-key >" --command-key-pattern="P" --command-ratio=15
39+
--command="XREADGROUP GROUP producer-consumer-group consumer2 COUNT 10 STREAMS stream-key >" --command-key-pattern="P" --command-ratio=15
40+
--hide-histogram
41+
-n 1000
42+
-c 50
43+
-t 4
44+
resources:
45+
requests:
46+
cpus: "4"
47+
memory: 2g
48+
tested-groups:
49+
- stream
50+
priority: 95

0 commit comments

Comments
 (0)