test: xorb reconstruction cache warm-up benchmark and unit test#24
Merged
Conversation
Add a unit test verifying that warm_reconstruction_cache is triggered on open() and that subsequent reads on the same handle are served without re-waiting (watch value stays true). Add an EC2 integration benchmark (warm_cache_bench) that measures TTFB and sequential throughput for 5 consecutive opens of a 100 MB file: - Open 1 (cold): CAS round-trip for reconstruction plan - Open 2+ (warm): plan served from in-process cache, data from xorb cache Use /dev/shm (tmpfs) as the xorb cache directory on Linux so warm reads hit RAM rather than EBS, demonstrating the actual benefit: cold TTFB 201 ms / 432 MB/s warm TTFB 1 ms / 6.7 GB/s
Contributor
POSIX Compliance (pjdfstest) |
Contributor
Benchmark Results |
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.
Summary
warm_reconstruction_cacheis triggered onopen()and that the watch stays true for subsequent reads on the same handle (no re-waiting)warm_cache_bench) measuring TTFB and sequential throughput for 5 consecutive opens of a 100 MB fileBackground
The streaming path already used the xorb chunk disk cache correctly via
FileReconstructor.with_chunk_cache(). This PR adds validation and numbers to prove it.Benchmark results (m6i.2xlarge, /dev/shm cache)
The bench uses
/dev/shm(tmpfs) on Linux so warm reads hit RAM. On EBS-backed/tmp(m6i default, ~125 MB/s baseline), warm reads would appear slower than cold S3 reads, making the cache benefit invisible.Run
cargo test --release --test warm_cache_bench -- --nocapture