Skip to content

Commit 8c680f2

Browse files
authored
perf(cuda): read pooled files in 8 MiB chunks (#10715)
## Problem Splitting staged file reads into 4 MiB chunks adds per-chunk I/O and transfer overhead. ## Solution Increase physical read and H2D chunks to 8 MiB, retaining concurrency 32 and existing logical batches. ## Assessment Uses larger staging buffers per request. Independent of mapped-file copying; based on #10726. Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
1 parent c88edde commit 8c680f2

4 files changed

Lines changed: 10 additions & 2 deletions

File tree

‎vortex-cuda/README.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ Key files:
1010
- `vortex-cuda/src/arrow/canonical.rs`: canonical-array export to `ArrowDeviceArray`.
1111
- `vortex-test/e2e-cuda/src/lib.rs`: cuDF interop harness.
1212

13+
## CUDA file scans
14+
15+
Local pooled file reads use fixed 8 MiB chunks with concurrency 32. These are physical
16+
file-read/H2D chunks, independent of logical row ranges or scan batch sizes.
17+
1318
## Building cuDF for Arrow Device interop
1419

1520
The `cudf-test-harness` repository provides prebuilt cuDF binaries for Arrow Device interop testing on

‎vortex-cuda/ffi/README.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ Use `vx_cuda_scan_path_arrow_device_stream` to read such a local file through pi
2424
and receive an Arrow C Device stream. Reuse the same CUDA session across scans so the pinned buffer
2525
pool and CUDA state are reused as well.
2626

27+
Pooled data reads use fixed 8 MiB chunks and concurrency 32;
28+
scan row ranges and batch sizes are unchanged.
29+
2730
On Linux, use `vx_cuda_scan_path_arrow_device_stream_with_options` with
2831
`vx_cuda_scan_options.flags = VX_CUDA_SCAN_FLAG_DIRECT_IO` to bypass the operating system page
2932
cache for pooled data-plane reads. Footer and zone-map reads remain buffered on the host.

‎vortex-cuda/src/pooled_read_at/file.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub const DEFAULT_FILE_CONCURRENCY: usize = 32;
3838

3939
// Physical segments can exceed the coalescing limit. Split their I/O, not their encoding,
4040
// to limit blocking read sizes and start transfers before the whole segment is read.
41-
const FILE_READ_CHUNK_BYTES: usize = 4 << 20;
41+
const FILE_READ_CHUNK_BYTES: usize = 8 << 20;
4242

4343
/// Options controlling how [`PooledFileReadAt`] opens and reads a local file.
4444
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]

‎vortex-cuda/src/pooled_read_at/file/tests.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ impl FileReadBackend for FakeFileReadBackend {
119119
}
120120

121121
fn file_byte(offset: u64) -> u8 {
122-
// Unlike a repeating u8 counter, this distinguishes adjacent 4 MiB chunks.
122+
// Unlike a repeating u8 counter, this distinguishes adjacent read chunks.
123123
(offset % 251) as u8
124124
}
125125

0 commit comments

Comments
 (0)