Boot time is super fast, how come?

The boot time in Ubuntu is really fast. 7-10 seconds. Comparing it to my mac (which is about 30-40 seconds). How come Ubuntu is so much faster? I'm thinking that it uses a different kernel (Linux). I'm not sure if that would come into account for anything...


Solution 1:

It boots fast because people have worked very hard toward that goal over the past couple of years since Ubuntu 8.10. Some of the major factors (over pre-10.04 Ubuntu):

  • Moving the boot process over to an event model (Upstart) so that things both load in parallel and when they're needed. It's a genius system.

  • X (the graphical desktop to most people) is now loaded very early on. By getting it ready faster, you can show the user something much quicker.

  • Removing deadwood from initramfs (the image that is loaded by grub to boot the system)

  • Various caching mechanisms have come and gone including sreadahead and ureadahead. These work by generating a binary block of files your system uses at boot so that can be read off the hard disk in one go.

Comparing 8.10 and 10.10, you probably only see a sixth of the boot time now. It's a very impressive improvement... But that doesn't really explain why it's faster than other systems.

For that I think I can only really say they're heavier and aren't as good at booting service in parallel.

Solution 2:

ureadahead is one reason.

That the people who are writing the system are the ones using it and they hate slow boots is another.

That desktop users generally expect long boots so there is little market pressure for Company X to say "the fastest boot in town" is a third.

Leaving only the truly necessary bits in the OS proper is a time-honored Unix tradition is a fourth.

There may be other reasons.