Replies: 1 comment 2 replies
-
Looks cool. We certainly want to support io_uring eventually. If you want to help out with getting io_uring into Tokio, then we would want a more detailed proposal that describes how it would be implemented so we can discuss what the best strategy for implementing it is. (e.g. Only file IO, or also network? How to place the rings across workers?) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Recently, I was trying to integrate io_uring into Tokio, and KuiBaDB/kbio works now.
Our experience using C++20 coroutines in Hologres tells us that work-stealing is very necessary. So we build kbio based on tokio.
We run one IO-Uring instance per Worker. Before that, all Workers in Tokio used an Epoll instance, mainly because once a file descriptor is bound to an Epoll instance in Tokio, then the file descriptor will never switch to other Epoll instances, which will affect the effect of Worker Steal.
When a Worker needs to submit SQE, it will give priority to the Uring instance corresponding to the current Worker, and will also switch to other Uring instances when there is no free space in the current Uring instance.
KBIO is only a transitional project. We expect Tokio to support iouring in the end. Currently, kbio is just used in KuiBaDB, it is only a prototype and has not been tested fully.
Most of kbio are fully compatible with tokio. See integrate kbio into memc for an example and a benchmark.
Beta Was this translation helpful? Give feedback.
All reactions