liburing: performance degradation starting from 5.7.16
Hi Jens,
I noticed that there is serious performance regression using sockets with io_uring starting from v5.7.16. Unfortunately, it continues into 5.8 and 5.9 I have not checked yet for which patch versions exactly.
perf top shows exactly where the contention happens but I can not identify the root-cause.
I am not sure if it’s directly related to io_uring or some other change that caused the regression.
5.7.15 and earlier does not inhibit such contention for the same machine (18 physical cores). I am testing on Ubuntu 20.04 patched with prebuilt kernels from https://kernel.ubuntu.com/~kernel-ppa/mainline/
For 5.7.15 my benchmark achieves 1.6M qps and system cpu is at ~80%. for 5.7.16 or later it achieves only 1M qps and the system cpu is is at ~100% .
57.66% [kernel] [k] native_queued_spin_lock_slowpath
1.09% [kernel] [k] _raw_spin_lock_irqsave
1.05% [kernel] [k] _raw_spin_lock
0.83% [kernel] [k] tcp_recvmsg
0.74% [kernel] [k] skb_release_data
0.69% [kernel] [k] ena_start_xmit
0.69% [kernel] [k] memset_erms
0.69% [kernel] [k] __slab_free
0.63% [kernel] [k] mwait_idle_with_hints.constprop.0
0.56% [kernel] [k] copy_user_generic_unrolle
0.49% [kernel] [k] ena_clean_tx_irq
0.45% [kernel] [k] read_tsc
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 26 (25 by maintainers)
You bet, I’ll use that email. Once we have a final and you’ve vetted it, would be great if I could also add your Tested-by in there.
Ok, checked the latest fix
c6a44403af72ba7788b82ee83bd53ff972923117and I confirm that the performance issue is solved! Ping server reaches 2.7M qps run on 72 vcpus and saturate networking capacity way before overloading the cpu.Great job!
P.S. Please backport the fix to 5.8 for the upcoming Ubuntu release.
Can you just document the exact flow as invalid/unsupported? It sounds like a deadlock what you are describing.
Btw, I use eventfd polling to wake io_uring loop from other threads and it works very well so i guess it applies to very specific use-case of eventfd. Or maybe you mean - eventfd generated by io_uring completions?
On Mon, Sep 28, 2020, 18:36 Jens Axboe notifications@github.com wrote: