# io_uring performance 40% better than kqueue and epoll !



## zoujiaqing (Dec 9, 2019)

*Io_uring: New Linux IO interface (I think it like IOCP)*

Linux 5.1 introduces a new high-performance interface called io_uring. It’s easy to use and hard to misuse user/application interface. Io_uring has an efficient buffered asynchronous I/O support, the ability to do I/O without even performing a system call via polled I/O, and other efficiency enhancements. This will help deliver fast and efficient I/O for Linux.\

Io_uring permits safe signal delivery in the presence of PID reuse which will improve power management without affecting power consumption. Liburing is used as the user-space library which will make the usage simpler. Axboe’s FIO benchmark has also been adapted already to support io_uring.









						Linux 5.1 out with Io_uring IO interface, persistent memory, new patching improvements and more! | Packt Hub
					

Linus Torvalds, announced the new Linux 5.1 version. It has new features like Io_uring and improvements to storage and security




					hub.packtpub.com
				








						liburing - io_uring library
					






					git.kernel.dk


----------



## zoujiaqing (Jan 29, 2020)

io_uring performance 40% better than kqueue !


----------



## shkhln (Jan 29, 2020)

That's a bit like saying that a 16 Gb memory stick is faster than a 4-core CPU.


Spoiler



They both revolve around the sun with the same velocity.



If you believe that FreeBSD needs an io_uring analog, you can propose that on the freebsd-hackers mailing list.


----------



## Vadim_Mkk (Jan 29, 2020)

zoujiaqing said:


> io_uring performance 40% better than kqueue !


Linus does invent new revolutionary  semiconductors structure? 
I don't believe in this radical  increasing performance without radical decreasing overall reliability...
ext2 showed  the miriacle IO performance in its time - but has problem with consistency of data when suddenly power downs. 
Real IO testing for different versions Debian  from 7 to 11 doesn't show 40% IO breaking


----------



## ralphbsz (Jan 29, 2020)

Please explain how this is relevant, how the measurements were done, and what you intend to accomplish by writing this.


----------



## mark_j (Jan 30, 2020)

ralphbsz said:


> Please explain how this is relevant, how the measurements were done, and what you intend to accomplish by writing this.



This.
It smells like a troll, but it might just be language barriers. Still it baffles me what a linux in-kernel hack has to do with freebsd?


----------



## Vadim_Mkk (Jan 30, 2020)

ralphbsz said:


> Please explain how this is relevant, how the measurements were done, and what you intend to accomplish by writing this.


If you mean my post - detailed description  of testing benchmarking  Debian from  7 (3.2 kernel announced 5 may 2013)  to 11 (current  5.x kernel) - here and includes and IO tests on page 2.
Margin in the random reading and writing doesn't equal + or - 40% from absolute values.
I don't see IO software revolution for increasing performance IO from Linux 3.2 -5.x kernel in these tests.


----------



## SirDice (Jan 30, 2020)

I'm pretty sure ralphbsz meant the claim from zoujiaqing in post #2.


----------



## mark_j (Jan 30, 2020)

Vadim_Mkk said:


> If you mean my post - detailed description  of testing benchmarking  Debian from  7 (3.2 kernel announced 5 may 2013)  to 11 (current  5.x kernel) - here and includes and IO tests on page 2.
> Margin in the random reading and writing doesn't equal + or - 40% from absolute values.
> I don't see IO software revolution for increasing performance IO from Linux 3.2 -5.x kernel in these tests.



The benchmarks on phoronix are dubious at best when translated to real world and are Linux - centred (of course, as that's what phoronix exists for, to pander to the Linux fanboy).  Any comparison by phoronix between Linux and FreeBSD should be taken as bogus.

Most benchmarks in general are a waste of your time unless it's your system and servers you're working on.


----------



## ralphbsz (Jan 30, 2020)

The Phoronix tests are absolutely useless. There is no thorough analysis of what the bottleneck was, and what we're actually measuring. Actually, they're worse than useless: people might believe the results as relevant, and organize their lives around it.

I agree that there is a problem in today's OS stack: we now have devices that are extremely fast for small IOs (around microsecond), and the overhead of the traditional stack (from userspace pread/pwrite all the way through system and device driver) is too heavyweight. But this is only relevant for a tiny fraction of all applications, in particular the backend implementation of databases and file systems. About 99.99% of all computer users and programmers should not even think about this stuff; they're more likely to break something (for example themselves).


----------



## kpedersen (Feb 1, 2020)

I think I am seeing a trend with the OPs topics:

What's state Gnome with Wayland on FreeBSD?
rpm4 was support for building rpm without Berkeley DB (–disable-bdb)
Do you have tools like fedora's flatpack?
How to use plasma 5 on wayland?
etc...
So it sounds like either they are pining for Linux or they are simply on the wrong forums.


----------



## zoujiaqing (Feb 1, 2020)

kpedersen said:


> So it sounds like either they are pining for Linux or they are simply on the wrong forums.


Sorry!
I just want FreeBSD to be better!


----------



## shkhln (Feb 1, 2020)

zoujiaqing said:


> I just want FreeBSD to be better!



40% better?


----------



## zoujiaqing (Feb 1, 2020)

shkhln said:


> 40% better?


I just reprinted the content.

I want to say maybe FreeBSD needed IOCP or io_uring.


----------



## zoujiaqing (Feb 1, 2020)

shkhln said:


> That's a bit like saying that a 16 Gb memory stick is faster than a 4-core CPU.


The performance of kqueue is close to epoll, and the performance of AAA is 40% higher than epoll! Do you understand?


----------



## shkhln (Feb 1, 2020)

zoujiaqing said:


> Do you understand?



Do I?


----------



## mark_j (Feb 1, 2020)

zoujiaqing said:


> The performance of kqueue is close to epoll, and the performance of AAA is 40% higher than epoll! Do you understand?


On Linux


----------



## mark_j (Feb 1, 2020)

zoujiaqing said:


> I just reprinted the content.
> 
> I want to say maybe FreeBSD needed IOCP or io_uring.


Where's this reference to 40%?


----------



## mark_j (Feb 1, 2020)

zoujiaqing said:


> Sorry!
> I just want FreeBSD to be better!


Actually as *kpedersen *says, you seem to want FreeBSD to be Linux.


----------



## shkhln (Feb 2, 2020)

mark_j said:


> Where's this reference to 40%?



There is no reference. This hypothetic benchmark doesn't exist.


----------



## zoujiaqing (Feb 2, 2020)

mark_j said:


> Actually as *kpedersen *says, you seem to want FreeBSD to be Linux.


IOCP and io_uring are complete asynchronous implementations, while kqueue and epoll are not!


----------



## zoujiaqing (Feb 2, 2020)

shkhln said:


> There is no reference. This hypothetic benchmark doesn't exist.


This link https://forum.dlang.org/thread/qivirzzsdjhevklrblwo@forum.dlang.org


----------



## mark_j (Feb 2, 2020)

zoujiaqing said:


> This link https://forum.dlang.org/thread/qivirzzsdjhevklrblwo@forum.dlang.org


And this mythical 40%?
I'm really not sure if this is all just an elaborate troll?
Do you want this liburing in the freebsd kernel? Best start posting wholesale patches to make it more like linux then.


----------



## shkhln (Feb 2, 2020)

mark_j said:


> I'm really not sure if this is all just an elaborate troll?



What do you mean "elaborate"? It's pretty low effort, IMO.


----------



## mark_j (Feb 2, 2020)

zoujiaqing said:


> IOCP and io_uring are complete asynchronous implementations, while kqueue and epoll are not!


Yep, freebsd should doggedly follow linux after all their attempt at a better kqueue resulted in that crap they call epoll.
Maybe we should shine the spotlight on accept_filter()...


----------



## mark_j (Feb 2, 2020)

shkhln said:


> What do you mean "elaborate"? It's pretty low effort, IMO.


In which case why haven't the moderators just nuked this 'discussion'? Crivens? SirDice?


----------



## mark_j (Feb 2, 2020)

zoujiaqing said:


> The performance of kqueue is close to epoll, and the performance of AAA is 40% higher than epoll! Do you understand?


Kqueue is at least 5% better than epoll. It's 100% more logical as well.


----------



## shkhln (Feb 2, 2020)

mark_j said:


> In which case why haven't the moderators just nuked this 'discussion'? Crivens? SirDice?



Moderators are less active on weekends, that's all.


----------



## SirDice (Feb 3, 2020)

Yes, contrary to popular belief, I do have a life outside of the forums. 

zoujiaqing be sure to read this: https://forums.freebsd.org/threads/why-is-freebsd-not-more-like.66591/


Thread closed.


----------

