From owner-freebsd-stable@FreeBSD.ORG Fri Feb 5 15:08:19 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 4EB21106566B for ; Fri, 5 Feb 2010 15:08:19 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta02.emeryville.ca.mail.comcast.net (qmta02.emeryville.ca.mail.comcast.net [76.96.30.24]) by mx1.freebsd.org (Postfix) with ESMTP id 36A188FC17 for ; Fri, 5 Feb 2010 15:08:18 +0000 (UTC) Received: from omta19.emeryville.ca.mail.comcast.net ([76.96.30.76]) by qmta02.emeryville.ca.mail.comcast.net with comcast id eD9P1d0051eYJf8A2F8KyC; Fri, 05 Feb 2010 15:08:19 +0000 Received: from koitsu.dyndns.org ([98.248.46.159]) by omta19.emeryville.ca.mail.comcast.net with comcast id eF8J1d00G3S48mS01F8JJB; Fri, 05 Feb 2010 15:08:19 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 69DB41E3033; Fri, 5 Feb 2010 07:08:17 -0800 (PST) Date: Fri, 5 Feb 2010 07:08:17 -0800 From: Jeremy Chadwick To: freebsd-stable@freebsd.org Message-ID: <20100205150817.GA6347@icarus.home.lan> References: <132a58b51002050600t768ff95fs1d922d5ce470c26d@mail.gmail.com> <57200BF94E69E54880C9BB1AF714BBCBA575D8@w2003s01.double-l.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <57200BF94E69E54880C9BB1AF714BBCBA575D8@w2003s01.double-l.local> User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: FreeBSD 8-Stable with Samba too slow 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: Fri, 05 Feb 2010 15:08:19 -0000 On Fri, Feb 05, 2010 at 03:41:42PM +0100, Johan Hendriks wrote: > >Hi all, > > >I have just installed FreeBSD 8.0-STABLE-201001 to work as a file > server > >running samba 3.3.9 installed by ports. > >But, I don't know why, when I try to access the share by Windows or by > >Linux, it is so slow. I takes a long time to give the authentication > window > >and when I manage authenticate It keeps so slow to browse directories > and > >files. And the interesting thing is that when I reach the share with my > >files (*.iso for tests) after a long time and start a copy, the > transfer > >goes so good, in a normal gigabit speed. > > >I tried compiling and installing samba 3.4.5 and had the same behaviour > . > >Maybe it's not a samba issue. > > >I already have two freebsd file servers both with the 8-RELEASE version > and > >they're running ok! > >In this case, I need to use the 8-STABLE version because of my disk > >controller. So I don't know what could be happening. > > > >Thanks in advance! > > Just a me too! > > I had a 8.0 RELEASE server running on a HP Proliant ML110. > The server responded quick wit no issues at all. > I just upgraded the server to 8-Stable (No reason, just test) and the > samba speed drops significant. > Normally little files did not show the copy box, but after the update > all copy's to the XP desktop shows me the copy window in windows. > > Same kernel file and settings. > Samba version is 3.3.9 I'm using Samba at home on FreeBSD 8.0-STABLE for personal use (user-level shares, and the guest OS is Windows XP). I've spent quite some time tuning both FreeBSD sysctls as well as smb.conf to try and get the most overall throughput. What I ended up with is this: sysctl.conf -- net.inet.tcp.sendbuf_max=16777216 net.inet.tcp.recvbuf_max=16777216 net.inet.tcp.sendspace=65536 net.inet.tcp.recvspace=131072 smb.conf -- socket options = TCP_NODELAY SO_SNDBUF=65536 SO_RCVBUF=65536 read raw = yes use sendfile = yes I tried adjusting many of the above parameters to try and find a "sweet spot" for reading/writing data to a 2-disk ZFS mirror (2x1TB disks, 7200rpm, SATA2 connected via ICH9 with AHCI enabled, and using ataahci(4) (not ahci(4)). The above is what works best. "Worked best" means I can push about 40-50MBytes/sec reading/writing to/from a Samba SMB/CIFS share. Comparatively, FTP gets around 75-85MByte/sec with the same sysctl.conf configuration. This is using Samba 3.3.10, though I can guarantee I saw the same speed/throughout as a result of the above tuning going back to 3.3.7. -- | 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 |