public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@zip.com.au>
To: Richard Gooch <rgooch@ras.ucalgary.ca>
Cc: joeja@mindspring.com, linux-kernel@vger.kernel.org
Subject: Re: faster boots?
Date: Thu, 04 Apr 2002 18:51:46 -0800	[thread overview]
Message-ID: <3CAD1142.82527917@zip.com.au> (raw)
In-Reply-To: <3CACEF18.CE742314@zip.com.au> <200204050218.g352ILY32221@vindaloo.ras.ucalgary.ca>

Richard Gooch wrote:
> 
> >       http://www.atnf.csiro.au/people/rgooch/linux/boot-scripts/
> 
> Around 20 seconds or less from when the kernel starts init(8) to when
> my XDM splash screen is up, last time I checked.

eww.  You need a doctored filesystem.

> ...
> > The theory was lovely.  And I tried all sorts of stuff.  But
> > the bottom line benefit was only about 10%.  The whole thing
> > was constrained by buffercache seek time - filesytem metadata.
> 
> The problem is that you're not listing the metadata blocks when
> building the database, right? And that's because Linus didn't want
> such hackery in the kernel. So instead we got the not-very-useful
> readahead system call.

No, everything was listed.  pagecache, buffercache.  This
was pre buffercache-in-pagecache.  I tried lots of stuff,
including intermingling pagecache and buffercache reads
in strict LBA order, buffercache first, no buffercache at
all.  Nothing really helped.  Fact is, all those files are
sprinkled all over the disk and a short seek is pretty much
as expensive as a long one.

The code's at http://www.zip.com.au/~akpm/linux/fboot.tar.gz -
it includes a demonstration of the ancient art of reading files
in a kernel module via insmod's standard input :)

> > Oh well.  The best benefit was in fact from launching all
> > the initscripts in parallel.  Lots of stuff broke because
> > of the lack of any sort of dependency system, but it was
> > appreciably quicker.
> 
> Of course, my boot scripts do the dependency stuff right (actually,
> it's the changes I made to simpleinit(8) that make it possible).

Yes, I've looked.  It's nice stuff.  The dependencies are critial.

> > I guess the greatest benefit would come from reorganising the
> > layout of the root filesystem's data and metadata so the
> > pagecache prepopulation doesn't have to seek all over the place.
> 
> Or being able to preload *everything* in ascending order...

I was preloading everything.  I certainly avoided the thought of
taking a *copy* of everything and placing it elsewhere on disk.
Scary coherency problems there.

One thing I did do a while back was to set up a new root filesystem
on a new disk via `tar cf - | (cd /newplace ; tar xf -)'.  But before
doing this I nobbled ext2's directory placement algorithm so
subdirectories in the new fs go in the same blockgroup as the parent.
This sped boots up quite a bit.  Probably the pagecache preload
code would work better with that setup.

Still.  Joe tells me (offlist) that his machine is taking
ages just to get to the "starting init" stage.

-

  reply	other threads:[~2002-04-05  2:52 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-04 23:54 faster boots? joeja
2002-04-05  0:21 ` Alan Cox
2002-04-05  1:00   ` Jeremy Jackson
2002-04-05  0:26 ` Andrew Morton
2002-04-05  2:18   ` Richard Gooch
2002-04-05  2:51     ` Andrew Morton [this message]
2002-04-05  3:00       ` Benjamin LaHaise
2002-04-05  3:21         ` Alan Cox
2002-04-05  5:38           ` Richard Gooch
2002-04-05 12:49             ` Alan Cox
2002-04-05 16:33               ` Richard Gooch
2002-04-05 23:02               ` Itai Nahshon
2002-04-05 23:07                 ` Benjamin LaHaise
2002-04-06  0:07                   ` Itai Nahshon
2002-04-06  0:29                     ` Benjamin LaHaise
2002-04-07 14:42                     ` Pavel Machek
2002-04-08  0:48                       ` Itai Nahshon
2002-04-08  0:57                         ` Richard Gooch
2002-04-08  1:14                           ` Andrew Morton
2002-04-08  4:17                             ` Andre Hedrick
2002-04-08  9:57                             ` Pavel Machek
2002-04-08 16:43                               ` Jamie Lokier
2002-04-08 16:48                                 ` Benjamin LaHaise
2002-04-08 21:09                                   ` Pavel Machek
2002-04-09  0:56                                   ` Jamie Lokier
2002-04-09 22:22                                     ` Pavel Machek
2002-04-12 10:44                                       ` Jamie Lokier
2002-04-12 11:42                                         ` Pavel Machek
2002-04-12 14:29                                           ` Jamie Lokier
2002-04-14 19:40                                             ` Pavel Machek
2002-04-15 13:34                                             ` Philipp Matthias Hahn
2002-04-08 17:08                             ` Mark Mielke
2002-04-08 17:49                               ` Rene Rebe
2002-04-08 18:02                                 ` G . Sumner Hayes
2002-04-08  6:02                           ` Oliver Neukum
2002-04-08 17:06                             ` Richard Gooch
2002-04-08 16:13                               ` Martin Dalecki
2002-04-08 15:16                           ` Bill Davidsen
2002-04-08 17:32                             ` Richard Gooch
2002-04-08 18:31                               ` Bill Davidsen
2002-04-08 18:40                                 ` David Lang
2002-04-08 18:56                                   ` Richard B. Johnson
2002-04-08 19:06                                     ` David Lang
2002-04-08 19:27                                       ` Richard B. Johnson
2002-04-08  8:03                         ` Helge Hafting
2002-04-08 12:38                           ` Rogier Wolff
2002-04-08 14:41                           ` Bill Davidsen
2002-04-08  9:55                         ` Pavel Machek
2002-04-08 12:15                         ` Rogier Wolff
2002-04-08 12:09                     ` Rogier Wolff
2002-04-05  6:14           ` Eric W. Biederman
2002-04-05 12:45             ` Alan Cox
2002-04-05 13:04         ` Bill Davidsen
2002-04-05 21:33           ` Benjamin LaHaise
2002-04-05  5:26       ` Richard Gooch
2002-04-05  7:45   ` dean gaudet
2002-04-05 18:43     ` Jeremy Jackson
2002-04-05  0:44 ` Piotr Esden-Tempski
2002-04-05 13:37   ` Mauricio Nuñez
2002-04-05  1:11 ` Ross Vandegrift
2002-04-05  1:55 ` Bernd Eckenfels
2002-04-05 12:56 ` Bill Davidsen
2002-04-10  1:20   ` Mike Touloumtzis
2002-04-05 19:08 ` Mark H. Wood
  -- strict thread matches above, loose matches on Subject: below --
2002-04-05  2:10 joeja
2002-04-05  7:44 ` Helge Hafting
2002-04-05 12:13   ` Thomas 'Dent' Mirlacher
2002-04-05 15:14   ` Luigi Genoni
2002-04-05  8:00 willy tarreau
2002-04-05 13:06 ` Bill Davidsen
2002-04-05 13:21   ` willy tarreau
2002-04-05 15:29     ` Bill Davidsen
2002-04-05 16:20       ` willy tarreau
2002-04-05 23:10     ` Itai Nahshon
     [not found] <3CACEF18.CE742314@zip.com.au.suse.lists.linux.kernel>
     [not found] ` <Pine.LNX.4.33.0204042330270.10358-100000@twinlark.arctic.org.suse.lists.linux.kernel>
2002-04-05  8:41   ` Andi Kleen
2002-04-05 18:23 Torrey Hoffman
2002-04-06 17:53 Re: " Alan Cox
2002-04-06 19:01 ` Joe
     [not found] <Pine.LNX.4.33.0204051403200.7124-100000@mhw.ULib.IUPUI.Edu >
2002-04-07 20:10 ` Stevie O

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3CAD1142.82527917@zip.com.au \
    --to=akpm@zip.com.au \
    --cc=joeja@mindspring.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rgooch@ras.ucalgary.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox