coalesced request align all segments#6158
Conversation
Benchmarks: TPC-H SF=1 on NVMESummary
Detailed Results Table
|
CodSpeed Performance ReportMerging this PR will degrade performance by 33.22%Comparing
|
Benchmarks: FineWeb NVMeSummary
Detailed Results Table
|
Benchmarks: Random AccessSummary
|
Benchmarks: TPC-H SF=1 on S3Summary
Detailed Results Table
|
Benchmarks: TPC-DS SF=1 on NVMESummary
Detailed Results Table
|
Benchmarks: TPC-H SF=10 on NVMESummary
Detailed Results Table
|
Benchmarks: FineWeb S3Summary
Detailed Results Table
|
Benchmarks: Statistical and Population GeneticsSummary
Detailed Results Table
|
Benchmarks: TPC-H SF=10 on S3Summary
Detailed Results Table
|
Benchmarks: Clickbench on NVMESummary
Detailed Results Table
|
Benchmarks: CompressionSummary
Detailed Results Table
|
vortex-file/src/read/driver.rs
Outdated
| /// Coalesce nearby requests into a single range while aligning the range start down to the | ||
| /// maximum alignment of all included requests. |
There was a problem hiding this comment.
| /// Coalesce nearby requests into a single range while aligning the range start down to the | |
| /// maximum alignment of all included requests. | |
| /// Coalesce nearby requests into a single range request aligned to widest alignment of all coalesced requests |
| /// [x, x, x, x, x, x, A, A, A, A, A, x, B] | ||
| /// A aligned to 2, B aligned to 4 | ||
| /// Coalesced range starts at 4, so the buffer is: | ||
| /// [x, x, A, A, A, A, A, x, B] |
There was a problem hiding this comment.
why does this have 9 values in?
There was a problem hiding this comment.
you want to read both A and B, and B is only one byte in this example. It has the leading 2 byte padding to keep B 4-aligned
Signed-off-by: Onur Satici <onur@spiraldb.com>
Signed-off-by: Onur Satici <onur@spiraldb.com>
Signed-off-by: Onur Satici <onur@spiraldb.com>
We align the coalesced range start down to the max alignment of all requests. That makes `coalesced_start % max_alignment == 0`, just like the file start. Because segment offsets are aligned in the file, their offsets relative to the coalesced start remain aligned, so each buffer stays properly aligned without per‑buffer realignment. example: bytes in the file: [x, x, x, x, x, x, A, A, A, A, A, x, B] A aligned to 2 B aligned to 4 coalesced read both to a 2 aligned buffer: [ A, A, A, A, A, x, B] A aligned to 2 B is not aligned to 4 with this change we read this to the coalesced buffer: [x, x, A, A, A, A, A, x, B] A aligned to 2 B aligned to 4 --------- Signed-off-by: Onur Satici <onur@spiraldb.com>
We align the coalesced range start down to the max alignment of all requests. That makes
coalesced_start % max_alignment == 0, just like the file start. Because segment offsets are aligned in the file, their offsets relative to the coalesced start remain aligned, so each buffer stays properly aligned without per‑buffer realignment.example:
bytes in the file:
[x, x, x, x, x, x, A, A, A, A, A, x, B]
A aligned to 2
B aligned to 4
coalesced read both to a 2 aligned buffer:
[ A, A, A, A, A, x, B]
A aligned to 2
B is not aligned to 4
with this change we read this to the coalesced buffer:
[x, x, A, A, A, A, A, x, B]
A aligned to 2
B aligned to 4