You are not logged in.
There are a lot of different things on Mac computers: different BIOS, different OS, a good selection of hardware. I guess they put everything to work together to do some nifty tricks like the suspend2ram and suspend2disk to minimize "boot" time.
Last edited by freakcode (2007-12-20 14:53:25)
Offline
I buy that "default action for a Mac is sleep" since that's what the ipods do. If you turn off your ipod and leave it for a week, the battery will drain
Offline
From here
Mac OS X uses a boot-time optimization (effectively a smart read-ahead) that monitors the pattern of incoming read requests to a block device (the boot disk), and sorts the pattern into a "playlist", which is used to cluster reads into a private cache. This "boot cache" is then used for satisfying incoming read requests, if possible. The scheme also measures the cache hit rate, and stores the request pattern into a "history list" for being adaptive in future. If the hit rate is too low, the caching is disabled.
The loadable (sorted) read pattern is stored in /var/db/BootCache.playlist. Once this pattern is loaded, the cache comes into effect. The entire process is invisible from users.
This feature is only supported on the root device. Further, it requires at least 128 MB of physical RAM before it is enabled (automatically).
Linux can do it too:
There are more implementations around, but these are the two i could remember on the fly.
I wonder how hard it could be to have these prefetch stuff in arch (fs-fcache is no more maintained), i tried the patches and stuff some time ago, but failed with the startup scripts...
want a modular and tweaked KDE for arch? try kdemod
Offline
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 thissuspend 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.
searched enough?
http://suspend.sourceforge.net/intro.shtml
if you don't have enough time because your macbook is booting up simply too fast, you can read directly the paragraph s2both ![]()
however, gnu/linux needs further improvement in these things, agreed. booting time to me isn't a real problem, it really makes the difference only when a machine needs continuous boots. with an uptime of various hours, (or days, as i seen and experienced on my home server), who cares about 10 seconds more?
Offline
If you put OSX in suspend-to-ram mode, it first turnoff the display and save the RAM to your harddisk like in suspend to disk. Then it goes really into suspend to ram. If your battery runs low here, it will boot using the suspend to disk file on the harddisk.
Offline
broch wrote: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 thissuspend 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.searched enough?
http://suspend.sourceforge.net/intro.shtmlif you don't have enough time because your macbook is booting up simply too fast, you can read directly the paragraph s2both
however, gnu/linux needs further improvement in these things, agreed. booting time to me isn't a real problem, it really makes the difference only when a machine needs continuous boots. with an uptime of various hours, (or days, as i seen and experienced on my home server), who cares about 10 seconds more?
well I have not seen linux waking up as fast as other OSes from suspend to RAM for whatever reason.
While OS X is not (my experience) faster than linux when cold boot, it is fastest when waking up from S3.
On the other hand if linux needs 20s to start from S3 it is as long as doing cold boot.
Offline
WTF..I did a cold boot on my sibling's macbook, and it seemed like less than half a min! I then took a stopwatch, it read 43 seconds when I clicked on GarageBand. Beyond 30s indeed, but that is still amazing considering boot alone on my significantly-optimized Arch system takes 30, almost same hardware (Core Duo, 1.6-1.8GHz, 5400RPM HDD).
Possible culprits are the BIOS and DE startup. The loading of a login manager adds 4 seconds. Typing and finally entering adds 2 seconds. Nah. We should all go EFI!
Shutdown is 5s for me, sometimes only 3s. Stupid HAL. Recovering from & going suspend2ram, 3-4s. Suspend2disk, 4 secs atleast. Btw, i have tried the hybrid thing above. It works, and it ain't magic.
Last edited by schivmeister (2007-12-22 21:23:47)
I need real, proper pen and paper for this.
Offline
I would also say, that the problem lies with the slow loading of almost every BIOS out there. The BIOS is one of the factors slowing down the computers bigtime, so I am looking forward to trying out LinuxBIOS or the like anytime soon. It might magically boost the performance of a Linux-based system - and especially decrease startup times, be it cold-booting or resuming.
celestary
Intel Core2Duo E6300 @ 1.86 GHz
kernel26
KDEmod current repository
Offline
Got OS X?
try thissuspend 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.
On Linux, you can have the computer S4 suspend to swap, but instead of turning off -- do a S3 suspend. So then if battery runs out, the computer will S4 resume, if it doesnt, it will S3 resume.
Offline
wow, i don't know what any of this stuff means for the most part. but i do know, that i haven't rebooted my system since i installed arch. at least my desktop. my laptop is a different story, i haven't timed it. but its fast enough for me, way faster than vista, at least if vista is set for power saving, it really hangs on startup, part of why i got rid of it.
though now i'm interested in finding an iso for the x86 mac os to try on one of my systems, couldn't find a download though, unless someone PM's me one? ill stop with that here though
linux bios looks interesting. thats one thing that came to mind, is that unless a bios it really catered to a specific machine, its hard for it to post fast, not like a generic phoenix or ami bios that has to scan its hardware every post
this is a signature
Offline
broch wrote:Got OS X?
try thissuspend 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.On Linux, you can have the computer S4 suspend to swap, but instead of turning off -- do a S3 suspend. So then if battery runs out, the computer will S4 resume, if it doesnt, it will S3 resume.
with nvidia drivers Arch (not only) boots from S3 to black screen.
how can I mix S4 with S3?
sounds interesting.
Linux BIOS is supported only by few mobos currently, so even if it sounds interesting it is not viable option
Offline
When OS X is in S3 it can can calculate "time to empty", it switches to S4 when needed.
no, it doesn't, it just does S3 and S4 at the same time, and then picks up from the fastest one avalaible.
On other hand, I make boot faster by putting gdm quite ahead in the daemons array, I just load network, dbus and hald, and then gdm, after that, I let boot samba, alsa restore, ssh, mpd, avahi and all the shit.
(I forgot: I also load ksyslog and fam and portmap before gdm, but that's about it, I even load cups and cron after gdm)
Last edited by Phrodo_00 (2007-12-24 00:55:40)
Offline
Hmm.. considering the time, money and other resources put in mac's and their own OS X, I'd say it's quite fair they're doing their boots a few secs faster than us with linuxes
But I doubt if OS X would still be faster if there was, say a macbook optimized linux distro developed with the same (HUGE) resources? After reading through these posts, it seems to me there sure are linux software around which only need a little more work to be as good as, or even better than whatever the thing is you envy of OS X.
Offline
I run Arch on a MacBook and dual-boot and can confirm that OSX boots significantly faster. Probably about twice as fast. It is very tempting to use just that, since the app I use most is Firefox.
However, whenever I do LAMP programming I'm glad I stuck with Linux.
Offline
I think why OS X launches so quickly is because they replaced their init system in 10.4 (tiger) with launchd. Launchd only starts services when they're actually needed, so when you get the login prompt or whatever very little software is running.
launchd is open source and someone managed to port it to FreeBSD, but it's under a crappy license (APSL)
Running: Arch Linux i686, x86_64, ppc
Offline
So, while we're on the subject, how might one improve boot times?
Maybe slightly off-topic, but in my experience disk I/O is everyting.
A year ago I bought a new laptop (C2D T5600, 5400RPM HDD, 2GB RAM etc). Prior to that, I primarily ran Arch on a desktop PC (Thunderbird 1400, 2 x 7200RPM HDD raid-0, 512MB RAM). To my surprise, my desktop booted Arch way faster than my laptop did. And trust me, a C2D is WAY faster than a good ol' Thunderbird. Because after I booted, things were going much faster on my laptop than they did on my desktop (in general, since loading apps also seems to be I/O related, but CPU also seems to be important).
Offline
phrakture wrote: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.
On my Media Center I even have some stupid "Raid Utility" which takes 10 secs for nothing (and that thing is broken anyway)..
That's really pointless. On my normal Desktop (Core2Duo) Arch needs about a minute, but I never made tweaks, but on the other side, I don't use many daemons etc.
GNOME also takes its time then, greeting is not as nice as on the other iMac, cause the display refreshes before GNOME finally shows up...
Offline
I run Arch on a MacBook and dual-boot and can confirm that OSX boots significantly faster. Probably about twice as fast. It is very tempting to use just that, since the app I use most is Firefox.
However, whenever I do LAMP programming I'm glad I stuck with Linux.
Hmm... I have Arch on a Macbook as well and it boots faster than 10.4.
Offline
I must admit that recent Arch/kernel is booting slower than some time ago:
Arch/kde//2.6.21 -> boot time 21s
Arch/kde/2.6.24 -> boot time 25s
4s is not a big deal but is shows some recent tendency (also noticed several times in other threads).
Offline
More modules, bigger kernel I suppose. New versions of software will be bigger anyway, no doubt.
I need real, proper pen and paper for this.
Offline
schivmeister wrote: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.
Ubuntu x86_64 on my C2D E6300 boots in 37 seconds (from when I choose it from Grub). Arch 64 boots in 30 seconds. For some reason Arch is by far the fastest to shut down though...
Offline
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.
Same on my Pentium D, actually. Going through the BIOS takes longer than booting Arch itself, which takes 28 seconds to get to the GDM screen and 56 seconds to have the desktop fully loaded and running. (Custom kernel with: DAEMONS=(syslog-ng gdm network crond alsa hal @x11vnc @sshd @privoxy @stbd) )
- "Cryptographically secure linear feedback based shift registers" -- a phrase that'll get any party started.
- My AUR packages.
- I use i3 on my i7.
Offline
28 secs to boot Arch from Grub to KDM.
charlie dont surf!
Offline
28 secs to boot Arch from Grub to KDM.
useless things can be fun...
28 seconds from grub to desktop
(kdm (eye-candy takes it's time) -> openbox-desktop) but i need about 30 seconds until grub comes up : ((dual boot with xp) so for me the bios is slowing down my boot time.
amd x2 4600@2600 on asrock 939nf4g-sata2-board.
Last edited by koch (2008-03-08 02:48:38)
Offline
kexec -l /boot/vmlinuz26uber /boot/kernel26uber.img -append="root=/dev/sdw9 ro vga=911"Well, something like that.
I need real, proper pen and paper for this.
Offline