SysVinit vs runit

Forum Forums New users New Users and General Questions SysVinit vs runit

  • This topic has 10 replies, 6 voices, and was last updated Dec 23-9:29 pm by fungalnet.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #47938
    Member
    blur13

      Hello!

      I’ve been using antiX with SysVinit since the release of 19.3 on an old Asus EEEpc 1015bx from 2012 with great results. Yesterday I installed antiX with runit on an old Sony VAIO SVE1112M1EW laptop from circa 2014. Played around with it for a while and everything works great. Was surprised to see that RAM usage was about the same as for SysVinit. Did an unscientific experiment on boot time by hitting the power button at the same time on the Asus and the VAIO, and was surprised that the Asus reached the login screen a few seconds faster, despite running on older hardware. From my understanding, one of the key selling points of runit is parallelization of the start up of system services, which can speed up the boot time of the operating system. Granted, an even better experiment would be running this on identical hardware.

      What are the technical pros and cons of using runit instead of SysVinit?

      Thanks!

      #47941
      Member
      sybok
        Helpful
        Up
        0
        ::

        Hi, I am not an expert (I never modify/tinker with these low-level parts of the system).
        The announcement in this forum mentions it as an experiment, without any underlying reasoning why to try it (though it may be present elsewhere in the forum).

        Try search the web, e.g.
        https://www.slant.co/versus/12957/12960/~sysv-init_vs_runit <– contains (sometimes contradicting) opinions, not necessarily facts
        http://smarden.org/runit/benefits.html

        • This reply was modified 2 years, 4 months ago by sybok.
        #47948
        Member
        userzero
          Helpful
          Up
          0
          ::

          By the way of managing services, this is not runit. It’s a crazy mix of Debian … 🤣

          #47953
          Anonymous
            Helpful
            Up
            0
            ::

            this is not runit. It’s a crazy mix of Debian …

            Would you please provide some details?
            Are you comparing the runit implementation seen in experimental antiX version,
            comparing it to that seen in VoidLinux? or in Gentoo?
            What are the noticeable (er, “crazy”) differences between the various implementations?

            #47991
            Member
            userzero
              Helpful
              Up
              0
              ::

              Been banging my head agains a wall to get a <#sv status slim> working, 🙂

              http://smarden.org/runit/https://wiki.artixlinux.org/Main/Runithttps://docs.voidlinux.org/config/services/user-services.htmlhttps://wiki.archlinux.org/index.php/runit

              >_ sudo sv status slim
              fail: slim: unable to change to service directory: file does not exist

              Clue number one, /etc/inittab which is a conffile of sysvinit-core.

              Number two,

              man sv,
              SYNOPSIS
                     sv [-v] [-w sec] command services
              
                     /etc/init.d/service [-w sec] command

              Number three,

              berbellon @:[/etc/rc2.d]
              >_ ls -l

              Entonces,

              List services:
              
              ls /etc/init.d/
              
              Start service:
              
              /etc/init.d/{SERVICENAME} start
              
              or
              
              service {SERVICENAME} start
              
              Stop service:
              
              /etc/init.d/{SERVICENAME} stop
              
              or
              
              service {SERVICENAME} stop
              
              Enable service:
              
              cd /etc/rc3.d
              ln -s ../init.d/{SERVICENAME} S95{SERVICENAME}
              
              (the S95 is used to specify the order. S01 will start before S02, etc)
              Disable service:
              
              rm /etc/rc3.d/*{SERVICENAME}

              https://unix.stackexchange.com/questions/106656/how-do-services-in-debian-work-and-how-can-i-manage-them

              Now, I understand that even Debian needed years to really switch toward systemd unit.

              #47993
              Member
              Dzhigit
                Helpful
                Up
                0
                ::

                Been banging my head agains a wall to get a <#sv status slim> working,

                I don’t think SLiM provides a runscript. The program sv uses the directory /etc/service by default, while most Debian packages only provide /lib/systemd or /etc/init.d

                #47994
                Anonymous
                  Helpful
                  Up
                  0
                  ::
                  >_ sudo sv status slim
                  fail: slim: unable to change to service directory: file does not exist

                  Clue number one, /etc/inittab which is a conffile of sysvinit-core.

                  Number two,

                  man sv,
                  SYNOPSIS
                         sv [-v] [-w sec] command services
                  
                         /etc/init.d/service [-w sec] command

                  Placement in init.d directory is mentioned in the sv project’s own docs.
                  The sv program can be sym-linked to /etc/init.d/ to provide an LSB init script interface.
                  (In other words, that detail is not a proprietary quirk of debian’s implementation.)
                  http://smarden.org/runit/sv.8.html

                  .

                  #47995
                  Anonymous
                    Helpful
                    Up
                    0
                    ::

                    > I don’t think SLiM provides a runscript

                    Yes, it does.

                    dpkg-query -L slim | grep init
                    ^—v
                    /etc/init.d/slim

                    edited, to add:
                    or, possibly, you meant “a runit run script”.
                    No, I’ve never encountered any *.deb which additionally installs a file to /etc/service/
                    (I haven’t checked; that may be one of the curation details in assembling the runit-flavored antiX version)

                    #47998
                    Member
                    Dzhigit
                      Helpful
                      Up
                      0
                      ::

                      I meant native runit script for sv.

                      No, I’ve never encountered any *.deb which additionally installs a file to /etc/sv/

                      dpkg-query -L getty-run

                      #47999
                      Anonymous
                        Helpful
                        Up
                        0
                        ::

                        not booted to a system using runit
                        dpkg-query: package ‘getty-run’ is not installed
                        so I looked here https://packages.debian.org/buster/all/getty-run/filelist but I learned nothing by doing so.

                        #48009
                        Member
                        fungalnet
                          Helpful
                          Up
                          0
                          ::

                          ls -al /etc/runit/runsvdir/default

                          lists the links to the service files that run when the system boots up.

                          The service files are in /etc/sv

                          ln -s /etc/sv/sshd /etc/runit/runsvdir/default/

                          starts sshd

                          
                          rm /etc/runit/runsvdir/default/sshd

                          removes the link and stops the service supervision.

                          Pretty damn simple. You have service files and you have a crunch directory where you link and unlink the service files you want running or not.

                          Beware that different cpus may use different amount of ram for the same exact system. It may have to do with what the kernel loads up to utilize the particular machine’s hw. So don’t draw quick conclusions on the init system.

                          Also if you look at processes with something like htop or lxtask and order the ram use running services must be identical to draw conlusions on ram use. Then boot time is also based on what services are running. If for example you have wpa-supplicant running and have no wifi, or have wifi but it doesn’t access any networks, it slows down booting somewhat as it is unnecesseraly waiting for response. Systemd is really terrible with net devices, if it is not connecting it takes by default 90s to move further down the list of services to run.

                          Then there is the issue of running runit as true init (pid1) or having sysv scripts run stage1 and runit taking over as a service supervisor. From what I’ve seen you can do either with antix/debian.

                        Viewing 11 posts - 1 through 11 (of 11 total)
                        • You must be logged in to reply to this topic.