You could try
benchmarks/iperf3. Should be available on Linux too.
But looking at the differences, it's primarily the BSD client that appears slow. BSD as a server and Linux as a client you're maxing out, so the BSD machine is surly able to
provide that gigabit network speed.
With regards to your
/etc/sysctl.conf, try without it all. Some I get, some are puzzling. Maybe add some later when you figured out why things aren't working properly.
With all those "optimizations" in sysctl.conf disabled I ran
iperf3 -s -f K on server
and
iperf3 -c 192.168.0.2 -f K on client
The results are identical:
Linux server/Linux client:
Connecting to host 192.168.0.2, port 5201
[ 5] local 192.168.0.3 port 43530 connected to 192.168.0.2 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 114 MBytes 116746 KBytes/sec 0 351 KBytes
[ 5] 1.00-2.00 sec 112 MBytes 115200 KBytes/sec 0 351 KBytes
[ 5] 2.00-3.00 sec 112 MBytes 114539 KBytes/sec 0 369 KBytes
[ 5] 3.00-4.00 sec 112 MBytes 114964 KBytes/sec 0 369 KBytes
[ 5] 4.00-5.00 sec 113 MBytes 115328 KBytes/sec 0 369 KBytes
[ 5] 5.00-6.00 sec 112 MBytes 115200 KBytes/sec 0 369 KBytes
[ 5] 6.00-7.00 sec 112 MBytes 114432 KBytes/sec 0 369 KBytes
[ 5] 7.00-8.00 sec 113 MBytes 115712 KBytes/sec 0 389 KBytes
[ 5] 8.00-9.00 sec 112 MBytes 115200 KBytes/sec 0 389 KBytes
[ 5] 9.00-10.00 sec 112 MBytes 114927 KBytes/sec 0 389 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 1.10 GBytes 115225 KBytes/sec 0 sender
[ 5] 0.00-10.00 sec 1.10 GBytes 114996 KBytes/sec receiver
Linux server/FreeBSD client:
Connecting to host 192.168.0.2, port 5201
[ 5] local 192.168.0.3 port 21257 connected to 192.168.0.2 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.06 sec 121 MBytes 116513 KBytes/sec 0 1.38 MBytes
[ 5] 1.06-2.00 sec 105 MBytes 114965 KBytes/sec 0 1.38 MBytes
[ 5] 2.00-3.00 sec 112 MBytes 115085 KBytes/sec 0 1.38 MBytes
[ 5] 3.00-4.06 sec 119 MBytes 114920 KBytes/sec 0 1.38 MBytes
[ 5] 4.06-5.06 sec 112 MBytes 115055 KBytes/sec 0 1.38 MBytes
[ 5] 5.06-6.06 sec 112 MBytes 115004 KBytes/sec 0 1.38 MBytes
[ 5] 6.06-7.06 sec 112 MBytes 115019 KBytes/sec 0 1.38 MBytes
[ 5] 7.06-8.00 sec 106 MBytes 114968 KBytes/sec 0 1.38 MBytes
[ 5] 8.00-9.00 sec 112 MBytes 115085 KBytes/sec 0 1.38 MBytes
[ 5] 9.00-10.00 sec 112 MBytes 114938 KBytes/sec 0 1.38 MBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 1.10 GBytes 115165 KBytes/sec 0 sender
[ 5] 0.00-10.01 sec 1.10 GBytes 114999 KBytes/sec receiver
FreeBSD server/Linux client:
Connecting to host 192.168.0.2, port 5201
[ 5] local 192.168.0.3 port 42630 connected to 192.168.0.2 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 114 MBytes 116732 KBytes/sec 0 389 KBytes
[ 5] 1.00-2.00 sec 112 MBytes 114832 KBytes/sec 0 389 KBytes
[ 5] 2.00-3.00 sec 112 MBytes 114939 KBytes/sec 0 389 KBytes
[ 5] 3.00-4.00 sec 112 MBytes 115188 KBytes/sec 0 389 KBytes
[ 5] 4.00-5.00 sec 112 MBytes 114958 KBytes/sec 0 389 KBytes
[ 5] 5.00-6.00 sec 112 MBytes 114948 KBytes/sec 0 389 KBytes
[ 5] 6.00-7.00 sec 112 MBytes 114941 KBytes/sec 0 389 KBytes
[ 5] 7.00-8.00 sec 112 MBytes 115065 KBytes/sec 0 389 KBytes
[ 5] 8.00-9.00 sec 112 MBytes 115194 KBytes/sec 0 389 KBytes
[ 5] 9.00-10.00 sec 112 MBytes 114813 KBytes/sec 0 389 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 1.10 GBytes 115161 KBytes/sec 0 sender
[ 5] 0.00-9.99 sec 1.10 GBytes 115050 KBytes/sec receiver
FreeBSD server/FreeBSD client:
Connecting to host 192.168.0.2, port 5201
[ 5] local 192.168.0.3 port 24571 connected to 192.168.0.2 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.06 sec 119 MBytes 114400 KBytes/sec 0 386 KBytes
[ 5] 1.06-2.06 sec 111 MBytes 114235 KBytes/sec 0 577 KBytes
[ 5] 2.06-3.00 sec 105 MBytes 114346 KBytes/sec 0 865 KBytes
[ 5] 3.00-4.05 sec 118 MBytes 114672 KBytes/sec 0 1.27 MBytes
[ 5] 4.05-5.06 sec 112 MBytes 114016 KBytes/sec 0 1.27 MBytes
[ 5] 5.06-6.06 sec 111 MBytes 114050 KBytes/sec 0 1.27 MBytes
[ 5] 6.06-7.02 sec 107 MBytes 114119 KBytes/sec 0 1.27 MBytes
[ 5] 7.02-8.06 sec 116 MBytes 114037 KBytes/sec 0 1.27 MBytes
[ 5] 8.06-9.06 sec 111 MBytes 114090 KBytes/sec 0 1.27 MBytes
[ 5] 9.06-10.06 sec 111 MBytes 114067 KBytes/sec 0 1.27 MBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.06 sec 1.10 GBytes 114205 KBytes/sec 0 sender
[ 5] 0.00-10.07 sec 1.10 GBytes 114041 KBytes/sec receiver