Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 03 May 2014 15:20:07 -0600
From:      Ian Lepore <ian@FreeBSD.org>
To:        Boris Samorodov <bsam@passap.ru>
Cc:        freebsd-arm@FreeBSD.org
Subject:   Re: wandboard-quad: ffec performance (about 190 Mbits/sec)
Message-ID:  <1399152007.22079.232.camel@revolution.hippie.lan>
In-Reply-To: <53654A67.6030605@passap.ru>
References:  <53654A67.6030605@passap.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 2014-05-03 at 23:58 +0400, Boris Samorodov wrote:
> Hi All,
> 
> My home PC has max perfomance approx. 800 Mbit/sec (measured between
> two re adapters and a cheap d-link switch in between them).
> 
> I've just test ffec performance (one of re's is the other side):
> -----
> % ifconfig ffec0
> ffec0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
>         options=80008<VLAN_MTU,LINKSTATE>
>         ether 00:1f:7b:b4:09:8e
>         inet 192.168.100.211 netmask 0xffffff00 broadcast 192.168.100.255
>         media: Ethernet autoselect (1000baseT <full-duplex>)
>         status: active
>         nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
> 
> % iperf -c 192.168.100.99
> Client connecting to 192.168.100.99, TCP port 5001
> TCP window size: 32.5 KByte (default)
> ------------------------------------------------------------
> [  3] local 192.168.100.211 port 11536 connected with 192.168.100.99
> port 5001
> [ ID] Interval       Transfer     Bandwidth
> [  3]  0.0-10.0 sec   225 MBytes   188 Mbits/sec
> -----
> 
> Here is the vmstat at the time of iperf test:
> -----
> % vmstat -w1
>  procs      memory      page                    disks     faults         cpu
>  r b w     avm    fre   flt  re  pi  po    fr  sr mm0 mm1   in   sy   cs
> us sy id
>  1 0 0    235M  1934M   219   0   1   0   149   5   0   0  687  685  911
>  0  2 98
>  0 0 0    235M  1934M    24   0   0   0    44   9   0   0  246  307   91
>  1  1 99
>  0 0 0    235M  1934M    32   0   0   0    44   9   0   0  208  280   94
>  0  1 99
>  0 0 0    235M  1934M    29   0   0   0    44   9   0   0  288  373  108
>  0  0 99
>  1 0 0    256M  1933M   311   0   0   0    87   9   0   0 8309  757
> 13373  1 26 73
>  0 0 0    256M  1933M    12   0   0   0    32   9   0   6 11955  465
> 20366  0 37 63
>  0 0 0    256M  1933M    22   0   0   0    44   9   0   0 11379  537
> 19295  0 34 65
>  1 0 0    256M  1933M    12   0   0   0    24   9   0   1 11171  461
> 19067  0 34 65
>  0 0 0    256M  1933M    12   0   0   0    24   9   0   0 11109  476
> 18945  1 34 65
>  1 0 0    256M  1933M    12   0   0   0    24   9   0   0 11354  468
> 19352  0 36 64
>  0 0 0    256M  1933M    13   0   0   0    24   9   0   0 11162  465
> 18866  1 34 65
>  0 0 0    256M  1933M    12   0   0   0    24   9   0   2 11297  471
> 19165  0 36 64
>  1 0 0    256M  1933M    12   0   0   0    24   9   0   0 11345  465
> 19296  1 35 64
>  0 0 0    256M  1933M    12   0   0   0    24   9   0   0 11044  461
> 18634  0 35 65
>  0 0 0    235M  1934M    65   0   0   0   263   9   0   1 3224  602 5060
>  2  9 89
>  0 0 0    235M  1934M    12   0   0   0    24   9   0   0  142  206   77
>  0  0 100
>  0 0 0    235M  1934M    34   0   0   0    64   9   0   0  260  347  104
>  0  1 99
>  0 0 0    235M  1934M    12   0   0   0    24   9   0   0  142  206   79
>  0  0 100
> -----
> 
> Is this an expected result? Assuming that the system was about 65% idle,
> there is a space for improvement.
> 
> The system:
> -----
> % uname -a
> FreeBSD wandboard 11.0-CURRENT FreeBSD 11.0-CURRENT #6 r265218M: Fri May
>  2 18:24:07 SAMT 2014
> bsam@wandboard:/usr/obj/usr/src/sys/WANDBOARD-QUAD  arm
> -----
> 

There is definitely room for improvement.  ffec is the first network
driver I ever wrote for freebsd, and I was trying for reliability more
than performance for the first attempt.

Every packet is being copied multiple times, and we can eliminate some
of that.  Also, the imx6 supports some hardware-assist stuff (but imx5
doesn't, and it's the same driver, so we have to support both).

I'm probably too busy to do anything about it for a while, but if
anybody else wants to improve it, that would be great.  I think its
performance could double without too much work, and then further
improvements after that will take increasing effort for smaller gains.

-- Ian





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