Skip to content

Keep recent segment buffers around and use as a read-cache #2

@dpc

Description

@dpc

Currently we circulate bunch of Vec<u8> as an per-entry cache we read from the socket into, before we write it into the open segment file. Instead of discarding this data right after write, we could keep it around to server the reads from them.

This will be in particular useful if we use direct mode for reads and writes, as (AFAIU) that will prevent serving answers from the kernel-level cache.

There's are some problems/things to figure out here:

  • It would be better to keep around fewer, but larger size buffers - e.g one Vec<u8> per segment. But tokio-uring wants to take ownership of the whole Vec on each operation, so working on such per-segment Vec might not be possible. In addition - how are we going to track which areas of the buffer are already written into, and which are not? Just usein_flight to check?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions