Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 04 Mar 2003 15:01:43 -0500
From:      Bill Moran <wmoran@potentialtech.com>
To:        Bigbrother <bigbrother@bonbon.net>
Cc:        questions@freebsd.org
Subject:   Re: SAMBA performance and FreeBSD
Message-ID:  <3E650627.7020500@potentialtech.com>
In-Reply-To: <003101c2e283$1763e110$e203a8c0@macedon>
References:  <003101c2e283$1763e110$e203a8c0@macedon>

next in thread | previous in thread | raw e-mail | index | archive | help
Bigbrother wrote:
> I started to use samba with freebsd and I cant say that I am
> satisfied with the performance of it. Specifically on my local 100Mbits
> network the samba read speed on the server (athlon 1700) is < 1Mbit/sec,
> while the write speed is much much worse.

What kind of HDD?  What other processes are running?  The HDD is likely
the limiting factor.  If your HDD is slow, adding RAM can help, but it's
only going to help so much.

> If I ftp to that machine I have read speed of minimum 7Mbits/sec.

As someone else pointed out, 7Mbytes/sec is reasonable, but 7Mbit/sec
is horrible.  I'm assuming your 1Mbit/sec number above is really
1Mbyte/sec.  Disabling delayed_ack should help.

> I am puzzled why the samba has so much worse performance.

Than ftp?  Samba will always be slower than FTP.  This is because SMB
is massivly bloated compared to FTP.  FTP is a pretty streamlined
protocol with very little overhead.  SMB has a good bit of overhead,
although you shouldn't be seeing 7x differences.  That indicates
something else is wrong, but SMB speed will never be on par with FTP.

> Is anyone that using samba on his freebsd machine without any
> performance loss? 

Yes.  We have a Samba server right here and the performance is excellent
considering the ancient hardware it's running on.

> Also if you have extra tips and tricks about samba and freebsd that can
> boost the performance, they would be much appreciated. About tunning
> parameters and so on....This machine will be the main server of a
> laboratory of the university, and its not acceptable to have a low
> speed.

You already seem to have found them below.  Have you changed delayed_ack
yet?  In my experiements, it makes a HUGE difference (we copied a large
file and I turned it on and off while the file was copying, you could
visibly see the difference in the speed at which the progress bar was
moving)

Additionally, don't use older versions of Windows.  We ran tests and
found out that Windows NT, 98, 95 all had approximately 1/2 the network
speed compared to Windows XP.  This is regardless of whether a Samba or
Windows server was used.

> Thanks very much in advance!!
> 
> P.s. I searched the net and I saw the people suggested changing the
> net.inet.tcp.delayed_ack value, or measuring with tcpdump the MSS window
> size and trying to put a formula on it to calculate the parameter
> SO_RCVBUF
> Of the samba and various other tricks....Do they have a point?

Yes.  Especially the net.inet.tcp.delayed_ack value will alter performance
considerably for Samba.  I've never gotten significant performance gains
by messing with the MSS windows, though.

> P.s.2 I am also mounting with SUIDDIR the filesystems. Does this make a
> performance loss?

Don't know

-- 
Bill Moran
Potential Technologies
http://www.potentialtech.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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