Skip to content

[Linux] Support async I/O with uring / liburing #12650

@damageboy

Description

@damageboy

It seems that Linux finally has a good story when it comes to async I/O: io_uring

While this is only released as part of Kernel 5.1, it definitely looks like a game changer when it comes to async I/O perf...

There's no point in going into what io_uring brings to the table in this issue, as it should be pretty clear from the linked PDF document, it is worth while to mention that this allows for some super high-perf scenarios by using advanced features such as:

  • Pre-registering I/O related file descriptors to avoid expensive kernel-side (!) reference counting
  • Pre-registering fixed buffers (in conjunction with O_DIRECT) to avoid expensive page-table manipulation on the kernel side (!)
  • Using Polled I/O to entirely avoid system calls when reading/writing data
  • Using batched operations

Some initial tests for File I/O from nodejs point to very substantial latency reductions (I'm "reprinting" the latency numbers from the linked comment):

I think that supporting this in CoreCLR can lead to substantial improvemnt of async I/O in Linux...
At the same time, its not clear to me how/if/when CoreCLR should adopt this and at what abstraction level...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions