Repository navigation
Measure the SQLite store: throughput, commit cost and list ordering (#859) - #882
Merged
Merged
Conversation
…dering (#859) Adds a manual benchmark (npm run bench:store, not part of verify) that serves an owned store collection with idempotency, audit off and on, drives it with a bounded keep-alive node:http client, samples the server's event-loop delay, and runs isolated micro-benchmarks for synchronous=FULL vs NORMAL and for JS-side vs SQL ordering at 1k/10k/50k records. Records one local run in docs/CAPACITY.md with machine, method and caveats. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #859 item 5 and measures item 1. This is measurement only; no store source changes.
packages/store/bench/store-throughput.ts, run withnpm run bench:store(not part ofverify).--quickgives a short run and--json <file>saves the raw results.If-MatchandIdempotency-Keywrites at fixed concurrency.fullfsync=ON, 4.0 ms (a true cache flush on macOS).sort=titletakes about 10 ms at 10k and about 1.3 ms at the default 1k cap.Recommendations (no change made)
synchronous=FULL. On macOS the fsync is not the bottleneck. Linux fsync flushes the drive cache, so runbench:storeon the target Linux host before deciding. Relaxing to NORMAL gives up durability of the last transactions on power loss, which is a product decision.maxRecordsof 1,000. It becomes worthwhile near 10k records with concurrent sorted traffic, but only with an index on each sortable field and a UTF-16-correct collation.Evidence
npm run typecheck,npm test(1150/1150) andnpm run checkpass.🤖 Generated with Claude Code