Need for cleanup of idle winbindd child processes...

Ravindra Channabasappa ravindra at juniper.net
Thu Mar 27 23:45:50 MDT 2014


Hi David,

>> 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.

Option 1 does the same thing except that the timer is installed only after serving configured number of requests (say 1000).
And it gets re-inited if winbindd is busy... have the working code ready... will send the patch for both options.


Thanks,
--ravindra

-----Original Message-----
From: David Disseldorp [mailto:ddiss at suse.de] 
Sent: Thursday, March 27, 2014 8:27 PM
To: Ravindra Channabasappa
Cc: samba-technical at lists.samba.org; metze at samba.org; gd at samba.org
Subject: Re: Need for cleanup of idle winbindd child processes...

Hi Ravindra,

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.

Option 1 does the same thing except that the timer is installed only after serving configured number of requests (say 1000).
And it gets re-inited if winbindd is busy... have the working code ready... will send both options.

Cheers, David





More information about the samba-technical mailing list