Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We run a small CentOS server as a test environment with staff connecting to it via Samba shares (from a combination of Macs and PCs).

The smbd service is utilising 5-10% CPU per user - which seems excessive. Especially as the server is a new quad-core.

Mac users seem to be causing higher CPU loads (closer to 10%) and having more problems with connection speed.

Are there any setting or configuration changes that can be made to lower CPU (and hopefully speed up connection for the Macs)

Contents of /etc/samba/smb.conf

# Global Parameters
[global]
        workgroup = Foo
        netbios name = Bar
;       encrypt passwords = yes
        username map = /etc/samba/smbusers
        socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536

[websites]
        path = /var/www/sites
;       browseable = yes
        write list = foobar, barfoo
;       writeable = no
        valid users = foobar, barfoo
share|improve this question
    
What kind of traffic are you seeing from an OSX host versus a Windows host? –  mbrownnyc Oct 7 '11 at 2:10
    
@mbrownnyc - it's anecdotal I'm afraid. We did use the Samba share to copy about 80gig from the Mac -> Samba -> PC and the PC was downloading at about 4 times the speed the Mac was uploading at. –  BaronGrivet Oct 7 '11 at 3:06
    
yeah macs dont appear to play very well with windows servers and i dont know why, i thought they may have fixed it in 10.7 (Lion) but the problems persist. random delays on authentication and share list requests... slow performance... ect... –  Silverfire Oct 7 '11 at 3:55
    
@Silverfire: I have the opposite anecdote; one or two macs will happily saturate Gigabit ethernet, while most (but not all) windows configs seem hardcoded at 10MB/s ('fast ethernet'?). I don't care much since windows here are for word/excel/email and macs are for big files; still seems weird. Except when I used 3Com switches, as soon as I plugged a mac on one of these, everything dropped to less than 1Mbps. 3Com people insisted that macs were doing "non-standard packets"; of course we haven't bought any 3Com product since. –  Javier Oct 7 '11 at 10:40

2 Answers 2

have you checked the wait time? what does iostat say? If your have a storage bottleneck, it sometimes appear as high CPU usage.

I have a busy fileserver with Samba for 30-50 simultaneous Mac clients (all with Gigabit Ethernet, working with huge Photoshop files) on a modest dual core CPU. The biggest factor was RAM (for cache). Each time the number or workload of users increased, I added some extra RAM, and the CPU usage, as reported from most tools decreased dramatically and responsivity stayed high.

share|improve this answer
    
Hi Javier. Thank you for that. I now have iostat installed on our system. Should I try some heavy disc read/ writes while running it? –  BaronGrivet Oct 9 '11 at 19:39
    
runt iostat -x 1 and try whatever it makes it feel sluggish. check if any column changes significantly from the 'quiet' state. especially telling are the await, svctm and %util –  Javier Oct 10 '11 at 2:41

If there is another Domain Controller, add/edit the following parameters in /etc/smb.conf:

domain master = no
local master = no
preferred master = no
os level = 0

to make Samba never becomes a master browser. Restart Samba to see if it help.

share|improve this answer
    
It's a standalone server sitting outside of a domain. –  BaronGrivet Oct 7 '11 at 3:07
    
Feel free to try this. –  quanta Oct 7 '11 at 3:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.