Skip to content

Valkey updates#2

Open
dvalinrh wants to merge 3 commits into
mainfrom
valkey_updates
Open

Valkey updates#2
dvalinrh wants to merge 3 commits into
mainfrom
valkey_updates

Conversation

@dvalinrh

@dvalinrh dvalinrh commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Adding valkey test.
This replaces the redis test in phoronix. Addinf to the zathras test defs will occur after push.

JIRA: https://redhat.atlassian.net/browse/RPOPC-1265
Git issue: #1

Run info
Use default settings, 5 iterations is enough to produce stable results.

Code has been reviewed through claude.

Results csv file
Note: Time period given is the time for 1 iteration. There is no way to differentiate the individual tests. pcp will have the time periods for the iterations, this is just to keep the results csv files all the same.

Value present in the csv file is the average for all the iterations.

Test general meta start

Test: valkey

Results version: v1.00

Host: m6i.xlarge

Sys environ: aws

Tuned: virtual-guest

OS: 6.12.0-124.38.1.el10_1.x86_64

Numa nodes: 1

CPU family: Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz

Number cpus: 4

Memory: 15813884kB

Test general meta end

Test,RPS,Start_Date,End_Date
XADD,159957,2026-07-08T11:19:26Z,2026-07-08T11:21:04Z
MSET_10_keys,159792,2026-07-08T11:19:26Z,2026-07-08T11:21:04Z
LRANGE_600_first_600_elements,20748,2026-07-08T11:19:26Z,2026-07-08T11:21:04Z
LRANGE_500_first_500_elements,23492,2026-07-08T11:19:26Z,2026-07-08T11:21:04Z
LRANGE_300_first_300_elements,37181,2026-07-08T11:19:26Z,2026-07-08T11:21:04Z
LRANGE_100_first_100_elements,84175,2026-07-08T11:19:26Z,2026-07-08T11:21:04Z
LPUSH_needed_to_benchmark_LRANGE,199933,2026-07-08T11:19:26Z,2026-07-08T11:21:04Z
ZPOPMIN,199933,2026-07-08T11:19:26Z,2026-07-08T11:21:04Z
ZADD,199933,2026-07-08T11:19:26Z,2026-07-08T11:21:04Z
SPOP,199900,2026-07-08T11:19:26Z,2026-07-08T11:21:04Z
HSET,199900,2026-07-08T11:19:26Z,2026-07-08T11:21:04Z
SADD,199933,2026-07-08T11:19:26Z,2026-07-08T11:21:04Z
RPOP,199966,2026-07-08T11:19:26Z,2026-07-08T11:21:04Z
LPOP,199933,2026-07-08T11:19:26Z,2026-07-08T11:21:04Z
RPUSH,199900,2026-07-08T11:19:26Z,2026-07-08T11:21:04Z
LPUSH,199900,2026-07-08T11:19:26Z,2026-07-08T11:21:04Z
INCR,199900,2026-07-08T11:19:26Z,2026-07-08T11:21:04Z
GET,199900,2026-07-08T11:19:26Z,2026-07-08T11:21:04Z
SET,199900,2026-07-08T11:19:26Z,2026-07-08T11:21:04Z
PING_MBULK,199933,2026-07-08T11:19:26Z,2026-07-08T11:21:04Z
PING_INLINE,199966,2026-07-08T11:19:26Z,2026-07-08T11:21:04Z

@dvalinrh dvalinrh requested a review from sayalibhavsar July 8, 2026 13:02
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added detailed documentation for the Valkey benchmark wrapper, including end-to-end workflow, options, metrics, output formats, examples, and troubleshooting.
    • Enhanced results reporting by aggregating per-iteration RPS into a single summary file, with optional min/max trimming for more stable averages.
  • Bug Fixes

    • Improved benchmark execution and result collation to keep per-iteration outputs isolated and combined correctly.
    • Increased the default request count and updated thread handling to follow the configured thread list.

Walkthrough

This PR updates the Valkey benchmark wrapper to increase the default request volume, manage Valkey per thread and iteration, scope result extraction, aggregate iteration results, update artifact persistence, remove stale verification data, and replace the README with a comprehensive user guide.

Changes

Valkey benchmark workflow

Layer / File(s) Summary
Benchmark execution and lifecycle management
valkey/valkey.sh
Updates defaults and usage text, runs configured threads with explicit Valkey service start and stop handling, scopes CSV extraction to each iteration, removes --commit parsing, and sets rc.local permissions.
Result aggregation and persistence
valkey/valkey.sh
Updates conversion and verification handling, averages per-test RPS across iterations with conditional min/max trimming, then shuts down PCP and saves CSV and PCP artifacts.
README user guide
README.md
Documents options, workflow, dependencies, operations, metrics, outputs, examples, thread selection, averaging, return codes, troubleshooting, and references.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant MainFlow
  participant execute_valkey
  participant systemctl
  participant ValkeyBenchmark
  participant generate_combine_report

  MainFlow->>execute_valkey: run configured benchmark iterations
  execute_valkey->>systemctl: start Valkey and wait for readiness
  systemctl-->>execute_valkey: return service status
  execute_valkey->>ValkeyBenchmark: run thread benchmark and write iteration CSVs
  execute_valkey->>systemctl: stop Valkey
  MainFlow->>generate_combine_report: aggregate iteration RPS values
  generate_combine_report-->>MainFlow: write valkey_results.csv
  MainFlow->>MainFlow: stop PCP and save results
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is related to the Valkey changes, but it is too broad to convey the main update. Rename it to something specific, e.g. "Add Valkey benchmark wrapper and reporting updates".
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly discusses adding the Valkey test and replacing the Redis test, matching the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@valkey/valkey.sh`:
- Around line 250-278: The aggregation in generate_combine_report is brittle for
very high RPS and missing per-iteration rows; update the loop over test_list/seq
so it safely handles absent grep matches from valkey_iter_${iter}.csv without
arithmetic failures, and replace the fixed low sentinel with a value derived
from the first valid sample (or another unbounded initialization). Also adjust
the avg calculation at the end of generate_combine_report so it preserves
fractional precision instead of truncating to an integer.
- Around line 191-197: The Valkey startup flow in valkey.sh uses a malformed
systemctl invocation, so the benchmark may begin before the service is ready.
Fix the startup sequence around the systemctl start/status calls by replacing
the invalid wait usage with a valid readiness check or wait-capable start
pattern before running valkey-benchmark, and keep the benchmark launch dependent
on Valkey being fully up.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 72a04337-916c-45ee-aea8-987350e78280

📥 Commits

Reviewing files that changed from the base of the PR and between 6e11b48 and 76aee6b.

📒 Files selected for processing (3)
  • README.md
  • valkey/valkey.sh
  • valkey/valkey_verify.json
💤 Files with no reviewable changes (1)
  • valkey/valkey_verify.json

Comment thread valkey/valkey.sh
Comment thread valkey/valkey.sh
Comment thread valkey/valkey.sh Outdated
Comment thread valkey/valkey.sh Outdated
Comment thread valkey/valkey.sh Outdated
Comment thread valkey/valkey.sh Outdated
Comment thread valkey/valkey.sh
Comment thread valkey/valkey.sh
Comment thread README.md Outdated

```
Valkey Options:
--commit <value>: Specify a git commit or tag to use for Valkey installation.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

documented by unimplemented

Comment thread README.md
Comment thread README.md
19. **LRANGE_600**: List range query retrieving 600 elements.

20. **MSET**: Multiple SET operations in single command.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://gist.github.com/sayalibhavsar/5c81c12078a73de108dbc89648b3a9bf
Operations list says 20, but valkey-benchmark also runs XADD by default which isn't listed

  1. XADD: Stream data structure - append entry to a stream.

Comment thread README.md
@dvalinrh dvalinrh requested a review from sayalibhavsar July 10, 2026 09:29

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
valkey/valkey.sh (1)

260-280: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

samples denominator ignores skipped iterations, skewing the average.

When a valkey_iter_${iter}.csv row is missing, Line 263-265 continues without adding to sum, but samples is still fixed to to_times_to_run (or to_times_to_run-2). The average is then divided by a count larger than the number of values actually summed, understating RPS. Track the count of valid samples instead of assuming a full set.

♻️ Suggested fix
 		high=0
 		low=""
 		sum=0
+		count=0
 		for iter in $(seq 1 1 $to_times_to_run); do
 			file="valkey_iter_${iter}.csv"
 			rval=$(grep ^${tst}, $file | cut -d, -f2 |cut -d. -f1)
 			if [[ -z $rval ]]; then
-				echo Error in parsing alkey_iter_${iter}.csv
+				echo "Error in parsing valkey_iter_${iter}.csv"
 				continue
 			fi
 			let "sum=${sum}+${rval}"
+			count=$((count+1))
 			if [[ $rval -gt $high ]]; then
 				high=$rval
 			fi
 			if [[ $low == "" ]] || [[ $rval -lt $low ]]; then
 				low=$rval
 			fi
 		done
-		if [[ $to_times_to_run -gt 4 ]]; then
-			let "samples=${to_times_to_run}-2"
+		if [[ $count -gt 4 ]]; then
+			let "samples=${count}-2"
 			let "sum=${sum}-${high}-${low}"
 		else
-			samples=${to_times_to_run}
+			samples=${count}
 		fi
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@valkey/valkey.sh` around lines 260 - 280, Track the number of successfully
parsed rows in the iteration loop, incrementing it only after a valid rval is
found, and use that count to determine samples instead of to_times_to_run.
Update the outlier-removal logic so high and low are excluded only when the
valid sample count supports it, while preserving the existing sum handling in
the loop around valkey_iter_${iter}.csv parsing.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@valkey/valkey.sh`:
- Around line 260-280: Track the number of successfully parsed rows in the
iteration loop, incrementing it only after a valid rval is found, and use that
count to determine samples instead of to_times_to_run. Update the
outlier-removal logic so high and low are excluded only when the valid sample
count supports it, while preserving the existing sum handling in the loop around
valkey_iter_${iter}.csv parsing.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 273622e9-7d15-41ee-a581-4971edab5eff

📥 Commits

Reviewing files that changed from the base of the PR and between 76aee6b and 674b09a.

📒 Files selected for processing (2)
  • README.md
  • valkey/valkey.sh
💤 Files with no reviewable changes (1)
  • README.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants