bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

stat() order performance issues


From: Phillip Susi
Subject: stat() order performance issues
Date: Thu, 25 Jan 2007 14:56:21 -0500
User-agent: Thunderbird 1.5.0.9 (Windows/20061207)

I have noticed that performing commands such as ls ( even with -U ) and du in a Maildir with many thousands of small files takes ages to complete. I have investigated and believe this is due to the order in which the files are stat()ed. I believe that these utilities are simply stat()ing the files in the order that they are returned by readdir(), and this causes a lot of random disk reads to fetch the inodes from disk out of order.

My initial testing indicates that sorting the files into inode order and calling stat() on them in order is around an order of magnitude faster, so I would suggest that utilities be modified to behave this way.

Questions/comments?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]