Need for cleanup of idle winbindd child processes...
ddiss at suse.de
Thu Mar 27 08:56:32 MDT 2014
On Thu, 27 Mar 2014 14:25:01 +0000, Ravindra Channabasappa wrote:
> 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.
Do you have any "smbcontrol <pid> pool-usage" dumps, or valgrind logs
showing the memory leak?
> 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'd prefer something like...
3. Attach a tevent timer to the child process, which is re-initialized
on ~every request. When the timer fires after a period of inactivity,
cleanup and die.
More information about the samba-technical