You are not logged in.
Recently, a certain elitist Mac user decided he wanted to demonstrate to me the superiority of the Mac. I decided to take him up on it... So, we both shut down our laptops, disconnected them, counted down from five, and hit the power buttons. Note that I watched what he was doing; this was definitely a cold boot.
The first thing I noticed was that the Macbook's EFI loaded instantly, whereas my laptop's BIOS took about 4 seconds. This I kind of expected.
However, I did not expect OSX to finish loading everything and go straight to the desktop while Arch was still running uevents.
What's up with this? Previously I've never seen OSX boot faster than any form of Linux. I did notice that my Mac-loving aquaintance carefully closed all his applications before shutting down; does the current version save everything in RAM to swap on a normal shutdown, instead of having a separate hibernation function?
The only other explanation I can think of is simply that his Macbook is a better machine; it came with 1 GB of RAM, so I wouldn't be surprised if it also has a SATA-300 hard drive.
Offline
There is no trick. Cold boot is cold boot. New Intel Macs boot pretty fast, but there is always something faster and there is always something slower, so, don't bang your head on useless things…
Edit: What would be more interesting is to install Arch on a Macbook and then compare booting time between OS X on a Mac and Arch on a Mac. But that would also be completely pointless, it's comparing apples and oranges. Besides, benchmarks are stupid and most of the time useless.
Last edited by sime (2007-12-18 22:23:57)
Offline
Did a cold boot, and from the moment I hit the powerbutton until I was able to log in it took around 38 sec, not using a dm. But on the other hand I have 4 partions to load (5 including swap).
Offline
I triple boot arch, vista and hacked OSX for PC (aka OSX86), I never timed it but OSX boots faster than vista and arch. With OSX After Grub menu you blink once or twice voila you are inside OSX.
Offline
Interesting. I wonder how they do that.
FWIW, do Ubuntu and other distros using more parallelized init mechanisms boot in comparable times?
Offline
There is no trick. Cold boot is cold boot. New Intel Macs boot pretty fast, but there is always something faster and there is always something slower, so, don't bang your head on useless things…
Don't worry, I wasted no time banging my head; I rarely do a cold boot.
What made me bang my head was when Mac-head started poking fun at my "slow" password prompt, and I had to explain to him why not having a password is stupid... You know the drill. "But I'm using a Mac, I can't get viruses! Whine, whine, whine, etc."
Offline
What made me bang my head was when Mac-head started poking fun at my "slow" password prompt, and I had to explain to him why not having a password is stupid... You know the drill. "But I'm using a Mac, I can't get viruses! Whine, whine, whine, etc."
He also has a password. It's just that the default setup is to auto boot to the selected default user account. It can easily be disabled, then he would also be prompted for a password on startup. OS X is basically a BSD (taking large chunks of FreeBSD code) with Nextstep heritage. It just has some nice things to it like their own controlled hardware architecture (utilizing EFI also helps) and because of it everything just works seamlessly… Also, they bolted their own custom Aqua surface on top instead of X (but having said that, you can also run X apps if you like).
Last edited by sime (2007-12-18 23:19:41)
Offline
Damn..and i thought i had a fast-booting computer. Ubuntu? Such pre-packaged distros can never boot less than 30secs because one size fits all. But then again, OS X is also one size fits all. OH NO PWNED!
I need real, proper pen and paper for this.
Offline
I suspect that jedi mind tricks were involved... *shifty eyes*
Offline
Damn..and i thought i had a fast-booting computer. Ubuntu? Such pre-packaged distros can never boot less than 30secs because one size fits all. But then again, OS X is also one size fits all. OH NO PWNED!
Ubuntu boots fast, I didn't time a cold boot on Ubuntu, but it's around 30-40secs.
Anyway I don't scratch my head for waiting some few seconds more, as long as my system runs fine, and I don't need to reboot if I don't want to ![]()
Offline
he "cheated"
OS X do not really poweroff completely unless you remove battery so he was booting system from RAM.
remove battery and try again.
I would not compare RAM suspend between linux OS X and windows: OS X is fastest, linux is always trailing behind.
fastest boot i experienced was FBSD (10s), fastest XP boot I experienced was 11s, fastest Arch 21s (all count from boot menu), I have seen Arch booting in 14s, Vista boots in 20s. POST will take different time depending on BIOS
If he can do 5s (which i doubt), then it is really fast
Last edited by broch (2007-12-19 14:34:42)
Offline
If you shut down your Mac, it's off. Completely. The other thing is sleep. If you put it to sleep, it comes on almost instantly. But shut down is a shut down. When you physically power it on, you hear chime and then there is a white-ish background with a spinner indicating booting.
According to you, there is no way to shut down a Mac laptop other then removing the battery?
Offline
after some tweaking my hp compaq nx6325 notebook needs 40 seconds until kdm and 5 more seconds for fluxbox.
8 seconds are needed by udev, but i don't think i can speed this one up.
xdm might be faster than kdm, so i will try this in the future.
And there are a few services that i don't really need to be loaded at start up.
But i think with all optimizations i still need at least 30 seconds for the system to boot up (xdm and fluxbox included).
Any tipps how to speed my system (especially udev) up are welcome ![]()
Offline
I always tell people this story - I have a sempron machine that boots to Arch x86_64 in about 5-7 seconds to console login.
EDIT: Premature clicking
The moral of the story? It's all hardware
Offline
So, while we're on the subject, how might one improve boot times?
Offline
So, while we're on the subject, how might one improve boot times?
Compile your custom kernel, with all modules built-in, you could also because of this completely disable the initrd. Load daemons in parallell (@daemon in rc.conf), don't use module autoloading in rc.conf, but specify them by hand (unless you have them compiled in), don't use DHCP, use the lightest X manager (xdm, kdm, gdm, slim etc)... hm, what else can be done?
Oh, don't use reiserfs for partitions (takes time to mount)..
Offline
If you shut down your Mac, it's off. Completely. The other thing is sleep. If you put it to sleep, it comes on almost instantly. But shut down is a shut down. When you physically power it on, you hear chime and then there is a white-ish background with a spinner indicating booting.
According to you, there is no way to shut down a Mac laptop other then removing the battery?
no, but OS X defaults to suspend. Apple has the best power management system. If you turn it off, it goes to suspend to RAM, If battery is going to drain out it automatically switches to suspend to disk preserving all the data (maybe sometime in the far far future linux will be able to make this work too). In other words, shutting down system puts it in sleep mode. I am not saying that you can't power down OS X completely, but this is not default (no reason for). I have seen OS X on dual core 2GHz laptop really shut down It takes ~40s to boot, so twice as long as it takes on my HP 2.2GHz/54000rpm. Vista on 2.2GHz/5400rpm boots to fully functional system in 20s (more or less = but time to start/use apps). But (as I mentioned above) I have seen Arch booting in the time similar to XP so boot time can be shorter.
The number of partitions does really matter. Size of partitions does matter though, cpu not much but disk access speed, disk rpm so all disk related crap. Finally, if you count POST, then BIOS setup will matter too obviously.
so hardware is one thing, software setup may be another factor.
Offline
I thought you could do that already with suspend2/tuxonice? It will save the image to disk first, then suspend2ram, and if somehow the computer is too stupid and dies without warning then voila thanks to the saved image. This may be how OS X does it too. In fact, it's the only way technically possible. There can be no magic when a computer dies without warning, unless ram and disk can relate for a few secs after shutdown, or maybe sending to non-volatile memory, then upon boot back to ram/disk could achieve it. Think this is it: cat /etc/hibernate/suspend2.conf | grep "## Powerdown"
Wow Linux looks like the slowest..but who gives a rat's arse. I could use the few seconds to think of something worthwhile, like continue my plan of world domination.
Last edited by schivmeister (2007-12-19 22:11:51)
I need real, proper pen and paper for this.
Offline
Skeletor with thwart your plan of world domination! His system already boots faster than yours, argh!
On a more topic-related note, I don't know how fast suspend-to-disk is in Mac OSX or Vista, but TuxOnIce apparently beats XP in that matter (judging from my parents' PC) - and it can preserve caches, I don't think XP does that.
Online
What made me bang my head was when Mac-head started poking fun at my "slow" password prompt, and I had to explain to him why not having a password is stupid... You know the drill. "But I'm using a Mac, I can't get viruses! Whine, whine, whine, etc."
Sorry if this sounds stupid, but needing a password for local logins doesn't add much at all to your security: pop in a livecd and then you can mount and edit away...or you use disk encryption...?
So anyone with much experience can pretty well do anything to your system if they can get their hands on it. And clearly anyone without experience will just be overwhelmed by the interface (if you just use a light wm like dwm or ratpoison or similar things). Of course a stray
rm -fr ~might be an unnerving practical joke. You keep backups... right?
Offline
It will save the image to disk first, then suspend2ram, and if somehow the computer is too stupid and dies without warning then voila thanks to the saved image.
I am not talking about software failure.
OS X is simply smarter: you don't need to save anything, you don't have to do anything extra.
if you suspend OS X to ram and battery drains out, it will go automatically into suspend to disk.
Linux or windows can't do this.
this is very, very nice way of preserving data no matter what. If battery drains out, that is not a software error, OS X can protect against such accidents.
Offline
broch,
in Suspend to Ram Mode everything is turned off except the RAM that contains information on the current session.
If a MacOSX machine runs out of battery it is NOT able to "automatically" change modes, since it would have to reactivate first (which would need even MORE power!).
So the way of archiving this (what you THINK is an automatical change of states) is to copy the RAM onto the swap-partition (for example) and THEN suspend to ram.
When it runs out of battery the ram gets lost. When you boot up again then, the system will see the RAM-Image on the Swap and "boot" it (return from suspend to disk) then.
This LOOKS like it changes states automatically, indeed it's just some sort of backing up the ram to the disk and using this backup for wakeup if necessary.
Offline
I always tell people this story - I have a sempron machine that boots to Arch x86_64 in about 5-7 seconds to console login.
EDIT: Premature clicking
The moral of the story? It's all hardware
You should see my Pentium D desktop.... 5 seconds to post,then 35 seconds of bios. Second or two for grub to load, then finally I can actually consider booting an operating system.
Ouch!
Offline
is there anything to speed up X11 loading per se, i.e. independent of WM/DE? Except for POST/Bios and uevents, that's what takes the most time in my case...
Offline
broch,
in Suspend to Ram Mode everything is turned off except the RAM that contains information on the current session.
If a MacOSX machine runs out of battery it is NOT able to "automatically" change modes, since it would have to reactivate first (which would need even MORE power!).So the way of archiving this (what you THINK is an automatical change of states) is to copy the RAM onto the swap-partition (for example) and THEN suspend to ram.
When it runs out of battery the ram gets lost. When you boot up again then, the system will see the RAM-Image on the Swap and "boot" it (return from suspend to disk) then.
This LOOKS like it changes states automatically, indeed it's just some sort of backing up the ram to the disk and using this backup for wakeup if necessary.
my point is that OS X power management is smart enough to monitor battery state while in suspend to RAM state, if needed OS X can switch automatically from S3 to S4 preserving data without user intervention. Neither windows nor linux can do this.
Got OS X?
try this
suspend to RAM OS X, and leave it until battery drains out. Boot it up, it will wake up from S4 state without data loss.
Try this in linux or windows.
So what you thin that I think is not quite correct.
When OS X is in S3 it can can calculate "time to empty", it switches to S4 when needed.
Offline