Use io_uring when available
Io_uring is a new subsystem for asynchronous transfers of network or disk/storage i/o.
https://lwn.net/Articles/810414/
It has a great potential in handling concurrent connections and transfers over multiple sockets or disk files.
Samba has implemented this on disk io as side, and ib my home / nas setting, it almost doubled total throughput on concurrent reads.
In network situations, it is said to be able to scale to 3-5x performance.
Liburing is a library to be able to utilise this subsystem. I think that Tor really should look at io_uring due to the massive concurrency of a relay.
In my own experience running a relay on a low end hardware for two years and the low end hardware was never able to fill the fiber connection. It seems to be quite a lot of internal overhead, perhaps io_uring could really help.
References https://lwn.net/Articles/810414/ https://lwn.net/Articles/776428/ https://git.kernel.dk/cgit/liburing/ https://github.com/axboe/liburing
Other projects using io_uring https://wiki.samba.org/index.php/Samba_4.12_Features_added/changed#.27io_uring.27_vfs_module https://github.com/ceph/ceph/pull/27392
Trac:
Username: torry