From owner-freebsd-net@FreeBSD.ORG Thu Apr 28 13:04:52 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 0B7E0106564A for ; Thu, 28 Apr 2011 13:04:52 +0000 (UTC) (envelope-from mike@sentex.net) Received: from smarthost1.sentex.ca (smarthost1-6.sentex.ca [IPv6:2607:f3e0:0:1::12]) by mx1.freebsd.org (Postfix) with ESMTP id BC37F8FC08 for ; Thu, 28 Apr 2011 13:04:51 +0000 (UTC) Received: from [IPv6:2607:f3e0:0:4:f025:8813:7603:7e4a] (saphire3.sentex.ca [IPv6:2607:f3e0:0:4:f025:8813:7603:7e4a]) by smarthost1.sentex.ca (8.14.4/8.14.4) with ESMTP id p3SD4mLS052976 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 28 Apr 2011 09:04:49 -0400 (EDT) (envelope-from mike@sentex.net) Message-ID: <4DB965D8.7090906@sentex.net> Date: Thu, 28 Apr 2011 09:04:24 -0400 From: Mike Tancsa Organization: Sentex Communications User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: Adam Stylinski References: <20110428072946.GA11391@zephyr.adamsnet> In-Reply-To: <20110428072946.GA11391@zephyr.adamsnet> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on IPv6:2607:f3e0:0:1::12 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:04:52 -0000 On 4/28/2011 3:29 AM, Adam Stylinski wrote: > Hello, > > 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 get poor transmit performance. I've done all of the tweaking specified in just about every guide out there (the usual TCP window scaling, larger nmbclusters, 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 realize that this may not be the most realistic test, linux hosts with the same card can achieve 995Mbit/s to another host running this. When the Freebsd box is the server, Linux hosts can transmit to it at around 800 something 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 performance is still below normal. > > sysctl stats report that the card is trigger a lot of tx_desc_fail2: > dev.em.0.tx_desc_fail2: 3431 Try the tests using the tools in /usr/src/tools/tools/netperf to generate / test udp traffic. 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. http://www.tancsa.com/em-723.tgz what does pciconf -lvc for your em NIC show ? also, vmstat -i ---Mike -- ------------------- 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/