Boot Process Visualization
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.
How about, uh, you know, actually loading multiple things at once instead of waiting for some service to take its time to start, therby holding everything else up along the way. That's what the problem seems to be - everything has to load in-line.
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 would be cool if it didn't suck.
I added a '&' to my /etc/rc file.
:-D
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
/* oops I accidentally made a comment, sorry */
http://www-106.ibm.com/developerworks/linux/librar y/l-boot.html?ca=dgr-lnxw82-obg-BootFast
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.
My rights don't need management.
You are supposed to leave them boxes on all of the time, like 99.999 % of the time.
Seems like the Heisenburg priciple might come into play at some point.
Maybe this is a silly question, but why cant the boot process be optimized for "workstation" type usage? That is: get a usable X login prompt up as soon as possible.
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.
For me, the user-space initialization is relatively fast. What is a pain is the kernel init time as it waits to hear what SCSI devices exist (including the boot drive). And this is after the BIOS has done the exact same thing.
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?)
Serious answer on funny comment: actually it's a very high initial spike with a gradual decay. See the hourly usage stats generated for a slashdoted April's Fool site. Note that this site is specifically designed to withstand the slashdot effect by using light graphics, no database and very simple scripting. Server load was low.
This is your sig. There are thousands more, but this one is yours.
I think sometimes people mistakenly equate the sooner they see the desktop as faster boot times -- this is not really true. Win2k, XP as well as Mac OS X tries to bring up the GUI as soon as all of the components necessary to bring it up are there -- thus in the user's perception, the startup time is shorter. That is why these OSes' performance is some what degraded when GUI first comes up -- because the OS is trying to finish loading all of the remaining services in the background.
Seems like a good and fairly straightforward plan... So much so that it's a wonder that nobody has tried to implement it yet :?
Treehugger? Treehugger... Treehugger!
For Windows, use BootVis. Comes very handy to figure out what driver is pausing the boot process for 5 minutes...
For bonus points, explain why Microsoft pulled it from its website.
Would it add to the overhead of loading services to have a WAIT/NOWAIT tag on the init files. For example, my current rc structure is:
/etc/rcX.d/S00SomeInit where 00 is a number that defines the order of startup services, and X is the runlevel.
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
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.
Napster-to-go says "Fill and refill your compatible MP3 player", which is a lie. It's not MP3. It's WMA with DRM.
Here some articles regarding booting Linux faster: Boot Linux faster and Reboot Linux faster using kexec Enjoy! ;)
You know, computers should default to sleep mode instead of turning off completely. The operating system should be able to handle this gracefully.
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.
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.
There is a theory (urban myth) that the extra power used during a boot outweighs any savings. If someone can disprove that then I will persuade more work mates to follow my action.
You don't need a chart, just a quick calculation. According to this 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.
0 1 - just my two bits
Well, I reboot my system fairy often. It is a laptop, and it goes on numerous car trips -- and shutting the lid, taking it out into -10 C and below while running is rather stupid.
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)
-- RJ
... Or lack thereof in the case of some various linux and other *nix boot processess. The first step in booting faster is to actually know for sure which things depend on which other things. The ancient simplistic approach was linear ordering (The "runlevels" are a higher-order linear ordering, and then within each runlevel the services were also number sequentially). If a linear ordered list is all you've got, then you're gauranteed to be doing a worst-case serial execution of all the startup tasks, which sucks.
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.
11*43+456^2
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.
No. RC_PARALLEL_STARTUP is not very parallel. At any given time, there is only one task running or two tasks and a busy wait. I have written a trully parallel startup patch for gentoo. Go here for the patch
You can see the charts that I created comparing RC_PARALLEL_STARTUP to my parallel startup here in comment #19. You can find there other things I have done to improve gentoo boot time. and an ebuild for bootchart.
Oh, man! I had a friend who, years ago, had written a special ROM for a dot-matrix printer to play a Bach four-part fugue by assigning the appropriate frequencies to the the head movements, paper feed mechanisms, and dot-matrix hammers. It was really cool!