Winbindd limited by select

Ken Cross kcross at nssolutions.com
Sat Feb 15 16:07:01 GMT 2003


My $0.02...


Mike Sweet wrote:
> Sooo, my recommendations are as follows:
> 
>     1. Provide a configure option (--with-maxfiles or similar)
>        to configure the upper limit you want to support in SAMBA.
>     2. Provide a smb.conf option to control the max number of
>        file descriptors.

There's currently a "max smbd processes" in 3.0.  Would that suffice for
max number of fd's for winbindd?


>     3. Provide a definition on Solaris for FD_SETSIZE before
>        including <sys/select.h> so that the correct version of
>        select() is used.

It's not just Solaris - I think it's fairly universal.  And it must be
defined before <sys/types.h>


>     4. On startup, query the current FD limit and set it to the
>        smaller of the "maxfiles" definition, the max value
>        reported by the kernel, and the max value in smb.conf.

And call setrlimit with this value.

>     5. Allocate the fd_set buffers [(maxfiles + 7) / 8 bytes]
>        and replace all use of FD_ZERO with memset/bzero with
>        the correct size.

It currently (and correctly, IMO) computes the largest *actual* fd and
uses that.  

>     6. Make sure all calls to FD_SET and FD_CLR are updated to
>        not use "&set", since "set" is now allocated.

Sure.

Ken
________________________________

Ken Cross

Network Storage Solutions
Phone 865.675.4070 ext 31
kcross at nssolutions.com 



More information about the samba-technical mailing list