[Samba] high cpu load

Jeremy Allison jra at samba.org
Thu Oct 23 23:17:13 GMT 2008


On Thu, Oct 23, 2008 at 02:27:27PM -0700, Wayne Cochran wrote:
> I think I have narrowed down the problem why smbd processes are soaking
> up so much CPU on our file server. Here are some selected samples from
> strace output as I attached to the offending smbd process:
>
> Culprit #1
>
> I took three sample snapshots, each lasted for several seconds, and I  
> took them
> minutes apart from each other.  I noticed many lines involved stat'ing  
> the
> a single file in the 'My Documents' subdirectory:
>
> stat64("My Documents/The Picture of Dorian Grey.rtf", {st_mode=S_IFREG| 
> 0744, st_size=0, ...}) = 0
> utimes("My Documents/The Picture of Dorian Grey.rtf", {1224548572, 0}) = 
> 0
>
> To see the frequency of these I grep'ed and use wc -l to get a line  
> count:
>
> # grep 'stat64("My Documents/The Picture of Dorian Grey.rtf"' /tmp/ 
> qqq.txt | wc -l
> 462
> # grep 'stat64("My Documents/The Picture of Dorian Grey.rtf"' /tmp/ 
> rrr.txt | wc -l
> 1065
> s# grep 'stat64("My Documents/The Picture of Dorian Grey.rtf"' /tmp/ 
> ppp.txt | wc -l
> 429
>
> Thousands of times this file is being stat'ed!?!?

What is the client doing at this point ? It's very possible
that this is what the client is requesting.

Jeremy.


More information about the samba mailing list