Skip to content

Consider using read_at for local read_range #161

@wjones127

Description

@wjones127

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    development-processRelated to development process of object-storeenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions