compare Loopback TCP Network performance among FreeBSD net stacks and the Linux kernel

This draws my interest to test and compare the default(base) FreeBSD network stack freebsd, the RACK network stack rack and the Linux kernel network stack on the topic of TCP throughput over loopback network. This is for fun and I am trying to know the code level efficiency, not the real world QoE or production efficiency.


summary

note

  1. The loopback device in FreeBSD does not use TSO (TCP segment offloading), but in Linux it uses TSO (tso, gso, gro).

  2. I don't test a case of MTU=64KB, because in FreeBSD I have to change the net.inet.tcp.sendspace value from default 32KB to 64KB or larger to enable MSS=64KB. If so, I also have to increase the net.inet.tcp.recvspace value from default 64KB to a larger value.

MSS = 32KB TCP throughput (Gbits/sec) over loopback in FreeBSD kernel vs. in Linux kernel

version

run#1

run#2

run#3

run#4

run#5

average

STDEV

average performance improvement

fbsd 14.2-RELEASE-p1 base

94.3

109.0

103.0

97.0

104.0

101.5

5.8

base

fbsd 14.2-RELEASE-p1 rack

95.0

97.1

90.4

87.8

90.5

92.2

3.8

-9.2%

Linux kernel 6.8.0 TSO on

42.5

40.8

41.6

40.4

39.2

40.9

1.2

-59.7%

Linux kernel 6.8.0 TSO off

33.8

32.2

32.0

32.5

33.4

32.8

0.8

-67.7%

MSS = 16KB TCP throughput (Gbits/sec) over loopback in FreeBSD kernel vs. in Linux kernel

version

run#1

run#2

run#3

run#4

run#5

average

STDEV

average performance improvement

fbsd 14.2-RELEASE-p1 base

96.4

95.6

93.2

89.5

93.1

93.6

2.7

base

fbsd 14.2-RELEASE-p1 rack

59.7

62.2

65.7

62.3

62.6

62.5

2.1

-33.2%

Linux kernel 6.8.0 TSO on

38.6

38.6

39.2

37.7

38.8

38.6

0.5

-58.8%

Linux kernel 6.8.0 TSO off

27.3

27.3

28.2

27.1

27.7

27.5

0.4

-70.6%

MSS = 9KB TCP throughput (Gbits/sec) over loopback in FreeBSD kernel vs. in Linux kernel

version

run#1

run#2

run#3

run#4

run#5

average

STDEV

average performance improvement

fbsd 14.2-RELEASE-p1 base

66.4

64.8

68.6

66.8

70.3

67.4

2.1

base

fbsd 14.2-RELEASE-p1 rack

35.7

36.2

38.9

36.9

38.5

37.2

1.4

-44.7%

Linux kernel 6.8.0 TSO on

38.4

43.9

38.0

38.3

38.8

39.5

2.5

-41.4%

Linux kernel 6.8.0 TSO off

26.2

25.5

26.7

24.5

23.4

25.3

1.3

-62.5%

attachment:summary_chartMSS32KB.png attachment:summary_chartMSS16KB.png attachment:summary_chartMSS9KB.png

testbed

A physical box (Beelink SER5 AMD Mini PC with AMD Ryzen 5 5560U [Cores: 6 Threads: 12]) that is using FreeBSD 14.2-RELEASE-p1 release or booted with a ubuntu-24.04.1-desktop-amd64 live USB drive.

iperf3 -s                                           // server side
iperf3 -B localhost -c localhost -t10 -i1 -Vfg      // client side

$ sudo ethtool -K lo tso off gso off gro off

the default(base) network stack in FreeBSD 14.2-RELEASE-p1
the RACK network stack in FreeBSD 14.2-RELEASE-p1
the default network stack in Ubuntu 24.04 Linux kernel 6.8.0-41-generic

performance in FreeBSD base stack

MTU = 32KB

iperf 3.18
FreeBSD n1.fbsd.cc 14.2-RELEASE-p1 FreeBSD 14.2-RELEASE-p1 GENERIC amd64
Control connection MSS 32768
Time: Fri, 08 Aug 2025 17:41:05 UTC
Connecting to host localhost, port 5201
      Cookie: fxprcxhg52qlnkh7sfhebe5xavf3g6wb7nva
      TCP MSS: 32768 (default)
[  5] local 127.0.0.1 port 30120 connected to 127.0.0.1 port 5201
Starting Test: protocol: TCP, 1 streams, 131072 byte blocks, omitting 0 seconds, 10 second test, tos 0
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.01   sec  12.1 GBytes   102 Gbits/sec    0   1.60 MBytes       
[  5]   1.01-2.00   sec  12.1 GBytes   105 Gbits/sec    0   1.60 MBytes       
[  5]   2.00-3.00   sec  12.6 GBytes   108 Gbits/sec    0   1.60 MBytes       
[  5]   3.00-4.00   sec  13.3 GBytes   114 Gbits/sec    0   1.66 MBytes       
[  5]   4.00-5.02   sec  13.3 GBytes   112 Gbits/sec    0   1.66 MBytes       
[  5]   5.02-6.04   sec  12.1 GBytes   102 Gbits/sec    0   1.66 MBytes       
[  5]   6.04-7.01   sec  11.0 GBytes  96.7 Gbits/sec    0   1.66 MBytes       
[  5]   7.01-8.04   sec  11.4 GBytes  95.8 Gbits/sec    0   1.66 MBytes       
[  5]   8.04-9.06   sec  11.5 GBytes  96.8 Gbits/sec    0   1.66 MBytes       
[  5]   9.06-10.06  sec  11.3 GBytes  97.3 Gbits/sec    0   1.66 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
Test Complete. Summary Results:
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.06  sec   121 GBytes   103 Gbits/sec    0            sender
[  5]   0.00-10.06  sec   121 GBytes   103 Gbits/sec                  receiver
CPU Utilization: local/sender 98.0% (0.7%u/97.3%s), remote/receiver 92.6% (3.1%u/89.4%s)
snd_tcp_congestion cubic
rcv_tcp_congestion cubic

iperf Done.

MTU = 16KB

iperf 3.18
FreeBSD n1.fbsd.cc 14.2-RELEASE-p1 FreeBSD 14.2-RELEASE-p1 GENERIC amd64
Control connection MSS 16344
Time: Fri, 08 Aug 2025 18:30:54 UTC
Connecting to host localhost, port 5201
      Cookie: vqnf3kcmsppuqt3yedhk57j6yvjsewslr6i3
      TCP MSS: 16344 (default)
[  5] local 127.0.0.1 port 51287 connected to 127.0.0.1 port 5201
Starting Test: protocol: TCP, 1 streams, 131072 byte blocks, omitting 0 seconds, 10 second test, tos 0
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.06   sec  11.8 GBytes  95.7 Gbits/sec    0   1.33 MBytes       
[  5]   1.06-2.00   sec  10.6 GBytes  96.9 Gbits/sec    0   1.33 MBytes       
[  5]   2.00-3.02   sec  10.9 GBytes  91.4 Gbits/sec    0   1.33 MBytes       
[  5]   3.02-4.04   sec  11.5 GBytes  97.2 Gbits/sec    0   1.33 MBytes       
[  5]   4.04-5.01   sec  11.1 GBytes  98.6 Gbits/sec    0   1.33 MBytes       
[  5]   5.01-6.02   sec  11.6 GBytes  98.4 Gbits/sec    0   1.33 MBytes       
[  5]   6.02-7.02   sec  11.5 GBytes  98.2 Gbits/sec    0   1.33 MBytes       
[  5]   7.02-8.04   sec  11.5 GBytes  96.1 Gbits/sec    0   1.33 MBytes       
[  5]   8.04-9.00   sec  10.8 GBytes  96.9 Gbits/sec    0   1.33 MBytes       
[  5]   9.00-10.00  sec  11.1 GBytes  95.4 Gbits/sec    0   1.33 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
Test Complete. Summary Results:
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec   112 GBytes  96.4 Gbits/sec    0            sender
[  5]   0.00-10.00  sec   112 GBytes  96.4 Gbits/sec                  receiver
CPU Utilization: local/sender 98.5% (0.8%u/97.7%s), remote/receiver 92.8% (2.7%u/90.2%s)
snd_tcp_congestion cubic
rcv_tcp_congestion cubic

iperf Done.

MTU = 9KB

iperf 3.18
FreeBSD n1.fbsd.cc 14.2-RELEASE-p1 FreeBSD 14.2-RELEASE-p1 GENERIC amd64
Control connection MSS 8960
Time: Fri, 08 Aug 2025 18:34:44 UTC
Connecting to host localhost, port 5201
      Cookie: qfs6ya6xkwnheb23xxejn6pep2ubz6bvefh4
      TCP MSS: 8960 (default)
[  5] local 127.0.0.1 port 23674 connected to 127.0.0.1 port 5201
Starting Test: protocol: TCP, 1 streams, 131072 byte blocks, omitting 0 seconds, 10 second test, tos 0
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.06   sec  8.58 GBytes  69.3 Gbits/sec    0   1.76 MBytes       
[  5]   1.06-2.02   sec  7.82 GBytes  70.2 Gbits/sec    0   1.76 MBytes       
[  5]   2.02-3.02   sec  7.90 GBytes  67.8 Gbits/sec    0   1.76 MBytes       
[  5]   3.02-4.06   sec  7.13 GBytes  58.9 Gbits/sec    0   1.76 MBytes       
[  5]   4.06-5.00   sec  6.93 GBytes  63.3 Gbits/sec    0   1.76 MBytes       
[  5]   5.00-6.06   sec  7.75 GBytes  62.9 Gbits/sec    0   1.76 MBytes       
[  5]   6.06-7.06   sec  7.10 GBytes  61.1 Gbits/sec    0   1.76 MBytes       
[  5]   7.06-8.06   sec  7.47 GBytes  64.3 Gbits/sec    0   1.76 MBytes       
[  5]   8.06-9.02   sec  8.34 GBytes  74.1 Gbits/sec    0   1.76 MBytes       
[  5]   9.02-10.06  sec  8.74 GBytes  72.3 Gbits/sec    0   1.76 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
Test Complete. Summary Results:
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.06  sec  77.8 GBytes  66.4 Gbits/sec    0            sender
[  5]   0.00-10.06  sec  77.8 GBytes  66.4 Gbits/sec                  receiver
CPU Utilization: local/sender 92.7% (1.6%u/91.1%s), remote/receiver 79.1% (3.6%u/75.6%s)
snd_tcp_congestion cubic
rcv_tcp_congestion cubic

iperf Done.

performance in FreeBSD RACK stack

MTU = 32KB

iperf 3.18
FreeBSD n1.fbsd.cc 14.2-RELEASE-p1 FreeBSD 14.2-RELEASE-p1 GENERIC amd64
Control connection MSS 32768
Time: Fri, 08 Aug 2025 17:43:09 UTC
Connecting to host localhost, port 5201
      Cookie: kf736ub2pvcqykzsxfdu2piyvtxydrao6irc
      TCP MSS: 32768 (default)
[  5] local 127.0.0.1 port 51551 connected to 127.0.0.1 port 5201
Starting Test: protocol: TCP, 1 streams, 131072 byte blocks, omitting 0 seconds, 10 second test, tos 0
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.03   sec  10.7 GBytes  89.4 Gbits/sec    0   1.61 MBytes       
[  5]   1.03-2.00   sec  10.3 GBytes  91.2 Gbits/sec    0   1.61 MBytes       
[  5]   2.00-3.06   sec  11.4 GBytes  91.9 Gbits/sec    0   1.61 MBytes       
[  5]   3.06-4.05   sec  10.6 GBytes  93.0 Gbits/sec    0   1.61 MBytes       
[  5]   4.05-5.01   sec  10.2 GBytes  90.4 Gbits/sec    0   1.61 MBytes       
[  5]   5.01-6.05   sec  11.7 GBytes  96.6 Gbits/sec    0   1.61 MBytes       
[  5]   6.05-7.01   sec  11.1 GBytes  99.9 Gbits/sec    0   1.61 MBytes       
[  5]   7.01-8.01   sec  11.3 GBytes  96.6 Gbits/sec    0   1.61 MBytes       
[  5]   8.01-9.00   sec  11.4 GBytes  98.1 Gbits/sec    0   1.61 MBytes       
[  5]   9.00-10.00  sec  11.9 GBytes   103 Gbits/sec    0   1.61 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
Test Complete. Summary Results:
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec   111 GBytes  95.0 Gbits/sec    0            sender
[  5]   0.00-10.00  sec   111 GBytes  95.0 Gbits/sec                  receiver
CPU Utilization: local/sender 99.4% (0.6%u/98.8%s), remote/receiver 92.2% (3.0%u/89.1%s)
snd_tcp_congestion cubic
rcv_tcp_congestion cubic

iperf Done.

MTU = 16KB

iperf 3.18
FreeBSD n1.fbsd.cc 14.2-RELEASE-p1 FreeBSD 14.2-RELEASE-p1 GENERIC amd64
Control connection MSS 16344
Time: Fri, 08 Aug 2025 18:41:20 UTC
Connecting to host localhost, port 5201
      Cookie: in4yu47nlekhtk2ce2rl4oleb4wa4xugpa7q
      TCP MSS: 16344 (default)
[  5] local 127.0.0.1 port 24078 connected to 127.0.0.1 port 5201
Starting Test: protocol: TCP, 1 streams, 131072 byte blocks, omitting 0 seconds, 10 second test, tos 0
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.03   sec  6.91 GBytes  57.9 Gbits/sec    0   1.34 MBytes       
[  5]   1.03-2.02   sec  7.13 GBytes  61.8 Gbits/sec    0   1.34 MBytes       
[  5]   2.02-3.00   sec  7.62 GBytes  66.4 Gbits/sec    0   1.34 MBytes       
[  5]   3.00-4.00   sec  7.22 GBytes  62.2 Gbits/sec    0   1.34 MBytes       
[  5]   4.00-5.06   sec  7.53 GBytes  60.9 Gbits/sec    0   1.34 MBytes       
[  5]   5.06-6.06   sec  7.64 GBytes  65.9 Gbits/sec    0   1.34 MBytes       
[  5]   6.06-7.02   sec  7.35 GBytes  65.5 Gbits/sec    0   1.34 MBytes       
[  5]   7.02-8.00   sec  7.44 GBytes  65.2 Gbits/sec    0   1.34 MBytes       
[  5]   8.00-9.02   sec  7.22 GBytes  60.7 Gbits/sec    0   1.34 MBytes       
[  5]   9.02-10.00  sec  6.78 GBytes  59.6 Gbits/sec    0   1.34 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
Test Complete. Summary Results:
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  72.8 GBytes  62.6 Gbits/sec    0            sender
[  5]   0.00-10.00  sec  72.8 GBytes  62.6 Gbits/sec                  receiver
CPU Utilization: local/sender 97.3% (0.6%u/96.7%s), remote/receiver 69.1% (4.2%u/64.9%s)
snd_tcp_congestion cubic
rcv_tcp_congestion cubic

iperf Done.

MTU = 9KB

iperf 3.18
FreeBSD n1.fbsd.cc 14.2-RELEASE-p1 FreeBSD 14.2-RELEASE-p1 GENERIC amd64
Control connection MSS 8960
Time: Fri, 08 Aug 2025 18:38:22 UTC
Connecting to host localhost, port 5201
      Cookie: rh5zm6touguzzbae5tl2smpqb62nsohqjwdn
      TCP MSS: 8960 (default)
[  5] local 127.0.0.1 port 33181 connected to 127.0.0.1 port 5201
Starting Test: protocol: TCP, 1 streams, 131072 byte blocks, omitting 0 seconds, 10 second test, tos 0
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.05   sec  4.30 GBytes  35.0 Gbits/sec    0   1.75 MBytes       
[  5]   1.05-2.05   sec  4.16 GBytes  35.7 Gbits/sec    0   1.75 MBytes       
[  5]   2.05-3.02   sec  4.05 GBytes  36.0 Gbits/sec    0   1.75 MBytes       
[  5]   3.02-4.04   sec  4.54 GBytes  38.1 Gbits/sec    0   1.75 MBytes       
[  5]   4.04-5.00   sec  4.27 GBytes  38.3 Gbits/sec    0   1.75 MBytes       
[  5]   5.00-6.01   sec  4.73 GBytes  40.5 Gbits/sec    0   1.75 MBytes       
[  5]   6.01-7.01   sec  4.75 GBytes  40.8 Gbits/sec    0   1.75 MBytes       
[  5]   7.01-8.00   sec  4.63 GBytes  40.0 Gbits/sec    0   1.75 MBytes       
[  5]   8.00-9.01   sec  4.70 GBytes  40.2 Gbits/sec    0   1.75 MBytes       
[  5]   9.01-10.01  sec  4.74 GBytes  40.7 Gbits/sec    0   1.75 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
Test Complete. Summary Results:
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.01  sec  44.9 GBytes  38.5 Gbits/sec    0            sender
[  5]   0.00-10.01  sec  44.9 GBytes  38.5 Gbits/sec                  receiver
CPU Utilization: local/sender 92.4% (0.4%u/92.0%s), remote/receiver 61.8% (3.4%u/58.5%s)
snd_tcp_congestion cubic
rcv_tcp_congestion cubic

iperf Done.

performance in Linux kernel net stack

MTU = 32KB and TSO on/off

iperf 3.16
Linux ubuntu 6.8.0-41-generic #41-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug  2 20:41:06 UTC 2024 x86_64
Control connection MSS 32768
Time: Fri, 08 Aug 2025 14:06:53 GMT
Connecting to host localhost, port 5201
      Cookie: 2udqgofwwimj5h4vqkuimhlif53qvfyzul6w
      TCP MSS: 32768 (default)
[  5] local 127.0.0.1 port 56685 connected to 127.0.0.1 port 5201
Starting Test: protocol: TCP, 1 streams, 131072 byte blocks, omitting 0 seconds, 10 second test, tos 0
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  4.58 GBytes  39.3 Gbits/sec    0    639 KBytes       
[  5]   1.00-2.00   sec  4.52 GBytes  38.8 Gbits/sec    0    639 KBytes       
[  5]   2.00-3.00   sec  4.41 GBytes  37.9 Gbits/sec    0    639 KBytes       
[  5]   3.00-4.00   sec  4.44 GBytes  38.1 Gbits/sec    0    639 KBytes       
[  5]   4.00-5.00   sec  4.70 GBytes  40.4 Gbits/sec    0   1.37 MBytes       
[  5]   5.00-6.00   sec  4.88 GBytes  41.9 Gbits/sec    0   1.37 MBytes       
[  5]   6.00-7.61   sec  0.00 Bytes  0.00 Gbits/sec    0   1.44 MBytes       
[  5]   7.61-8.00   sec  1.75 GBytes  38.3 Gbits/sec    0   1.44 MBytes       
[  5]   8.00-9.00   sec  4.86 GBytes  41.7 Gbits/sec    0   1.62 MBytes       
[  5]   9.00-10.00  sec  4.80 GBytes  41.2 Gbits/sec    0   1.62 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
Test Complete. Summary Results:
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  47.5 GBytes  40.8 Gbits/sec    0             sender
[  5]   0.00-10.00  sec  47.5 GBytes  40.8 Gbits/sec                  receiver
CPU Utilization: local/sender 102.2% (0.8%u/101.5%s), remote/receiver 68.0% (3.3%u/64.7%s)
snd_tcp_congestion cubic
rcv_tcp_congestion cubic

iperf Done.

iperf 3.16
Linux ubuntu 6.8.0-41-generic #41-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug  2 20:41:06 UTC 2024 x86_64
Control connection MSS 32716
Time: Tue, 12 Aug 2025 17:16:19 GMT
Connecting to host localhost, port 5201
      Cookie: n7wuwxowqcyjtniux6uc66ru2qxo2iitxxpg
      TCP MSS: 32716 (default)
[  5] local 127.0.0.1 port 49719 connected to 127.0.0.1 port 5201
Starting Test: protocol: TCP, 1 streams, 131072 byte blocks, omitting 0 seconds, 10 second test, tos 0
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  3.71 GBytes  31.8 Gbits/sec    0    479 KBytes       
[  5]   1.00-2.00   sec  3.77 GBytes  32.4 Gbits/sec    8    671 KBytes       
[  5]   2.00-3.00   sec  3.59 GBytes  30.9 Gbits/sec    0    671 KBytes       
[  5]   3.00-4.00   sec  3.57 GBytes  30.6 Gbits/sec    0    671 KBytes       
[  5]   4.00-5.00   sec  3.69 GBytes  31.7 Gbits/sec    0    927 KBytes       
[  5]   5.00-6.00   sec  3.38 GBytes  29.1 Gbits/sec    0    927 KBytes       
[  5]   6.00-7.00   sec  3.47 GBytes  29.8 Gbits/sec    0    927 KBytes       
[  5]   7.00-8.00   sec  3.28 GBytes  28.1 Gbits/sec    0   1.37 MBytes       
[  5]   8.00-9.00   sec  3.62 GBytes  31.1 Gbits/sec    0   2.06 MBytes       
[  5]   9.00-10.00  sec  3.41 GBytes  29.3 Gbits/sec    0   2.06 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
Test Complete. Summary Results:
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  37.9 GBytes  32.5 Gbits/sec    8             sender
[  5]   0.00-10.00  sec  37.9 GBytes  32.5 Gbits/sec                  receiver
CPU Utilization: local/sender 100.4% (0.5%u/99.9%s), remote/receiver 81.6% (3.5%u/78.0%s)
snd_tcp_congestion cubic
rcv_tcp_congestion cubic

iperf Done.

MTU = 16KB and TSO on/off

iperf 3.16
Linux ubuntu 6.8.0-41-generic #41-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug  2 20:41:06 UTC 2024 x86_64
Control connection MSS 16344
Time: Fri, 08 Aug 2025 14:11:55 GMT
Connecting to host localhost, port 5201
      Cookie: g2dq2c3jr6jbrvzec4mdaalbqcebelequoof
      TCP MSS: 16344 (default)
[  5] local 127.0.0.1 port 36577 connected to 127.0.0.1 port 5201
Starting Test: protocol: TCP, 1 streams, 131072 byte blocks, omitting 0 seconds, 10 second test, tos 0
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  4.47 GBytes  38.3 Gbits/sec    0    702 KBytes       
[  5]   1.00-2.00   sec  3.73 GBytes  32.1 Gbits/sec    0    702 KBytes       
[  5]   2.00-3.00   sec  4.07 GBytes  35.0 Gbits/sec    0    702 KBytes       
[  5]   3.00-4.00   sec  3.12 GBytes  26.8 Gbits/sec    0    702 KBytes       
[  5]   4.00-5.00   sec  3.77 GBytes  32.4 Gbits/sec    0    702 KBytes       
[  5]   5.00-6.00   sec  4.29 GBytes  36.8 Gbits/sec    0    702 KBytes       
[  5]   6.00-7.00   sec  3.95 GBytes  34.0 Gbits/sec    0    702 KBytes       
[  5]   7.00-8.00   sec  4.19 GBytes  36.0 Gbits/sec    0    702 KBytes       
[  5]   8.00-9.00   sec  4.51 GBytes  38.8 Gbits/sec    0    702 KBytes       
[  5]   9.00-10.00  sec  4.45 GBytes  38.2 Gbits/sec    0    702 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
Test Complete. Summary Results:
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  45.2 GBytes  38.8 Gbits/sec    0             sender
[  5]   0.00-10.00  sec  45.2 GBytes  38.8 Gbits/sec                  receiver
CPU Utilization: local/sender 100.8% (0.8%u/100.1%s), remote/receiver 75.9% (3.3%u/72.6%s)
snd_tcp_congestion cubic
rcv_tcp_congestion cubic

iperf Done.

iperf 3.16
Linux ubuntu 6.8.0-41-generic #41-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug  2 20:41:06 UTC 2024 x86_64
Control connection MSS 16332
Time: Tue, 12 Aug 2025 17:13:52 GMT
Connecting to host localhost, port 5201
      Cookie: hoblq2qnztwrpi6jkzii7lphsr3sazyr73hr
      TCP MSS: 16332 (default)
[  5] local 127.0.0.1 port 47455 connected to 127.0.0.1 port 5201
Starting Test: protocol: TCP, 1 streams, 131072 byte blocks, omitting 0 seconds, 10 second test, tos 0
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  3.21 GBytes  27.5 Gbits/sec    0    447 KBytes       
[  5]   1.00-2.00   sec  2.72 GBytes  23.4 Gbits/sec    0    447 KBytes       
[  5]   2.00-3.00   sec  1.61 GBytes  13.9 Gbits/sec    0    447 KBytes       
[  5]   3.00-4.00   sec  1.46 GBytes  12.5 Gbits/sec    0    447 KBytes       
[  5]   4.00-5.00   sec  2.72 GBytes  23.4 Gbits/sec    1    463 KBytes       
[  5]   5.00-6.00   sec  3.23 GBytes  27.7 Gbits/sec    0    463 KBytes       
[  5]   6.00-7.00   sec  3.15 GBytes  27.0 Gbits/sec    0    463 KBytes       
[  5]   7.00-8.00   sec  2.29 GBytes  19.7 Gbits/sec    0    463 KBytes       
[  5]   8.00-9.00   sec  2.20 GBytes  18.9 Gbits/sec    0    463 KBytes       
[  5]   9.00-10.00  sec  2.41 GBytes  20.7 Gbits/sec    0    463 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
Test Complete. Summary Results:
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  32.3 GBytes  27.7 Gbits/sec    1             sender
[  5]   0.00-10.00  sec  32.3 GBytes  27.7 Gbits/sec                  receiver
CPU Utilization: local/sender 101.4% (0.4%u/101.0%s), remote/receiver 76.7% (2.8%u/74.0%s)
snd_tcp_congestion cubic
rcv_tcp_congestion cubic

iperf Done.

MTU = 9KB and TSO on/off

iperf 3.16
Linux ubuntu 6.8.0-41-generic #41-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug  2 20:41:06 UTC 2024 x86_64
Control connection MSS 8948
Time: Fri, 08 Aug 2025 14:16:57 GMT
Connecting to host localhost, port 5201
      Cookie: ysrjn7b3kg763hvvte7mbof6d3mbndeuqz5t
      TCP MSS: 8948 (default)
[  5] local 127.0.0.1 port 56301 connected to 127.0.0.1 port 5201
Starting Test: protocol: TCP, 1 streams, 131072 byte blocks, omitting 0 seconds, 10 second test, tos 0
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  4.50 GBytes  38.6 Gbits/sec    0    612 KBytes       
[  5]   1.00-2.00   sec  3.94 GBytes  33.8 Gbits/sec    0    612 KBytes       
[  5]   2.00-3.00   sec  4.09 GBytes  35.1 Gbits/sec    0    612 KBytes       
[  5]   3.00-4.00   sec  4.17 GBytes  35.8 Gbits/sec    0    734 KBytes       
[  5]   4.00-5.00   sec  4.33 GBytes  37.2 Gbits/sec    0    848 KBytes       
[  5]   5.00-6.00   sec  2.56 GBytes  22.0 Gbits/sec    0    848 KBytes       
[  5]   6.00-7.00   sec  2.71 GBytes  23.3 Gbits/sec    0    848 KBytes       
[  5]   7.00-8.00   sec  2.87 GBytes  24.6 Gbits/sec    0    935 KBytes       
[  5]   8.00-9.00   sec  4.35 GBytes  37.4 Gbits/sec    0    935 KBytes       
[  5]   9.00-10.00  sec  1.71 GBytes  14.7 Gbits/sec    0    935 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
Test Complete. Summary Results:
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  45.2 GBytes  38.8 Gbits/sec    0             sender
[  5]   0.00-10.00  sec  45.2 GBytes  38.8 Gbits/sec                  receiver
CPU Utilization: local/sender 102.0% (0.6%u/101.4%s), remote/receiver 77.2% (3.2%u/74.0%s)
snd_tcp_congestion cubic
rcv_tcp_congestion cubic

iperf Done.

iperf 3.16
Linux ubuntu 6.8.0-41-generic #41-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug  2 20:41:06 UTC 2024 x86_64
Control connection MSS 8948
Time: Tue, 12 Aug 2025 17:11:19 GMT
Connecting to host localhost, port 5201
      Cookie: vnvkeftotra5c4y64qhdld6es22h4tilv4h2
      TCP MSS: 8948 (default)
[  5] local 127.0.0.1 port 49165 connected to 127.0.0.1 port 5201
Starting Test: protocol: TCP, 1 streams, 131072 byte blocks, omitting 0 seconds, 10 second test, tos 0
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  2.90 GBytes  24.9 Gbits/sec    0    367 KBytes       
[  5]   1.00-2.00   sec  2.79 GBytes  24.0 Gbits/sec    0    542 KBytes       
[  5]   2.00-3.00   sec  1.77 GBytes  15.2 Gbits/sec    0    612 KBytes       
[  5]   3.00-4.00   sec  2.04 GBytes  17.5 Gbits/sec    0    612 KBytes       
[  5]   4.00-5.00   sec  2.74 GBytes  23.5 Gbits/sec    0    612 KBytes       
[  5]   5.00-6.00   sec  2.80 GBytes  24.0 Gbits/sec    0    751 KBytes       
[  5]   6.00-7.00   sec  2.60 GBytes  22.4 Gbits/sec    0    751 KBytes       
[  5]   7.00-8.00   sec  2.22 GBytes  19.1 Gbits/sec    0   1.11 MBytes       
[  5]   8.00-9.00   sec  2.63 GBytes  22.6 Gbits/sec    0   1.11 MBytes       
[  5]   9.00-10.00  sec  2.22 GBytes  19.1 Gbits/sec    0   1.66 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
Test Complete. Summary Results:
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  29.7 GBytes  25.5 Gbits/sec    0             sender
[  5]   0.00-10.00  sec  29.7 GBytes  25.5 Gbits/sec                  receiver
CPU Utilization: local/sender 101.0% (0.4%u/100.5%s), remote/receiver 63.2% (2.3%u/60.9%s)
snd_tcp_congestion cubic
rcv_tcp_congestion cubic

iperf Done.

chengcui/tcp_loopback_perf (last edited 2025-08-12T18:36:23+0000 by chengcui)