Monday, June 15, 2009

Still a minute faster

Back in March, I compared the load times for Windows XP and Fedora 10 on different hardware, and found that Linux booted about a minute faster. The fact that I had to run the test on different hardware was because I have to run Windows on my work laptop, but my wife happily runs Linux on her laptop at home. But it was still interesting that Linux booted faster on much older hardware (2005: IBM/Lenovo ThinkPad T43, Intel Centrino CPU @ 1.86 GHz, 512MB memory) compared to the newer laptop running Windows (2008: Dell Latitude D430, Intel Core2 CPU @ 1.20GHz, 2GB memory).

Over the weekend, I installed Fedora 11 on my wife's laptop. As part of the install process, I created a "Fedora 11 Desktop Edition" Live USB - meaning I could now boot a laptop using Fedora 11. So I thought it was important to repeat the head-to-head boot comparison on the same laptop, using both Windows and Linux.

Since my previous test, our desktop support folks upgraded my laptop to Windows Vista. After the initial problems of getting everything installed, I noticed that Vista booted a bit faster than XP. So good on Microsoft for that. But how does it compare to Linux?

Before we begin, a note on the boot media: Windows is installed on the hard drive, but Linux is booting from a Live USB. According to Dell, my Latitude D430 laptop has a 5400 rpm hard drive, typical for most "mobile" hard drives. Tom's Hardware suggests a "maximum sequential read transfer rate of 48 MB/s is an excellent result for a 5400 rpm drive." Wikipedia says that "typical fast USB drives claim to read at up to 30 MB/s." So Windows will have a slight performance advantage here, since its boot media can read data about 18 MB/s faster.

I used a digital stopwatch (on an iPod) to record timings. While this is not exactly scientific, I repeated the tests over several boots and got similar numbers. To remove the question of how long it took the laptop to check memory (POST at boot) I always started the timer when I was inside the BIOS menu that selected my boot device. I'm most interested in how long it takes to boot the system (from BIOS), login, bring up Firefox, and display a web page (Google).

Here are the major milestones for Windows:

From BIOS to login prompt: 36 seconds

Login prompt to desktop: +42 seconds

Desktop to web page (Firefox): +46 seconds

Total: 2 minutes, 4 seconds

And to compare, the same for Linux:

From BIOS to login prompt: 40 seconds

Login prompt to desktop: +15 seconds

Desktop to web page (Firefox): +12 seconds

Total: 1 minute, 7 seconds

Surprisingly, both laptops also prompted for login at about the same time (36-40 seconds.) Yet it takes much less time to present the desktop on Linux, and launching Firefox is much faster.

I have to give Microsoft some credit, here. Remember that Windows XP booted on the same laptop (and displayed a web page) in 3 minutes, 7 seconds. But Windows Vista does it in 2 minutes, 4 seconds - clearly, Microsoft made boot time a priority for the Windows Vista team, and it shows. Good for them!

But a minute faster on slower boot media (USB, versus hard drive) is very impressive. This represents the time spent waiting for Windows to load, when you could be getting to task right away under Linux. In the comparison from March, I commented I was able login to our webmail system at work, read an email, and delete it in that extra minute. That's real work. Linux wins hands-down on this test.

7 comments:

Before anyone catches this: in another post I mentioned that when Vista boots remotely (i.e. at home) it takes approximately another 2 minutes for me to log in. It seems that whenever I log in to Windows, Vista checks that my bookmarks are accessible. And my bookmarks aren't reachable when I'm not on the office network, so I guess Windows wants to wait for the remote connection to time out before presenting my desktop.

The boot comparison here was done on the office network so Windows was logging in to the local AD. It's drive mappings didn't need to time out.

IIRC, we don't run extraneous programs at login when we login to AD - the login action just maps some network drives.

I have found the same thing when booting my vista partition vs my ubuntu one, though not to the same degree. The vista one is only a little slower, maybe 10 seconds, but I have removed a lot of components from it (aero, printing services, a lot of non-essential networking stuff).

I've got both the Windows 7 release candidate and Kbuntu on my laptop, so I can run that test. I've only had them installed for a short while so they'll be relatively clean; if anything it should be biased in favor of Kbuntu since I have a couple IBM things (like a battery monitor) starting up in Windows.

Unfortunately, neither OS is bootable right now since I was mucking with the boot loader to solve a minor issue* between Win 7 and XP (yes, triple boot system!) did more harm than good, and haven't put any effort into fixing it yet beyond getting XP working.

I'll try to put up some example times when I get around to fixing that.

* If you're curious, the problem is the following. Grub correctly detected that I had Win7 (well, it called it Vista, but whatever) and XP istalled and presented both in the menu. However, the XP option didn't boot and just lead to a "missing boot loader" error or something like that. However, the Vista option loaded MS's boot loader, which now presents the option between Win 7 and XP, so both were still accessible.

The only problem with this is that if I hibernated one of the Windows installations, the boot loader wouldn't ask what it should do and always booted the one that was hibernated. This is not a completely unreasonable behavior, but I really wanted to be able to hibernate one version of Windows then boot into the other.

Damn damn damn damn... I just got a (used) new latop, and it had vista on it. I wiped the drive and now it has Linux on it. But before I wiped it I did NOT try a boot speed test!!!! Why? (Kicking myself)

But, as I mention in my post pointing over here, it would not matter much if one OS was faster than another. What matters is that one OS has to be booted frequently for simple upgrades and system adjustments, while the other almost never has to be booted. THAT makes a huge difference.

Greg: A properly secured system is never transported without first being shut down. If it's a laptop, that means it will be booted at least daily, meaning that the differences in boot time will directly corrolate to the daily productivity of an organization.

There is still a liklihood that the Windows machine will need to be booted at some point during the day though, but that's less of an issue once you leave XP behind.

JH: I'd like to see this as a long-term study. Maybe you could do a boot speed test on the first Monday of every month and graph the results after a year.

About me

I've been a Linux user since 1993, and since 2002 I've been fortunate enough to run Linux full-time at work. But, I've been asked to move back to Windows, at least for work. The difference between Windows and Linux has been shocking, to say the least. Since I find it interesting when long-time Windows users experiment with Linux for the first time, I thought it might be equally interesting for this long-time Linux user to blog about my first experience running Windows in over 6 or 7 years.