-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Description
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...