Live data from Hacker News

Monoio – A thread-per-core Rust async runtime with io_uring

github.com

11–20 of 84 posts

Re: Monoio – A thread-per-core Rust async runtime with io_uring

#11
post #2

Have any other Rust async runtimes use io_uring/gotten at all good yet? Best of the best modern systems programmers gotta get good sometime. Not sure if it's happening yet. Ok here's one point of call: https://github.com/tokio-rs/tokio-uring

Glommio uses io_uring: https://github.com/DataDog/glommio

And I integrated Hyper as an example: https://github.com/DataDog/glommio/blob/master/examples/hype...

And the performance was blisteringly quick (6x better latency streaming from a file compared to Nginx).

Re: Monoio – A thread-per-core Rust async runtime with io_uring

#12

Earlier quoted context omitted.

"Async runtimes" is a thing that only makes sense for interpreted languages and their limitations. This thing is pure cargo cult and shows that Rust mostly appeals to newbies who don't know what they are doing.

Yes, io_uring, a linux subsystem, is clearly just a cargo cult feature for people who don't know what they're doing.

Last I saw there was no substantial evidence of io_uring delivering a significant improvement over epoll, but I haven't looked in the last year. I wouldn't assume it is good just because it is in Linux (this is coming from someone who uses Linux exclusively)

Re: Monoio – A thread-per-core Rust async runtime with io_uring

#13
post #2

Have any other Rust async runtimes use io_uring/gotten at all good yet? Best of the best modern systems programmers gotta get good sometime. Not sure if it's happening yet. Ok here's one point of call: https://github.com/tokio-rs/tokio-uring

"Async runtimes" is a thing that only makes sense for interpreted languages and their limitations. This thing is pure cargo cult and shows that Rust mostly appeals to newbies who don't know what they are doing.

As I posted above I integrated Hyper (web server) with Glommio (io_uring based async runtime).

Based on my limited benchmarks against Vertx/Scala and Nginx it was significantly faster, had zero failed transactions and used a fraction of the memory/CPU.

That means I need less servers and have a better end user experience.

Re: Monoio – A thread-per-core Rust async runtime with io_uring

#14

Earlier quoted context omitted.

Yes, io_uring, a linux subsystem, is clearly just a cargo cult feature for people who don't know what they're doing.

Last I saw there was no substantial evidence of io_uring delivering a significant improvement over epoll, but I haven't looked in the last year. I wouldn't assume it is good just because it is in Linux (this is coming from someone who uses Linux exclusively)

I don't assume it's good because of Linux, I have a generally negative view of Linux. It's just stupid to attribute io_uring to rust or call it cargo culting for Rust to use io_uring. The two projects are unrelated.

As for performance, I wouldn't judge based on a year ago, obviously a lot has changed since then - you can find numbers if you'd like, I saw the maintainer posting benchmarks only a few weeks ago.

Re: Monoio – A thread-per-core Rust async runtime with io_uring

#15

I truly appreciate that this team uses nightly rust and only runs only Linux currently (due to relying on io_uring). Truly in the spirit of systems programming - focusing on a single, tight, efficient implementation first and leaving other considerations such as cross-platform compatibility for later. Lets those of us who love to live on the bleeding edge have our nice things too! :)

> for later or for never :P why not prove like... "this is the best. all other platforms/circumstances/situations are subpar" if the performance differences are enough, i can picture people making excuses to avoid all of those other platforms (or just never using this... more likely)

Agreed. I wouldn't care if Rust dropped Windows/ OSX support entirely. Totally niche platforms.

Re: Monoio – A thread-per-core Rust async runtime with io_uring

#16
post #2

Have any other Rust async runtimes use io_uring/gotten at all good yet? Best of the best modern systems programmers gotta get good sometime. Not sure if it's happening yet. Ok here's one point of call: https://github.com/tokio-rs/tokio-uring

"Async runtimes" is a thing that only makes sense for interpreted languages and their limitations. This thing is pure cargo cult and shows that Rust mostly appeals to newbies who don't know what they are doing.

Care to explain why they only make sense for interpreted languages and what limitations you are talking about? Async in Rust is mostly just a convenient syntax around ideas which has been around in the C and C++ worlds for decades with libraries like libevent.

Re: Monoio – A thread-per-core Rust async runtime with io_uring

#17

Earlier quoted context omitted.

"Async runtimes" is a thing that only makes sense for interpreted languages and their limitations. This thing is pure cargo cult and shows that Rust mostly appeals to newbies who don't know what they are doing.

Async models are idiomatic for high-performance server code regardless of the programming language, particularly for anything I/O or concurrency intensive. The reason people use thread-per-core software architectures, which naturally require an async model, is because they have much higher throughput than the alternatives. If software performance, efficiency, and scalability are primary objectives, you are going to b…

The GP mentioned "async runtimes". There are other approaches to async that don't involve using an async runtime, like epoll / kqueue. I personally prefer writing synchronous code, running in multiple threads pulling from a shared work queue. It isn't a one-size-fits-all solution but it is widely applicable, and you get to avoid the complexity of writing 'async code'

Re: Monoio – A thread-per-core Rust async runtime with io_uring

#18

Earlier quoted context omitted.

Yes, io_uring, a linux subsystem, is clearly just a cargo cult feature for people who don't know what they're doing.

Last I saw there was no substantial evidence of io_uring delivering a significant improvement over epoll, but I haven't looked in the last year. I wouldn't assume it is good just because it is in Linux (this is coming from someone who uses Linux exclusively)

Up to 2.44x faster for network zerocopy send: https://lore.kernel.org/io-uring/cover.1638282789.git.asml.s...

Up to 1.6x faster than epoll: https://twitter.com/axboe/status/1362271500489793539

io_uring 11% faster for non-polled IO: https://twitter.com/axboe/status/1465358880502861829/photo/1

And it's not like io_uring is complete. With every kernel release the gap over epoll gets bigger.

Re: Monoio – A thread-per-core Rust async runtime with io_uring

#19

Earlier quoted context omitted.

Async models are idiomatic for high-performance server code regardless of the programming language, particularly for anything I/O or concurrency intensive. The reason people use thread-per-core software architectures, which naturally require an async model, is because they have much higher throughput than the alternatives. If software performance, efficiency, and scalability are primary objectives, you are going to b…

can you take code that is blocking in nature and make it async (like an FFI dlsym call), or at a low level does that just boil down to lots of polling/timers?

http://think-async.com/Asio/asio-1.5.3/doc/asio/overview/cor...

Re: Monoio – A thread-per-core Rust async runtime with io_uring

#20

I truly appreciate that this team uses nightly rust and only runs only Linux currently (due to relying on io_uring). Truly in the spirit of systems programming - focusing on a single, tight, efficient implementation first and leaving other considerations such as cross-platform compatibility for later. Lets those of us who love to live on the bleeding edge have our nice things too! :)

io_uring is coming to Windows: https://twitter.com/axboe/status/1396837335141134336
Post reply on HN