[Samba] Slow Directory listing for large number of files

Michael Carmack karmak at karmak.org
Mon Apr 19 15:59:04 GMT 2004


Matthew Enger wrote:

> I have a samba server which has a directory with 11764 files. (The
> program stores information about jobs and each job has 3 files, nothing
> I can do about it).
> 
> When I do a listing of that directory using smbclient, it takes 15+
> seconds to complete, same thing on Windows XP.
>
> I have tried Samba 2.2.7a and 3.0.2 which both have the same issue. Log
> is from 3.0.2. Running Fedora Core 1 and ext3 file system.

How fast do you get a listing when directly on the server? Most 
filesystems become really slow once you get more than a couple thousand 
files in them.

If listings are slow on the server, the only thing you can do is divide 
up the files into subdirectories or switch to something like reiserfs 
that can handle large directories.

I don't know if anything can help XP though. I once had a directory with 
~25,000 files on a samba server, and XP would just hang when trying to 
list it.

m.



More information about the samba mailing list