(boot improvement experiments) Re: Boot poster challenge

Franco Catrin fcatrin at tuxpan.com
Fri Nov 19 21:22:50 UTC 2004


Sorry to hang up on this part of the discussion, I've just subscribed
fedora-devel because I knew there was a discussion about the boot time
on Fedora.

I was trying to improve the boot time with FC2 some weeks ago, and I got
very interesting results.  This is not directly related to the boot
poster, it is just a trial and error work to improve FC2 boot time.


My machine:

P4-M 2.8Ghz HT
512MB RAM
4200RM hard disk drive (dell notebook, very slow compared to a desktop
machine)
Fedora Core 2 + updates
Nvidia card with nvidia drivers


Critical times for me:

GDM: Time from GRUB until GDM gets ready to login an user
GNOME: Time to load the whole gnome-session for the fist time
EPIPHANY: Time to load epiphany for the fist time
OPENOFFICE: Time to load any openoffice application for the fist time


Original timings:

- GDM: 75 seconds (more than 1 minute!)
- GNOME: 41 seconds
- EPIPHANY: 5 seconds
- OPENOFFICE: 22 seconds

Results:
- GDM: 38 seconds (!!)
- GNOME: 19 seconds
- EPIPHANY: 2 seconds
- OPENOFFICE: 5 seconds (!!)


Bottlenecks I couldn't resolve:

- IDE detection in the kernel
- init start time
- USB detection
- nvidia driver probing for monitor/lcd/tv
- gnome trying to load 1500 files (it seems to be resolved now with
icon-cache, owen?)

FC3 seems to be slower.  I've just installed FC3 this week, and I really
miss my old boot timings


Method:

Since I am the only one who uses this notebook, and it doesn't change
the hardware, there are several things that doesn't need to be running,
and several other things that doesn't need to be checked (quota for
example)

I've also changed the order of things that are started, for example
there is no need to load httpd nor sshd before bringing gdm up.


Gory details:

- I disabled:
  - kudzu
  - rhgb
  - netfs
  - sendmail

- I added "fastboot" option to the kernel.  I saw that rc.sysinit use
this flag to skip some things, I don't remember what exactly did at this
time

- I commented out every unneeded check by rc.sysinit on my machine (like
quotas)

- I prepared an readahead.early.files running strace -e trace=open on X
and gdm

- the fist thing that I put in rc.sysinit was an hdparm command the get
the best of my slow disk

- readahead.early.files is processed asynchronously with low priority as
soon as possible (on top of rc.sysinit).  It preloads X+gdm

- I commented out the line that loads prefdm in iniitab, replacing it
with a chkconfig script

- I disabled "unix:" fonts in X, so xfs was disabled

- the fisrt script to run runlevel 5 is the prefdm chkconfig script, I
added "ifup lo" in before loading the real prefedm script

- services like pcmcia, sshd, httpd, and others are loaded with low
priority behinds the scenes, while x+gdm are starting.  They ever load
fine, so I don't need to see if they load or not.

- I prepared a readahead.files running strace -e trace=open over gnome-
session + gnome componentes (gnome-panel, gconfd and others).  There I
found all the icons loaded by gnome-panel (by the theme I suppose)

- readahead is executed against readahead.files just after gdm is ready
to accept a login.  I did it measuring the time and adding a sleep
command before running readahead (cof cof)

- while the user (me) is entering the username and password, the gnome
session is preloaded with readahead.

- I prepared another readahead file running strace -e trace=open over
openoffice and epiphany

- I set up gnome-session-properties to run this readahead just after
loading the gnome-session (priority 90 did the work)


This approach doesn't make the system faster at all, but it seems faster
to the user. The main trick is to change the order of loading the system
components and preload the slowest applications.  

I don't think that this is applicable to the distribution as a whole,
but I know that some things than can help on this type of customization
and may be applied on Fedora

1. rc.sysinit could be modularized, so the user can disable/enable some
bits of it without touching the script file.  An easy way could be to
move some part of it to chkconfig scripts

2. prefdm in inittab could be moved to a chkconfig script, and the order
of services could be changed so prefdm could be started before starting
services like httpd, sshd, and others

3. figure out a way to automate the generation of readahead files to
match the most used files

I know that Seth Nickell was working on 1 and 2, but I haven't heard of
that again (SystemServices)


I would be glad to help on improving Fedora boot time
-- 
Franco Catrin L.  TUXPAN
http://www.tuxpan.com/fcatrin




More information about the devel mailing list