Repository navigation
test-suites: add three ZSCAN full-walk specs using memtier cursor iteration - #574
Conversation
…ration The existing ZSCAN specs re-issue cursor 0 on every call, so they only ever measure the first page of a ZSCAN. memtier_benchmark now follows the cursor returned by ZSCAN (--scan-incremental-iteration, redis/memtier_benchmark#539), so add full-traversal companions for the three shapes that matter: - 1key-zset-200K-elements-zscan-count-10-incremental-iteration (200K members, default COUNT: ~20,000 cursor round-trips per walk) - 1key-zset-200K-elements-zscan-count-1000-incremental-iteration (200K members, COUNT 1000: ~200 reply-construction-dominated pages per walk) - 1key-zset-1K-elements-zscan-incremental-iteration (1,000 members with non-integral scores: every emitted score takes the non-integer formatting path) Datasets, key names and encodings are the same as the first-page siblings so the two numbers can be read side by side. Each client keeps its own cursor, walks until the server returns 0 and starts over; memtier reports the initial "ZSCAN 0" requests and the "ZSCAN <cursor>" continuations separately and the exported Totals covers both. --pipeline 1 is required by the iteration mode. The existing first-page specs are left untouched.
|
🤖 Automated first-pass review — a human maintainer's review is still required before merge. This was a single read-only pass over the PR description, diff and the sibling specs already on The three specs can't produce data until memtier #539 is in Separately, not a blocker: the 1K spec gives the Everything else lines up with what's already merged: the 200K preload is copied verbatim from the two existing 200K ZSCAN specs, including the single- So the specs themselves look right to me — the only thing I'd hold on is the memtier image ordering. |
…ommand like its sibling dataset_name/description no longer inherit the sibling's stale "1key-sorted-set-32B-size" / "redis set data structures" label; the client command drops the explicit COUNT 10 so it matches memtier_benchmark-1key-zset-1K-elements-zscan exactly (COUNT 10 is the server default, as the description states).
|
Thanks — both nits taken in f8b9e33:
On the merge ordering: agreed, and it is the plan — this PR is not to be merged (nor a release cut) until redis/memtier_benchmark#539 has merged and |
The two existing specs that load the identical zset:1000 payload (1K-elements-zscan, 1K-elements-zrange-all-elements) take the same accurate dataset_name/dataset_description as the new full-walk spec, so the runner's unique-dataset accounting and the profiling label see one dataset. Metadata only; commands, preloads and encodings are unchanged.
|
Went with "rename all three in one pass" in bfe8acf: |
|
Pre-merge stability check on real hardware, with the
Every run produced a datapoint and the run-to-run spread is ≤ 1.1% on both architectures. For reference, the first-page siblings on the same boxes sit at ~124–128K ops/s (200K, COUNT 10), ~2.9–3.8K (COUNT 1000) and ~119–123K (1K): the full walk costs a few percent more per page than the first page at COUNT 10 and about the same at COUNT 1000, as expected. |
Why
The existing ZSCAN specs re-issue cursor
0on every call, so they only ever measure the first page of a ZSCAN (cursor progression, rehash safety and late-page cost are never exercised). memtier_benchmark now follows the cursor returned by ZSCAN —--scan-incremental-iterationextended to the key-scoped SCAN commands in redis/memtier_benchmark#539 — so this adds full-traversal companions for the three shapes that matter. Purely ZSCAN. The existing first-page specs keep their commands, preloads and encodings; the only touch to existing files is that the two specs loading the identicalzset:1000payload take the same accuratedataset_name/dataset_descriptionas the new 1K spec (one physical dataset, one label).New specs
memtier_benchmark-1key-zset-200K-elements-zscan-count-10-incremental-iterationzscan200k, 200,000 short members, score 0, skiplistmemtier_benchmark-1key-zset-200K-elements-zscan-count-1000-incremental-iterationmemtier_benchmark-1key-zset-1K-elements-zscan-incremental-iterationzset:1000, 1,000 members with 6-decimal scores, skiplistZSCAN zset:1000 0, like its sibling) → ~100 pages per walk; every emitted score takes the non-integer formatting pathClient:
--command "ZSCAN <key> 0 COUNT n" --scan-incremental-iteration --pipeline 1 -c 50 -t 4 --hide-histogram --test-time 180. Each client keeps its own cursor, walks until the server returns0, then starts over. memtier reports the initialZSCAN 0requests and theZSCAN <cursor>continuations as separate rows; the exportedTotalscovers both.--pipeline 1is required by the iteration mode. Descriptions state encoding, metric (Ops/sec) and the memtier requirement.Validation
redis-benchmarks-spec-cli --tool stats --fail-on-required-diffon the branch: exit 0.unstableserver with a memtier built from ci: fix update-in-place comment corruption (gh api -f -> -F) #539's head (45043d4), 20 s runs, one core for the server:Zscan 0sops/sZscan <cursor>sops/scmdstat_zscancallsZscan 0sis exactly one initial request per connection (200 connections / 20 s ≈ 10/s) on the 200K specs, whose walks are longer than the 20 s window; on the 1K spec walks complete ~100 pages each. Three repeats of each spec (40 s) landed within 1.2% / 2.4% / 5.6% of each other on the same laptop.Note
These specs need a memtier image that includes redis/memtier_benchmark#539 (
redislabs/memtier_benchmark:edgeonce it is merged); on an older build memtier exits with--scan-incremental-iteration requires the command to be a SCAN commandand the run produces no data.Note
Low Risk
Benchmark YAML and metadata only; no Redis server or application runtime changes, though CI needs a memtier image that supports ZSCAN incremental iteration.
Overview
Adds three memtier benchmark specs that measure full ZSCAN traversals via
--scan-incremental-iterationand--pipeline 1, pairing with existing first-page-only ZSCAN suites: 200K-member sets at COUNT 10 and COUNT 1000, and 1K members with fractional scores (non-integer score formatting).Also corrects dataset metadata on
memtier_benchmark-1key-zset-1K-elements-zrange-all-elementsandmemtier_benchmark-1key-zset-1K-elements-zscan: replaces the misleading1key-sorted-set-32B-sizelabel with1key-zset-1K-elements-fractional-scoresand an accurate description. New specs depend on memtier with ZSCAN cursor iteration (e.g.redislabs/memtier_benchmark:edge/ memtier_benchmark#539).Reviewed by Cursor Bugbot for commit bfe8acf. Bugbot is set up for automated code reviews on this repo. Configure here.