Re: [Samba] Is there a maximum number of shares samba can serve?

2008-03-14 Thread Eric Boehm
On Thu, Mar 13, 2008 at 06:40:49PM +0100, Volker Lendecke wrote:
 Volker == Volker Lendecke [EMAIL PROTECTED] 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
[EMAIL PROTECTED]   \ /  No HTML or RTF in mail
X   No proprietary word-processing
Respect Open Standards / \  files in mail
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Is there a maximum number of shares samba can serve?

2008-03-14 Thread Volker Lendecke
On Fri, Mar 14, 2008 at 08:48:44AM -0400, Eric Boehm wrote:
 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?

No, there's no way to have hosts allow in the usershare
definitions.

Valid users should be possible. If you have local users, you
can use S-1-22-1-uid or S-1-22-2-gid.

Volker


pgpiRHHFJ1ilR.pgp
Description: PGP signature
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

[Samba] Is there a maximum number of shares samba can serve?

2008-03-13 Thread Eric Boehm
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.

Personally, I don't think this is a good idea. Clients will go from
having a single connection to a single share to 50-300 connections to
multiple shares. That can't be good for performance or load.

I've searched the mailing list, the web, the documentation, the wiki
and the source code. I haven't been able to determine the maximum, if
any. Of course, I may have missed it. Feel free to point me to the
correct documentation or source file.

I've seen some references that you can't have either more than 145 or
165 shares per samba server.

However, if there is anyone running such a large number of shares and
has advice, I am happy to listen.

-- 
Eric M. Boehm  /\  ASCII Ribbon Campaign
[EMAIL PROTECTED]   \ /  No HTML or RTF in mail
X   No proprietary word-processing
Respect Open Standards / \  files in mail
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Is there a maximum number of shares samba can serve?

2008-03-13 Thread Marcello Romani

Eric Boehm ha scritto:

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.

Personally, I don't think this is a good idea. Clients will go from
having a single connection to a single share to 50-300 connections to
multiple shares. That can't be good for performance or load.

I've searched the mailing list, the web, the documentation, the wiki
and the source code. I haven't been able to determine the maximum, if
any. Of course, I may have missed it. Feel free to point me to the
correct documentation or source file.

I've seen some references that you can't have either more than 145 or
165 shares per samba server.

However, if there is anyone running such a large number of shares and
has advice, I am happy to listen.



Hi,
I found some docs about this smb.conf parameter:

usershare max shares

which specifies the maximum number of shares that the samba admin will 
allow non-root users to create via the command


net usershare add

( read for example 
http://us1.samba.org/samba/docs/man/manpages-3/net.8.html )


The example value given in the docs for the usershare max shares 
parameter is 100, which makes me think that a samba server should cope 
with a number of shares in the hundreds.


I know it's not much, but I HTH nonetheless.

--
Marcello Romani
Responsabile IT
Ottotecnica s.r.l.
http://www.ottotecnica.com
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Is there a maximum number of shares samba can serve?

2008-03-13 Thread Eric Boehm
On Thu, Mar 13, 2008 at 03:03:24PM +0100, Marcello Romani wrote:
 Marcello == Marcello Romani [EMAIL PROTECTED] writes:

Marcello Eric Boehm ha scritto:
 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.

Marcello Hi, I found some docs about this smb.conf parameter:

Marcello usershare max shares

Marcello which specifies the maximum number of shares that the
Marcello samba admin will allow non-root users to create via the
Marcello command

Marcello net usershare add

Marcello ( read for example
Marcello http://us1.samba.org/samba/docs/man/manpages-3/net.8.html
Marcello )

Yes, I saw that but it wasn't much comfort. We don't have users
creating shares in our environment but I understand your reasoning. 

I have a suspicion that the limit was set to a large value on the
premise it would be unlikely that users would ever create that many
shares.

Marcello The example value given in the docs for the usershare
Marcello max shares parameter is 100, which makes me think that a
Marcello samba server should cope with a number of shares in the
Marcello hundreds.

Marcello I know it's not much, but I HTH nonetheless.

My primary concern is the the number of clients connections would
increase dramatically.

If I have 50 clients with one connection (one share) now, that's 50
connections.

This could increase to 300*50 connections. Granted, not every client
will be active on every share at the same time but I could easily see
that I could go from 1 to 10 connections per client.

I am interested in knowing or at least estimating how Samba might
perform under these conditions.

-- 
Eric M. Boehm  /\  ASCII Ribbon Campaign
[EMAIL PROTECTED]   \ /  No HTML or RTF in mail
X   No proprietary word-processing
Respect Open Standards / \  files in mail
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Is there a maximum number of shares samba can serve?

2008-03-13 Thread Charles Marcus

On 3/13/2008, Eric Boehm ([EMAIL PROTECTED]) wrote:

If I have 50 clients with one connection (one share) now, that's 50
connections.

This could increase to 300*50 connections. Granted, not every client
will be active on every share at the same time but I could easily see
that I could go from 1 to 10 connections per client.

I am interested in knowing or at least estimating how Samba might
perform under these conditions.


It might be better if you define the problem and/or goal first...

*Why* dod you need 300+ shares? Maybe there's a better way to do it? For 
example, you could define one (or a few) shares, then using a 
combination of permissions and the 'hide unreadable' setting, users will 
only see the folders that they have access rights to...


--

Best regards,

Charles
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Is there a maximum number of shares samba can serve?

2008-03-13 Thread webster
I currently have a server with 1,885 shares.

It is running Samba version  3.0.20b-3.11-SUSE


Gary R. Webster



Eric Boehm [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
03/13/2008 08:23 AM
Please respond to
Eric Boehm [EMAIL PROTECTED]


To
samba@lists.samba.org
cc

Subject
[Samba] Is there a maximum number of shares samba can serve?





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.

Personally, I don't think this is a good idea. Clients will go from
having a single connection to a single share to 50-300 connections to
multiple shares. That can't be good for performance or load.

I've searched the mailing list, the web, the documentation, the wiki
and the source code. I haven't been able to determine the maximum, if
any. Of course, I may have missed it. Feel free to point me to the
correct documentation or source file.

I've seen some references that you can't have either more than 145 or
165 shares per samba server.

However, if there is anyone running such a large number of shares and
has advice, I am happy to listen.

-- 
Eric M. Boehm  /\  ASCII Ribbon Campaign
[EMAIL PROTECTED]   \ /  No HTML or RTF in mail
X   No proprietary word-processing
Respect Open Standards / \  files in mail
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Is there a maximum number of shares samba can serve?

2008-03-13 Thread Eric Boehm
On Thu, Mar 13, 2008 at 10:56:47AM -0400, Charles Marcus wrote:
 Charles == Charles Marcus [EMAIL PROTECTED] writes:

Charles On 3/13/2008, Eric Boehm ([EMAIL PROTECTED]) wrote:
 If I have 50 clients with one connection (one share) now,
 that's 50 connections.
 
 This could increase to 300*50 connections. Granted, not every
 client will be active on every share at the same time but I
 could easily see that I could go from 1 to 10 connections per
 client.
 
 I am interested in knowing or at least estimating how Samba
 might perform under these conditions.

Charles It might be better if you define the problem and/or goal
Charles first...

Charles *Why* dod you need 300+ shares? Maybe there's a better
Charles way to do it? For example, you could define one (or a
Charles few) shares, then using a combination of permissions and
Charles the 'hide unreadable' setting, users will only see the
Charles folders that they have access rights to...

We currently use Samba as an Interop environment for IBM/Rational
ClearCase.

The desire is control access to each ClearCase VOB individually. There are
anywhere from 100-400 VOBs on each server. Normal UNIX permissions of
owner, group and world are insufficient. In addition, there is a need
to restrict access by hostname as well as user.

I don't think permissions and hide unreadable will help with access by
hostname.

We have a concurrent problem with restricting NFS access relating to
how large the export file can be and how many NFS mounts a client can
make. It is likely that we will have to back off to the level of
filesystems or higher in the directory tree.

For example, we have

/export/vobstore/disk1/proj1/VOBa
/export/vobstore/disk1/proj1/VOBb
/export/vobstore/disk1/proj2/VOBc
/export/vobstore/disk1/proj1/VOBd
/export/vobstore/disk2/proj2/VOBe
/export/vobstore/disk2/proj1/VOBf
/export/vobstore/disk3/proj2/VOBg
/export/vobstore/disk3/proj1/VOBh

The current method is to define the share

[export]
path = /export

One proposal is to use

[VOBa]
path = /export/vobstore/disk1/proj1/VOBa
[VOBb]
path = /export/vobstore/disk1/proj1/VOBb

etc.

This is not going to work for NFS so we may back off to

[disk1]
path = /export/vobstore/disk1
[disk2]
path = /export/vobstore/disk2

etc.

-- 
Eric M. Boehm  /\  ASCII Ribbon Campaign
[EMAIL PROTECTED]   \ /  No HTML or RTF in mail
X   No proprietary word-processing
Respect Open Standards / \  files in mail
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Is there a maximum number of shares samba can serve?

2008-03-13 Thread Volker Lendecke
On Thu, Mar 13, 2008 at 03:03:24PM +0100, Marcello Romani 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.

There is no limit in the number of shares Samba can serve.
If you list them all in smb.conf, you will however see
increased memory usage, because all share definitions are
loaded individually in all smbd processes. A single share
definition takes around 3k (we're working on reducing that).
So multiply the number of shares defined with the number of
concurrent clients and you might see some memory footprint.

So if you want to go REALLY large, in the order of
thousands, you might want to look at the user shares. If the
configuration options you can set in the user shares are
sufficient for your needs, then these are much more
memory-efficient because the definitions are only loaded in
smbd on demand.

Volker


pgpKTatZ3fP1Q.pgp
Description: PGP signature
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba