Gentoo Logo
Gentoo Spaceship

Installation:
Gentoo Handbook
Installation Docs

Documentation:
Home
Listing
About Gentoo
Philosophy
Social Contract

Resources:
Bug Tracker
Developer List
Discussion Forums
Gentoo BitTorrents
Gentoo Linux Enhancement Proposals
IRC Channels
Mailing Lists
Mirrors
Name and Logo Guidelines
Online Package Database
Security Announcements
Staffing Needs
Supporting Vendors
View our CVS

Graphics:
Logos and themes
Icons
ScreenShots

Miscellaneous Resources:
Gentoo Linux Store
Gentoo-hosted projects
IBM dW/Intel article archive




List Archive: gentoo-soc
Navigation:
Lists: gentoo-soc: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-soc@g.o
From: Vladimir Skuratovich <skuratovich@...>
Subject: Some experiments on Fast Boot
Date: Thu, 2 Apr 2009 11:05:17 +0300
Sorry for the delay, I've been quite busy at my university lately.

I've experimented a bit with my system and found a few things about
its startup performance:

- On a system with a hard disk parallel startup isn't much faster -
  bootchart displays high disk activity, but little throughput, so, I
  guess, some king of readahead is even more important for HDDs than
  for SSDs. Unfortunately, 'sreadahead' seems to work only with ext3 and
  is designed with only SSDs in mind; 'preload' doesn't like to start
  too early in the boot process, and although it seems quite effective
  to me, only a small part of boot process can benefit from it. Right
  now I'm trying Fedora's 'readahead'...

- For me, the startup process is slowed down considerably by mounting
  a /home partition. The programs we'd want to start up as early as
  possible, including X, are delayed until the mounting finishes. This
  is especially noticeable with reiser4, as mounting it usually takes
  a few seconds, but I suppose this is true to some extent for other
  filesystems too. Maybe if the system has a /home partition we should
  wait in the session manager for it to be mounted, while X is
  starting up? Not sure what to do with other filesystems, such as
  /usr, which still have to be mounted very early.

- If Xorg in some configurations uses HAL to find input devices,
  probably the primary input devices should be configured
  statically. It seems that Xorg (at least v.1.6.0) can successfully
  connect to HAL even if HAL is started after it. With static nodes
  for the few devices required by X, we could start it very early.

- Gentoo init scripts perform a lot of 'autodetection' of different
  system parameters. Probably the autodetection could be left as a
  'safe boot' option, and the real values could be recorded somewhere
  and loaded at boot time?

- Instead of cleaning directories such as /var/run, they can be
  mounted on tmpfs and the necessary directory tree inside can be
  recreated every time.

- Placing static device nodes on /dev while udev is starting speeds up
  the boot significantly for me

With a few hours of experiments on my system I've managed to reduce
its boot time to about ~15 seconds (not including kernel startup - and
kernel initialization takes quite long) This is on a system with a
5400rpm laptop hard drive (40-45 mb/s linear read) with everything on
LVM inside dm-crypt. It seems that the 10 second boot time for HDD
systems, which is mentioned in Moblin presentation, is quite a
realistic goal.

If someone is interested, I can post the bootchart logs somewhere.

The system uses initng - but the structure of init scripts in Gentoo
seems very similar, so I guess porting it to Gentoo would be easy.

Next I'm going to experiment a bit with unpacking some of the binaries
onto tmpfs (probably combined with unionfs so they stay there even
after system startup). If that helps, it can also result in a system
that runs mostly from RAM, without spinning up the hard drive upon
starting every program.

Regards,
         Vladimir.


Replies:
Re: Some experiments on Fast Boot
-- Arun Raghavan
Navigation:
Lists: gentoo-soc: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
About "Create and release a Gentoo stats server/client"
Next by thread:
Re: Some experiments on Fast Boot
Previous by date:
Re: Gentoo/Java projects
Next by date:
Re: Some experiments on Fast Boot


Updated Jun 17, 2009

Donate to support our development efforts.

Gentoo Centric Hosting: vr.org

VR Hosted

Tek Alchemy

Tek Alchemy

SevenL.net

SevenL.net

php|architect

php|architect

Copyright 2001-2007 Gentoo Foundation, Inc. Questions, Comments? Email www@gentoo.org.