• Broadfern@lemmy.world
    link
    fedilink
    English
    arrow-up
    52
    ·
    3 days ago

    Why are we afraid of systemd again? /gen

    I came in late w/ arch-based systems so legitimately don’t know the lore.

    • rtxn@lemmy.worldM
      link
      fedilink
      arrow-up
      89
      arrow-down
      2
      ·
      edit-2
      3 days ago

      Off the top of my head, in no particular order:

      • Systemd and its components are responsible for too many essential system functions. Init, services, mounts, timers, logging, network config, hostname, DNS resolution, locale, devices, home directories, boot, NTP sync, and I’m sure there are others, can be handled by systemd or one of its components.
      • Systemd violates the UNIX philosophy of “do one thing and do it well”. Systemd is a complex solution to a complex problem: this thread has several comments by a former Arch Linux maintainer that explains why they’ve switched to systemd, and why the earlier method of using single initscripts was unsustainable.
      • It is owned and maintained by Red Hat, known for its many controversies.
      • Some people just don’t like modern things and think that the Linux ecosystem peaked in the 1980s.

      Most (though not all) of the popular complaints are completely unreasonable. Those people usually see themselves as moral and righteous and expect the world at large to follow their personal creed. I especially consider the UNIX philosophy to be outdated, and strict adherence to it to be an obstacle for modern apps and systems.

      I have some issues with systemd, and I don’t like that one for-profit company has such a massive influence over the entire Linux ecosystem, but I have to acknowledge that it works, it works well enough to counter my personal issues, and that the people whose opinion matters the most (specifically Debian and Arch maintainers) chose it for a good reason.

      • N.E.P.T.R@lemmy.blahaj.zone
        link
        fedilink
        English
        arrow-up
        25
        arrow-down
        2
        ·
        edit-2
        2 days ago

        My personal reasons for disliking systemd (note: I still use systemd):

        • The lead developer of systemd has said multiple times that we should be fine with break POSIX if it means developing faster.
        • systemd has massive attack surface, making it easier to exploit and result in privilege escalation. It is a highly complex and large codebase that really shouldnt be given the trust of PID 0
        • systemd is not portable or modular.
        • It only just barely got musl support. Hope to see it improve in the future.
        • systemd is much slower than other inits (eg. dinit, s6, openrc)
        • systemd being the go-to init encourages developers to more heavily depend on it, making it difficult for distros without systemd

        The biggest feature I like about systemd is run0, though I wish it was a drop in replacement for sudo. Secondly, I do like that services can be sandboxed.

        • nesc@lemmy.cafe
          link
          fedilink
          English
          arrow-up
          4
          arrow-down
          4
          ·
          2 days ago
          • It’s developed for linux and there is literally 0 linux distributions that are POSIX-compliant, also standard is dead.
          • It doesn’t, also moving it to any other PID won’t make any difference.
          • It is modular (IIRC there is only three mandatory parts) and portable.
          • Was completely on musl side (also musl is as much not portable and modular as systemd 🙃 and in every practical way worse than glibc).
          • It’s not an init, nor does it present itself like this. Do you have any benchmarks that show this slowness when doing comparable operations?
          • Why exactly depending on a stable system component is a bad thing? Distros without systemd are moving against the stream, obviously there going to be some problems.
          • ferrule@sh.itjust.works
            link
            fedilink
            arrow-up
            2
            ·
            18 hours ago

            For me the portability issue wasn’t really solved. I still work on embedded devices where I need to squeeze out every cycle and every byte of memory i can. Running systemd is an automatic no go, but in the *nix way of doing things I do have other options, so that’s good.

            But the more people depend on the systemd ecosystem rather than an open standard, the availability for me to use other projects goes down. Again there are usually options, but it’s sad to see no one really thought about that when everyone jumped on board.

            I also love the BSDs and other Unix systems. I remember decades ago downloading FreeBSD on my Gentoo box and was able to load the same Gnome desktop on both systems. Two totally different operating systems running the same UI. It sucks that targeting systemd might make software not run on other *nix operating systems

            • nesc@lemmy.cafe
              link
              fedilink
              English
              arrow-up
              1
              ·
              14 hours ago

              That’s pretty niche use-case devices that can run linux but at the same tume limited enough that systemd is the bottleneck. I do get it that running systemd on some embedded devices makes little sense.

              Systemd has stable API so nothing stops other systems from implementing parts of it that interest them, thing is, *bsds aren’t interested or resource constrained so much that they can’t.

              • ferrule@sh.itjust.works
                link
                fedilink
                arrow-up
                2
                ·
                edit-2
                3 hours ago

                it’s honestly not that niche. it’s just not a use case that hobbiest run into. there is a lot of devices in your house or in your life running linux and you just never think about it. none of the devs of these devices are loud about systemd because we are hand crafting distros ourselves so dealing with scripts in an init system is the least of our worries.

                I have worked on gas meters for your house, refridgerators, two way radios for your car, home automation systems, TVs, gas pumps, A/C controllers. All hand crafted, tiny distros, all things you never see a penguin on but still run linux.

                Systemd has stable API

                yes, now it does as an afterthought. it wasn’t a public standard, seeking comment. no taking input from other developers. systemd was created to solve a problem distro were having, a system manager that is plug and play and makes everything just work. it is a good problem to solve, it’s one of the few reasons that so many distros exist.

                But there are tons of design choices that had very narrow views. Polkit, logind and the rest of credential management come to mind as something that needs a lot of massaging if you are rolling your own distro. When running a non-systemd distro there are often pain points getting apps and services that need to have a wider reach or interact with other priviledged code. none of it makes the system any more secure, just more of a pain in the ass.

                • nesc@lemmy.cafe
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  ·
                  46 minutes ago

                  Interesting, I’ve worked on car infotainment system for a short while, it was based on yocto, I think, and it was build with systemd support, tbh not once developers had a problem with resources on that thing, a lot of problems were with safety and regulatory requirements.

                  Before that I had an experience with wind river based system for network appliance and there were no systemd but that was when systemd was still a new thing.

                  Modern hardware is extremely powerful and has a lot of resources, I think there is some project that runs more or less standard linux on esp32.

                  • ferrule@sh.itjust.works
                    link
                    fedilink
                    arrow-up
                    2
                    ·
                    16 minutes ago

                    it is definitely a question of power. had a debian based device because it was plugged into mains and needed to do a lot of tasks. i also had a yocto based system that ran on solar pannels and scavenged power from vibrations of the pipes the computer was attached to. power and resources setting limits on what i was running.

      • mech@feddit.org
        link
        fedilink
        arrow-up
        22
        arrow-down
        1
        ·
        3 days ago

        Some people just don’t like modern things and think that the Linux ecosystem peaked in the 1980s.

        Linux was released in 1991.

        • rtxn@lemmy.worldM
          link
          fedilink
          arrow-up
          45
          ·
          edit-2
          3 days ago

          It’s called a hyperbole.

          (edit) But, honestly, it’s still kind of accurate. Many of the most significant software suites that define the Linux ecosystem in more recent decades were written in the 80s or earlier. X (the display protocol) was released in 1984, and X11 in 1987. GNU Emacs was released in 1985. Vi, in 1976. UNIX System V, from which sysvinit and compatible init systems were adopted, was released in 1983. It’s not a stretch to say that certain people want to regress to the 1980s state, even if the kernel wasn’t around.

          • nesc@lemmy.cafe
            link
            fedilink
            English
            arrow-up
            15
            ·
            edit-2
            2 days ago

            Funny thing is, nothing in the list adheres to the so called unix philosophy.

        • zloubida@sh.itjust.works
          link
          fedilink
          arrow-up
          21
          ·
          3 days ago

          It’s a little known fact that the first answer to Linus’ first message announcing his new OS was “You stupid thing, why did you created it? It ruined it! Linux was better before!”.

      • 2910000@lemmy.world
        link
        fedilink
        arrow-up
        15
        arrow-down
        2
        ·
        3 days ago

        Those people usually see themselves as moral and righteous and expect the world at large to follow their personal creed.

        If they don’t like systemd but are forced to use it for some reason, I can understand why they might have some negative feelings

        Once I switched to a distro with OpenRC, I stopped feeling the need to argue about systemd

        • nesc@lemmy.cafe
          link
          fedilink
          English
          arrow-up
          2
          ·
          2 days ago

          You are forced to use a lot of things bit systemd is where you draw a line? 😺

          • 2910000@lemmy.world
            link
            fedilink
            arrow-up
            7
            ·
            2 days ago

            I see from your other comment in the thread that you’re enthusiastic about systemd, and that’s great.
            I’m glad we inhabit a software ecosystem broad enough that we can both be happy

            • nesc@lemmy.cafe
              link
              fedilink
              English
              arrow-up
              2
              ·
              2 days ago

              I’m not enthusiastic about it, I’m just old enough to remeber how bad were good old times before systemd and a bit miffed how old and untrue statements about it are perpetuated.

              • 2910000@lemmy.world
                link
                fedilink
                arrow-up
                4
                ·
                2 days ago

                I was a long-time Linux user at the time of the systemd switchover.
                Your memories of the good old times are your own

      • caseyweederman@lemmy.ca
        link
        fedilink
        arrow-up
        6
        arrow-down
        1
        ·
        2 days ago

        systemd DOES do one thing really well. Too well. It’s a service manager.
        People noticed that it works really well as a framework for their stuff and started plugging all the other stuff in your first bullet point into it. And that also worked really well.

    • Barbarian@sh.itjust.works
      link
      fedilink
      arrow-up
      30
      arrow-down
      1
      ·
      3 days ago

      “You can’t have programs that do multiple things! Any program that is multi-use is ebil. Standardized syntax and functionality between different related systems? NO! PROGRAM DO ONE THING!”

      • The_Decryptor@aussie.zone
        link
        fedilink
        English
        arrow-up
        6
        ·
        edit-2
        2 days ago

        A lot of this is also a post-hoc justification, UNIX didn’t get shared libraries until some point in the 80s (Can’t find an exact year), so before that your options were to either statically compile the needed functionality into your program or keep it as an entirely separate program and call out to that.

        It’s a perfect mix, in a time where enterprise storage was measured in single digit megabytes, and the only efficient way to created shared functionality was via separate programs, and you’ve got an OS that happens to have “easily pass data between programs” as a core paradigm.

        And now people invoke it to attack an init program for also monitoring the programs it starts and not just spawning them.

    • Caveman@lemmy.world
      link
      fedilink
      arrow-up
      13
      arrow-down
      3
      ·
      2 days ago

      Systemd is controlled by redhat and is a very large part of the Linux stack. It’s become so universal that a lot random stuff won’t work unless the system has systemd.

      Compared to X11 to wayland or pulseaudio to pipewire it’s a lot hard to now replace an init system and with that in the hands of redhat which is for profit is not a nice thought.

      But you know, fuck it, having systemd is a massive headache for people making distros that’s just gone. Everyone is using the same thing and things just work so people aren’t really complaining. If redhat tries some shenanigans there’ll always be a fork or a systemd compatible init system or even whatever Alpine is using now that’ll take it’s place.

      • nesc@lemmy.cafe
        link
        fedilink
        English
        arrow-up
        3
        ·
        2 days ago

        How exactly is it controlled by Red Hat? Having systemd is a massive blessing for linux distributions that use it and for absolute majority of users.