[Samba] high cpu load

Cochran, Wayne Owen wcochran at vancouver.wsu.edu
Thu Oct 23 23:22:52 GMT 2008




-----Original Message-----
From: Jeremy Allison [mailto:jra at samba.org]
Sent: Thu 10/23/2008 4:17 PM
To: Cochran, Wayne Owen
Cc: samba at lists.samba.org
Subject: Re: [Samba] high cpu load
 
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.


By client I assume you mean the user is explicitly asking for all
this data to be transferred. This is very unlikely since this is happening
frequently throughout the day -- sometimes 5 or 6 clients simultanously --
so it must be something thats happening automatically.

Of course none of this explains why the RTF file is being stat'ed thousands
of times! 

--w



More information about the samba mailing list