From owner-freebsd-net@FreeBSD.ORG Thu Apr 28 13:29:08 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBAF71065670 for ; Thu, 28 Apr 2011 13:29:08 +0000 (UTC) (envelope-from kungfujesus06@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id AAFF28FC0C for ; Thu, 28 Apr 2011 13:29:08 +0000 (UTC) Received: by iwn33 with SMTP id 33so3077624iwn.13 for ; Thu, 28 Apr 2011 06:29:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=sLcL29tdE9/XXxnIDkROkDEsesbpETqdb/moRA3K9dg=; b=FiFAXWFIfiLEMqgMFfDzD0fpMOHGGeXxloZKHLlNxVa7V35adAHJGnU8ldjaMHf9iC 9PzA0ZigvDkHFXw0CQolKdcehQTnwivS+3pU+OZoSsvL719Mr1m03qCRFxg10A61elc7 gzV0pM+0Wd6lrkedybYTFIRFnDzLfWtjM1Fe4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=klAtrCJvgHbGVyf3weslXIP39LKs/FbyyRzKoBAO4qF2Xg2ZU49SmdQyto8BgRAeSc R6ZY9mvKe4Obt2LAtp3GRogDtdGdMlQv3cYlpTBlEOqzd8Z1n8Y4+zeUw8Kesivf9gLS yomWnoSzlQh5S++KesTMV/IWtmUv52HVc36h4= Received: by 10.43.60.148 with SMTP id ws20mr3888206icb.264.1303997348036; Thu, 28 Apr 2011 06:29:08 -0700 (PDT) Received: from ossumpossum.geop.uc.edu ([129.137.163.68]) by mx.google.com with ESMTPS id 13sm717343ibo.59.2011.04.28.06.29.06 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 28 Apr 2011 06:29:06 -0700 (PDT) Date: Thu, 28 Apr 2011 09:29:22 -0400 From: Adam Stylinski To: Mike Tancsa Message-ID: <20110428132922.GC2800@ossumpossum.geop.uc.edu> References: <20110428072946.GA11391@zephyr.adamsnet> <4DB965D8.7090906@sentex.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tqI+Z3u+9OQ7kwn0" Content-Disposition: inline In-Reply-To: <4DB965D8.7090906@sentex.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-net@freebsd.org Subject: Re: em0 performance subpar X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Apr 2011 13:29:09 -0000 --tqI+Z3u+9OQ7kwn0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 28, 2011 at 09:04:24AM -0400, Mike Tancsa wrote: > On 4/28/2011 3:29 AM, Adam Stylinski wrote: > > Hello, > >=20 > > I have an intel gigabit network adapter (the 1000 GT w/chipset 82541PI)= which performs poorly in Freebsd compared to the same card in Linux. I've= tried this card in two different freebsd boxes and for whatever reason I g= et poor transmit performance. I've done all of the tweaking specified in j= ust about every guide out there (the usual TCP window scaling, larger nmbcl= usters, delayed acks, etc) and still I get only around 600mbps. I'm using = jumbo frames, with an MTU of 9000. I'm testing this with iperf. While I r= ealize that this may not be the most realistic test, linux hosts with the s= ame card can achieve 995Mbit/s to another host running this. When the Free= bsd box is the server, Linux hosts can transmit to it at around 800 somethi= ng Mbit/s. I've increased the transmit descriptors as specified in the if_= em man page, and while that gave me 20 or 30 more mbit/s, my transmit perfo= rmance is still below normal. =20 > >=20 > > sysctl stats report that the card is trigger a lot of tx_desc_fail2: > > dev.em.0.tx_desc_fail2: 3431 >=20 > Try the tests using the tools in /usr/src/tools/tools/netperf to > generate / test udp traffic. >=20 > Perhaps give the driver from HEAD a try. There are a few fixes to it. I > back ported it to RELENG_8, but it should work on 8.2R as well. >=20 > http://www.tancsa.com/em-723.tgz >=20 > what does pciconf -lvc for your em NIC show ? > also, vmstat -i >=20 > ---Mike >=20 >=20 >=20 > --=20 > ------------------- > Mike Tancsa, tel +1 519 651 3400 > Sentex Communications, mike@sentex.net > Providing Internet services since 1994 www.sentex.net > Cambridge, Ontario Canada http://www.tancsa.com/ lspci -lvc: em0@pci0:7:5:0: class=3D0x020000 card=3D0x13768086 chip=3D0x107c8086 rev=3D= 0x05 hdr=3D0x00 vendor =3D 'Intel Corporation' device =3D 'Gigabit Ethernet Controller (Copper) rev 5 (82541PI)' class =3D network subclass =3D ethernet cap 01[dc] =3D powerspec 2 supports D0 D3 current D0 cap 07[e4] =3D PCI-X supports 2048 burst read, 1 split transaction vmstat -i: interrupt total rate irq1: atkbd0 6 0 irq14: ata0 30306 1 irq18: ohci0 ohci1* 5 0 irq20: em0 994488 43 irq24: aac0 107044 4 irq40: hptrr0 89761 3 irq48: fwohci0+ 5047 0 cpu0: timer 45466809 1999 irq256: ahci1 83842 3 cpu2: timer 45458298 1999 cpu3: timer 45458296 1999 cpu1: timer 45458295 1999 Total 183152197 8055 --=20 Adam Stylinski PGP Key: http://pohl.ececs.uc.edu/~adam/publickey.pub Blog: http://technicallyliving.blogspot.com --tqI+Z3u+9OQ7kwn0 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iQIcBAEBAgAGBQJNuWuyAAoJED6sRHE6TvmnnlAQANSHsX5yLRf5d3pcFTKRnNxw u039V0m3bdkIk0/3TuBJDpqW5J9jf9VwaRAoDPNJOvnkkDGmxUKhigadWQ2YVphO UgzrFo0kdXuEKEYK2bn89ITJrQKJmqUUWlhqsCRZ0+LRjspO1EKJKtfyJK362QGl yMtDxKn+P7sgFPOy2qFnI5dBNDM16E6fxhZWFWNr6IEOkezwhxizwhqD20cvh9CW 9Wom9iauRQbqIlS9ttTkYkIWbRZ+Sxl0xn7dXTUEzVJrk19EuU2ILWSXJHw+Eb6p HdRnIdvllWa/fVvkEt+4gw6BKWy2HvWAGH19fcHqFEeT8hn97qCDXpV4h7McrJ0W cjmqrx8lSU3vBhe2I54vzgq1u0tYyAAIiH7dDoF/siOtZlFa2gGeHv+9X6iu2zTQ zVzv33rWa6CRo0qsOFXWmrx5tsqNZ/y0K7a/6U/lARSpjqc1GeKuz+3TTLTuH6mG 0nNjIAQU9tW3FsqQ6x8Ocq+zBva0S/oUE+kSuL53KJXu7klHzMYpKZLiQdQoccAf dV/vRSHK+1Jcq5cLRd1DexNBcFJ8oBVwhM4HxQF2klzZD6Ww4u/WQxVEymHALS2q pkZ4+2UKdRsXLQD98WDL1j06B335PolXSgkBGDMTaTOO/5zggDUfO04ETmI9nkLy CIFyUkZKUoAOAdW5gXt/ =G+64 -----END PGP SIGNATURE----- --tqI+Z3u+9OQ7kwn0--