Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Apr 2011 08:39:57 -0400
From:      Adam Stylinski <kungfujesus06@gmail.com>
To:        freebsd-net@freebsd.org
Subject:   Re: em0 performance subpar
Message-ID:  <BANLkTim1OdpK83YtkeoXKP_j=K99A-BD6A@mail.gmail.com>
In-Reply-To: <20110428123847.GA85701@freebsdbox.adamsnet>
References:  <20110428072946.GA11391@zephyr.adamsnet> <4DB946CE.4030901@rdtc.ru> <20110428123847.GA85701@freebsdbox.adamsnet>

next in thread | previous in thread | raw e-mail | index | archive | help
--00151747b8d8d6bba204a1f9da06
Content-Type: text/plain; charset=ISO-8859-1

---------- Forwarded message ----------
From: Adam Stylinski <kungfujesus06@gmail.com>
Date: Thu, Apr 28, 2011 at 8:38 AM
Subject: Re: em0 performance subpar
To: Eugene Grosbein <egrosbein@rdtc.ru>


On Thu, Apr 28, 2011 at 05:51:58PM +0700, Eugene Grosbein wrote:
> 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

ITEM                     SIZE     LIMIT      USED      FREE  REQUESTS
 FAILURES
mbuf_packet:              256,        0,     4096,      896,   531481,
 0
mbuf:                     256,        0,     1026,    10497,  3882824,
 0
mbuf_cluster:            2048,    65768,     4992,     2998,   105908,
 0
mbuf_jumbo_page:         4096,    12800,        0,     4462,  1261679,
 0
mbuf_jumbo_9k:           9216,     6400,        0,        0,        0,
 0
mbuf_jumbo_16k:         16384,     3200,        0,        0,        0,
 0
mbuf_ext_refcnt:            4,        0,        0,      168,        1,
 0

I'm willing to try compiling the module with EM_MULTIQUEUE on the test box
to see if it makes a difference, but I read it can have issues with UDP
traffic.
--
Adam Stylinski
PGP Key: http://pohl.ececs.uc.edu/~adam/publickey.pub
Blog: http://technicallyliving.blogspot.com

--00151747b8d8d6bba204a1f9da06
Content-Type: application/pgp-signature
Content-Disposition: attachment
Content-Transfer-Encoding: base64
X-Attachment-Id: d83242f6e3f9e33_0.1

LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KVmVyc2lvbjogR251UEcgdjIuMC4xNyAoRnJl
ZUJTRCkKCmlRSWNCQUVCQWdBR0JRSk51Vi9QQUFvSkVENnNSSEU2VHZtbmRZOFFBSzVvNWFXdlY1
VVJlWkluU1dRTWR6MmEKWmpOb2d3R3I2eEVCV3Z3dmZmYllhWHljSkgxTnhDU0dYWGFVRVpIbFRs
RFk0R240dEs2eWhkaDhpa0VuN28wYwpjRGsrSy9ONUhXMlFqQnVvNTIxY2pPOG52MElSWnpmNk82
ZnRyamQvM0FtVFViSXhTdU9LNHFHdXZycE55UXpTCm5rQVVmUmJnaDMxcElINEpMN0JqaTNZczBH
ZHdWUm1PSEl5b3k4cWVDQTlyQ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