[Linux-aus] SaMBa using all available CPU

lug at phormix.com lug at phormix.com
Thu Dec 2 01:19:01 UTC 2004

I'm probably a bit off on this since you do state that it's the samba
daemon in particular that's sucking CPU, buuuuuut just to give it a shot.
Firstly, what Distro are you using (helps me know what tools are available).

Also, what happens if you kill off samba for a few moment or two, and run
some processes that cause either heavy disk usage or network traffic? I've
had some very funkified things happen with bad cheap NICS (particularly
onboard NICS which may be pulling system resources).
The RAM could also perhaps be a factor if you're running heavily into
swapspace for some reason and your HDD is subsequently thrashing with both
hefty simultaneous swapping and DB operations?
You could try writing a temporary 500MB file to see what happens with high
hard-disk IO:
dd if=/dev/zero of=/tmp/somefile bs=1k count=500000

Network traffic, perhaps just copying a large file via FTP, http, or some
other means (perhaps SCP although the encryption may mean slower network
overhead but more CPU due to encryption).
On Wednesday 01 December 2004 15:07, lug at phormix.com wrote:
> Did you swap to a different architecture?

No, both are Intel Celeries of similar speed. Only hardware differences
are motherboard (one has a built-in via-rhine LAN I/F, the other does
not) and the flaky machine had 1.5GB of RAM, the replacement has only

> Kernel optimization another possibility.

Same hard drive == no software changes.

> Also, check that DMA is turned on with the hard drive?

DMA, readhead, all manner of goodness.

If it helps, the CPU useage is split about 50-50 between user and kernel
time, and doing a "refresh" (involves lots of db activity) in the app
results in one smbd using about 60% CPU on a 2.4GHz machine.

Cheers; Leon

http://cyberknights.com.au/     Modern tools; traditional dedication
http://plug.linux.org.au/       Vice President, Perth Linux User Group
http://osia.net.au/             Member, Open Source Industry Australia
http://slpwa.asn.au/            Member, Linux Professionals WA
http://linux.org.au/            Member, Linux Australia

More information about the linux-aus mailing list