Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Jul 2013 21:23:22 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Peter Jeremy <peter@rulingia.com>
Cc:        freebsd-arm@freebsd.org, Hans Petter Selasky <hselasky@c2i.net>
Subject:   Re: USB Performance on Raspberry Pi
Message-ID:  <C7B05010-5448-43F5-B8B3-10D84B3D16BD@bsdimp.com>
In-Reply-To: <20130707031732.GS39302@server.rulingia.com>
References:  <20130707031732.GS39302@server.rulingia.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Jul 6, 2013, at 9:17 PM, Peter Jeremy wrote:

> Hi Hans,
>=20
> USB performance on the Raspberry Pi is rather lacking.  This is =
important
> because pretty much everything goes via USB.  Do you have any =
suggestions
> on how to fix the bottlenecks?  I suspect one is that FreeBSD is using
> PIO, whereas Linux is using DMA.
>=20
> I've previously commented about the sawtooth pattern in ping times:
> 64 bytes from 192.168.123.231: icmp_seq=3D6 ttl=3D64 time=3D2.701 ms
> 64 bytes from 192.168.123.231: icmp_seq=3D7 ttl=3D64 time=3D1.465 ms
> 64 bytes from 192.168.123.231: icmp_seq=3D8 ttl=3D64 time=3D10.589 ms
> 64 bytes from 192.168.123.231: icmp_seq=3D9 ttl=3D64 time=3D9.688 ms
> 64 bytes from 192.168.123.231: icmp_seq=3D10 ttl=3D64 time=3D8.673 ms
> 64 bytes from 192.168.123.231: icmp_seq=3D11 ttl=3D64 time=3D7.330 ms
> 64 bytes from 192.168.123.231: icmp_seq=3D12 ttl=3D64 time=3D6.857 ms
> 64 bytes from 192.168.123.231: icmp_seq=3D13 ttl=3D64 time=3D5.946 ms
> 64 bytes from 192.168.123.231: icmp_seq=3D14 ttl=3D64 time=3D3.955 ms
> 64 bytes from 192.168.123.231: icmp_seq=3D15 ttl=3D64 time=3D2.079 ms
> 64 bytes from 192.168.123.231: icmp_seq=3D16 ttl=3D64 time=3D1.072 ms
>=20
> Whereas pinging a Linux RPi gives:
> round-trip min/avg/max/stddev =3D 0.276/0.373/0.455/0.049 ms
>=20
> yongari@ gave me same patches for the SMSC NIC but they didn't have
> any noticable effect.
>=20
> And the network throughput is also well below what Linux can achieve.
>=20
> If I connect an external USB disk to a Linux RPi, I get 20.6 MBps
> read.  The same disk on FreeBSD RPi gives 6.3 MBps - with ~50%
> interrupt time.

sure sounds a lot like the USB polling issues...  Maybe we have a =
problem with the USB controller generating the proper interrupts, or =
some interrupt delivery problem?

Warner=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C7B05010-5448-43F5-B8B3-10D84B3D16BD>