ntex icon indicating copy to clipboard operation
ntex copied to clipboard

Have an investigation on the Monoio runtime?

Open clia opened this issue 3 years ago • 7 comments

https://github.com/bytedance/monoio/blob/master/docs/en/benchmark.md

According to the official benchmark, the Monoio runtime's performance is better than the Glommio's.

Will you have an investigation on it?

clia avatar Jul 12 '22 03:07 clia

i dont have time at the moment

fafhrd91 avatar Jul 12 '22 04:07 fafhrd91

The implementation https://github.com/botika/ntex/commit/e4aced391af2097c633078b2860cb8f30ef5ec77, but has some problems:

  • need nightly and I have no idea how to put it only to compile in nightly, so that ntex in stable does not compile.

zzau13 avatar Oct 17 '22 17:10 zzau13

how is performance?

fafhrd91 avatar Oct 17 '22 17:10 fafhrd91

how is performance?

Well, I was still reviewing the implementation before putting it in the techempower benchmark environment. I don't know if I'll have time today.

Also with this change ntex only compiles in nightly and I don't see a way to include a dependency according to the version of Rust.

zzau13 avatar Oct 17 '22 18:10 zzau13

@botika You can conditionally apply a feature that runs only on nightly.

trickster avatar Oct 24 '22 09:10 trickster

@botika In case you haven't seen these, I found a couple of online answers about how to conditionally compile a feature only for nightly. They are from 2019, so the syntax may have evolved or changed (I haven't personally tried them):

https://stackoverflow.com/questions/59542378/conditional-compilation-for-nightly-vs-stable-rust-or-compiler-version https://users.rust-lang.org/t/add-unstable-feature-only-if-compiled-on-nightly/27886

mkvalor avatar Nov 06 '22 09:11 mkvalor

The benchmark is misleading. If you look at the source it compares multi-threaded tokio with thread per core glommio and monoio. Which is not how ntex work under the hood with tokio. Besides that the bench does not include abstraction over poll based api which ntex uses internally. And the cost of converting a completion future to a readiness future soundly can be high.(depend on the implementation) From my personal test I don't find io_uring suitable for network io handling in Rust (yet).

fakeshadow avatar Nov 16 '22 09:11 fakeshadow