Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Aug 2008 16:14:29 -0700
From:      Jeremy Chadwick <koitsu@FreeBSD.org>
To:        "Rick C. Petty" <rick-freebsd2008@kiwi-computer.com>
Cc:        Pyun YongHyeon <pyunyh@gmail.com>, freebsd-hackers@freebsd.org
Subject:   Re: local network throughput issues
Message-ID:  <20080816231429.GA86316@eos.sc1.parodius.com>
In-Reply-To: <20080816222831.GC67723@keira.kiwi-computer.com>
References:  <20080816194311.GA67723@keira.kiwi-computer.com> <20080816221535.GA82290@eos.sc1.parodius.com> <20080816222831.GC67723@keira.kiwi-computer.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Aug 16, 2008 at 05:28:31PM -0500, Rick C. Petty wrote:
> > 2) NFS (unless you're explicitly disabling it) is UDP-based, while SSH
> > and Samba are TCP-based.  Your nfe0 device has TSO4 enabled on it, so
> > I'm left wondering if the TCP offloading support for your nfe(4) device
> > is broken.
> > 
> > Can you try disabling it by adding -tso to your ifconfig_nfe0 line in
> > /etc/rc.conf?  If you're using DHCP on that interface, that may pose
> > somewhat of a problem.
> 
> Yes, that seems to have made all the difference in the world:
> 
> % ssh gateway cat /dev/zero | dd of=/dev/null
> load: 0.08  cmd: ssh 68698 [runnable] 1.20u 0.25s 11% 3020k
> 94384+0 records in
> 94384+0 records out
> 48324608 bytes transferred in 5.314707 secs (9092619 bytes/sec)
> load: 0.08  cmd: ssh 68698 [runnable] 1.81u 0.33s 15% 3020k
> 147664+0 records in
> 147664+0 records out
> 75603968 bytes transferred in 7.652768 secs (9879297 bytes/sec)
> 
> So I'm thinking TSO wasn't an option in the older 7-stable I was running
> and now it is, but the support for it is broken.

TSO support is something that's implemented in each network driver.  TSO
in nfe(4) was commited to HEAD (CURRENT) on June 12th 2007.  See
revision 1.17 below:

http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/nfe/if_nfe.c

That would have been what is now considered RELENG_7 (since FreeBSD
7.0-RELEASE was announced and made available on February 27th, 2008).

I'm under the impression that TSO was available/enabled for you before,
but I'm not sure because there's not a lot of historic data available
here.  I don't know why/how it broke, or what has changed.

I've CC'd one of the nfe(4) maintainers, PYUN Yong-Hyeon, who should be
able to help determine what's going on.  Yong-Hyeon, his dmesg output is
available here, but you'll probably need more than that:

http://lists.freebsd.org/pipermail/freebsd-hackers/2008-August/025706.html

> Your comment about DHCP, would that affect dhcpd or dhclient?  This is my
> "server" machine so I don't run dhclient on it.  I hardcode the IP
> connecting to the DSL modem.  I'm currently hardcoding all the other
> machines also so I should be okay.

My comment about DHCP is WRT to the FreeBSD box acting as a DHCP client
(e.g. fetching an IP from your ISP).  I believe dhclient (when getting a
new IP) might override any interface options you set in rc.conf; purely
speculative on my part, but I wanted to mention it in the case you
didn't have a static IP configured in rc.conf.

> > 3) Can you disable the firewall (disable ipfw entirely) and see if the
> > problem continues?
> 
> Well the firewall is primarily for NAT and port forwarding.  There's
> nothing special about it.  It looks like the TSO disabling fixed my
> problems.  Thank you for the suggestion!

No problem.

-- 
| Jeremy Chadwick                                jdc at parodius.com |
| Parodius Networking                       http://www.parodius.com/ |
| UNIX Systems Administrator                  Mountain View, CA, USA |
| Making life hard for others since 1977.              PGP: 4BD6C0CB |




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080816231429.GA86316>