From 9cd8b1256c467d864703e3f540c73afa0ce11a2a Mon Sep 17 00:00:00 2001 From: Paulo Sousa Date: Mon, 20 Oct 2025 15:45:57 +0100 Subject: [PATCH] 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 --- ...ark-stream-10M-entries-xread-count-100.yml | 36 +++++++++++++ ...tream-10M-entries-xreadgroup-count-100.yml | 38 ++++++++++++++ ...tream-concurrent-xadd-xreadgroup-70-30.yml | 50 +++++++++++++++++++ 3 files changed, 124 insertions(+) create mode 100644 redis_benchmarks_specification/test-suites/memtier_benchmark-stream-10M-entries-xread-count-100.yml create mode 100644 redis_benchmarks_specification/test-suites/memtier_benchmark-stream-10M-entries-xreadgroup-count-100.yml create mode 100644 redis_benchmarks_specification/test-suites/memtier_benchmark-stream-concurrent-xadd-xreadgroup-70-30.yml diff --git a/redis_benchmarks_specification/test-suites/memtier_benchmark-stream-10M-entries-xread-count-100.yml b/redis_benchmarks_specification/test-suites/memtier_benchmark-stream-10M-entries-xread-count-100.yml new file mode 100644 index 0000000..b33fd8a --- /dev/null +++ b/redis_benchmarks_specification/test-suites/memtier_benchmark-stream-10M-entries-xread-count-100.yml @@ -0,0 +1,36 @@ +version: 0.4 +name: memtier_benchmark-stream-10M-entries-xread-count-100 +description: 'Runs memtier_benchmark, pre-loading Redis with 10M stream entries using XADD, then testing XREAD performance with COUNT 100.' +dbconfig: + configuration-parameters: + save: '""' + check: + keyspacelen: 1 + preload_tool: + run_image: redislabs/memtier_benchmark:edge + tool: memtier_benchmark + arguments: '"--data-size" "100" --command "XADD stream-key * field __data__" --command-key-pattern="P" -n 50000 -c 50 -t 4 --hide-histogram' + resources: + requests: + memory: 4g + dataset_name: 1M-stream-entries + dataset_description: This dataset contains 1 stream key with 1M entries, each with a field containing 100 bytes of data. +tested-commands: +- xread +redis-topologies: +- oss-standalone +build-variants: +- gcc:15.2.0-amd64-debian-bookworm-default +- gcc:15.2.0-arm64-debian-bookworm-default +- dockerhub +clientconfig: + run_image: redislabs/memtier_benchmark:edge + tool: memtier_benchmark + arguments: --command="XREAD COUNT 100 STREAMS stream-key 0" --hide-histogram -n 1000 -c 25 -t 4 + resources: + requests: + cpus: '4' + memory: 2g +tested-groups: +- stream +priority: 95 diff --git a/redis_benchmarks_specification/test-suites/memtier_benchmark-stream-10M-entries-xreadgroup-count-100.yml b/redis_benchmarks_specification/test-suites/memtier_benchmark-stream-10M-entries-xreadgroup-count-100.yml new file mode 100644 index 0000000..6d0953a --- /dev/null +++ b/redis_benchmarks_specification/test-suites/memtier_benchmark-stream-10M-entries-xreadgroup-count-100.yml @@ -0,0 +1,38 @@ +version: 0.4 +name: memtier_benchmark-stream-10M-entries-xreadgroup-count-100 +description: 'Runs memtier_benchmark, pre-loading Redis with 10M stream entries using XADD, creating a consumer group, then testing XREADGROUP performance with COUNT 100.' +dbconfig: + configuration-parameters: + save: '""' + check: + keyspacelen: 1 + preload_tool: + run_image: redislabs/memtier_benchmark:edge + tool: memtier_benchmark + arguments: '"--data-size" "100" --command "XADD stream-key * field __data__" --command-key-pattern="P" -n 50000 -c 50 -t 4 --hide-histogram' + init_commands: + - XGROUP CREATE stream-key test-group 0 MKSTREAM + resources: + requests: + memory: 4g + dataset_name: 1k-stream-entries-with-consumer-group + 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'. +tested-commands: +- xreadgroup +redis-topologies: +- oss-standalone +build-variants: +- gcc:15.2.0-amd64-debian-bookworm-default +- gcc:15.2.0-arm64-debian-bookworm-default +- dockerhub +clientconfig: + run_image: redislabs/memtier_benchmark:edge + tool: memtier_benchmark + arguments: --command="XREADGROUP GROUP test-group consumer1 COUNT 100 STREAMS stream-key >" --hide-histogram -n 1000 -c 25 -t 4 + resources: + requests: + cpus: '4' + memory: 2g +tested-groups: +- stream +priority: 94 diff --git a/redis_benchmarks_specification/test-suites/memtier_benchmark-stream-concurrent-xadd-xreadgroup-70-30.yml b/redis_benchmarks_specification/test-suites/memtier_benchmark-stream-concurrent-xadd-xreadgroup-70-30.yml new file mode 100644 index 0000000..6685992 --- /dev/null +++ b/redis_benchmarks_specification/test-suites/memtier_benchmark-stream-concurrent-xadd-xreadgroup-70-30.yml @@ -0,0 +1,50 @@ +version: 0.4 +name: memtier_benchmark-stream-concurrent-xadd-xreadgroup-70-30 +description: + Starting with a pre-loaded stream of 500K entries, the benchmark tests concurrent stream operations with a consumer group for distributed processing. + 70% of commands produce messages with XADD, while 30% consume with XREADGROUP COUNT 10. + 500K initial entries plus 200K * 70% minus 200K * 10 * (15% + 15%) ≈ 40K left in the stream at the end. +dbconfig: + configuration-parameters: + save: '""' + check: + keyspacelen: 1 + preload_tool: + run_image: redislabs/memtier_benchmark:edge + tool: memtier_benchmark + arguments: '"--data-size" "100" --command "XADD stream-key * field __data__" --command-key-pattern="P" -n 2500 -c 50 -t 4 --hide-histogram' + init_commands: + - XGROUP CREATE stream-key producer-consumer-group 0 MKSTREAM + resources: + requests: + memory: 4g + dataset_name: stream-concurrent-producer-consumer-500k-seed + dataset_description: This dataset starts with 500K pre-loaded stream entries, then tests concurrent stream operations with a consumer group for distributed processing. +tested-commands: + - xadd + - xreadgroup +redis-topologies: + - oss-standalone +build-variants: + - gcc:15.2.0-amd64-debian-bookworm-default + - gcc:15.2.0-arm64-debian-bookworm-default + - dockerhub +clientconfig: + run_image: redislabs/memtier_benchmark:edge + tool: memtier_benchmark + arguments: > + --data-size 100 + --command="XADD stream-key * field __data__" --command-key-pattern="P" --command-ratio=70 + --command="XREADGROUP GROUP producer-consumer-group consumer1 COUNT 10 STREAMS stream-key >" --command-key-pattern="P" --command-ratio=15 + --command="XREADGROUP GROUP producer-consumer-group consumer2 COUNT 10 STREAMS stream-key >" --command-key-pattern="P" --command-ratio=15 + --hide-histogram + -n 1000 + -c 50 + -t 4 + resources: + requests: + cpus: "4" + memory: 2g +tested-groups: + - stream +priority: 95