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

Use io_uring? #100

Open
ArniDagur opened this issue Jan 20, 2021 · 4 comments
Open

Use io_uring? #100

ArniDagur opened this issue Jan 20, 2021 · 4 comments

Comments

@ArniDagur
Copy link

ArniDagur commented Jan 20, 2021

It might be interesting to use io_uring for asynchronous IO. It is Linux specific, but so is pwritev and preadv.

@vimpunk
Copy link
Owner

vimpunk commented Apr 13, 2021

I've been thinking about this as well, io_uring seems well suited for the torrenting use case. Thanks for the suggestion.

@vimpunk
Copy link
Owner

vimpunk commented Apr 13, 2021

The decision here is going to be effected by whether we want to support windows or not. I'd be fine with linux only but there has been some interest in bringing cratetorrent to windows, so it's unclear whether this makes sense going forward. I would very much like to have cratetorrent as a base to experiment with io_uring, though, maybe with the new tokio-uring experimental crate.

Maybe there could be support for both windows and io_uring via compilation switches, since the proposed API of tokio-uring should be fairly similar to that of tokio.

@ArniDagur
Copy link
Author

I'm currently writing a torrent client in C++ which uses io_uring (school coursework). I use it for both networking and file system operations. I must say that the experience has been great so far.

@vimpunk
Copy link
Owner

vimpunk commented Aug 14, 2021

@ArniDagur sounds interesting. Would you mind digging into the architecture of your torrent client with regard to how it uses io_uring?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants