Working with large directories

Alan Cox alan at lxorguk.ukuu.org.uk
Fri Mar 16 23:33:23 UTC 2012


> I think it's most likely not that nautilus, etc., are slow in 
> large directories, it is that large directories take a long time
> to search for files, making any action on those directories much
> slower than normal. A "problem" of long-standing on pretty much
> all Unix(-ish) file systems (and I'm not saying it won't happen on
> other systems, I don't really know, but suspect it does.)

Ext3, ext4 and recent file systems have hashed directory indexing so this
is no longer true. Plus a window of files isn't searching, its simply
scanning the directory which is fast.

If you have spinning rust however and nautilus is trying to read content
from each file the cost of the disk seeks to each file will kill your
performance pretty effectively. Disk seek time hasn't really improved in
years as its down the limits of physics.

The cure ultimately is probably to use more subdirectories 8)


Alan






More information about the users mailing list