Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 07 Oct 2015 18:39:06 +0200
From:      "C.Dornig" <c_dornig@gmx.de>
To:        "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>
Subject:   Re: dwc on banana pi pro and poor network performance
Message-ID:  <56154AAA.1080205@gmx.de>
In-Reply-To: <CAB=2f8yEd58Gv-UXrJL=B7D1vVNhTEewSNoY4eDrVXZCs0Xpag@mail.gmail.com>
References:  <560ED8DF.4080709@gmx.de> <CAB=2f8yEd58Gv-UXrJL=B7D1vVNhTEewSNoY4eDrVXZCs0Xpag@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi,


I tested it again without witness and debug enabled Kernel (r288916)

The results are a bit better now:


iperf
#####
- ------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 64.0 KByte (default)
- ------------------------------------------------------------
[  4] local 10.0.0.100 port 5001 connected with 10.0.1.100 port 55959
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.0 sec   389 MBytes   325 Mbits/sec

Top:
####

last pid:   848;  load averages:  0.37,  0.29,  0.15
                                                      up 0+00:07:04
10:15:10
14 processes:  1 running, 13 sleeping
CPU 0:  0.0% user,  0.0% nice,  0.0% system,  100% interrupt,  0.0% idle
CPU 1:  0.0% user,  0.0% nice,  1.5% system,  0.0% interrupt, 98.5% idle
Mem: 17M Active, 11M Inact, 44M Wired, 4332K Buf, 923M Free
Swap:

  PID USERNAME    THR PRI NICE   SIZE    RES STATE   C   TIME    WCPU
COMMAND
  846 root          1  20    0  7540K  3052K CPU1    1   0:00   0.39% top
  840 admin         1  20    0 15040K  6828K select  1   0:00   0.20% sshd
  651 root          1  20    0  7200K  4620K ttyin   1   0:00   0.00% csh
  837 root          1  28    0 15040K  6820K select  0   0:00   0.00% sshd
  844 root          1  32    0  7200K  3812K pause   0   0:00   0.00% csh

netstat -i -w 1 -n -bd
#######################

            input        (Total)           output
   packets  errs idrops      bytes    packets  errs      bytes colls drops
        10     0     0        864          6     0        880     0     0
         2     0     0        144          2     0        368     0     0
       59k     0     0        58M        58k     0        58M     0     0
       76k     0     0        75M        76k     0        75M     0     0
       79k     0     0        78M        80k     0        78M     0     0
       80k     0     0        79M        79k     0        79M     0     0
       80k     0     0        79M        80k     0        79M     0     0
       81k     0     0        80M        81k     0        80M     0     0
       81k     0     0        80M        82k     0        80M     0     0
       82k     0     0        81M        81k     0        80M     0     0


I am a bit confused why the network interrupts are block 100% only one
CPU instead both.

It would be nice to get the same network performance as with Linux.


Regards,
C.

On 02.10.2015 23:49, Luiz Otavio O Souza wrote:
> On 2 October 2015 at 16:19, C.Dornig wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA256
>>
>> Hi,
>>
>>
>> I have a Lemaker Banana Pi Pro and want to use it as router (regarding
>> the GBit interface).
>>
>> For testing i used iperf with two test hosts. The Pi have two vlans
>> configured and each test node use the pi as router to reach the other node.
>>
>> I created a FreeBSD 11 image with crochet (FreeBSD r288430,
>> +u-boot-bananapi version 2015-04).
>>
>> Test scenario:
>>
>> # On Banana:
>> sysctl net.inet.ip.forwarding=1
>> sysctl net.inet.ip.fastforwarding=1
>> ifconfig vlan10 create
>> ifconfig vlan10 vlan 10 vlandev dwc0
>> ifconfig vlan10 10.0.0.1/24 up
>> ifconfig vlan11 create
>> ifconfig vlan11 vlan 11 vlandev dwc0
>> ifconfig vlan11 10.0.1.1/24 up
>>
>> # Host 1:
>> ifconfig vlan10 create
>> ifconfig vlan10 vlan 10 vlandev em0
>> ifconfig vlan10 10.0.0.100/24 up
>> route add -net 10.0.1.0/24 10.0.0.1
>> iperf -c 10.0.1.100
>>
>> # Host 2:
>> ifconfig vlan11 create
>> ifconfig vlan11 vlan 11 vlandev em0
>> ifconfig vlan11 10.0.1.100/24 up
>> route add -net 10.0.0.0/24 10.0.1.1
>> iperf -s
>>
>> The hosts can reach each others.
>>
>> Iperf reports me ~130 Mbit.
>>
>> During the test, netstat reports ~37k pps and the interrupt rate are
>> also not very high (~300).
>>
>> The same test with Linux on the PI results ~550 Mbit.
>>
>> Iperf from host 1 to host 2 without PI in between reports ~990 Mbit.
>>
>>
>> What's wrong here ?
>>
>> Regards,
>> C.
> 
> 
> This is expected, if_dwc needs some work to perform better.
> 
> I just did enough to make it work on A20.
> 
> If someone is willing to work with this, I can help with some of
> details (yongari@ was kind enough to educate me about what could be
> done there), otherwise I'll fix this on my free time (i.e. it will
> take some time).
> 
> Luiz
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJWFUqlAAoJENpF8Q7kD80ylwgP/AwYVEpsGq+495VGaUFaoa+u
aWGTB023TB6Vurmus3Us8XfSEBSHrYQOCd49T6R5r07p6v7moPmEDSDm4lwQ93BQ
Y7jgs0B5J9nLDFGdHYcDOpXAJGBC1GntPoABMnw/ko+oUn+hNuTjEcoRYidXjUWa
CH4QUt4C30wI8qKbY7c12bPtCTX4yfz7WqbUNGzU5HkaIu7U0Yv9liQBNVPdTTka
lBa9mMSq+v2pTsEvzqpuPjMWpS8Y/Hd3WqOQTpo0N3znM7AenEagm4oM8pRRSH2b
mpjDl6WWmoHsL7TfjEmz4AuNV6MxA4lIcuCBunPNm/S+O8SEAom9jfpvh6/JCk5L
AYyidVXRrtfbq1nutwWYQ6SFmS1LaxUHZJHV7dgkN+P7XqnOsc0HMh+a5BrAt4iO
9bmONhnIM1H3A+D4sslc0D1PwvA3+B5jjeG8IKfBaR3jQbUhPxNaxbn2eFfYTNjX
f9bsTAfqCDm2DtbTGdgMAzrB68WUp9OsZ42925SamWt5PWbzqxRZftRtZ05Q+joj
mYqVwjsaSZmQdcMJs8/S2SAVn5seK3TfT0VuWNIyAy/kQiy032rHepX+mtxYnpUj
F6DFFJ6zdFI+7UK2WA2GyiIoB30ZAlnI/S9L7/mky2oWEds5ZdQFCMl9WrTHCHmr
GTupJncTJytrFIBPkaqS
=WiaO
-----END PGP SIGNATURE-----



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