Stories
Slash Boxes
Comments

SoylentNews is people

posted by Fnord666 on Thursday August 10 2017, @12:18AM   Printer-friendly
from the not-the-PHB dept.

Frew Schmidt has written seven posts on init systems and supervisors. He covers both basic and advanced supervisors, and what they do including some more unusual options.


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 3, Interesting) by Pino P on Thursday August 10 2017, @05:17PM (4 children)

    by Pino P (4721) on Thursday August 10 2017, @05:17PM (#551737) Journal

    Compared to other things the problem of starting tasks in a proper order and keeping them running is a simple problem.

    Not when peripherals are added to or removed from a system. When a USB storage device is connected, the file system for that device needs to be mounted. When a USB network adapter is connected, the adapter needs to be brought up, and the computer needs to authenticate to the switch, access point, or other means of access control. Here, the order of tasks depends on which devices are connected and when.

    In addition, the order isn't necessarily a total order [wikipedia.org], where A has to be started before B, which has to be started before C, which has to be started before D, which has to be started before E. Often, the tasks form a partially ordered set [wikipedia.org], where the order of some tasks doesn't matter, allowing non-interdependent branches of the dependency graph to be run in parallel. Because users find a system with a shorter latency from power-on to usability more valuable, a competitive init system needs to handle parallel startup of a wide variety of peripherals and services.

    Starting Score:    1  point
    Moderation   +1  
       Interesting=1, Total=1
    Extra 'Interesting' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   3  
  • (Score: 0) by Anonymous Coward on Thursday August 10 2017, @08:24PM (3 children)

    by Anonymous Coward on Thursday August 10 2017, @08:24PM (#551849)

    make -j is pretty good with ordering dependencies and executing them in parallel. I once built a Linux from Scratch and wrote makefiles instead of using the recommended start-up scripts.

    It worked pretty well.

    Then I became too lazy to do my own package management and just installed Gentoo. OpenRC isn't as quick as make -j runlevel5, but either way my machine can still boot in less time than it takes me to get a glass of ice water, especially if I have to refill the ice tray in the freezer. In winter, I use a different metric. In a few months, I'll only care if it's quicker than the amount of time it takes me to put a tea kettle on the stove.

    • (Score: 1) by pTamok on Friday August 11 2017, @07:43AM (1 child)

      by pTamok (3042) on Friday August 11 2017, @07:43AM (#552187)

      That's your use case, but your case is not a universal one. I'm pretty much like you - starting up in less time than it takes to make a cup of tea is 'good enough' for me. However, some people do have system startup time requirements that are shorter: for example, spinning up virtual machines in response to events like increased load in a server farm hosting a popular Internet site. There are use-cases where using systemd can make sense (please don't pick on my example if it is wrong, just substitute your own).

      However, what is clear is that systemd is not a universally correct solution; and one of the problems with the current landscape is that it is unnecessarily difficult to choose a different init/supervisor. Part of this is caused by people making their applications dependent on systemd's presence on a system, which is a shame.

      There's a phrase associated with Jon Postel [wikipedia.org]

      "Be liberal in what you accept, and conservative in what you send"*

      in the context of designing Internet Protocols, and the same really ought to be applied to higher-level programs/applications - they should aim to be workable with as many different init/supervisors as possible, rather than restricting their functionalities to just one. Of course, this requires extra work for the programmers (after all, I'm not volunteering to do the work), and it is completely understandable that people don't want to do this - the easiest path is to support only the most used init/supervisor, which is systemd.

      *The principle has been criticised e.g. see here [acm.org] and . [ietf.org]

      • (Score: 1, Informative) by Anonymous Coward on Friday August 11 2017, @04:36PM

        by Anonymous Coward on Friday August 11 2017, @04:36PM (#552408)

        For many cases, we use the BusyBox implementation of runit. Most virtual machines and containers we use are designed to be as light weight and fast booting as possible. So we strip out everything we don't need (including most of the kernel and no initrd), and that includes the overly complex and fat systemd. Instead, BusyBox acts as our init system too, which is something we include in the images anyway.

        But one note is that systemd (like Windows and MacOS) cheats the boot process. Part of the design is displaying the login prompt as early as possible, while still loading stuff in the background. Back in the day, the login prompt was displayed later, but people discovered that the time required for people to log in was precious seconds where they could appear to boot faster. Of course, I'd fully expect that if hibernate worked better in Linux, systemd would fully cheat and "shutdown" would actually be "exit most programs and then hibernate."

    • (Score: 2) by Pino P on Sunday August 13 2017, @09:32PM

      by Pino P (4721) on Sunday August 13 2017, @09:32PM (#553372) Journal

      either way my machine can still boot in less time than it takes me to get a glass of ice water, especially if I have to refill the ice tray in the freezer.

      If you're sitting on public transportation waiting for your laptop to get done booting so that you can log in and get to offline work before it reaches your stop, you'll be using a different metric.