Page 1 of 4 123 ... LastLast
Results 1 to 10 of 53

Thread: Let's boot with Upstart (GDM ready in 15s)

Hybrid View

  1. #1
    Join Date
    Oct 2004
    Location
    Cupertino, CA
    Beans
    5,092
    Distro
    Ubuntu 10.04 Lucid Lynx

    Let's boot with Upstart (GDM ready in 15s)

    I got bored and rewrite my entire system to boot up with Upstart. Yes, I rewrote all jobs, essentially wrapping them to call init scripts individually and tweaking the dependencies correctly.


    Short Statistics:
    Time spent hacking: 5+ hours. Ran into a lot of snags getting udev and filesystem mount ordered correctly, and each time I failed at that it meant needing a livecd!


    The Victim: Me. Err, oh you meant the computer: Macbook Core 2 Duo 2.16, 2GB RAM, running Hardy.

    Enjoyment: Infinite. This kind of nerdy thing keeps me going.

    Stopwatch/Visual statistics:
    I'll get to bootchart in a moment, but bootchart doesn't tell the whole story -- what bootchart calls a bootup time and what the user sees as the bootup time are two entirely different things. These boot times are from a stopwatch from GRUB to login chime:

    Native Upstart: 18s

    SysV Upstart: 30s

    Bootchart Stats:

    Native Upstart: (22s) http://jdong.mit.edu/~jdong/macbook/...rt-upstart.png

    SysV Upstart: (27s) http://jdong.mit.edu/~jdong/macbook/bootchart-sysv.png


    Observations:

    (1) Note how slow my laptop hard drive is. Around 12MB/s is its peak read speeds. If I tried this with a powerful desktop hard drive, the 10 second long "readahead-list" could be shaved to 5 seconds or less.

    (2) Ignore the first 17s of both bootup charts for the time being: Time spent probing modules and slurping readahead cannot be optimized by parallelized startup and are more or less hardware and kernel limitations on bootup speed. Focus on what's after the big blue trapezoid @ 15s: The actual time it took to set up dbus, hal, avahi, GDM, anacron, sysklog, and other system services. It took 5 seconds to do all of that on Upstart while SysV took over 10s. That's effectively doubling the speed at which services are coming up. In addition, notice how Upstart was more consistently able to break the one-core barrier of CPU usage.


    The event.d:
    For educational purposes, here's how I wrote my upstart events: http://jdong.mit.edu/~jdong/event.d.tar.gz

    You're welcome to play with it all you want, but DO IT ON AN EXPERIMENTAL BOX. It's extremely easy for one typo or logic error to result in an unbootable system.


    EDIT

    As a proof-of-concept, I "defragged" (rewrote rapidly) all the files readahead identified as being used at bootup, and got peak IO to around 15MB/s and upstart boot time to 19s by bootchart

    EDIT 2: Youtube video of bootup: (note how rough around the edges it is )
    http://www.youtube.com/watch?v=cY8MWwbESy4

    Bootchart for this bootup: http://jdong.mit.edu/~jdong/macbook/...-defragged.png

    EDIT 3: After some requests I am posting some dependency diagrams of my boot:
    http://jdong.mit.edu/~jdong/macbook/...pstart-dep.png

    For comparison, SysV: http://jdong.mit.edu/~jdong/macbook/...t/sysv-dep.png

    For the most part it fans out massively parallel quite well, which is encouraging news. Now, to optimize the longest chain length....

    You can generate this diagram on your own system by grabbing http://jdong.mit.edu/~jdong/macbook/...rt/depchart.py and http://jdong.mit.edu/~jdong/macbook/...pchart-sysv.py

    They don't come with manuals; figure it out
    Last edited by jdong; March 18th, 2008 at 02:09 AM.

  2. #2
    Join Date
    Feb 2007
    Location
    Tuxland
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Let's boot with Upstart (GDM ready in 15s)

    Wow, if these speed boosts are correct, that is friggen amazing. This needs to be added to Intrepid so badly. I mean like it should be one of the major focuses to get a stable event based bootup up.

  3. #3
    Join Date
    Aug 2005
    Location
    Birmingham, AL
    Beans
    974
    Distro
    Kubuntu

    Re: Let's boot with Upstart (GDM ready in 15s)

    Honestly, I never was interested in this sort of thing. For Windows, maybe, where reboots are common and frequent, shaving time off of booting is important, but I almost never reboot Linux, and if I did, I really don't mind a few extra seconds.

    I guess it's one of those "why not" things, because if it can be faster, you might as well make it faster, but I've just never been too interested.

    Nice results, though.

  4. #4
    Join Date
    Apr 2005
    Location
    Glasgow, Scotland
    Beans
    1,642

    Re: Let's boot with Upstart (GDM ready in 15s)

    Quote Originally Posted by Penguin Power View Post
    John, you need a hobby. One that involves interaction with other humans.
    I'm screwed then.

    Quote Originally Posted by DoktorSeven View Post
    Honestly, I never was interested in this sort of thing. For Windows, maybe, where reboots are common and frequent, shaving time off of booting is important, but I almost never reboot Linux, and if I did, I really don't mind a few extra seconds.
    I've never understood this practice, it's wasteful of electricity.
    A Fedora user

  5. #5
    Join Date
    Apr 2008
    Beans
    73

    Re: Let's boot with Upstart (GDM ready in 15s)

    Quote Originally Posted by bruce89 View Post
    I've never understood this practice, it's wasteful of electricity.
    If you want to save electricity you can sleep or suspend. I keep my linux servers on 24/7 though, since some jobs never end.

  6. #6
    Join Date
    Nov 2005
    Location
    Pune, India
    Beans
    838
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Let's boot with Upstart (GDM ready in 15s)

    Any updates on the same jdong?
    Registered Linux user #468829

    http://flossexperiences.wordpress.com

  7. #7
    Join Date
    Jul 2006
    Location
    Washington, DC
    Beans
    1,678
    Distro
    Kubuntu Development Release

    Re: Let's boot with Upstart (GDM ready in 15s)

    Quote Originally Posted by DoktorSeven View Post
    Honestly, I never was interested in this sort of thing. For Windows, maybe, where reboots are common and frequent, shaving time off of booting is important, but I almost never reboot Linux, and if I did, I really don't mind a few extra seconds.
    laptops.

    LinuxChix | Linux User #432169 | Ubuntu User #8495 | IRC: maco @ irc.linuxchix.org or irc.freenode.net

  8. #8
    Join Date
    Oct 2005
    Location
    Portland, Oregon USA
    Beans
    4,022

    Thumbs up Re: Let's boot with Upstart (GDM ready in 15s)

    Quote Originally Posted by macogw View Post
    laptops.
    Exactly.

  9. #9
    Join Date
    Sep 2007
    Location
    Switzerland
    Beans
    47

    Re: Let's boot with Upstart (GDM ready in 15s)

    Quote Originally Posted by macogw
    laptops
    Only thing that matters with my laptop is hibernate/restore time, I only reboot for real at most once a month.

  10. #10
    Join Date
    Jul 2008
    Location
    Where I am
    Beans
    807
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Let's boot with Upstart (GDM ready in 15s)

    this should be used in jaunty
    .i coi rodo

Page 1 of 4 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •