Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Jul 2002 17:23:03 +0930 (CST)
From:      Richard Sharpe <rsharpe@ns.aus.com>
To:        Darren Pilgrim <dmp@pantherdragon.org>
Cc:        Chad David <davidc@acns.ab.ca>, <hackers@FreeBSD.ORG>, <alfred@FreeBSD.ORG>
Subject:   Re: tuning for samba
Message-ID:  <Pine.LNX.4.33.0207111718120.5985-100000@ns.aus.com>
In-Reply-To: <3D2D2607.A5AA1FA6@pantherdragon.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 10 Jul 2002, Darren Pilgrim wrote:

> Chad David wrote:
> > 
> > A local company has been having issues with samba for some time (it kills
> > an e250, and has seriously stressed an e5000) and I've been telling the
> > admin (half seriously) that he should just toss it on a PC with FreeBSD.
> > Well they finally got tired of hearing FreeBSD this and FreeBSD that and
> > asked me to bring a box in if I was so confident... tomorrow morning at
> > 9am.  So, I'm building a new box tonight and was wondering if anybody
> > has any tried and true tuning parameters for samba on -stable.  They
> > currently have ~700 users attached.  The load per user is pretty low
> > but just rebooting and handling the reconnects has killed small boxes.
> > 
> > As a side note, the data being served will be attached to the samba server
> > via NFS.
> 
> The one thing I've seen kill a box besides the reboot-reconnect blast
> is content searches by the Windows Find dialog.  All it takes is one
> user on a fast machine and network link doing the Windows equivalent
> of "find / -name * -exec grep "foo" \{\} \;" to run you out of file
> descriptors in a matter of seconds.

Yes, Samba has to do readdir scans to simulate a case-insensitive file 
system on a case-sensitive file system.
 
> Samba uses a seperate process for each connection, and Windows opens
> one connection per share.

Yes to the first claim, no to the second. Most definitely not. For a 
single client, windows puts all share access (net use, mounting, whatever 
you want to call it) over the single TCP connection to the server.

The only time Windows will create a new connection is if you have given 
the server multiple NetBIOS names, and you use different NetBIOS names to 
access the share. For example, even if the NetBIOS names NB1 and NB2 
translate to the same IP (10.10.10.10), if you do the following:

  net use f: \\nb1\share1
  net use f: \\nb2\share1

the client will establish two different connections. However, that is the 
only way I know to get multiple connections from a client to a server. 
Even Terminal Server multiplexes multiple users over the one TCP 
connection.

>                             Most Windows users only work on one share
> at a time, so with two open shares on ~700 machines that means ~1400
> connections with roughly half of them idle.  That's a lot of freeable
> RAM should you suddenly need it.

Nope, ~700 connections!

Regards
-----
Richard Sharpe, rsharpe@ns.aus.com, rsharpe@samba.org, 
sharpe@ethereal.com


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.33.0207111718120.5985-100000>