perf(bench): isolate the read-scaling bottleneck (sepdb/snap)#18
Merged
Conversation
Add two contention-isolation workloads to scale_bench and record the results: - sepdb: one DB file per thread (no shared root page) — 30-50% faster than the shared-db baseline at 4-12 threads, confirming shared hot-page contention. - snap: per-thread DB_TXN_SNAPSHOT reads (MVCC, no page locks, reused locker) — scales to 4 threads but still plateaus at 8-12, isolating the buffer-header page pin (__memp_fget) as the dominant read-scaling cap, with the lock manager a secondary cost. Also replace pthread_barrier (absent on macOS) with a portable volatile start gate so the harness builds on Linux/FreeBSD/macOS.
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.
Adds two contention-isolation workloads to
scale_benchand records the measured ranking of the multi-core read bottlenecks.Result
In-cache random-read sweep (12-core laptop; pattern matches the 24-core
mehperf profile):__memp_fget, not the lock manager.Conclusion (drives the prototype order)
Also replaces
pthread_barrier(absent on macOS) with a portable start gate so the harness builds on Linux/FreeBSD/macOS. Full analysis indocs/design/scaling-findings.md.