From: Stan Hoeppner on
Samba 3.2.5 on Debian Lenny

From: http://www.samba.org/samba/docs/server_security.html
"Samba is able to limit the number of concurrent connections when smbd is
launched as a daemon (not from inetd). The 'max smbd processes' smb.conf option
allows Administrators to define the maximum number of smbd processes running at
any given point in time. Any further attempts from clients to connect to the
server will be rejected."

I'm using max smbd processes for another reason. I'm trying to optimize memory
usage on this box, which really only ever has one samba client machine
connecting. I'm trying to get the number of smbd processes down to 1 but to
this point have failed. I have in /etc/samba/smb.conf:

max smbd processes = 1

Yet once restarting samba and connecting to a share, I get this:

[04:41:16][root(a)greer]/$ ps -ef|grep smbd
root 8586 1 0 00:12 ? 00:00:00 /usr/sbin/smbd -D
root 8591 8586 0 00:12 ? 00:00:00 /usr/sbin/smbd -D
stan 8596 8586 0 00:13 ? 00:00:56 /usr/sbin/smbd -D

top:
8586 root 20 0 12368 2828 2168 S 0 0.7 0:00.12 smbd
8591 root 20 0 12368 984 340 S 0 0.3 0:00.00 smbd
8596 stan 20 0 12912 3972 2896 S 0 1.0 0:56.46 smbd

I've set max smbd processes to 1, yet I see 3 smbd processes. Is something
broken? Is "max smbd processes" not an accurate description? Would it better
be described as "max smbd concurrent clients" or "max smbd user processes"?

I can understand the need for a master daemon process that spawns children for
each connection, but at most that should require 2 smbd processes, not 3. As
you can see from the top output, only one smbd process is actually servicing a
client. One is completely idle, sucking up resources. The other appears to be
the master which spawns the children.

I know I'm in a fringe scenario here, as most people aren't going to try to
limit smbd processes to 1. I'm just wondering why the documentation is so
exactly specific as to the nature of this config option, but why the option
doesn't work the way it is described. Is this a "truth in advertising" issue,
or am I missing something else in my config to make this config directive work
as advertised?

Thanks.

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