I did a bit of hacking up of the java scripts for parsing, and the shell scripts for executing, the bootloader analysis work done by the guys over at http://www.klika.si/ziga/bootchart/, the Boot Process Performance Visualisation tool recently developed to help Linux folk tune their system startups for faster performance.
I wondered what Darwin would do; it's got a very unusual boot loader and boot process; startup times are fast, and moreover, a bit odd. :)
And came up with something rather different.
Initial Fedora Core 3 bootchart
Revised FC3 bootchart, post-fixes
Others, for comparison, are over on the bootchart samples page.
So what does a mac look like? Keep in mind that a mac is an unusual beast; I haven't yet been able to hook up all of the stats appropriately in the script, as iostat doesn't report times on the mac (and has a very different set of parameters); while in theory I can get some of this information out of top, it's not necessarily formatted in the same way. All the more reason why Apple should work a whole lot harder at providing decent tools at the base level - there's no excuse for darwin being hapless and hopelessly crippled when it comes to something as basic and universal for performance analysis as iostat.
MacOS X 10.3.7, Darwin (~50 seconds)
(click image to view full size; or just grab the SVG)
A few things worthy of note:
- The system in question is a dual-cpu system; it's an upgraded DP500, with all the joys of 100Mhz ram and slow I/O, with a pair of 1.3GHz G4s sitting on it. This is the digital equivalent of sticking a Ferrari engine in a Pinto; the bus speeds are horrendous, and so I'm not terribly surprised that it's not very CPU-bound; IO stats would help here, as it sure *sounds* IO-bound.
- Login window came up at about 22 seconds into the boot; it's set to auto-login, and so it did.
- Dock and finder spent over 10 seconds loading before login items started kicking off. You can feel the I/O load in the ground under your feet, but you can't see it in the graph; then it kicks off all of my userland processes. Note that lots of processes hadn't yet finished their loading; including SystemStartup, still running in the background, still doing... well... something. Who knows.
- By 50 seconds in, I clicked on the terminal icon, fiddled for about 10-15 seconds, and shut down the monitors at 70 seconds.
There's definitely something unusual about the boot process; IO will help, so I'll continue hacking and see what I can come up with. It's already starting to look/feel awfully different than its Linux counterpart, though I am trying to keep this stuff compatible. Code will go up at some point when I get bored and don't care what my boot process looks like any longer. It'd be nice to see the sleeping/zombie state, as well as everything else that's going on, but the two beasts are very different, methinks, and I may not be able to get at that information, no matter what I do.