19

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...

2
  • 6
    The boot time of a system depends on many factors- like your hardware configuration, startup scripts and programs- DE etc etc. Welcome to the linux world.
    – tinhed
    Apr 27, 2011 at 11:10
  • 1
    It's strange that your Mac doesn't boot similarly fast, since Apple uses launchd (en.wikipedia.org/wiki/Launchd), which seems to be similar to Upstart. Apr 27, 2011 at 16:55

4 Answers 4

28

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.

5
  • You did explain why. Other system didn't expend as much resources optimising boot time as linux did. Apr 27, 2011 at 11:45
  • 5
    In fairness to to them, I'm sure Microsoft and Apple have spent huge wadges of cash trying to improve their boot processes... Microsoft certainly made a huge song and dance about it before Windows 7 was launched. They're just not as good at it ;)
    – Oli
    Apr 27, 2011 at 11:49
  • 2
    I'm not sure if you intended it to sound that way or not, but "generating a binary block of files your system uses to boot" makes it sound like ureadahead copies data used during boot to a central cache where it is read from instead. This is not the case. It generates a list of those files, and reads them from their original locations at boot time in an optimized order before they are needed.
    – psusi
    Apr 27, 2011 at 13:53
  • @psusi I was thinking of sreadahead which does generate a binary "pack" file. Actually, are you sure? I've been reading further into ureadahead and it also seems to revolve around the "pack" concept (which makes sense if you want to counter slow seek times on mechanical disks)...
    – Oli
    Apr 27, 2011 at 14:23
  • 2
    The pack file is a list of what blocks from what files need to be read; it does not contain the actual data. I have been experimenting with defragging the disk and packing those files tightly at the start of the disk and getting improvements from that due to less seek time. Simply reading the files in order helps a good deal with seeks though since the head only has to seek forward and never backwards.
    – psusi
    Apr 27, 2011 at 15:29
7

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.

1
  • There is little market pressure for fast boot time because many people now puts their computer to sleep instead of complete shutdown.
    – Lie Ryan
    Apr 27, 2011 at 15:34
0

That is early loading of readahead technology + independent init of hardware devices + not so many system services to load + a lot of them load after presentin a UI to user.

-2

Boot time of ubuntu is not 7 seconds AFAIK. The fastest you can get is 15-30 seconds boot time (login time not included). The fastest boot of a full Desktop OS I have heard of chromeOS which is 3 seconds(that too when it comes with their hardware). It takes time to load drivers, scripts etc. Any ways boot time in Ubuntu(and other Linux distros) is faster than others because they use modern techniques already discussed above. http://www.tuxradar.com/content/benchmarked-ubuntu-vs-vista-vs-windows-7

9
  • 5
    The "standard boot benchmark" is from after BIOS hands off to sitting at a usable desktop (using auto-login). I can get about 10 seconds to desktop, 13 seconds until the Wifi connects. Fairly sure this could be tuned down too. If this were with a faster system with a faster SSD, 7 seconds would be easy.
    – Oli
    Apr 27, 2011 at 11:46
  • Yes surely you can get less that 10 seconds (as I said chromeOS based on ubuntu gets on in 3 seconds), But you have to rip of many things. With fully loaded OS with many applications and other drivers installed it would take time to boot. With SSD Ubuntu can boot even in 5 seconds but what about HDD? most people own that.
    – puneet
    Apr 27, 2011 at 12:42
  • 2
    Plenty of people with SSDs get sub 10 second boot times without any major hacking. I usually get about 8 with mine. My record on rotational hard disks is 12 seconds, though that is with some tweaking. 15-18 is more typical.
    – psusi
    Apr 27, 2011 at 13:57
  • after i select ubuntu from grub it takes only 7 seconds with my not so fast segate baracuda 160 gb with dual boot configuration with windows 7
    – kaykay
    Apr 28, 2011 at 6:08
  • 1
    @puneet just because your computer doesn't boot that quickly, doesn't mean other computers can't. The boot time will vary based on what hardware you have, SSD vs HDD being the biggest factor. There is nothing wrong with your computer it just isn't as fast at booting as some. (It takes me 30-40 seconds)
    – dv3500ea
    Apr 29, 2011 at 10:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .