logoalt Hacker News

mgaunardtoday at 10:28 AM1 replyview on HN

Doing more system calls isn't really a good idea for performance.

Also if you're doing asynchronous writes you typically can only have one write in-flight at any time, you should aggregate all other buffers while that happens.

Though arguably asynchronous writes are often undesired due to the complexity of doing flow-control with them.


Replies

mgaunardtoday at 2:31 PM

Actually, with newer Linux kernels and io_uring, it appears it is now possible to do multiple writes asynchronously concurrently, by annotating each one with a sequencing constraint.

Whether that's really useful or not depends on whether you do the associated buffer management work.