NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ure0: Questionable Performance





Em seg, 2024-07-22 às 14:54 +0100, Robert Swindells escreveu:
matthewd%fastmai.us@localhost wrote:
May I have some help troubleshooting poor network performance?  I have
an older laptop (Thinkpad 13) with a USB-C Ethernet dongle that attaches
as ure0 as it has no builtin Ethernet port.  I'm running NetBSD 10.0
STABLE built locally from a couple of days ago.

$ ifconfig ure0
ure0: flags=0x8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        capabilities=0x3ff00<IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Rx,TCP4CSUM_Tx>
        capabilities=0x3ff00<UDP4CSUM_Rx,UDP4CSUM_Tx,TCP6CSUM_Rx,TCP6CSUM_Tx>
        capabilities=0x3ff00<UDP6CSUM_Rx,UDP6CSUM_Tx>
        enabled=0

You could enable HW checksumming.

As a comparison, on a Thinkpad T495S running -current with an axen(4)
device connected to USB-C all HW checksum options enabled:

% iperf3 -c 192.168.0.2
Connecting to host 192.168.0.2, port 5201
[  5] local 192.168.0.37 port 65534 connected to 192.168.0.2 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  91.2 MBytes   764 Mbits/sec    0   2.00 MBytes       
[  5]   1.00-2.01   sec  91.4 MBytes   759 Mbits/sec    0   2.00 MBytes       
[  5]   2.01-3.01   sec  89.9 MBytes   754 Mbits/sec    0   2.00 MBytes       
[  5]   3.01-4.01   sec  89.9 MBytes   754 Mbits/sec    0    318 KBytes       
[  5]   4.01-5.01   sec  89.8 MBytes   753 Mbits/sec    0    297 KBytes       
[  5]   5.01-6.01   sec  89.9 MBytes   754 Mbits/sec    0    256 KBytes       
[  5]   6.01-7.01   sec  89.8 MBytes   753 Mbits/sec    0    208 KBytes       
[  5]   7.01-8.01   sec  89.6 MBytes   752 Mbits/sec    0    144 KBytes       
[  5]   8.01-9.01   sec  89.9 MBytes   754 Mbits/sec    0    373 KBytes       
[  5]   9.01-10.01  sec  89.8 MBytes   753 Mbits/sec    0    339 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.01  sec   901 MBytes   755 Mbits/sec    0             sender
[  5]   0.00-10.01  sec   901 MBytes   754 Mbits/sec                  receiver

With TSO4 enabled as well (which your adaptor won't do):

 % iperf3 -c 192.168.0.2
Connecting to host 192.168.0.2, port 5201
[  5] local 192.168.0.37 port 65532 connected to 192.168.0.2 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   112 MBytes   943 Mbits/sec    0   2.00 MBytes       
[  5]   1.00-2.01   sec   114 MBytes   943 Mbits/sec    0   2.00 MBytes       
[  5]   2.01-3.01   sec   112 MBytes   942 Mbits/sec    0   2.00 MBytes       
[  5]   3.01-4.01   sec   112 MBytes   941 Mbits/sec    0    250 KBytes       
[  5]   4.01-5.01   sec   112 MBytes   942 Mbits/sec    0    622 KBytes       
[  5]   5.01-6.01   sec   112 MBytes   942 Mbits/sec    0    844 KBytes       
[  5]   6.01-7.01   sec   112 MBytes   942 Mbits/sec    0   1018 KBytes       
[  5]   7.01-8.01   sec   112 MBytes   943 Mbits/sec    0   1.14 MBytes       
[  5]   8.01-9.01   sec   112 MBytes   942 Mbits/sec    0   1.27 MBytes       
[  5]   9.01-10.01  sec   112 MBytes   942 Mbits/sec    0    181 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.01  sec  1.10 GBytes   942 Mbits/sec    0             sender
[  5]   0.00-10.01  sec  1.10 GBytes   942 Mbits/sec                  receiver

I don't think there is anything wrong with the USB or TCP/IP stacks.

What is at the other end of your cable?

One cause of really slow network performance can be a mismatch in full/half
duplex negotiation between the two devices

In my system running on a small desktop amd64 on celeron with ONE ethernet 
and another NIC on usb... runs very goot UNTIL you try to execute tcpdump -n -i ure0
the system panics, reboot and go ready in less than 30 sec.
.



Home | Main Index | Thread Index | Old Index