Hi,

As you can see here, the iperf3 udp performance dropped by 29% at 22nd
December.
http://bluhm.genua.de/perform/results/2021-01-05T15%3A48%3A19Z/gnuplot/udp.png

All numbers for each commit at that day are here:
http://bluhm.genua.de/perform/results/2021-01-05T15%3A48%3A19Z/perform.html

It is caused by this commit:
Implement select(2) and pselect(2) on top of kqueue.
http://bluhm.genua.de/perform/results/cvslog/src/sys/2020-12-22T12%3A59%3A05Z--2020-12-22T13%3A24%3A45Z.html

Despite its name, iperf3 -u does not directly meassure UDP performance.
It does 4 gettimeofday, 1 select and 1 write for each packet, so
it measures these system calls together.  Note that it got faster
since gettimeofday is no system call anymore.  An alternative
measurement method without calling select(2) does not change its
UDP numbers.

Here are the flame graphs with kernel stack trace for running iperf3
send and recv, select and kqueue.
http://bluhm.genua.de/files/iperfudp4fwd-select.svg
http://bluhm.genua.de/files/iperfudp4rev-select.svg
http://bluhm.genua.de/files/iperfudp4fwd-kqueue.svg
http://bluhm.genua.de/files/iperfudp4rev-kqueue.svg

You can see that sys_select became more expensive in comparison to
sys_write and sys_read.

bluhm

Reply via email to