[Samba] more smbd CPU mystery
jra at samba.org
Sat Oct 25 04:14:24 GMT 2008
On Fri, Oct 24, 2008 at 03:46:04PM -0700, Cochran, Wayne Owen wrote:
> Well I have determined that everytime someone logs in/logs out
> of a windows box in our lab *ALL* of the files in "My Directory"
> are copied from/to the file server to the local client. Needless to
> say this is retarded and needs to stop. The local sys admin needs
> to perform some windows voodoo to redirect this directory.
> Still this brings the mystery as to why smbd would take up so
> much CPU. The work should mainly network and disk i/o bound
> (not CPU bound). nfsd doesn't have this kind of bad CPU performance,
> why does smbd?
> I had one of the users download a big file (which was being saved
> on the desktop). During this I was running top on the file server
> and noted it was continually soaking up 25% of the CPU:
> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
> 12270 liffland 20 0 12748 4776 3628 S 24 0.1 1:02.36 smbd
> Why would disk/network traffic be so CPU heavy? Shouldn't this mostly
> be handled by a DMA controller? Can anyone explain this.
You need to split out the CPU usage into user/kernel numbers.
Yes, smbd is using a lot of CPU here but if it's mostly in
kernel then it's just doing it's job. You *want* smbd to
be cpu bound, it's really easy to increase CPU by adding
more CPU than it is to increase network bandwidth
or disk i/o - that gets expensive.
Run vmstat to see what is using the CPU.
More information about the samba