Boot Process Visualization 536
zigam writes "The time needed to boot desktop Linux systems is becoming an issue. That's why I recently took the challenge posted by Red Hat's Owen Taylor on the Fedora developers list and came up with a tool for visualization of the boot process. It collects performance data during the boot up and then renders an SVG or PNG performance chart. It immediately helped Red Hat developers solve some issues and I have since received boot charts from other GNU/Linux developers as well. Solaris kernel developers reported success in improving their boot process too." Update: 12/15 20:04 GMT by T : Sorry, someone decided your time was worth wasting; no more mirrored bootchart.
For starters.. (Score:4, Interesting)
On another note, I'd like to see other distros do what Red Hat is doing to Fedora's boot screen: Using X resolutions for the startup. Damn, that looks nice! Thought it would be even nicer if the pointless resolution change between bootup and main X server startup was eliminated (it's usually the same res anyway).
it's easy to speed up boot (Score:5, Interesting)
like so:
$i start&
I have been berated a coupdl times in online forum because 'some services might need it to start properly', but I have never noticed any ill effects. My machines now boots in about 6 seconds
Tried with the IBM enhancements? (Score:5, Interesting)
IBM has published a paper on speeding up the boot process using something like a make to launch things in parallel that are not dependent on each other.
Why boot? (Score:2, Interesting)
Why write something like this in Java? (Score:1, Interesting)
server vs workstation (Score:5, Interesting)
On my machine, a bunch of random (but useful) things are fired up sequentially, before the prompt appears. Some things are used rarely/not at all, but they're still started. I dont want to disable them, but I dont want to wait for them either. Apache. MySQL. Privoxy.
Why doesnt inetd start all these things? Apache would get started on first use. Likewise with the other services -- I pay for the startup (once) when I want to use them.
On a server, it'll be up for forever so starting everything on boot makes sense. For a workstation, the system should be usable as fast as possible; the rest of the services can just as well wait until later.
Kernel init time (Score:3, Interesting)
I suppose I should figure out where the timeout value for that is in the kernel and cut it short. (Doesn't Solaris handle that by saving the data unless you tell it that it needs to rescan?)
Re:For starters.. (Score:4, Interesting)
Fedora actually reads your xorg.conf and utilizes the X video driver being used by your system and runs at the same resolution and refresh rate. It looks really slick if you ask me.
Re:it's easy to speed up boot (Score:3, Interesting)
One thing that may cause problems is that when the login prompt comes up some services aare still initializing so you may have to wait a bit before accessing any of the servers, for instance your http://localhost for apache/mysql based homepages and such... you may also still have alsa loading up back there if you're using a 2.4 kernel or not using the one in the 2.6 kernel so sound won't work for a few minutes (or it may try to turn up the volume before alsa starts...)
There are a multitude of things that *can* go wrong with this, but if you just do it for things that have no other dependancies just waiting a few moments before using anything else after logging in you should be OK...
Re:Reboot visualization (Score:4, Interesting)
When is boot time considered shorter? (Score:1, Interesting)
Re:A better boot loader is needed (Score:3, Interesting)
Windows tool (Score:4, Interesting)
For bonus points, explain why Microsoft pulled it from its website.
Why not have a wait tag/flag (Score:3, Interesting)
Now why not just have something like:
S10+NOWAITFILE
S11-WAITFILE
So it allows whatever is in S10+NOWAITFILE to load without blocking, but S11-WAITFILE will block S12SOMETHING until loaded, etc etc
Re:server vs workstation (Score:1, Interesting)
I'm told, often, that winXP "boots so much faster that linux," yet it's my experience that winXP simply pushes the startup thrashing into my login time (if I log on right away - and yes this is on a fresh install). So even though the system "only" takes 15 seconds to boot, I have to wait 2 minutes before the disks settle and the system is really usable.
Re:For starters.. (Score:2, Interesting)
http://www-106.ibm.com/developerworks/linux/libra
Re:Mirror? (Score:3, Interesting)
I've used IIS. I've written ISAPI filters for IIS. We currently use IIS at work. And let me tell you right here and now -- IIS sucks. Voice of experience.
Re:Tried with the IBM enhancements? (Score:5, Interesting)
XP not only boots processes in parallel - it monitors which sectors of the disk are read during bootup, moves them around so they all sit in order in the same place on the disk as a background process, and prefetches the whole damn thing during subsequent bootups.
It also does the same thing for application launches - you start an app, it profiles what is read from disk, reorders it, and prefetches it when you run the app again later.
IBM articles about improving Linux boot time (Score:4, Interesting)
Re:Boot times *are* important (Score:2, Interesting)
Then boot time is a non-issue, and your computer can go from sleep to fully usable in just a few seconds. Plus, with such a system, the users previous 'state' is preserved. Many modern TV's have a 'sleep state', so do stereo systems. It's time computers worked this way too.
I know, Macs already do this. But the PC world needs this too.
Re:it's easy to speed up boot (Score:3, Interesting)
As to "P" - I did have a play around with "/etc/rc" some time back and managed to get things working very easily. It wasn't that tricky really: I just needed to replace (this is from Fedora) "for i in /etc/rc$runlevel.d/S*" with "for i in /etc/rc$runlevel.d/[PS]*" then add an extra "if...else...fi" conditional to add the extra apersand to those init scripts that were safe to start in parallel. However, those natty little coloured status indicators next to each daemon are bit of a problem - I took the easy way out and returned "OK" as soon as I'd run "some_daemon_init &", but ideally you would want to have a proper confirmation that the daemon was up and running.
Personally, I only reboot my Linux boxes once in a blue moon, or after a kernel update (which is pretty much the same thing) so the time saved (maybe a minute, tops) wasn't worth the effort. Plus you can get some "interesting" issues if you ever upgrade your initscripts and forget to restore your personalisations - you have been warned! Currently, I just use the standard non-parallel init scripts with the sole exception of NessusD which I'll parallelise by hacking its specific init script directly, provided that I remember to do so after each upgrade. Speaking of which...
Re:an issue is it??? (Score:3, Interesting)
If you use your system every day, like I do, the wear and tear on the hardware by all the added start cycles will eliminate your cost savings. Have a CPU fan go out and your processor melts, and all of your cost savings go out the window. Since I leave my PC on all the time, on the occasions when I do shut it down and let it cool off, I can always tell. The sounds it makes when it starts from a cold boot are *awful*, and they all go away when the components get warm again. I've had more parts fail on start than at any other time.
As far as power consumption is concerned, an idle PC consumes less energy than your average light bulb. Leave your porch light on at night? Chances are it consumes three times as much energy as your PC left on all night.
And as far as environmentally responsible is concerned...unless you don't own a car, are completely off the power grid, never flush your toilets unless they are full, take sponge baths, and recycle absolutely everything, I'd shut the hell up. All of us could do more to help the environment, but we don't and that's life. I think we all have bigger fish to fry than my 35 watts/hour it takes to keep my PC on all night.
So, in short, if you use your system every day, it *is* smarter to leave it on 24/7 than shut it down. Not to mention convenient.
Re:Boot times *are* important (Score:2, Interesting)
You don't need a chart, just a quick calculation. According to this [techreport.com] a Pentium 4 desktop machine draws around 150 watts just sitting idle. 150 watts times 10 hours idle time equals 1500 watt-hours wasted per day. In order for a two minute boot process to waste 1500 watt-hours, the machine would have to draw 90,000 watts during bootup. (1500W*h * 60min/hr / 2min). Assuming your office in the US (or anywhere else where mains voltage is 120 Volts rms), that would be about a 750 amp current draw (90,000W / 120V) to turn on one computer. Most normal circuits (like you would plug a computer into) are protected by breakers that trip at about 20 amps. The wires in your office walls would melt before you could boot a computer if you tried to pull that much current through them.
Turn the computers off. Whoever pays the electric bill will thank you.
Re:server vs workstation (Score:2, Interesting)
It allows you to "start" while still in the process of loading things. Depending upon the speeds of certain components in your box, you may or may not notice this. Most of us do, and scratch our heads why.
The boot -> login time is quite low, but "usability" time still quite high; especially on slower boxes that don't do well multi-tasking. It's more or less to present the impression of speed that isn't actually there. If you don't login right away, it looks all that much better.
As Linux is often known for being the poor man's *NIX, I don't see how any type of parallel loading like XP uses would solve anything. High end usually goes with gaming, which (sadly) goes with Windows. Maybe it's just me, though. Like always.
Re:an issue is it??? (Score:2, Interesting)
My laptop and my friends decrepid XP system have similar boot times, but as I utterly dislike windows, I'll cope with the boot times
It WOULD be nice if some programs (cough exim cough) would time out faster or at least allow you to bypass it when there is not an internet connection at the time. Waiting 5 minutes for that to time out is a -real- time waster.
I could definitely use a proggie to show me exactly whats taking so long. Then I might be bothered to go and try to fix the problem (Read: Find someone with a little more computer know-how than me to fix it for me)
Problem is in the dependency model (Score:3, Interesting)
Have a look at Gentoo's init script setup. It actually knows about hard and soft dependencies. It still only fires off one script at a time at the moment, but importantly the system has all the right data in hand to parallelize the process. (Hard dependencies are for instance when then nfsclient script *requires* that the network script is run before it, soft dependencies are things like the apache script saying that *if* the mysql service is enabled, please start it before you start me, but I do not require it if it wasn't enabled explicitly by the admin).
Gentoo would be a great jumping point for parallel ization of startup tasks. The only real issue is screen clutter.... but I think that can be solved (if not terribly elegantly) by line-buffering the startup messages and displaying them serially in whatever order they "complete", resulting in a random line-order on the screen, but nothing stepping on each other's lines.
Re:an issue is it??? (Score:3, Interesting)
It isn't that my computer draws a lot of power -- it's that the rest of my house draws so little.
And my primary motivation is NOT saving money. Yeah, I save a lot on the electric bill, but consider this: I recently plonked down $1252 for a washer/drier (at a hefty discount, retail would have been $2200 but I got a special deal) that averages about 10% of the energy/water usage of a "normal" washer and drier. It'll take me over 8 years to recover that cost in the form of energy savings, but I don't care. I'm interested in saving energy, not money.
My next big project is to install a solar water heater on my roof as a booster for my normal water heater. It's kind of tough this time of year, because I go to work in the dark, and come home in the dark.
Re:Gentoo can do this... (Score:2, Interesting)
You can see the charts that I created comparing RC_PARALLEL_STARTUP to my parallel startup here [gentoo.org] in comment #19. You can find there other things I have done to improve gentoo boot time. and an ebuild for bootchart.
Re:For starters.. (Score:3, Interesting)
So it'd better boot *fast*.
As an aside, those 'fast boot time' makes me laugh: with a Celeron333, on BeOS I was able to boot from BIOS (when the BIOS "starts" the OS) to a usable graphical desktop within less than 20s (14s if memory serves)!
XP boot time while smaller than Linux's one is not especially great as the desktop is not usable at the beginning..
I'd really like to have Linux kernel + KDE (or Gnome) boot under 20s, but I'm not dreaming
Re:What we really need (Score:3, Interesting)