Subject: Re: LFS
To: None <port-i386@netbsd.org>
From: Bernd Sieker <bsieker@freenet.de>
List: port-i386
Date: 12/06/2001 01:02:36
On 05.12.01, 05:48:56, Richard Rauch wrote:
> Bernd, I have two questions about your comments on LFS:
> 
> (a) You say that it is ``an order of magnitude faster'' for unpacking than
> FFS with softdeps.  Is this literally true?  At least 10 times faster?  Or
> do you just mean ``really a whole lot faster''?  If it's not really an
> order of magnitude faster, can you estimate the real performance gain for
> unpacking tarballs?

Yes, I really mean "10 times as fast.", And I did some crude
benchmarks using "time" to measure elapsed time for unpacking and
rm'ind pkgsrc.tar.gz. That's on a Celeron/366, Intel BX chipset, IBM
DCAS 4GB disk on a TekRAM DC390U Ultra-SCSI. Writing thousands of
small files to disk is so fast with LFS that gzip becomes a limiting
factor.

So it might be faster still with a faster CPU.

Here's my small benchmark (on identical disks and on roughly the
same region of the respective disks.) The LFS has a 1MB segment size,
both have 1k frag and 8k block size. (Not sure if LFS actually has
frags.)

  > time tar zxf pkgsrc.tar.gz

  FFS Softdep: 	09:01.29
  LFS:		01:14.39

Ok, that's not really 10 times, but only 7.3 times ... during the
second half of the unpacking, the lfs_cleanerd process interefered and
slowed it down. But that's sometimes inevitable. I did not test
different segment sizes.

Removing the pkgsrc tree, FFS is even worse, and LFS a lot better:

  FFS Softdep:	28:50.02 (!)
  LFS:		00:28.18 (!!)

That's a factor of more than 60! I was really amazed to see it take
almost half an hour on FFS, but to the best of my knowledge my
computer was not doing anything else involving disk access at that
time.

> 
> (b) Are you running a regular release, or are you running some flavor of
> -current?

Actually, 1.5.3_ALPHA (i. e. 1.5 branch, updated a few days ago), but
AFAIK there have been no changes to lfs between 1.5.2 and 1.5.3
(yet).

> 
> 
> (I've never set up LFS, but if I can really get a 10x improvement, or
> something close to that, it'd be worth looking into for something
> non-critical like pkgsrc and /usr/src...  I tend to have those
> trees populated, and it does take a while to unpack the tarballs...(^&)

pkgsrc has recently become much better by removing the "./pkg"
directory in each pkg's directory, slightly reducing LFS's advantage
:-)

> 
> 
>   ``I probably don't know what I'm talking about.'' --rauch@math.rice.edu

-- 
Bernd Sieker

With many thanks to the core team and UCB CSRG.
		-- Greywolf