Re: Qmail - huge performance increase
And on an Ultra-60 running Solaris 7 w/UFS:
bash-2.04$ time /bin/ls | wc
63975 63975 1971245
bash-2.04$ time ls | wc
63975 63975 1971253
Sped it up "just a little bit" :-)
On Wednesday 27 June 2001 07:03, Tomasz Papszun wrote:
> On Thu, 21 Jun 2001 at 13:25:17 +1000, Craig Sanders wrote:
> > On Thu, Jun 21, 2001 at 01:45:23AM +0800, Jason Lim wrote:
> > > SO... by increasing conf-split to 97 (from the default of 20
> > > something afaik), each directory ends up only having a hundred or so
> > > files. Doing "ls" now is far speedier.
> > > [...]
> > this is actually a well-known limitation of ext2fs and similar
> > file-systems - as soon as you get more than a thousand or so files in a
> > directory, performance takes a nosedive.
> BTW, a tip: if you've got "ls" aliased (for instance as
> 'ls --color=auto -F') then you can shorten this long execution of "ls".
> Just issue "/bin/ls" instead of "ls". The difference is very big. It can
> be as 1:200 (yeah!). I've just done a comparison in a directory
> with > 33000 files.
> "/bin/ls | wc" has taken 1 (one) second. "ls | wc" lasted 3 minutes and 26
> seconds. Yes, near 3 and a half minutes!
> This is because "ls" with additional information (e.g. file type, which is
> needed to colour a listing) needs more time to gather this information.
> I don't know what difference would be for reiserfs or xfs filesystems.
> Hope it helps a little :-) .
"To me vi is Zen. To use vi is to practice zen. Every command is
a koan. Profound to the user, unintelligible to the uninitiated.
You discover truth everytime you use it." email@example.com