adventures in booting

David Zeuthen david at fubar.dk
Tue Nov 30 22:43:01 UTC 2004


On Tue, 2004-11-30 at 15:20 -0500, David Malcolm wrote:
> On Sun, 2004-11-28 at 20:49 -0500, David Zeuthen wrote:
> 
> Awesome!  So... is no-one else going to reply to this email?  
> 
> Various comments inline below...
> 

Thanks!

> > Hey,
> > 
> > So, I've looked a bit more into the booting process and how to optimize
> > it. Mostly based on the discussion triggered by Owen's boot poster
> > challenge, here
> > 
> >  http://www.redhat.com/archives/fedora-devel-list/2004-November/msg00447.html
> > 
> > and also some experiments that I did - basically replacing rhgb with gdm
> > as described here 
> > 
> >  http://www.redhat.com/archives/fedora-desktop-list/2004-November/msg00066.html
> > 
> > What I've done is a bit crude - I've replaced init(1) with a shell
> > script based on /etc/rc.d/rc.sysinit and tried to optimize specifically
> > for my system: IBM Thinkpad T41 laptop with a Pentium M processor at
> > 1600MHz along with 512MB of RAM.
> 
> If I understand, you're also optimising for a specific user of that
> system.  

Yeah, out of 5189 files (193MB), 231 of them (31MB) are from my home
directory. Due to the way I've instrumented the kernel (printk() in
fs/namei.c function link_path_walk()) this also includes files that are
only stat(2)'ed. Which means that e.g. 

 /home/davidz/Desktop/Stuff/kernel-2.6.9-1.751_EL.i686.rpm

of size approx 10MB are loaded. So 193MB is a bit high, however, since
files are being stat(2)'ed anyway there will be a disk seek to the inode
so to play it safe we need that block as well. Thus, readahead would be
better to do on the block layer level; also because shared objects like
e.g. libgtk-x11-2.0.so contains a lot of deprecated API's nobody uses
anyway (e.g. don't load those pages).

> Is it worth splitting the readahead into a system-wide list of
> files (enough to get to the login screen), followed by a per-user list
> for logging in as a user?  

Could be done, yeah.

> To what extent will the files needed to get
> to a usable desktop vary between Alice and Bob?

I dunno; if Bob uses, say, 50MB worth of .pdf documents every time he
logs in we should preload those (that isn't at all out of the ordinary
if Bob uses a lot of reference manuals). 

The list of files (blocks) should be generated from several criteria
including how often they are read. Ideally we always start a daemon in
early boot to monitor this and rearrange blocks on the disk when idle or
perhaps every week.

> >  d. The whole init(1) procedure seems dated; perhaps something more
> >     modern built on top of D-BUS is the right choice - SystemServices
> >     by Seth Nickell comes to mind [1]. Ideally services to be started
> >     would have dependencies such as 1) don't start the gdm service
> >     before /usr/bin/gdm is available; 2) the SSH service would only
> >     be active when NetworkManager says there is a network connection;
> >     /usr from LABEL=/usr would only be mounted when there is a volume
> >     with that label and so forth. Also, such a system would of course
> >     have support for LSB init scripts.
> >     (This is probably a whole project on it's own so I'm omitting
> >     detailed thinking on it for now)
> 
> Hopefully this could also allow us to make system-config-services look a
> lot slicker.  I've never liked the way it has random text spewage for
> each service's status - some kind of widgetry would satisfy my eye-candy
> cravings.
> 

Heh, and sweet icons too :-)

Cheers,
David





More information about the devel mailing list