[Samba] Is there a maximum number of shares samba can serve?
Eric Boehm
boehm at nortel.com
Fri Mar 14 12:48:44 GMT 2008
On Thu, Mar 13, 2008 at 06:40:49PM +0100, Volker Lendecke wrote:
>>>>> "Volker" == Volker Lendecke <Volker.Lendecke at sernet.de> writes:
Volker> On Thu, Mar 13, 2008 at 03:03:24PM +0100, Marcello Romani
Volker> wrote:
>> >I am being asked to determine the feasibility of serving
>> hundreds >(300-400) of directories as individual shares instead
>> of sharing a single >parent directory.
Volker> There is no limit in the number of shares Samba can serve.
Volker> If you list them all in smb.conf, you will however see
Volker> increased memory usage, because all share definitions are
Volker> loaded individually in all smbd processes. A single share
Volker> definition takes around 3k (we're working on reducing
Volker> that). So multiply the number of shares defined with the
Volker> number of concurrent clients and you might see some memory
Volker> footprint.
Thanks, but I don't think it is going to meet my needs. I see no way
to define 'hosts allow' or 'valid users' for a user share. I know I
could use a template but that wouldn't allow me to change it for
different shares.
It was a little tricky defining the shares. Apparently, you can't
define an ACL without a comment and defining the ACL didn't work as I
expected.
net usershare add archive /localdisk/software/archive test 'AMERICASE\boehm:F,AMERICASE\julieb:R'
net usershare info
[archive]
path=/localdisk/software/archive
comment=test
usershare_acl=Unix User\boehm:F,Unix User\julieb:R
guest_ok=n
I wasn't expecting 'Unix User\boehm'. Looking at net_usershare.c, it
looks like I am expected to provide an SID for the user. I don't
normally run winbindd.
I guess I will just have to live with the overhead.
What would happen if I created the usershare data file manually
instead of using the 'net usershare add' command? For example, adding
'hosts allow' or 'valid users' to the file created by the 'net
usershare add' command?
Volker> So if you want to go REALLY large, in the order of
Volker> thousands, you might want to look at the user shares. If
Volker> the configuration options you can set in the user shares
Volker> are sufficient for your needs, then these are much more
Volker> memory-efficient because the definitions are only loaded
Volker> in smbd on demand.
--
Eric M. Boehm /"\ ASCII Ribbon Campaign
boehm at nortel.com \ / No HTML or RTF in mail
X No proprietary word-processing
Respect Open Standards / \ files in mail
More information about the samba
mailing list