Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Implement io_uring support via tokio_uring #1480

Closed
Xuanwo opened this issue Mar 5, 2023 · 16 comments
Closed

feat: Implement io_uring support via tokio_uring #1480

Xuanwo opened this issue Mar 5, 2023 · 16 comments
Labels
help wanted Extra attention is needed

Comments

@Xuanwo
Copy link
Member

Xuanwo commented Mar 5, 2023

Previously, we aimed to implement runtime agonistic io_uring support in OpenDAL, but this proved to be a difficult task that hindered our progress. Therefore, we have revised our goal to initially add io_uring support via tokio_uring and then collaborate with the community to enhance it.

To enable tokio_uring, a newer Linux kernel (5.6 and above) and a tokio-uring runtime are required. We will integrate this support under a new feature known as services-fs-with-io-uring. Once activated, the service fs implementation will be based on io_uring.

NOTE: It is the users' responsibility to ensure that this service is running on the tokio_uring runtime.

Related Discussions

@Xuanwo Xuanwo added good first issue Good for newcomers help wanted Extra attention is needed labels Mar 5, 2023
@PsiACE PsiACE self-assigned this Mar 5, 2023
@PsiACE
Copy link
Member

PsiACE commented Mar 5, 2023

I still maintain an interest in these types of questions, so let me see if tokio_uring is already available.

@Xuanwo
Copy link
Member Author

Xuanwo commented Mar 5, 2023

actix-files already employs tokio_uring, making it worthwhile to give it a shot.

@Xuanwo
Copy link
Member Author

Xuanwo commented Apr 21, 2023

It's also worth to take a look over: https://github.com/spacejam/rio

It's GPL-3.0 unless we become spacejam's github sponsors.

@Xuanwo Xuanwo removed the good first issue Good for newcomers label Apr 25, 2023
@oowl
Copy link
Member

oowl commented Jun 22, 2023

Hello, it seems this future is not moved forward in a long time, Can I get to know which blocked it? If needed, I can help to further push this feature to opendal. @Xuanwo

@Xuanwo
Copy link
Member Author

Xuanwo commented Jun 23, 2023

Can I get to know which blocked it?

Using tokio_uring requires additional runtime setup that goes against OpenDAL's VISION. I am exploring alternatives to enable us to use io_uring without this setup.

@oowl
Copy link
Member

oowl commented Jun 23, 2023

You mean that opendal core codebase can not require some special rust runtime instance (for example tokio), we need to find some io_uring instance just return Furture?

@Xuanwo
Copy link
Member Author

Xuanwo commented Jun 23, 2023

You mean that opendal core codebase can not require some special rust runtime instance (for example tokio), we need to find some io_uring instance just return Furture?

Exactly!

@oowl
Copy link
Member

oowl commented Dec 16, 2023

As we have added some Tokio runtime as dependencies of OpenDAL, So I think the problem against OpenDAL vision which we mentioned before does not exist.

I have done some research on tokio-ioring, the main block of OpenDAL using it is iouring specific thread models in tokio,
because io-uring pulls msg queue design, so tokio-uring adopts an isolated thread-per-core model as runtime, OpenDAL has been using originally tokio thread model, So which means we can not use io-uring as only fs operation if we want to use tokio-uring function in OpenDAL, we need to replace whole runtime as tokio-uring supported.

@vertexclique
Copy link

vertexclique commented Jan 19, 2024

Here the nuclei author, I am writing the new ring design. Hopefully, it will land soon. On the other hand, what exactly this comment mentions is why I wrote whole nuclei and why I wrote async runtimes, and M:N model everywhere. Tioli, don't poison your dependencies, it will be irreversible, and you are %100 right on what you wrote there.

@Xuanwo
Copy link
Member Author

Xuanwo commented Jan 19, 2024

Here the nuclei author, I am writing the new ring design.

Looking forward to your project!

@vertexclique
Copy link

Hi all, I have updated nuclei to 0.4. It now includes also multishot accept and some parts of multishot API. + socket state changes and more improvements and recent io_uring changes came with 5.19+. Now I am working on 6.1+ changes, it will take some time, since that requires some design changes. https://crates.io/crates/nuclei

In addition to that, here is the benchmark comparison with Epoll for HTTP server: https://vertexclique.github.io/nuclei/#/benches

In addition to that book is here: https://vertexclique.github.io/nuclei/#/

Have a good time!

@Xuanwo
Copy link
Member Author

Xuanwo commented Jan 22, 2024

Congrats!

In addition to that, here is the benchmark comparison with Epoll for HTTP server: https://vertexclique.github.io/nuclei/#/benches

A small feedback: the website seems broken for css missing.

@vertexclique
Copy link

I will check, just deployed the site. Is it readable at least?

@Xuanwo
Copy link
Member Author

Xuanwo commented Jan 22, 2024

Is it readable at least?

Yep, ok to read

image

@vertexclique
Copy link

There is a pdf at the end of the page. That summarizes io_uring performance in two modes. Maybe that's better to check. I will take a look at the site tomorrow.

@Xuanwo
Copy link
Member Author

Xuanwo commented Jun 14, 2024

Tracked at #4520. We will start a new issue once we start this work.

@Xuanwo Xuanwo closed this as not planned Won't fix, can't repro, duplicate, stale Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants