Slow performance on large dirs.

mstoop mstoop at xs4all.nl
Wed Oct 27 22:04:19 GMT 1999


I have run into a problem with samba performing very
slow on directories with many files (>5000 files).
Opening a file in notepad takes about 9 seconds!

I open the file from a command prompt like:
C:\>C:\WINNT\NOTEPAD.EXE N:\piping\901t10.gd

The delay happens in trans2findfirst and trans2findnext.
There is a lot of substring comparing in there what
seems to be the cause for the delay.

What wonders me is that the whole filelist is scanned
if the mask is an exact filename. what I see in the log
is that when findfirst encounters the filename it continues
to scan for matching filenames.

I have put some code in trans2.c after line 773 and 1030
to set finished to true if the found filename is an exact
match to the given mask. This speeds things up but it is
not a good fix. Altough I try to understand why NT first
tries to determine if the file exists before opening it,
I have to come up with a solution to this problem this
week or we have to abandon samba and come up with another
solution to access files on our D380 server.

I run samba on HP-UX 11.00 platform, but same problem on
a linux server or a HP-UX 10.20 file server.

---
Michel Stoop,

Senior Network and Systems Administrator
Numeriek Centrum Groningen B.V.
Vuyk Engineering Center Groningen B.V.
Cono Industrie Groep N.V.
Postbus 204
9700AE Groningen
+31 (0)50 541 26 32  fax: +31 (0)50 542 37 17
http://www.ncg.nl
mailto:stoop at ncg.nl
---



More information about the samba-technical mailing list