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

Re: Qmail - huge performance increase



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 :-) .
-- 
 Tomasz Papszun   SysAdm @ TP S.A. Lodz, Poland  | And it's only
 tomek@lodz.tpsa.pl   http://www.lodz.tpsa.pl/   | ones and zeros.



Reply to: