From owner-freebsd-arm@FreeBSD.ORG Sat May 3 21:20:12 2014 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ACAF2A0F for ; Sat, 3 May 2014 21:20:12 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 706C916CB for ; Sat, 3 May 2014 21:20:11 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1WghLu-000OrJ-6O; Sat, 03 May 2014 21:20:10 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id s43LK7rp021863; Sat, 3 May 2014 15:20:07 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18qo+w2T20P9ztTyn2CAa4z Subject: Re: wandboard-quad: ffec performance (about 190 Mbits/sec) From: Ian Lepore To: Boris Samorodov In-Reply-To: <53654A67.6030605@passap.ru> References: <53654A67.6030605@passap.ru> Content-Type: text/plain; charset="us-ascii" Date: Sat, 03 May 2014 15:20:07 -0600 Message-ID: <1399152007.22079.232.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: freebsd-arm@FreeBSD.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 May 2014 21:20:12 -0000 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 metric 0 mtu 1500 > options=80008 > ether 00:1f:7b:b4:09:8e > inet 192.168.100.211 netmask 0xffffff00 broadcast 192.168.100.255 > media: Ethernet autoselect (1000baseT ) > status: active > nd6 options=29 > > % 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