Make winbind use epoll where available

Matthieu Patou mat at samba.org
Thu Jan 17 12:11:31 MST 2013


On 01/17/2013 10:31 AM, Jeremy Allison wrote:
> On Thu, Jan 17, 2013 at 12:57:10PM -0500, Ira Cooper wrote:
>>
>>
>> On Thu, Jan 17, 2013 at 12:52 PM, Jeremy Allison <jra at samba.org> wrote:
>>       On Thu, Jan 17, 2013 at 04:57:26PM +0100, Volker Lendecke wrote:
>>       > Hi!
>>       >
>>       > Attached find a patchset to make winbind use the standard
>>       > tevent_context_init function which uses epoll where
>>       > available. Before this winbind would always do poll. Ran a
>>       > successful private autobuild.
>>       >
>>       > One customer test brought winbind from 100% CPU over minutes
>>       > down to barely being seen in "top" for obvious reasons.
>>       >
>>       > Comments?
>>
>>       Is it worth making samba, smbd and nmbd also do this ?
>>
>> I see poll and the smbd poll setup functions in my profiling with DTrace
>> already.
>>
>> I'm not sure on the percentages.  I can find that out.  Also I'm not sure how
>> much I'd get converting to a Solaris "port" based mechanism.  But it
>> should be similar to epoll.
> Yep. You'll need a port backend to tevent.
>
> Also, looking more closely at smbd, it's only the echo child
> handler that still uses run_events_poll(), smbd/process.c
> uses tevent_loop_once(). I'll have to dig more deeply to
> see if we're already using epoll by default in smbd and
> samba.
But winbindd is also using the tevent_loop_once just it used the "s3" 
tevent backend that is mostly using poll.

Matthieu.

-- 
Matthieu Patou
Samba Team
http://samba.org



More information about the samba-technical mailing list