public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* stat benchmark
@ 2008-04-24 20:59 Soeren Sandmann
  2008-04-24 21:42 ` Carl Henrik Lunde
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: Soeren Sandmann @ 2008-04-24 20:59 UTC (permalink / raw)
  To: linux-kernel

At

    http://www.daimi.au.dk/~sandmann/stat-benchmark.c

there is a simple program that will measure the time it takes to stat
every file in the current directory with a cold cache.

This is essentially what applications do in a number of common cases
such as "ls -l", nautilus opening a directory, or an "open file"
dialog being showed.

Unfortunately, performance of that operation kinda sucks. On my system
(ext3), it produces:

    c-24-61-65-93:~% sudo ./a.out 
    Time to readdir(): 0.307671 s
    Time to stat 2349 files: 8.203693 s

8 seconds is about 80 times slower than what a user perceives as
"instantly" and slow enough that we really should display a progress
bar if it can't be fixed.

So I am looking for ways to improve this.

Under the theory that disk seeks are killing us, one idea is to add a
'multistat' system call that would allow statting of many files at a
time, which would give the disk scheduler more to work with. 

Possibly the same thing would need to be done for the getxattr
information.

Does this sound like a reasonable idea?


Thanks,
Soren

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2008-04-28 19:42 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-24 20:59 stat benchmark Soeren Sandmann
2008-04-24 21:42 ` Carl Henrik Lunde
2008-04-24 21:44 ` Jan Engelhardt
2008-04-25  2:27   ` Justin Banks
2008-04-25  7:01   ` Christoph Hellwig
2008-04-25 19:48 ` Theodore Tso
2008-04-27 23:29   ` Soeren Sandmann
2008-04-28  0:13     ` Carl Henrik Lunde
2008-04-28 19:41       ` Alexander Larsson
2008-04-28  2:10     ` Theodore Tso
2008-04-27 22:40 ` Carl Henrik Lunde
2008-04-28 17:46   ` Zach Brown
2008-04-28  4:43 ` Ulrich Drepper
2008-04-28 11:53   ` Theodore Tso
2008-04-28 11:59     ` Avi Kivity
2008-04-28 13:31       ` Theodore Tso
2008-04-28 16:18     ` J. Bruce Fields

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox