From nobody@FreeBSD.org  Sat Dec  4 09:29:51 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2CC0F106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  4 Dec 2010 09:29:51 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (unknown [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 009C28FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  4 Dec 2010 09:29:51 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id oB49ToYn024470
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 4 Dec 2010 09:29:50 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id oB49ToKf024469;
	Sat, 4 Dec 2010 09:29:50 GMT
	(envelope-from nobody)
Message-Id: <201012040929.oB49ToKf024469@red.freebsd.org>
Date: Sat, 4 Dec 2010 09:29:50 GMT
From: Rick Richard <rick@sloservers.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [em] poor performance on 8.1, 8.2-PRE
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         152828
>Category:       kern
>Synopsis:       [em] poor performance on 8.1, 8.2-PRE
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-net
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 04 09:30:15 UTC 2010
>Closed-Date:    
>Last-Modified:  Wed Jul 20 15:50:08 UTC 2011
>Originator:     Rick Richard
>Release:        FreeBSD 8.2-PRERELEASE #3: Fri Dec  3 22:28:42 PST 2010
>Organization:
>Environment:
FreeBSD thinking.kicks-ass.org 8.2-PRERELEASE FreeBSD 8.2-PRERELEASE #3: Fri Dec  3 22:28:42 PST 2010     rrichard@thinking.kicks-as
s.org:/usr/obj/usr/src/sys/REASON  amd64
>Description:
The only additions to the kernel config are PF and ALTQ.

After upgrading from 8.0 to 8.1-RELEASE, throughput has been terrible with this card.  I have it connected to a 100baseTX switch.  Using iperf between this machine and another machine I measure only 1.80Mbits/sec coming in but the full 94.8Mbits/sec going out.  

I just upgraded to 8-STABLE hoping for some improvement, but the results are the same.

Now just to be sure, I copied the 8.0-RELEASE em / e1000 driver over to 8-STABLE, rebuilt the kernel, and measured 94.6Mbits/sec coming in and 87.4Mbits/sec going out.  It seems that the post-8.0 driver performs better when transmitting but there is something seriously wrong with the reception of traffic.

dmesg:
FreeBSD 8.1-RELEASE-p2 #2: Fri Dec  3 15:58:41 PST 2010
<snip>
em0: <Intel(R) PRO/1000 Legacy Network Connection 1.0.1> port 0xcc00-0xcc3f mem 0xfdfe0000-0xfdffffff,0xfdfc0000-0xfdfdffff irq 16 1
em0: [FILTER]
em0: Ethernet address: 00:07:e9:19:f0:cc

FreeBSD 8.2-PRERELEASE #3: Fri Dec  3 22:28:42 PST 2010
<snip>
em0: <Intel(R) PRO/1000 Legacy Network Connection 1.0.3> port 0xcc00-0xcc3f mem 0xfdfe0000-0xfdffffff,0xfdfc0000-0xfdfdffff irq 16 1
em0: [FILTER]
em0: Ethernet address: 00:07:e9:19:f0:cc

sysctl -a:
dev.em.0.%desc: Intel(R) PRO/1000 Legacy Network Connection 1.0.3
dev.em.0.%driver: em
dev.em.0.%location: slot=4 function=0
dev.em.0.%pnpinfo: vendor=0x8086 device=0x100e subvendor=0x8086 subdevice=0x002e class=0x020000
dev.em.0.%parent: pci1
<snip for being too long>

ifconfig -a:
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC>
        ether 00:07:e9:19:f0:cc
        inet 24.176.175.198 netmask 0xfffffff8 broadcast 24.176.175.199
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
>How-To-Repeat:
Use same or similar chipset and compare performance between 8.0 and 8.1+

I believe the card is named "Intel PRO/1000 MT Desktop RT"
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Dec 6 17:54:38 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=152828 

From: "Michael W. Lucas" <mwlucas@blackhelicopters.org>
To: bug-followup@FreeBSD.org
Cc: rick@sloservers.com
Subject: Re: kern/152828: [em] poor performance on 8.1, 8.2-PRE
Date: Wed, 20 Jul 2011 11:49:08 -0400

 I'm seeing the exact same problem here as the original poster. Is
 anybody looking at this?
 
 Running FreeBSD 8.2-RELEASE-p1 amd64, from FreeNAS 8.0
 
 sysctls:
 dev.em.0.%desc: Intel(R) PRO/1000 Network Connection 7.1.9
 dev.em.0.%driver: em
 dev.em.0.%location: slot=0 function=0
 dev.em.0.%pnpinfo: vendor=0x8086 device=0x108b subvendor=0x8086 subdevice=0x0000 class=0x020000
 dev.em.0.%parent: pci1
 dev.em.0.nvm: -1
 dev.em.0.debug: -1
 ...
 
 ifconfig:
 em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
         options=219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC>
         ether 00:15:17:31:c8:fe
         inet 139.171.199.13 netmask 0xffffff00 broadcast 139.171.199.255
         media: Ethernet autoselect (1000baseT <full-duplex>)
         status: active
 
 dmesg | grep em0
 em0: <Intel(R) PRO/1000 Network Connection 7.1.9> port 0xbc00-0xbc1f mem 0xff6e0000-0xff6fffff irq 16 at device 0.0 on pci1
 em0: Using an MSI interrupt
 em0: [FILTER]
 em0: Ethernet address: 00:15:17:31:c8:fe
 
 
 
 
 -- 
 Michael W. Lucas 	
 http://www.MichaelWLucas.com/, http://blather.MichaelWLucas.com/
 Latest book: Network Flow Analysis http://www.networkflowanalysis.com/
 mwlucas@BlackHelicopters.org, Twitter @mwlauthor
>Unformatted:
