Re: Performance test for CUBIC in stable/14

From: void <void_at_f-m.fm>
Date: Mon, 21 Oct 2024 18:24:51 UTC
On Mon, Oct 21, 2024 at 10:42:49AM -0400, Cheng Cui wrote:
>Change the subject to `Performance test for CUBIC in stable/14`, was `Re:
>Performance issues with vnet jails + epair + bridge`.
>
>I actually prepared two patches, one depends on the other:
>
>https://reviews.freebsd.org/D47218     << apply this patch firstly
>https://reviews.freebsd.org/D47213     << apply this patch secondly
>
>Please let me know if you have any questions.

Hi,

What version (git -C /usr/src rev-list --count --first-parent HEAD) did you
patch? 

I installed FreeBSD-14.1-STABLE-amd64-20241017-d36ba3989ca9-269125-disc1.iso and
then updated the sources with git before checking out stable/14 which is
n269252, applying the patches and building/installing kernel from there.

What's the exact iperf command you're using please? I'm using

# iperf --time 60 -c 192.168.1.232

but I'm not sure [see note a] if that one would give comparable tests to yours.

In my context, the bge0 interface has hardware offloading enabled (as it does by
default)

Here's before and after patch results. The reference speed is that of the bhyve host.
There seems to be a large delta between fastest and slowest speeds.

1. bhyve host

[ ID] Interval       Transfer     Bandwidth
[  1] 0.00-60.03 sec  6.58 GBytes   941 Mbits/sec

2. 20241017-d36ba3989ca9-269125

[ ID] Interval       Transfer     Bandwidth
[  1] 0.00-60.02 sec  5.16 GBytes   738 Mbits/sec

3. n269252-e18ba5c5555a
after patches applied and reboot

[ ID] Interval       Transfer     Bandwidth
[  1] 0.00-60.01 sec  4.87 GBytes   697 Mbits/sec

[a] iperf method from earlier emails

iperf -B 192.168.1.13 -c 192.168.1.232 -l 1M -t 30 -i 2 -e ; netstat -nCRp tcp |
egrep "Active|Proto|5001"
------------------------------------------------------------
Client connecting to 192.168.1.232, TCP port 5001 with pid 16360 (1/0
flows/load)
Write buffer size: 1048576 Byte
TCP congestion control using cubic
TOS defaults to 0x0 (dscp=0,ecn=0) (Nagle on)
TCP window size: 32.8 KByte (default)
------------------------------------------------------------
[  1] local 192.168.1.13%vtnet0 port 42853 connected with 192.168.1.232 port
5001 (sock=3) on 2024-10-21 19:17:24.491 (BST)
[ ID] Interval        Transfer    Bandwidth       Write/Err
[  1] 0.00-2.00 sec   151 MBytes   633 Mbits/sec  151/0
[  1] 2.00-4.00 sec   159 MBytes   667 Mbits/sec  159/0
[  1] 4.00-6.00 sec   148 MBytes   621 Mbits/sec  148/0
[  1] 6.00-8.00 sec   200 MBytes   839 Mbits/sec  200/0
[  1] 8.00-10.00 sec   197 MBytes   826 Mbits/sec  197/0
[  1] 10.00-12.00 sec   182 MBytes   763 Mbits/sec  182/0
[  1] 12.00-14.00 sec   195 MBytes   818 Mbits/sec  195/0
[  1] 14.00-16.00 sec   175 MBytes   734 Mbits/sec  175/0
[  1] 16.00-18.00 sec   133 MBytes   558 Mbits/sec  133/0
[  1] 18.00-20.00 sec   127 MBytes   533 Mbits/sec  127/0
[  1] 20.00-22.00 sec   201 MBytes   843 Mbits/sec  201/0
[  1] 22.00-24.00 sec   194 MBytes   814 Mbits/sec  194/0
[  1] 24.00-26.00 sec   199 MBytes   835 Mbits/sec  199/0
[  1] 26.00-28.00 sec   171 MBytes   717 Mbits/sec  171/0
[  1] 28.00-30.00 sec   189 MBytes   793 Mbits/sec  189/0

[  1] 0.00-30.00 sec  2.56 GBytes   733 Mbits/sec  2622/0

Active Internet connections
Proto Recv-Q Send-Q Local Address          Foreign Address           flowid
ftype CC          cwin   ssthresh   MSS ECN
tcp4       0      0 192.168.1.13.42853     192.168.1.232.5001      00000000
63 cubic    1721802     891968  1460 off

--