From owner-freebsd-net@FreeBSD.ORG Thu Apr 28 10:52: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 7B4F51065670 for ; Thu, 28 Apr 2011 10:52:08 +0000 (UTC) (envelope-from egrosbein@rdtc.ru) Received: from eg.sd.rdtc.ru (unknown [IPv6:2a03:3100:c:13::5]) by mx1.freebsd.org (Postfix) with ESMTP id C5DE38FC14 for ; Thu, 28 Apr 2011 10:52:07 +0000 (UTC) Received: from eg.sd.rdtc.ru (localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.14.4/8.14.4) with ESMTP id p3SAq31V098686; Thu, 28 Apr 2011 17:52:03 +0700 (NOVST) (envelope-from egrosbein@rdtc.ru) Message-ID: <4DB946CE.4030901@rdtc.ru> Date: Thu, 28 Apr 2011 17:51:58 +0700 From: Eugene Grosbein User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; ru-RU; rv:1.9.2.13) Gecko/20110112 Thunderbird/3.1.7 MIME-Version: 1.0 To: Adam Stylinski References: <20110428072946.GA11391@zephyr.adamsnet> In-Reply-To: <20110428072946.GA11391@zephyr.adamsnet> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 10:52:08 -0000 On 28.04.2011 14:29, 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 > > Looking at a comment in the source code this indicates that the card was not able to obtain enough transmit descriptors (but I've given the card the maximum of 4096 in my loader.conf tunable). Is this a bug or a performance regression of some kind? Does anybody have a fix for this? I tried another card with the same chip in a different box on 8-STABLE to no avail (the box I'm trying to improve performance on is on 8.2-RELEASE-p1). > > Anybody manage to make this card push above 600mbps in ideal network benchmarks? Any help would be gladly appreciated. Please show output of "vmstat -z|egrep 'ITEM|mbuf'" command after the test. Eugene Grosbein