[Samba] Samba4 consumes more CPU

Andrew Bartlett abartlet at samba.org
Mon Sep 2 14:50:00 MDT 2013

On Mon, 2013-08-26 at 22:39 +0530, Prema wrote:
> Dear Andrew,
> As per your suggestion , I have attached the gdb log of the samba and smbd
> process log running in the single server mode.
> Also when I noted in the perf top, libndr.so consumes the maximum cpu.
> I noticed that it happens soon after sometime the samba process is started
> and the CPU is filled up.
> Since the samba process occupies 100% atleast two or more CPUs out of 8 CPU
> , the clients are not able to get authenticate to the server.
> Kindly go through the logs and suggest what can be done to lessen the CPU
> consumption.

Digging into the libndr issue some more:

Sadly I can't use the perf.data without your full build tree, so I'm
going to need you to do some more digging on this side of things. 

Can you show me what exact code in libndr is spinning?  (That is, dig
into the perf screen)

Then, can you re-run it under 

'perf record -g -p <PID>'?

And then show me the output of perf report -g, expanding the first
function call stacks to find out what is the eventual high-level caller
of the spinning routine.  This may give us the critical clues we need.


Andrew Bartlett

Andrew Bartlett
Authentication Developer, Samba Team           http://samba.org
Samba Developer, Catalyst IT                   http://catalyst.net.nz

More information about the samba mailing list