Announcement

Collapse
No announcement yet.

A Two-Second Boot Time With systemd

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    Two seconds... Well, that beats my 30-something second boot. And that's not counting the BIOS and GRUB loading times, which would bring the number close to a minute.

    It would indeed be interesting to see how it works on other distros. How do you get a list of all boot scripts that are active?

    Comment


    • #12
      Originally posted by halfmanhalfamazing View Post
      Um, if my math serves me correctly - your bootup time would be 7 seconds.

      Which is sweet. Much better than what we have today, no?
      Debian stable here: 7.57 sec for init (another 9.5 sec for KDE)
      He has 5.8 sec with systemd
      I remember Gentoo's OpenRC to be in that range too, as long as you use ramfs.

      It's better, but let's keep it realistic.

      2 second init is nice, but it's not the major reason for switching to systemd.

      Comment


      • #13
        Gents, many of the suggestions in the article apply only to appliances and fixed-purpose systems. They do not apply to general purpose computing desktops.

        First Examples:
        1: No LVM
        2: No disk encryption
        3: No SELinux

        These three items need a suitable replacement. Disks should be encrypted. Program execution execution needs some form of sandbox. I don't want to say the author is wrong, I would just like to see alternatives offered. As is, all we have is "Linux boots really fast if you disable all sorts of things and adversely affect the security of your system". The first retort that comes to mind is "Duh".

        4: No syslog and auditing. Saying that the journal "is usually more than sufficient for desktops" is.... a short sighted overstatement.
        5: No cron? I'd really have to see if systemd is a suitable replacement. He 'might' be right that you can replace many cron-instanciated startup executables with systemd. Cron will still need to be used for more advanced scheduling, and it's startup can be delayed until after boot.

        Perhaps the author, in time, will be correct. Unfortunately, we need lighter and faster (starting) alternatives for the first three. A smarter alternative may be to work towards decreasing the startup performance penalty of LVM/Encryption/SELinux.

        F

        Comment


        • #14
          Originally posted by ChrisXY View Post
          But aside from that, starting KDE still takes 5+ seconds, even with an SSD. So what's the point for desktop distributions in extremely fast booting when the desktop environment still takes multiple times the boot times to start up?
          The bootchart in the article shows booting from kernel to complete XFCE desktop in less than two seconds. KDE is bit heavier of course but it could definetly benefit from systemd if the startup script were to be ported to use it. Something like that is probably going to be used in Plasma Active as Mer uses systemd so it might not take that long to come to desktop... or at least I hope so.

          Originally posted by ChrisXY View Post
          2 second init is nice, but it's not the major reason for switching to systemd.
          I would say that nearly instantaneous boot is pretty damn compelling. Of course many of the other systemd features are even more insteresting but still... If Windows 8 is getting ~10s boot then we can do it five times better. Sounds good to me.

          Comment


          • #15
            Originally posted by Teho View Post
            I would say that nearly instantaneous boot is pretty damn compelling.
            It's not a near-instantaneous boot, it's a near-instantaneous init.

            Boot goes like this:

            BIOS
            GRUB/lilo
            Kernel
            init <------ this is the part that was cut down from 7 seconds to 2 seconds
            X initialisation
            KDE/GNOME

            The whole boot process is still much longer than 10 seconds.

            It's still impressive work, but some of the comments here are misleading. This is only a part of the boot process.

            Comment


            • #16
              Originally posted by pingufunkybeat View Post
              It's not a near-instantaneous boot, it's a near-instantaneous init.

              Boot goes like this:

              BIOS
              GRUB/lilo
              Kernel
              init <------ this is the part that was cut down from 7 seconds to 2 seconds
              X initialisation
              KDE/GNOME
              To make this more generic:

              Hardware/firmware init
              Bootloader
              Kernel
              service init
              Display server
              Window Manager.

              For appliances, we can actually combine the first three (think linux-bios) and do away with the WM in kiosk style implementations.

              For general purpose computing, we can do away with the majority of boot-from-off situations by improving support for sleep/hibernate. Aside from kernel updates, the only reasons I ever boot my systems is due to shortcomings in my OS's sleep/hibernate implementations.

              Look at the iPad as an example. Booting-from-off is a 30-60 second process, but since it has a proper sleep implementation, booting is an extremely rare occurrence.

              F

              Comment


              • #17
                Originally posted by pingufunkybeat View Post
                It's not a near-instantaneous boot, it's a near-instantaneous init.
                http://git.fenrus.org/tmp/bootchart-20120512-1036.svg

                XFCE desktop seems to be completely loaded in less than two seconds. It takes around 500ms for the kernel to load and another 500ms till the X.org can start then bit less than a second till the complete desktop (PulseAudio, Thunar, power management, XFCE panel...) is loaded. So yeah to me it seems that the entire boot proccess from the start of the kernel initialization to the usable desktop takes less than two seconds. Modern BIOS takes around one second to load so around three seconds total?

                Comment


                • #18
                  Adding to my first post, I'd also like to add that the time your computer takes to boot depends strongly of your Hardware. In the case of systemd, I can assure using a HDD vs SSD is an important factor...

                  Another important think that (might) wasn't mentioned in the systemd article is the fact a custom-optimized kernel might load significantly faster than the generic distro kernel (most of us) use, (OC, if you know the options to choose in your kernel .config)...

                  Cheers

                  Comment


                  • #19
                    There are a lot of people who still don't use suspend-to-ram, suprisingly.

                    I boot maybe once every 10-30 days for a variety of reasons, and the boot time is short enough now that it never concerns me.

                    Comment


                    • #20
                      Originally posted by evolution View Post
                      Adding to my first post, I'd also like to add that the time your computer takes to boot depends strongly of your Hardware. In the case of systemd, I can assure using a HDD vs SSD is an important factor...

                      Another important think that (might) wasn't mentioned in the systemd article is the fact a custom-optimized kernel might load significantly faster than the generic distro kernel (most of us) use, (OC, if you know the options to choose in your kernel .config)...

                      Cheers
                      The Wiki article mentions it.
                      10. If you work on an appliance, make sure to build all drivers you need into the kernel, since module loading is slow. If you build a distribution at least built all the stuff 90% of all people need into your kernel, i.e. at least USB, AHCI and HDA!

                      Comment

                      Working...
                      X