Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Jul 2020 15:39:20 -0700
From:      John-Mark Gurney <jmg@funkthat.com>
To:        Hans Petter Selasky <hps@selasky.org>
Cc:        Kevin Oberman <rkoberman@gmail.com>, "freebsd-usb@FreeBSD.org" <freebsd-usb@freebsd.org>, FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: slow USB 3.0 on -current
Message-ID:  <20200713223920.GO4213@funkthat.com>
In-Reply-To: <50d00b19-9e27-4d0f-f3d1-af0574687c14@selasky.org>
References:  <20200711224426.GC4213@funkthat.com> <b0053811-20c6-53d6-1197-6ae50a7033ce@selasky.org> <20200712215449.GI4213@funkthat.com> <CAN6yY1uigZ20jMF8ccN77CN2fsco%2BEJHeTRMDGH3jTv=Rff2=A@mail.gmail.com> <20200713010240.GJ4213@funkthat.com> <50d00b19-9e27-4d0f-f3d1-af0574687c14@selasky.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hans Petter Selasky wrote this message on Mon, Jul 13, 2020 at 10:50 +0200:
> On 2020-07-13 03:02, John-Mark Gurney wrote:
> > MB means megabytes.. I would use Mbps for bits...  so, on Win10 and
> > NetBSD, I'm able to get 100 MBytes/sec on Win10/NetBSD, and FreeBSD,
> > I'm only getting a tenth the capability of gige at 9-10 MBytes/sec...
> > 
> > I'll note that fetch reports numbers of MBps, which is one of the tools
> > I've been using for testing.
> 
> Could you have a look at the traffic pattern, when using iperf?
> 
> usbdump -i usbusX -f Y
> 
> Where X and Y are the numbers after ugen .
> 
> Many of the network USB drivers are single buffered, because that's what 
> older USB host controllers support. Then the IRQ rate 8000 for USB 
> 2.0/3.0 and 1000 for USB 1.0, limits the number of packets per second.

Hmm...  now that I do the math, that sounds very likely what the problem
is:
8000 int/s * 1480 bytes/int * 8 bits/byte /1000/1000 == 94.72 Mbps

add in the delay to swap buffers...  and this is very close to the speed
that I'm seeing...

I wasn't sure what to look for, but the output is here:
https://www.funkthat.com/~jmg/FreeBSD/usb.a78/usbdump.0.4.txt.xz

Also, the output does not match what the man page says..  It implies
that OUT or IN, but I'm seeing SUBM and DONE instead, and the delimiters
between the feels don't make sense...

This was running:
gold,pts,/home/jmg,521$iperf3 -b 240m -u -c 192.168.0.80
Connecting to host 192.168.0.80, port 5201
[  5] local 192.168.0.2 port 65117 connected to 192.168.0.80 port 5201
[ ID] Interval           Transfer     Bitrate         Total Datagrams
[  5]   0.00-1.00   sec  28.6 MBytes   240 Mbits/sec  20531
[  5]   1.00-2.00   sec  28.6 MBytes   240 Mbits/sec  20548
[  5]   2.00-3.00   sec  28.6 MBytes   240 Mbits/sec  20550
[  5]   3.00-4.00   sec  28.6 MBytes   240 Mbits/sec  20546
[  5]   4.00-5.00   sec  28.6 MBytes   240 Mbits/sec  20551
[  5]   5.00-6.00   sec  28.6 MBytes   240 Mbits/sec  20545
[  5]   6.00-7.00   sec  28.6 MBytes   240 Mbits/sec  20548
[  5]   7.00-8.01   sec  28.1 MBytes   234 Mbits/sec  20175
[  5]   8.01-9.00   sec  29.1 MBytes   246 Mbits/sec  20921
[  5]   9.00-10.00  sec  28.6 MBytes   240 Mbits/sec  20548
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Jitter    Lost/Total Datagrams
[  5]   0.00-10.00  sec   286 MBytes   240 Mbits/sec  0.000 ms  0/205463 (0%)  sender
[  5]   0.00-10.35  sec   107 MBytes  87.1 Mbits/sec  0.172 ms  128298/205436 (62%)  receiver

Which is trying to send 240Mbps UDP traffic to the USB3 ethernet
machine, and the machine only receives the usual 91Mbps...

I have also published:
https://www.funkthat.com/~jmg/FreeBSD/usb.a78/umass.debug.txt.xz

Which shows the umass issue that I've been having where any umass
device on this system almost never attaches...  This was takes w/
hw.usb.umass.debug=-1
hw.usb.xhci.debug=17

I set those sysctl's, then attached the umass device (as USB3.0 SD
card reader), waited for the five retries..

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200713223920.GO4213>