You are not logged in.

#1 2008-02-27 16:21:17

jstarek
Member
Registered: 2008-02-27
Posts: 15

Long boot time due to udev and load-modules.sh

After having set up my new Arch installation so that everything worked, I went to improving its less-than-impressive boot time, among other things. Looking at the boot process with bootchart, I noticed that udevd starts a script called load-modules.sh several times over. This script seems to call modprobe in order to insert auto-detected modules, but takes a lot of CPU time to do so: Over 30 seconds on my 1 GHz Pentium III mobile, resulting in about a minute total boot time. This is definitely too long to "just quickly look up an address"...

I've read other posts mentioning this in the forum, and generally the answers ranged from "disable module autoloading and put everything you need in a custom kernel" to "well, you can't do much about that".

As this machine is a laptop, I'd like to keep the possibility of just plugging in hardware, relying on udev to insert the right modules for it. So yes, it would be a possibility for me to include drivers for my standard hardware in the kernel, but I'd need to build lots of other drivers as modules nonetheless. So this would not cut down on my boot time as udev would have to check wheter or not to load those modules anyway, would it?

Does anyone have any other hints as to how to speed this up?

Many thanks in advance

  Jürgen


Restoring the oldest German radio telescope: http://astropeiler.de

Offline

#2 2008-02-27 16:38:04

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Long boot time due to udev and load-modules.sh

Compile a custom kernel, with (almost) everything built-in.

Then, the module-checking won't take long, because there will hardly be any modules to check! Simple.

Yes, you can have some modules if you like, and there's no need to disable/interfere with udev.

The proof is this line in /lib/udev/load-modules.sh

/sbin/modprobe -i --show-depends $1

That will fail, and most importantly fail very quickly, if the module is built-in (or doesn't exist).

See compilekernel wink

Last edited by brebs (2008-02-27 16:44:55)

Offline

#3 2008-02-27 18:07:31

Mikko777
Member
From: Suomi, Finland
Registered: 2006-10-30
Posts: 837

Re: Long boot time due to udev and load-modules.sh

This wiki is great : http://wiki.archlinux.org/index.php/Speedup_udev

Not perfect but if it works for you you should get about 10 seconds off the boottime.

My laptop boots to awesome in 24 seconds with that instead of 34 seconds. Fast enough for me smile

Offline

Board footer

Powered by FluxBB