Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question
4  
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 '11 at 11:10
    
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. –  Brendan Long Apr 27 '11 at 16:55

4 Answers 4

up vote 29 down vote accepted

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.

share|improve this answer
    
You did explain why. Other system didn't expend as much resources optimising boot time as linux did. –  Javier Rivera Apr 27 '11 at 11:45
4  
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 '11 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 '11 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 '11 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 '11 at 15:29

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.

share|improve this answer
    
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 '11 at 15:34

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.

share|improve this answer

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

share|improve this answer
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 '11 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 '11 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 '11 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 '11 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 '11 at 10:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.