Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Operating Systems Software Unix Linux

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.
This discussion has been archived. No new comments can be posted.

Boot Process Visualization

Comments Filter:
  • For starters.. (Score:4, Interesting)

    by Zorilla ( 791636 ) on Wednesday December 15, 2004 @02:54PM (#11095000)
    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).
  • by nocomment ( 239368 ) on Wednesday December 15, 2004 @02:58PM (#11095068) Homepage Journal
    I added a '&' to my /etc/rc file.
    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 :-D
  • by earthforce_1 ( 454968 ) <earthforce_1@y[ ]o.com ['aho' in gap]> on Wednesday December 15, 2004 @03:00PM (#11095105) Journal
    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.
  • Why boot? (Score:2, Interesting)

    by xv4n ( 639231 ) on Wednesday December 15, 2004 @03:00PM (#11095107)
    You are supposed to leave them boxes on all of the time, like 99.999 % of the time.
  • by Anonymous Coward on Wednesday December 15, 2004 @03:05PM (#11095188)
    Seems like the Heisenburg priciple might come into play at some point.
  • by studboy ( 64792 ) on Wednesday December 15, 2004 @03:09PM (#11095240) Homepage
    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.

  • Kernel init time (Score:3, Interesting)

    by crow ( 16139 ) on Wednesday December 15, 2004 @03:10PM (#11095253) Homepage Journal
    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?)
  • Re:For starters.. (Score:4, Interesting)

    by Zorilla ( 791636 ) on Wednesday December 15, 2004 @03:13PM (#11095307)
    Right, but most use the framebuffer kernel extension. That's just a really basic means of getting it done. What you get is a difficult-to-configure screen that's always at 60Hz.

    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.
  • by Drantin ( 569921 ) * on Wednesday December 15, 2004 @03:15PM (#11095352)
    placing an ampersand (&) at the end of a command in a *nix system (maybe it's shell dependant? iono) causes the process to run in the background. If you do this in a tty/vterm you can continue using the same one instead of switching to another (you can also just use screen for that...)
    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...
  • by Erik Hensema ( 12898 ) on Wednesday December 15, 2004 @03:16PM (#11095375) Homepage
    Serious answer on funny comment: actually it's a very high initial spike with a gradual decay. See the hourly usage stats [usenet-audio.com] 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.
  • by Anonymous Coward on Wednesday December 15, 2004 @03:17PM (#11095387)
    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.
  • by MikeCapone ( 693319 ) <skelterhell @ y a hoo.com> on Wednesday December 15, 2004 @03:19PM (#11095405) Homepage Journal
    Seems like a good and fairly straightforward plan... So much so that it's a wonder that nobody has tried to implement it yet :?
  • Windows tool (Score:4, Interesting)

    by ilyag ( 572316 ) on Wednesday December 15, 2004 @03:25PM (#11095473)
    For Windows, use BootVis [majorgeeks.com]. 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.
  • by phorm ( 591458 ) on Wednesday December 15, 2004 @03:31PM (#11095553) Journal
    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
  • by Anonymous Coward on Wednesday December 15, 2004 @03:32PM (#11095574)
    I hate to sound like a troll, but...

    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)

    by tjp ( 264994 ) on Wednesday December 15, 2004 @03:37PM (#11095634)
  • Re:Mirror? (Score:3, Interesting)

    by 1010011010 ( 53039 ) on Wednesday December 15, 2004 @03:40PM (#11095687) Homepage

    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.
  • by dabraun ( 626287 ) on Wednesday December 15, 2004 @03:44PM (#11095745)
    Something like Windows XP has been doing for years?

    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.
  • by OmegaBlac ( 752432 ) on Wednesday December 15, 2004 @03:48PM (#11095793)
    Here some articles regarding booting Linux faster: Boot Linux faster [ibm.com] and Reboot Linux faster using kexec [ibm.com] Enjoy! ;)
  • by merdark ( 550117 ) on Wednesday December 15, 2004 @04:20PM (#11096192)
    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.
  • by Zocalo ( 252965 ) on Wednesday December 15, 2004 @04:28PM (#11096309) Homepage
    The problem that I was alluding to with not having DNS available is down to the initialisation of the daemons. Specifically, when a daemon needs to bind itself to an IP, but that IP address is specified as a hostname in the config file. No DNS, means there is no way of getting an IP, so the daemon fails to initialise properly, if at all. I've actually seen this happen with a *very* popular distro: Apache was started before DNS, and the HTTPS server was configured by name, which caused the daemon to start on port 80 OK, but fail to bind to port 443. Once things are all up and running, then things are much more forgiving of services being restarted, or even totally absent for a limited period of time.

    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)

    by pnuema ( 523776 ) on Wednesday December 15, 2004 @04:35PM (#11096390)
    Yeah. My desire to cut my electric bill in half is "stupid." My desire to increase my energy efficiency is "stupid." Attempting to be environmentally responsible is "stupid." Unless you need your computer to be running 24/7, leaving it on is a tremendous waste of energy, and I think it's unethical. You're an ass.

    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.

  • by Cid Highwind ( 9258 ) on Wednesday December 15, 2004 @04:47PM (#11096538) Homepage
    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 [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.
  • by maskedbishounen ( 772174 ) on Wednesday December 15, 2004 @04:47PM (#11096541)
    Yep. That's exactly what XP does.

    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)

    by Trillian_Angel ( 542729 ) on Wednesday December 15, 2004 @04:56PM (#11096650) Homepage
    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)
  • by photon317 ( 208409 ) on Wednesday December 15, 2004 @05:16PM (#11096900)
    ... 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.
  • Re:an issue is it??? (Score:3, Interesting)

    by pclminion ( 145572 ) on Wednesday December 15, 2004 @05:30PM (#11097061)
    You can cut your power bill in HALF, just by shutting off your workstation. Christ, what are you running, a PDP11?

    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.

  • by paulpach ( 798828 ) on Wednesday December 15, 2004 @05:31PM (#11097075)
    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 [gentoo.org]

    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)

    by renoX ( 11677 ) on Wednesday December 15, 2004 @06:44PM (#11097820)
    Yes, but now Unix is installed on laptops.
    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 :-( :-(
  • by Darren Hiebert ( 626456 ) on Wednesday December 15, 2004 @07:03PM (#11097995) Homepage
    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!

Say "twenty-three-skiddoo" to logout.

Working...