Skip to content

[Feature][C++] Support mmap as an optional local file read backend - #920

Open
Young-Leo wants to merge 1 commit into
apache:developfrom
Young-Leo:ly/mmap-read-backend
Open

[Feature][C++] Support mmap as an optional local file read backend#920
Young-Leo wants to merge 1 commit into
apache:developfrom
Young-Leo:ly/mmap-read-backend

Conversation

@Young-Leo

Copy link
Copy Markdown
Contributor

Summary

  • Add AUTO, MMAP, and PREAD local file read backends for the C++ reader.
  • Implement POSIX mmap and Windows file mapping, including automatic fallback and explicit mapping errors.
  • Expose the read backend configuration through the C and Python APIs.
  • Add correctness and lifecycle tests, documentation, and a benchmark covering sequential, random, metadata, query, and concurrent reads.

Benchmark

Preliminary Windows Release benchmark using a 96.40 MiB TsFile with a warm OS page cache:

Workload MMAP / PREAD
64 KiB sequential read 0.52x
4 KiB random read 15.38x
Metadata parsing 0.71x
Random queryByRow 0.93x
Concurrent read 2.83x

The results show that MMAP mainly benefits fine-grained random reads. It is not faster for every workload.

Closes #903

Add AUTO, MMAP, and PREAD configuration across the C++, C, and Python APIs. Implement Windows and POSIX mappings with fallback and explicit errors, plus lifecycle tests, documentation, and comparison benchmarks for issue apache#903.
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.

[Feature][C++] Support mmap as an optional local file read backend

1 participant