Tokio-uring experiences

Is tokio-uring ready for prime time? Any experiences someone could share? Between tokio::fs and tokio-uring which one should one go with. Thanks in advance.

If you need performance neither are very fast. Tokio uses a 2MB buffer for its file objects so to read a 1 GB file you will make 500 system calls. It's faster to use synchronous filesystem operations with spawn_blocking. There hasn't been a release of tokio-uring in three years.

Filesystem stuff is weird in async Rust because you have to use async (fs operations can block!) but we just kind of give up when it comes to stdout and stderr. Whether or not a logging statement blocks depends on the logging subscriber you use (if you're using tracing). You can deadlock by logging to a pipe.

The usual async API isn't quite right for io-uring. You kind of want to give the runtime a buffer when you issue a read or write and get the buffer back when it's done. There are other alternatives but you can't really make an API that takes references work without extra copying.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.