Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Feb 2010 07:08:17 -0800
From:      Jeremy Chadwick <freebsd@jdc.parodius.com>
To:        freebsd-stable@freebsd.org
Subject:   Re: FreeBSD 8-Stable with Samba too slow
Message-ID:  <20100205150817.GA6347@icarus.home.lan>
In-Reply-To: <57200BF94E69E54880C9BB1AF714BBCBA575D8@w2003s01.double-l.local>
References:  <132a58b51002050600t768ff95fs1d922d5ce470c26d@mail.gmail.com> <57200BF94E69E54880C9BB1AF714BBCBA575D8@w2003s01.double-l.local>

next in thread | previous in thread | raw e-mail | index | archive | help
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 |




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