liburing: zero-copy send doesn't have better performance
My test was running on two physical machines (20Gbps bonding NICs), kernel version 6.2.0-1.el7.elrepo.x86_64.
First I setup a tcp server on one machine, and then run these two commands on the other, to compare send_zc and send performance.
./example/send-zerocopy -n8 -s32768 -4 -t20 -D11.158.242.44 -p9527 -z1 tcp
tx=1294016 (MB=40438), tx/s=64700 (MB/s=2021)
./example/send-zerocopy -n8 -s32768 -4 -t20 -D11.158.242.44 -p9527 -z0 tcp
tx=1528384 (MB=46343), tx/s=76419 (MB/s=2317)
The send_zc is even worse …
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 27
@isilence
IORING_SETUP_DEFER_TASKRUN | IORING_SETUP_SINGLE_ISSUER | IORING_SETUP_COOP_TASKRUNand settingset_iowq_affinity. I re-run the new zc example, now it could reach the 20G limit. And CPU util is less than normal tcp, looks good.TCP_NODELAYdid have negative impact, but very small. Let’s forget it.@isilence
case 1: ./examples/send-zerocopy -n1 -s32768 -4 -t20 -D11.158.242.44 -p9527 -z0 -d tcp tx=1616716 (MB=50363), tx/s=80835 (MB/s=2518) CPU usage: 56% copy.txt
case 2: ./examples/send-zerocopy -n1 -s32768 -4 -t20 -D11.158.242.44 -p9527 -z1 -d tcp tx=1494701 (MB=46709), tx/s=74735 (MB/s=2335) CPU usage: 48% zc.txt
In the @beef9999 's logs, look for io_wq, e.g.
io_wq_submit_work