[Samba] Performance problem

Riddoch, John E SITI-ITDSEP3 John.E.Riddoch at is.shell.com
Thu Oct 24 14:23:02 GMT 2002


We're trying to use Samba here to share out data from our Unix NAS server to
PC (Win2K) clients.  However, we're experiencing a problem in that saving a
project from one of the applications (Petrel, used for subsurface analysis
of oil/gas wells) can take 10 seconds, whereas saving to a win2k server
takes ~2 seconds.  Obviously, something is not performing...

After a lot of poring over truss files, I've discovered two causes for
concern:
1. there are 5394 stat64() calls during the saving of the project, taking in
total >5s
2. there are 43209 getdents64() calls during the saving, also taking in
total >5s; most of these getdents calls follow an open() of the diretory
holding the files.  This open() happens 1053 times (i.e. ~ 2 x the number of
files)

(for reference, the above timings are based on using truss -D -p <pid> -o
<filename> and then running awk '{ s+=$1 } END { print s }' to get a total)

Note that the figures are somewhat prone to inflation as using truss on the
process slows things down.

This would appear to be the bottleneck in the system, but I'm not sure what
I can do about it.

Some more information about the data: the application stores 526 files in
one directory, each with a name like:
affbae41-0628-42a5-b053-8712a7673567.dat
Other projects store a different number of files.  Total disk space used is
~200MB, with file sizes ranging from a few hundred bytes up to 14MB.

The name seems rather random, but follows the same pattern of alphanumerics
and hyphens.

I've tried Samba on AIX (on a p660), Solaris (Ultra 1, v880 & Sunblade) and
IRIX (12 CPU server), all with similar results (i.e. it takes significantly
longer on Samba than on the Windows server).  All are using local disk &
native filesystem (i.e. JFS, UFS or XFS as appropriate).

Samba version is 2.2.2, but I've tried 2.2.6 and it gives the same result.

Does anyone have any idea on how to improve things?

Sorry for the length of the post, but I wanted to include as much
information as possible from the start.



John Riddoch
Unix Project Engineer
Shell Information Technology International Limited
Loirston House, Wellington Road, Altens, Aberdeen AB12 3BH

Tel: +44(0)1224 21 7660 Fax: 7502
Email: John.E.Riddoch at is.shell.com
Internet: http://www.shell.com




More information about the samba mailing list