Linked by diegocg on Sun 13th May 2012 23:48 UTC
Linux Lennart Poettering, the author of systemd, has announced: "I just put a first version of a wiki document together that lists a couple of easy optimizations to get your boot times down to [less than] 2s. It also includes a list of suggested things to hack on to get even quicker boot-ups."
Permalink for comment 517979
To read all comments associated with this story, please click here.
As a kernel dev myself
by Alfman on Mon 14th May 2012 02:34 UTC
Member since:

I've always found it bewildering how long so many commercial operating systems take to bootup.

The following bottlenecks probably deserve most of the blame:

1. Unnecessary Serialization.
Most devices are independent from one another and can be initialized at the same time, but many coders are lazy or not good at multitheaded/multiprocess programming and depend on critical sections, disabling interrupts, etc. Even drivers which support parallel execution might be prevented from doing so by the OS. Several linux distros suffer huge performance penalty because their init scripts load everything serially instead of in parallel.

2. Unnecessary delays.
I've seen this so often it makes me disappointed in my peers, but they often solve race conditions by adding arbitrary delays throughout the code. For example back in the modem days it was very common to see companies running code that delays between AT commands and even some cases where the code had hard coded delays between characters. These delays will become significantly less optimal as hardware evolves. One company thought they were being clever and made the delays configurable - how thoughtful. Removing these delays means solving race conditions that the original developer couldn't be bothered to solve.

3. Disk thrashing.
This one is easy enough to fix by using a SSD. For HDs, placing everything in an initd and/or rearranging startup apps linearly on disk will significantly reduce the need for numerous and slow disk seek operations. I've seen defrag tools do this for windows, but I've never seen anything similar for linux (can someone clue me in!).

(4. Network delay)
I hesitate to add this one, since an unresponsive network should not really cause local bootup delays. But in fact I have seen cases of it where serially loaded processes get blocked due to a process waiting on DHCP or a network connection.

Reply Score: 3