-
Notifications
You must be signed in to change notification settings - Fork 436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pageserver: do vectored read on each dio-aligned section once #8763
Conversation
3780 tests run: 3674 passed, 0 failed, 106 skipped (full report)Code coverage* (full report)
* collected from Rust tests only The comment gets automatically updated with the latest test results
2443e9a at 2024-08-28T14:18:55.634Z :recycle: |
Signed-off-by: Yuchen Liang <yuchen@neon.tech>
Signed-off-by: Yuchen Liang <yuchen@neon.tech>
0af8e83
to
ea5efeb
Compare
Signed-off-by: Yuchen Liang <yuchen@neon.tech>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good
Are we supporting these two modes to allow for a staged cut-over to dio?
Currently doing perf testing to see if this is mergable without the actual |
Signed-off-by: Yuchen Liang <yuchen@neon.tech>
Signed-off-by: Yuchen Liang <yuchen@neon.tech>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This review pertains to code that is taken by the Adjacent
path, i.e., this review is to ensure we're not regressing anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed the ChunkedVectoredReadBuilderInner.
Seems correct, some style comments.
Signed-off-by: Yuchen Liang <yuchen@neon.tech>
Signed-off-by: Yuchen Liang <yuchen@neon.tech>
Signed-off-by: Yuchen Liang <yuchen@neon.tech>
Signed-off-by: Yuchen Liang <yuchen@neon.tech>
Signed-off-by: Yuchen Liang <yuchen@neon.tech>
Signed-off-by: Yuchen Liang <yuchen@neon.tech>
dff338c
to
fe2393c
Compare
Signed-off-by: Yuchen Liang <yuchen@neon.tech>
Signed-off-by: Yuchen Liang <yuchen@neon.tech>
Signed-off-by: Yuchen Liang <yuchen@neon.tech>
Signed-off-by: Yuchen Liang <yuchen@neon.tech>
Signed-off-by: Yuchen Liang <yuchen@neon.tech>
Signed-off-by: Yuchen Liang <yuchen@neon.tech>
Signed-off-by: Yuchen Liang <yuchen@neon.tech>
Part of #8130, closes #8719. ## Problem Currently, vectored blob io only coalesce blocks if they are immediately adjacent to each other. When we switch to Direct IO, we need a way to coalesce blobs that are within the dio-aligned boundary but has gap between them. ## Summary of changes - Introduces a `VectoredReadCoalesceMode` for `VectoredReadPlanner` and `StreamingVectoredReadPlanner` which has two modes: - `AdjacentOnly` (current implementation) - `Chunked(<alignment requirement>)` - New `ChunkedVectorBuilder` that considers batching `dio-align`-sized read, the start and end of the vectored read will respect `stx_dio_offset_align` / `stx_dio_mem_align` (`vectored_read.start` and `vectored_read.blobs_at.first().start_offset` will be two different value). - Since we break the assumption that blobs within single `VectoredRead` are next to each other (implicit end offset), we start to store blob end offsets in the `VectoredRead`. - Adapted existing tests to run in both `VectoredReadCoalesceMode`. - The io alignment can also be live configured at runtime. Signed-off-by: Yuchen Liang <yuchen@neon.tech>
Part of #8130, closes #8719.
Problem
Currently, vectored blob io only coalesce blocks if they are immediately adjacent to each other. When we switch to Direct IO, we need a way to coalesce blobs that are within the dio-aligned boundary but has gap between them.
Summary of changes
VectoredReadCoalesceMode
forVectoredReadPlanner
andStreamingVectoredReadPlanner
which has two modes:AdjacentOnly
(current implementation)Chunked(<alignment requirement>)
ChunkedVectorBuilder
that considers batchingdio-align
-sized read, the start and end of the vectored read will respectstx_dio_offset_align
/stx_dio_mem_align
(vectored_read.start
andvectored_read.blobs_at.first().start_offset
will be two different value).VectoredRead
are next to each other (implicit end offset), we start to store blob end offsets in theVectoredRead
.VectoredReadCoalesceMode
.Testing
See #8779 for a matrix build of the regression test with alignment requirement = [1, 512].
Performance
Benchmark Results
TLDR: No significant difference between using different chunk sizes.
Rollout
io_buffer_alignment=0
).We will test the new chunked vectored read code path in pre-prod later this week after release.
Checklist before requesting a review
Checklist before merging