Slashdot is powered by your submissions, so send in your scoop


Forgot your password?
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:
  • IIS? (Score:5, Funny)

    by swordboy ( 472941 ) on Wednesday December 15, 2004 @02:52PM (#11094978) Journal
    No comments and your IIS web server is down. Nice.
  • Mirror? (Score:4, Funny)

    by kmmatthews ( 779425 ) * <> on Wednesday December 15, 2004 @02:52PM (#11094980) Homepage Journal
    Anyone have a mirror? That was the fastest slashdotting ever, .. 0 comments and his IIS server died.

    OTOH, it *is* IIS, it could die if you blink at it the wrong way. :)

  • by Doc Ruby ( 173196 ) on Wednesday December 15, 2004 @02:53PM (#11094990) Homepage Journal
    I want similar charts of telemetry of a server as it goes down, like the forensics of a Slashdotting. Today's front-page feature should give zigam plenty of data to experiment with ;).
  • 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).
    • Re:For starters.. (Score:2, Informative)

      by kfg ( 145172 )
      I'd like to see other distros do what Red Hat is doing to Fedora's boot screen: Using X resolutions for the startup.

      The desktop oriented distros have been doing that since before Fedora existed.

      • 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.
    • Even SCO OpenServer did this. In addition to the S and K scrtipts there were P scripts. P40server would be called from the rc.d script as:

      P40server &

      You would start init scripts with a P (I guess for pthreaded?) if it didn't have anything that depends on it starting.

    • Re:For starters.. (Score:5, Insightful)

      by kmmatthews ( 779425 ) * <> on Wednesday December 15, 2004 @03:03PM (#11095147) Homepage Journal
      On the other hand, Unix wasn't really intended to be booted every day, e.g. the way XP is*. (MS intentionally made sure the boot up was very fast, running things side by side and some other tricks.)

      (* IMHO.. If I'm wrong.. I'm sure you'll let me know..)

      • My XP machine gets roughle one reboot a week. Still a far cry from the months of uptime expected from *nix though.
        • far cry from the months of uptime expected from *nix

          Didn't mean to intone that XP has to be rebooted often, just that it's very optimized for booting - as many people turn thier computers on and off as they start and finish using them.

      • Re:For starters.. (Score:3, Interesting)

        by renoX ( 11677 )
        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 :-( :-(
    • Re:For starters.. (Score:5, Informative)

      by wizbit ( 122290 ) on Wednesday December 15, 2004 @03:03PM (#11095157)
      Try reading David Zeuthen's analysis [] of the FC boot process (with charts) over on the fedora archives. Very interesting - among other things, nearly 200 MB of files(!) are buffered while starting GNOME - quite a footprint - and apparently by putting those files on a separate (non-fragged) partition he sped process by nearly 30 seconds and reports OOo and Firefox start times of around 3 seconds.
      • Re:For starters.. (Score:3, Insightful)

        by Erik Hensema ( 12898 )

        200 MB is peanuts for modern disks. Takes them about five seconds to read it sequentially.

        However, a *lot* of time is wasted doing disk seeks while booting. A few things can be done to stop wasting that time:

        • Do parallel loads of daemons. While daemon1 is loaded from disk, daemon2 is run. However, this could also cause extra seeks so this could be sub-optimal
        • Make a 'recorder' for the seeks done during boot and then defragment the disk to minimize disk seeks. This acually is what Windows XP does AFAIK.
    • Unfortunately, I didn't save the link, but some clever lunatic rewrote his initscripts into makefiles (!) actually working out what depended on what and running all sorts of stuff in parallel - the kernal just launched "make boot" instead of initd. It made quite a bit of difference, IIRC.
  • by Anonymous Coward
    This is all fine and good, but what we really need is kernel boot music, a theme song if you will. Imagine a harmoniously syncronized beowulf cluster.....
  • by cmpkilla ( 47878 ) <cp1134 AT nullcell DOT net> on Wednesday December 15, 2004 @02:55PM (#11095019)
    Bah! Here's an ascii visualization of your webserver:

    (X_X) <--- Dead in the water
  • heh (Score:5, Funny)

    by minus_273 ( 174041 ) <> on Wednesday December 15, 2004 @02:56PM (#11095033) Journal
    in case it is slashdotted here is a mirror of the chart.

    Linux ===============
    BSD ========
    • Re:heh (Score:3, Funny)

      by Ingolfke ( 515826 )
      The graphic you were looking at did not download completely before the server went AWOL. The complete graphic looked like this.

      Linux ===============
      BSD ========(died)
  • by rogabean ( 741411 ) on Wednesday December 15, 2004 @02:57PM (#11095041)
    "The time needed to boot desktop Linux systems is becoming an issue."

    You mean I'm not supposed to have time to make coffee?

    bad joke, but yeah the boot time is getting pretty bad these days on out of the box distros.
    • by Zorilla ( 791636 ) on Wednesday December 15, 2004 @03:03PM (#11095146)
      Reminds me of an old Gateway 2000 commercial where a kid is waiting for a computer to start up. It goes through a montage of the kid screwing around in the garage waiting for it.

      "No, Mom! It's still starting!"

      One of my friends had a theory that held true (up until Windows XP) that Windows (and MacOS at the time, this was 1995) was harmonically tuned to boot up just as long as it would take you to get up and take a piss and come back.

      Though some of the Windows 2000 machines here at work make me think I have enough time to take a dump and come back. They're fast, just something is very wrong with them.
      • Symantec Antivirus.
      • For reference, my Shuttle XPC with an Athlon64 3500+ (1GB Ram, 7200rpm SATA HD) hot-boots windows XP in 17 seconds flat. a cold boot takes 1 second extra

        My mac G5 (dual 1.8GHz) boot a little slower (25secs) but after boot, remains at 0%, whereas the shuttle keeps humming and buzzing for about a minute (while it is 100% responsive though)
  • 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
    • whoa, that sounded like a 15 y/o wrote that (no offense to 15 y/o's). I meant that some people have said that some services might require others to start correctly.

      As an example I am running dhcp, and apache, yet both services start correctly even though the interfaces are still in the process of coming online. This has smoothed things out greatly for me (ymmv).

      FWIW I'm running Mandrake.
    • Does that really work, or is this just a troll?
      • nope it really works...all my services start up at the same time now.
      • 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 apac
      • by Zocalo ( 252965 ) on Wednesday December 15, 2004 @03:24PM (#11095468) Homepage
        The correct answer is that it works, but... As the original poster noted there are some dependencies within in the plethora of Linux daemons, and YMMV. For instance some SMTP and HTTP configurations require that DNS is available, so if you are also running your own DNS one the same box then you might have a problem. Realistically of course this scenario *should* mean we are talking about home servers only, but there are some really crappy (V)ISPs out there...

        Still, it's a nice thing to experiment with for people who run Linux in situations where reboots are common, laptops for instance. It's also useful if you are running something like Nessus as a daemon which takes an *age* to initialise itself and obviously has no dependencies. A better solution would be to have an additional prefix on certain init scripts - "P" for "parallel" - to tell INIT that they can safely be started in the background, something that a couple of commercial Unicies do.

    • Gentoo's startup scripts that reside in /etc/init.d explicitly list dependencies. I wonder if there would be any headaches using your trick for that distro? I can't see how. I'll have to try it out.
      • be easy enough to use a touch file somewhere that other processes could use to check to see if something they depend on is up and running properly yet. If it isn't there, sleep for a second or two and check again...
      • SuSE has had this parallel startup for some time, using the listed dependencies.
        It is usually the first thing I turn off after an install, but someone caring about startup time will love it.
    • by macdaddy ( 38372 ) * on Wednesday December 15, 2004 @03:15PM (#11095357) Homepage Journal
      I can think of a number of examples where this would fail but on the average desktop I don't think this would be much of a problem. Servers on the otherhand have to have certain processes started for others to start correctly. MIMEDefang and Sendmail for example. Sendmail and OpenLDAP. PgSQL and OpenLDAP. All the various NFS goodies and any server processes that require something off one of the NFS-mounted volumes. Still I can think of dozens that can and should be started in parallel. I can't think of any ill-effects of starting a number of processes that come to mind in simultaneously. I'll have to give that a try sometime. Maybe the init process should have a Next Generation version that allows you to specify what is absolutely required by a process to start correctly. init-ng can then decide what it can start in parallel based on that. Sounds like a project to me. :-)
  • Who reboots? (Score:2, Insightful)

    I reboot every 497 days.
    • laptop users... (Score:3, Insightful)

      by Drantin ( 569921 )
      until hibernate features work correctly anyway... and when X locks up and doesn't let you ctrl+alt+f# to another vterm/tty (only had that happen a few times, but it does happen) and you don't have another computer handy to ssh in and fix it...
      and if you have a loud computer near the bed...
    • The last time my XP machine needed a reboot was when I had to apply a Window update that required a restart. Now that I think about it, that's really the only time I ever need a reboot - an update or an install.

      I dual boot at home, so I rarely leave it on long enough to see any comparisons between Linux, Win2k and XP.
  • by earthforce_1 ( 454968 ) <earthforce_1@[ ] ['yah' in gap]> on Wednesday December 15, 2004 @03:00PM (#11095105) Journal 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.
    • 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.
      • That's why (Score:4, Informative)

        by gr8_phk ( 621180 ) on Wednesday December 15, 2004 @05:18PM (#11096933)
        So THATs why XP boots so fast....

        As an embedded programmer, I've got to get many startup diagnostics and initializations done in the shortest time possible (under 1 second usually) - otherwise you'd be waiting for your car to boot every time you turn on the key. Everything in parallel that can be. Dependancies are mapped out and a static start sequence is defined. Linux has a more variable set of things to do, so I'd expect a more flexible implementation. This shocks me that there is NO implementation.

        It doesn't matter what MS does, every application wants load at boot time so it will respond quicker later - this just kills my boot time. Yah, a whole tray full of crap starts and I sometimes use one of those things.

  • Why boot? (Score:2, Interesting)

    by xv4n ( 639231 )
    You are supposed to leave them boxes on all of the time, like 99.999 % of the time.
  • I had some really witty comments all made up and ready to go, but since the site is down people might suspect I didn't read the article....
  • in a chart or a movie, so we can see the change vs. time.

    The scientific importance of this research is that it is a tool to understand DDOS. In case you need something more serious funny.

  • Quick Link (Score:5, Informative)

    by Roofus ( 15591 ) on Wednesday December 15, 2004 @03:05PM (#11095185) Homepage
    Here's an example image for you to ogle:
  • 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?)
  • by Anonymous Coward
    The problem with Linux's boot process is that things have to load sequentially using the System V init program. They are given a number and then the init program loads them in that order.

    A much better solution would be to say that for each service that needs to be started which services must be started before it and to provide a priority for each service. The boot loader could then use this information to start processes in parallel giving priorities as needed. This would avoid the need to load everything
    • Seems like a good and fairly straightforward plan... So much so that it's a wonder that nobody has tried to implement it yet :?
    • A much better solution would be to say that for each service that needs to be started which services must be started before it and to provide a priority for each service. The boot loader could then use this information to start processes in parallel giving priorities as needed.

      "Make" can already do this in parallel, and is an appropriate tool for specifying dependencies. It would be a simple matter to use it as the primary boot manager rather than shell scripts.
  • When people "scratch an itch", useful things happen.
  • Google caches of:
    Main page []
    Samples page []
  • If you search around in the Google Cache [], you can find a link to a Mandrake Wiki [] that has several [] bootchart [] images [].

    - Tash
  • Partial mirror (Score:2, Informative)

    by markclong ( 575822 )
    I've mirrored some of the site here: l []

    If you have the whole site email it to me and I'll host it.
  • Windows tool (Score:4, Interesting)

    by ilyag ( 572316 ) on Wednesday December 15, 2004 @03:25PM (#11095473)
    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.
  • by EdMcMan ( 70171 ) <> on Wednesday December 15, 2004 @03:25PM (#11095476) Homepage Journal
    The first two comments in a row I read were saying how "My linux never crashes, I never reboot, etc etc". That's great. You have to keep in mind that the average /. reader is not the average computer user!

    Most people turn off their computer when they are not using it, and actually turn it on when they need it. For the average computer user, boot times mean quite a bit more since they see it more. Don't be ignorant and think that just because it means little to you, it is unimportant to improve.
    • That, and plus:

      1) Not only newbies, but experienced computer users will shut down their computers when not in use to save power. Computers aren't the most expensive thing in the world, but if I could save $5 a month by keeping it off, I'd be stupid not to. I love Windows XP's Hibernate function for this exact reason.

      2) Laptops. Even people who keep their desktop on all the time will most likely reboot their laptops a lot more often. Maybe they swapped out batteries, or maybe their battery can't keep t
  • 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:

    So it allows whatever is in S10+NOWAITFILE to load without blocking, but S11-WAITFILE will block S12SOMETHING until loaded, etc etc
  • by OmegaBlac ( 752432 ) on Wednesday December 15, 2004 @03:48PM (#11095793)
    Here some articles regarding booting Linux faster: Boot Linux faster [] and Reboot Linux faster using kexec [] Enjoy! ;)
  • by l4m3z0r ( 799504 ) <> on Wednesday December 15, 2004 @03:49PM (#11095808)
    Last time i rebooted my linux machine was 25 days ago(updated kernel from 2.4.18). Prior to that it had an uptime of 179 days. Not sure I care a whole lot about boot speed since i do it so infrequently. And honestly if your constantly rebooting and starting your linux machine something is wrong. I would however like to see my OS X machine boot faster...
  • Hahahah (Score:5, Funny)

    by Lisandro ( 799651 ) on Wednesday December 15, 2004 @03:58PM (#11095914)
    "Update: 12/15 19:32 GMT by T: An anonymous coward adds this mirrored version of one of the bootcharts."

    Have you actually bothered to check that link? It made me spit my Coke in laughter.
  • 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.

"How many teamsters does it take to screw in a light bulb?" "FIFTEEN!! YOU GOT A PROBLEM WITH THAT?"