raft-engine icon indicating copy to clipboard operation
raft-engine copied to clipboard

Speed up read performance with AIO

Open tabokie opened this issue 3 years ago • 0 comments

  1. Expanding FileSystem interface to provide async tasking capability:
trait AsyncContext {
  fn wait() -> Result<()>;
}

trait FileSystem {
  pub type AsyncIoContext: AsyncContext;
  fn new_async_context() -> AsyncContext;
  fn read(ctx: &mut AsyncIoContext, offset: u64, size: usize) -> IoResult<usize>;
}
  1. Modify read_entry implementation to generate read requests of all file blocks, then wait for completion.

For best kernel compatibility, use AIO to implement the first version. Reference: https://docs.rs/nix/latest/nix/sys/aio/fn.aio_suspend.html

tabokie avatar Jul 21 '22 07:07 tabokie