Need for cleanup of idle winbindd child processes...

Ravindra Channabasappa ravindra at
Thu Mar 27 08:25:01 MDT 2014

We are experimenting with winbindd option "max domain connections" and we find that there is a need to clean up the idle child winbindd processes after each of them has served 'configured number' of requests.

Suppose if max_domain_connections=10 then during authentication 10 processes are spawned and will be there forever.

If we enable trusted domain flag and there are 10 trusted domains, the number of processes increase (10x10) under load. Once started these processes do not exit. Also, it is observed in our setup that the memory consumed by these child processes keeps on increasing (for every load test run) without any sign of reducing. This has performance implications as we successively run load test on the winbindd daemon.

So Proposal:

1)      Make child winbindd processes exit after having served configured number of requests.

        - Introduce a new 'smb.conf' parameter say 'winbind max requests to handle'
        - Make changes in winbindd_dual() child event loop.
                if (number of request served is > configured) then set a timer and its handler.
        - In the timer handler check if there are no queued requests (pending requests > 1;).  If so exit the child.

2.)     Another option is to introduce the cleanup of child processes inside parent's SIGUSR2 handler.
        This parent process sigusr2 handler will check if the child is busy handling requests if not send kill signal.
        Then as part of the parent winbindd child exit handler, the child processes data's are removed.

        The external programs (clients of winbindd) can periodically or as and when required send SIGUSR2 signal to clean up the processes.

I had a chat with Matthieu and he preferred option 1. Depending on the option selected will work on the proper patches.


More information about the samba-technical mailing list