Skip to content

Conversation

@aliddell
Copy link
Member

@aliddell aliddell commented Sep 19, 2025

This PR introduces platform-specific vectorized chunk writing to improve file I/O performance.

Key changes

  • Added pure virtual Sink::write(size_t offset, const std::vector<uint8_t>& buffers) with implementations in child classes to write a collection of buffers, either vectorized or in sequence
  • Added pure virtual Sink::align_to_system_size(size_t) with implementations in child classes to align sizes to a system-dependent size (e.g., sector size)

Platform-specific implementations

  • POSIX uses pwritev()
  • Windows uses WriteFileGather and appropriate I/O flags
  • S3 writes in sequence

@aliddell aliddell changed the title Vector-write chunks to shards Add vectorized file writes for improved I/O performance Sep 23, 2025
@aliddell aliddell force-pushed the with-vectorized-writing branch from 665d2bd to 4e33aac Compare September 25, 2025 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants