-
Notifications
You must be signed in to change notification settings - Fork 105
Description
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Right now in read_range, we open the file, seek to the start of the range, and then read. However depending on the access pattern, it might make more sense to use std::os::unix::fs::FileExt::read_at (there is a Windows equivalent as well). This uses the pread64 syscall under the hood, which reads at an offset without moving the file cursor.
Describe the solution you'd like
We should benchmark this against the current access pattern. In our recent tests we find it's 2 - 3 times faster for random reads of 4k bytes.
Describe alternatives you've considered
There may be other ideas, or we may find in benchmarks this isn't ideal for many other common read patterns (sequential reads).
Additional context