On Thu, Apr 07, 2005 at 09:16:43PM +0000, Casey Allen Shobe wrote:
> > Stat'ing 19k files in my qmail folder takes me 2.5 minutes. My
> > INBOX takes 10 seconds with 1500 messages.. Compared to the
> > single stat of mbox, Maildir really can't compete.. :-/
> 
> I don't know where you get those enormous times from...

I agree that those times seem long, what does that server run on,
Andreas? And did you make a special test case application or time
binc, or some other application? (du?)


> (or what exactly a stat is, or why you're using it)

stat() is the system call used to read directory information about
files and subdirectories. Size is one of the things returned for
files. Check out the stat man-page for a full description of struct
stat.


> # time du -h --summarize .Mailing\ Lists.Software.Qmail/
> 43M     .Mailing Lists.Software.Qmail/
> 
> real    0m0.047s
> user    0m0.012s
> sys     0m0.035s

Kernel caching has huge impact on these test, you would have to make
sure that nothing in that directory was in the cache before getting
good numbers. Which can be hard.


> # ls -lR .Mailing\ Lists.Software.Qmail/ | wc -l
> 8507

I just did a du on my spam maildir on ext3 with 597MB and 60k messages,
it only took a few seconds which is really good, but on the other
hand that's pretty much the only thing running on that system, and I
wrote to it not long ago.


//Peter

Reply via email to