Slow performance on large dirs.
davecb at canada.sun.com
Fri Oct 29 12:58:25 GMT 1999
Michel Stoop wrote:
> 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 usually reccomend transforming names so
that 19990312.636328 turns into 19/99/03/12/63/63/28
or the like... If a program is accessing the files,
this is trivial. It's not suitable for humans, though,
who get tired of clicking...
> 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,
If you're seeing lots of repeated acccesses to the same
file, it's usually helpfull to cache the last filename
seen. A single-element cache, in such a case, will
make a slow algorithm appear twice as fast (ie, the
first access will remain slow, but the second will fly).
This works well when the temporal adjacency is high, which
appears to be true in your case.
> 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.
What else can we do to help?
> 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
> mailto:stoop at ncg.nl
David Collier-Brown, | Always do right. This will gratify some people
185 Ellerslie Ave., | and astonish the rest. -- Mark Twain
Willowdale, Ontario | http://java.science.yorku.ca/~davecb
Work: (905) 415-2849 Home: (416) 223-8968 Email: davecb at canada.sun.com
More information about the samba-technical