Samba Speed Question - Please Help!
ddez at cbf.com
Fri Oct 6 03:07:34 GMT 2000
A few months ago, we did some testing of Samba with 3000 files in a
directory. I wrote a simple program that would create 3000 zero byte
files, named 1, 2, 3, etc.
Using a Win98 client we tested this with Samba 2.0x running under
Solaris 7.0, OpenBSD, Linux w/EXT2, and Linux with the ReiserFS. In
every instance the file creation got slower and slower, and the CPU
usage would gradually increase to the point of 80-100%, this only with
a single Win98 client!
We've got a few NT40 servers that have more than 20000 files in a single
directory, that don't perform this badly. We'd like to replace these
with Linux boxes using Samba, but unless we re-organize these files into
multiple directories (which means a bunch of custom software needs to
be rewritten), this isn't possible.
This definately is a problem that should be a looked into, this is not the
first time I've seen someone complain about this. Spliting the files up
into multiple directories, is just a temporary workaround, not a solution.
> If the poster could describe the size and contents of the directory,
>we could do a little experiment with ufs and samba to see if the
>problem lies in the OS or Samba...
> Older Solaris systems were slow updating heavily-hit directories,
>which hits the Windows "rename, copy/edit, save, delete" sequence
>right between the eyes, but didn't hurt "copy *" operations, so
>the data and the use of it are relevant.
> And, as always, if the data is structured like 27july1944.jsmit.23,
>it should be changed to a layout like july1944/27/jsmit.23, so as
>to keep the directoiry sizes small and bounded...
More information about the samba