Repository navigation
perf: stream discarded YCSB reads - #234
Conversation
Signed-off-by: Perfloop Agent <[email protected]>
Signed-off-by: Perfloop Agent <[email protected]>
Greptile SummaryThis PR changes YCSB reads to stream response chunks directly into
Confidence Score: 4/5The PR appears safe to merge, with only non-blocking improvements needed in the regression test and duplicated documentation. The streaming implementation preserves response draining and error handling, but the new test does not distinguish streaming into Files Needing Attention: client/cmd/ycsb/ycsb_test.go, docs/benchmark.md Important Files Changed
Reviews (1): Last reviewed commit: "perf: stream discarded YCSB reads" | Re-trigger Greptile |
| if got, want := cacheServer.responseBytes.Load(), int64(cfg.NumOps*cfg.ValueSize); got != want { | ||
| t.Errorf("response bytes = %d, want %d", got, want) | ||
| } |
There was a problem hiding this comment.
Byte count misses allocation regression
The server-side responseBytes assertion only proves that the complete response was sent. A buffered Get would consume the same bytes, so this test still passes when the result-materializing implementation—and the allocation regression this test is intended to prevent—is restored.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| | `--force-streaming` | Force streaming for all operations | `false` | | ||
| | `--force-streaming` | Force streaming for writes; reads always stream | `false` | | ||
|
|
||
| Read operations always stream their responses because the benchmark does not consume values. `--force-streaming` therefore only affects writes below the automatic streaming threshold. |
There was a problem hiding this comment.
Streaming semantics are duplicated
This paragraph repeats the --force-streaming behavior already stated in the immediately preceding table row, adding maintenance overhead and allowing the two descriptions to drift.
| Read operations always stream their responses because the benchmark does not consume values. `--force-streaming` therefore only affects writes below the automatic streaming threshold. |
Rule Used: Avoid adding explanatory notes that simply restate... (source)
Learned From
tigrisdata/tigris-os-docs#265
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
🎉 This PR is included in version 1.12.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
YCSB does not consume read values. Drain reads through
GetStreaminstead of materializing an unused result slice; the full response is still received and errors are reported.The size threshold and
--force-streamingnow apply only to writes. Add a regression test that verifies every response byte is drained, plus a read-only YCSB benchmark spanning 64 KiB–1 MiB values.Tests:
make fmt-checkmake test-clientWorkload:
YCSB C discarded reads, 64 KiB values, 1 key, 64 operations, 4 workers, connection pool 4, NoProgress=true, ForceStreaming=falseB/opWorkload:
YCSB C discarded reads, 256 KiB values, 1 key, 64 operations, 4 workers, connection pool 4, NoProgress=true, ForceStreaming=falsens/opMB/sB/opWorkload:
YCSB C discarded reads, 1 MiB values, 1 key, 64 operations, 4 workers, connection pool 4, NoProgress=true, ForceStreaming=falsens/opMB/sB/opGenerated by Perfloop. Measurements and checks.
Note
Cursor Bugbot is generating a summary for commit a1cacf1. Configure here.