Skip to content

fix: prefill the memtier keyspace before measuring - #271

Merged
skyoo2003 merged 1 commit into
mainfrom
feat/memtier-prefill
Sep 30, 2026
Merged

skyoo2003 merged 1 commit into
mainfrom
feat/memtier-prefill

Conversation

@skyoo2003

Copy link
Copy Markdown
Owner

Summary

make memtier sent GETs at keys nobody had written, so the GET numbers on the performance page mostly measured the miss path. This PR writes every key before the load starts. It also re-measures the page on AC power; the previous numbers were taken on battery.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Refactor
  • CI/CD

Changes

  • scripts/memtier.sh writes memtier-0 through memtier-100000 through redis-cli --pipe, before the load starts:
    • One MSET per 1,000 keys, so the fill is 101 writes. One SET per key would take about 6 minutes in durable mode and about 40 in a cluster.
    • The run fails if the pipe reports any errors.
  • website/content/docs/performance.md:
    • Replaces all numbers with an AC-power run with the prefill. GET misses are now 0 in all three modes.
    • Corrects why cluster reads are fastest. The node is mostly idle while connections wait on their writes; skipping consensus is not the reason, since memory-mode reads skip it too and are about 15× slower.
    • The RESP benchmark rows come from a second run of ./internal/server, because another process on the machine loaded the CPU during the first.

Changelog

  • changie new fragment added — one sentence, two at most, 280 characters max
  • Not user-visible, no fragment needed

Testing

  • make memtier in all three modes, 60 s × 2 each: GET misses are 0, and the two runs of each mode are within 3% on throughput.
  • make bench BENCH_COUNT=6
  • hugo --minify, sh -n scripts/memtier.sh
  • New tests added (if applicable): N/A, script and docs only

Related Issues

N/A

`make memtier` sent GETs at 100,000 keys nobody had written, so most reads
took the miss path: by the end of a durable run about 12% of the keys
existed, in a cluster about 2.5%. The script now writes every key first,
a thousand to an MSET so that the fill costs a hundred writes rather than
minutes of fsyncs or most of an hour of consensus rounds.

The performance page is re-measured with the prefill on AC power, and its
explanation of the cluster's fast reads is corrected: they are fast because
the node is mostly idle waiting on writes, not because they skip consensus.
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Sep 30, 2026
@skyoo2003
skyoo2003 merged commit 24cccb1 into main Sep 30, 2026
3 checks passed
@skyoo2003
skyoo2003 deleted the feat/memtier-prefill branch September 30, 2026 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant