On 9.5.2023. 9:56, Alexander Bluhm wrote:
> On Sun, May 07, 2023 at 09:00:31PM +0200, Alexander Bluhm wrote:
>> Not sure if I addressed all corner cases already.  I think IPsec
>> is missing.
> Updated diff:
> - parts have been commited
> - works with IPsec now
> - some bugs fixed
> - sysctl net.inet.tcp.tso
> - netstat TSO counter
> 
> If you test this, recompile sysctl and netstat with new kernel
> headers.  Then you can see, whether the diff has an effect on your
> setup.
> 
> # netstat -s -p tcp | grep TSO
>                 79 output TSO packets software chopped
>                 0 output TSO packets hardware processed
>                 840 output TSO packets generated
>                 0 output TSO packets dropped
> 
> If you run into problems, disable the feature, and report if the
> problem goes away.  This helps to locate the bug.
> 
> # sysctl net.inet.tcp.tso=0
> net.inet.tcp.tso: 1 -> 0
> 
> I would like to keep the sysctl for now.  It makes performance
> comparison easier.  When we add hardware TSO it can be a quick
> workaround for driver problems.
> 
> When this has been tested a bit, I think it is ready for commit.
> Remaining issues can be handled in tree.  My tests pass, I am not
> aware of TCP problems.

Hi,

I've tested this with few iperf3/tcpbench clients. While generating
traffic disabling and enabling net.inet.tcp.tso and the difference in
performance compared to hw TSO is small, but visible ...

netstat -s -p tcp | grep TSO
                61559792 output TSO packets software chopped
                0 output TSO packets hardware processed
                685352918 output TSO packets generated
                0 output TSO packets dropped



  PID      TID PRI NICE  SIZE   RES STATE     WAIT      TIME    CPU COMMAND
79516   543359  59    0    0K 1384K onproc/0  -        11:35 42.68% softnet
50096   165854  10    0 5432K 7400K sleep/1   netlock   7:16 38.92% iperf3
60190   204914  10    0 5440K 7316K sleep/2   netlock   7:03 37.89% iperf3
72560   588715  10    0 5428K 7408K sleep/3   netlock   7:17 37.16% iperf3
30689   450329  10    0 5436K 7424K sleep/1   netlock   7:16 37.06% iperf3
66203   324544  10    0 5440K 7352K sleep/3   netlock   4:30 29.83% iperf3
88977   447186  10    0 5432K 7376K sleep/5   netlock   4:34 29.74% iperf3
 6101   488471  10    0 5444K 7412K sleep/5   netlock   4:34 28.76% iperf3
 2186   575957  10    0 5436K 7376K sleep/2   netlock   4:32 28.12% iperf3
77920   442144  10    0    0K 1384K sleep/1   bored     7:00 22.27% softnet
48409   243224  14    0    0K 1384K sleep/2   netlock   6:29 21.14% softnet
91863   516055  10    0    0K 1384K sleep/4   bored     6:09 21.09% softnet
67265   156637 -22    0    0K 1384K run/0     -         0:17  0.10%
softclock


Reply via email to