Need for cleanup of idle winbindd child processes...

Ravindra Channabasappa ravindra at juniper.net
Tue Apr 22 13:20:51 MDT 2014


Thanks Volker.

Yes, I tested using "use mmap = no" option... still see the RSS size increase in the child winibndd.

OS info: Linux localhost2 2.6.24.7 #1 SMP Sun Apr 13 14:55:34 PDT 2014 i686 i686 i386 GNU/Linux

I checked smap data. It indicates heap size increase. Approximately 400Kb for every 5000 user logins per run.
I will raise a samba bug for this.

What about the patch attached? I think it can be used for cleanup of idle winbindd processes.

Thanks,
--ravindra


-----Original Message-----
From: Volker Lendecke [mailto:Volker.Lendecke at SerNet.DE] 
Sent: Tuesday, April 22, 2014 2:28 PM
To: Ravindra Channabasappa
Cc: samba-technical at lists.samba.org
Subject: Re: Need for cleanup of idle winbindd child processes...

On Mon, Apr 21, 2014 at 01:32:10PM +0000, Ravindra Channabasappa wrote:
> Volker,
>   
>     In my setup there are only two winbindd processes. One
>     parent winbindd and the other one for the configured
>     domain.
> I have not enabled trusted domain configuration.  Do you still think 
> mmap'ing tdb files has issues?  But I observe that for every run of 
> 5000 users login, RSS size increases by ~500 KB (ps -eo output) and 
> never comes down.

Yes, I still believe it can contribute to indicated memory use. Have you tried the "use mmap = no" option? This would eliminate that source of RSS use.

> I tried checking through 'smbcontrol --pool-usage'
> command. Output of the same is attached for before the load test and 
> after the test.
> I could not figure much difference between the outputs.
> About valgrind output- having problem in getting valgrind run under 
> jail environment where winbindd is running.

Ok. The pool-usage does not indicate anything that grows, so it must be somewhere else. In the thread I missed the information what base operating system you are running on.
In case it is Linux, the file /proc/<pid>/smaps shows which memory segment uses how much memory. If possible, can you compare those values before/after? Here you would also see what happens to the tdb files, if they grow. If however it is heap memory which is growing, there is no reasonable other way than to run winbind under valgrind --tool=memcheck, sorry for that.

> 
> Also, in another thread - "RE: [PATCH] Unix datagram socket 
> messaging"- I see that patch mentions about cleanup of winbindd 
> processes as well.

This cleanup relates to something different, not memory or child processes. It relates to cleaning up unix domain datagram sockets with a changed internal messaging scheme.
Processes should clean up behind themselves, the 15-minute interval is deliberately chosen so long because it will only clean up behind faulty or crashed processes. If that happens very frequently, we have other problems to solve I guess.

> If so, IMO based on internal testing 15 minutes to cleanup child 
> processes looks long. Is it fine to reduce the time to 5 minutes or 
> make this configurable through smb.conf ?
> I hope we can apply this patch for Samba-4.1.3...

Sure, this will be configurable. But the specific 15 minute cleanup interval in the thread is not relevant in 4.1.3, which does not yet have the new messaging scheme.

With best regards,

Volker Lendecke

--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9 AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: run3-smap.txt
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140422/040a6d9c/attachment-0002.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: run4-smap.txt
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140422/040a6d9c/attachment-0003.txt>


More information about the samba-technical mailing list