From owner-freebsd-stable@FreeBSD.ORG Mon Jul 5 05:51:07 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6104C106566B for ; Mon, 5 Jul 2010 05:51:07 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta10.emeryville.ca.mail.comcast.net (qmta10.emeryville.ca.mail.comcast.net [76.96.30.17]) by mx1.freebsd.org (Postfix) with ESMTP id 485E08FC08 for ; Mon, 5 Jul 2010 05:51:06 +0000 (UTC) Received: from omta04.emeryville.ca.mail.comcast.net ([76.96.30.35]) by qmta10.emeryville.ca.mail.comcast.net with comcast id e5jF1e0010lTkoCAA5r6eE; Mon, 05 Jul 2010 05:51:06 +0000 Received: from koitsu.dyndns.org ([98.248.46.159]) by omta04.emeryville.ca.mail.comcast.net with comcast id e5r51e0053S48mS8Q5r6iy; Mon, 05 Jul 2010 05:51:06 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 6A13C9B425; Sun, 4 Jul 2010 22:51:05 -0700 (PDT) Date: Sun, 4 Jul 2010 22:51:05 -0700 From: Jeremy Chadwick To: David Warren Message-ID: <20100705055105.GA21681@icarus.home.lan> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-stable@freebsd.org Subject: Re: 8.0 network problem X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jul 2010 05:51:07 -0000 On Sun, Jul 04, 2010 at 07:52:11PM -0500, David Warren wrote: > I've got a persistent problem with my LAN. I'm running a FreeBSD 8.0 > box as a home server performing the following functions for wired and > wireless networks: router; firewall; DHCP server; and file server. For what > it's worth, I've got ZFS up and running as the main filesystem. The > recurring issue is that file transfers from the FreeBSD box to computers on > the wired network (gigabit) start out fast and then become agonizingly > slow. I'm sharing home directories over Samba, and those transfers work > briefly and then tail off to a few kilobytes per second. The failure is > somewhat predicatable in that it tends to happen once a few hundred > megabytes have been transferred. Your system has 3 different network interfaces on it (em, ral, nfe), but you don't tell us across which interface the slow transfers happen. You also don't tell us which firewalling stack you're using (ipfw, ipfilter, pf). Let us know. I'm going to make the assumption that based on your "...on the wired network (gigabit)..." statement that the transfers are going across the em0 interface, but again, I'm not sure. Relevant interfaces (wlan0 is tied to ral0): > em0: flags=8843 metric 0 mtu 1500 > options=9b > ether 00:0e:0c:b7:71:44 > inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255 > media: Ethernet autoselect (1000baseT ) > status: active > ral0: flags=8843 metric 0 mtu 2290 > ether 00:1f:1f:3f:76:f3 > media: IEEE 802.11 Wireless Ethernet autoselect mode 11g > status: running > nfe0: flags=8843 metric 0 mtu 1500 > options=8 > ether 00:01:29:d4:2d:6b > inet XXX.XXX.XXX.XXX netmask 0xfffffc00 broadcast 255.255.255.255 > media: Ethernet autoselect (100baseTX ) > status: active > [...] > wlan0: flags=8843 metric 0 mtu 1500 > ether 00:1f:1f:3f:76:f3 > inet 192.168.1.1 netmask 0xffffff00 broadcast 192.168.1.255 > media: IEEE 802.11 Wireless Ethernet autoselect mode 11g > status: running > ssid FreeBSD_AP channel 7 (2442 Mhz 11g) bssid 00:1f:1f:3f:76:f3 > country US authmode WPA privacy MIXED deftxkey 2 TKIP 2:128-bit > txpower 0 scanvalid 60 protmode CTS dtimperiod 1 -dfs First and foremost: is the problem specific to Samba? Can you reproduce the problem when using the FTP protocol? Are there any indications of problems in "dmesg" when the issue is happening? Can you provide output from "vmstat -i" while the problem is happening? Can you provide output from "pciconf -lvc"? Only interested in the sections relevant to the above devices. Can you provide contents of /etc/make.conf, /etc/sysctl.conf, and /boot/loader.conf? Have you looked at "netstat -I -indb" output during the slow transfers to see if there's any indication of problems, or some sort of "common rate" (transfer, etc.) Does disabling the firewalling stack improve things at all? Can the slowness be reproduced using benchmarks/netperf or only when using something that involves actual disk I/O? (To use netperf you'll need two FreeBSD boxes). If only disk I/O, then ZFS analysis might be needed (there are some performance adjustments that are often required). Focusing more on em0: Have you tried disabling rxcsum and txcsum (using ifconfig) to see if there's any improvement? I don't see TSO used by your interface, so that should rule out any problems with that feature. -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |