samba - high cpu usage

General support questions including new installations
Post Reply
deano
Posts: 7
Joined: 2005/03/03 19:10:50

samba - high cpu usage

Post by deano » 2005/03/03 19:16:29

Hi

have just got round to installing centos 4 and are currently running samba
on it.

in *top* the averages for cpu are to me quite high as in all above 5.something
all it is doing at the moment is haveing 3 win2k servers backing up to it
with the ntbackup utill. samba cpu usage is at hovers at 20%

does the load seem high or is it me?

the hardware is an IBM X345 dual zeon 2.4's 1Gb mem, raid 5, samba share is on a sagita san connecting by a qlogic qla2100 card.

cheers
deano

mciann
Posts: 3
Joined: 2005/03/04 01:33:19

Re: samba - high cpu usage

Post by mciann » 2005/03/04 01:50:16

I've done a lot of work with Samba in high performance environments. Samba by default usually does run pretty high utilization, which increases in direct proportion to directory file depth. The issue is that the unix filesystem is case sensitive, and Windows isn't. Windows can keep track of a case sensitive filename, but the "real" name of the file is caseless:

actual file on windows server:

Foo

Which can be accessed by any of the following names:

fOo
foo
FOO

and so on.

Samba has to go through some programmatic hoops to emulate this behavior. You can disable this by setting the following option:

case sensitive = yes

This will force Samba to write files just exactly as they are called, but this breaks Windows compatibility and creates some very important caveats:

Say user 1 copies a file to the server:

file.txt

Then user 2 copies another file:

File.txt

The second user will not get a prompt to overwrite, because the Samba box will (rightly) consider them to be two different files. Both files will exist on the server, but it is difficult to know which one a windows user will get if they ask for "FILE.txt". If you are using the server in a specialized environment where this isn't a problem, however, you can get screaming fast performance out of Samba. Alternatively, if you can do things so that you never get more than about 3000 files in a directory, this should never really become a problem anyway.

Post Reply

Return to “CentOS 4 - General Support”