SystemD is blamed for long boot times and being heavy and bloated on resources. I tried OpenRC and Runit on real hardware (Ryzen 5000-series laptop) for week each and saw only 1 second faster boot time.

I’m old enough to remember plymouth.service (graphical image) being the most slowest service on boot in Ubuntu 16.04 and 18.04. But I don’t see that as an issue anymore. I don’t have a graphical systemD boot on my Arch but I installed Fedora Sericea and it actually boots faster than my Arch despite the plymouth (or whatever they call it nowadays).

My 2 questions:

  1. Is the current SystemD rant derived from years ago (while they’ve improved a lot)?
  2. Should Linux community rant about bigger problems such as Wayland related things not ready for current needs of normies?
  • Nah, it’s fine. Boot times are considerably faster than sys.v in most cases, and it has a huge amount of functionality. Most people I work with have adopted it and much prefer it to the old init.d and sys.v systems.

    People’s problem with systemd (and there are fewer people strongly against it than before) seem to break down into two groups:

    1. They were happy with sys.v and didn’t like change. Some were unhappy with how distros adopted it. (The debian wars in particular were really quite vicious)

    2. It does too much. systemd is modular, but even so does break one of the core linux tenets - “do one thing well”. Despite the modularity, it’s easy to see it as monolithic.

    But regardless of feelings, systemd has achieved what it set out to do and is the defacto choice for the vast majority of distros, and they adopted it because it’s better. Nobody really cares if a user tries to make a point by not using it any more, they’re just isolating themselves. The battle was fought and systemd won it.

    • One of my biggest problems with critics of systemd is that a lot of the same people who make that second point also argue against wayland adoption when xorg does the exact same thing as systemd. It makes me feel like they’re just grumpy stubborn old Linux nerds from the 90s who just hate anything that’s not what they learned Linux with.

      Which is sad, because honestly I think it’s kind of not great that an unnecessarily massive project has gained such an overwhelming share of users when the vast majority of those users don’t need or use most of what it does. Yeah, the init systems from before systemd sucked, but modern alternatives like runit or openrc work really well. Unfortunately they get poorly supported because everyone just assumes you have systemd. I don’t like the lack of diversity. I think it’s a problem that any init system “won”.

      •  jarfil   ( @jarfil@lemmy.ml ) 
        link
        fedilink
        4
        edit-2
        1 year ago

        Xorg, or X11, “used to” do the “minimum necessary” for a remote display system… in the 80s. Graphics tech has changed A LOT in the last 40 years, with most of the stuff getting offloaded to GPUs, so the whole X11 protocol became more and more bloated as it kept getting new and optional features without dropping backwards compatibility.

        The point against Wayland, was dropping support for remote displays, while kind of having an existential crysis for several years during which it didn’t know what it wanted to become. Hopefully that’s clear now.

        OpenRC and runit are indeed working alternatives, but OpenRC is kind of a hack over init.rd, while runit relies a bit too much on storing all its status in the filesystem. Systemd has a cleaner approach and a more flexible service configuration.

      • Maybe systemd gets grouped with wayland and xorg with other init systems simply because of usability?

        I mean, I got used to the thought that what I prefer is less usable, because some pretentious UX designers say so, and we Unix nerds use inconvenient things because we are all perverts.

        But when I read about industrial design and ergonomics, it seems that my preferences are consistent with what I read, and all those UX designers and managers should just be fired for incompetence and malice.

        Back to wayland/xorg and runit/systemd (for example), same reason FreeBSD may seem easier to set up and use than an “advanced” Linux distribution - there’s less confusion.

    • “do one thing well”

      Arguably, Systemd does exactly that: orchestrate the parallel starting of services, and do it well.

      The problem with init.d and sys.v is they were not designed for multi-core systems where multiple services can start at once, and had no concept of which service depended on which, other than a lineal “this before that”. Over the years, they got extended with very dirty hacks and tons of support functions that were not consistent between distributions, and still barely functional.

      Systemd cleaned all of that up, added parallel starting taking into account service dependencies, which meant adding an enhanced journaling system to pull status responses from multiple services at once, same for pulling device updates, and security and isolation configs.

      It’s really the minimum that can be done (well) for a parallel start system.

    • systemd is modular, but even so does break one of the core linux tenets - “do one thing well”.

      Linux itself (i.e. the kernel) breaks the hell out of that so-called core tenet. Have you looked at make menuconfig at any point? There’s everything but the kitchen sink in there.

  • systemd is a godsend when you need service control while getting actual work done, at scale.

    there are legitimate things to criticize but in general the rants are incompetent preaching to the uninformed.

  • I do not think systemd is bad, I (and personal preference here) much prefer it over the older style of init systems.

    Quite frankly, one of the things that has always irked me about a portion of the Linux community is that as far as I know, a strength and selling point of Linux has always been the freedom of choice. And yet, people start wars over your choices. For example, I know at least on r/Linux if you were to make a post saying that you liked Snaps over Flatpaks you’d get torn to shreds over it. Wouldn’t matter what reasons you had either.

    It is always something. Whether its about Arch vs other distros, Snaps vs Flatpak vs AppImage vs Traditional packaging, X11 vs Wayland, systemd vs Sys V/init.d, pulseaudio vs pipewire, etc.

    I never understood why it mattered so much what someone ran on their own computer. Assuming they’re the only one using it, what is the big deal if they choose to run OpenRC, X11, Snaps, and Alsa?

    And I get a bad feeling the next one is going to be immutable distros vs non-immutable distros, but I guess we’ll see.

    • Quite frankly, one of the things that has always irked me about a portion of the Linux community is that as far as I know, a strength and selling point of Linux has always been the freedom of choice. And yet, people start wars over your choices

      the “war” about systemd was actually a discussion about the (continuing) ability to make choices, not that some people chose systemd over other options. One of the main points of the debate was that systemd was monopolizing the init process and turning gnu/linux into gnu/linux/systemd.

      The assertion that people were just upset like little babies that some wanted to choose a different init is highly disingenuous.

    • Snaps and Flatpaks, are essentially the same thing seen from a different angle, so anyone preferring one over the other, basically deserves whatever they get 😋

      The rest… well, freedom of choice is one thing, but when discussing the pros and cons, there are likely people who got burned by the cons of any choice out there, and each choice has their fair share of cons, so it’s understandable that they’d sometimes get emotional.

  • Ok, so I have a very unique background in systemd. I worked at Red Hat supporting it basically as the primary support and I’ve worked with the developers of systemd at Red Hat directly. I no longer work there.

    So first off, it’s “systemd” all lower case. I don’t care, but for some reason Lennart Pottering (creator) does.

    systemd was a MASSIVE change. And Red Hat did a TERRIBLE job relaying it. To the point where I’m still trying to get my company to understand that it can NOT be treated like the old init systems. You can NOT just drop an init script in place and walk away and hope it works. Because a LOT of times it doesn’t. Due to forks, switch users, etc.

    systemd is NOT an init system. RHEL 5 and older had sysvinit as it’s init systemd. RHEL 6 had UpStart as it’s init system and looked exactly like sysvinit that no one even noticed. systemd again is NOT an init system. Init system is 1 part of systemd. systemd does a lot of cool things. It bundles applications together, it manages those applications and can restart them or kill children, it can do resource constraints, it separates out users from the system, and lots more.

    Because it is not an init system there is a LOT LOT LOT of bad recommendations out on the internet where someone has X problem and person suggests Y and IT WORKS! … except it doesn’t REALLY work as far as systemd is concerned and you’ll hit other issues or your application takes longer to start or stop and people just blame systemd.

    It is systemd’s fault that it has done an ATROCIOUS job of helping people adapt. It’s a great example of RTFM. systemd’s man pages are INCREDIBLE and extensive, but when you drop so much knowledge it becomes more difficult to find what you want/need. systemd.index and systemd.directives are your best bet.

    So systemd does a lot of amazing things that sysvinit never attempted to do. It’s never attempted to explain anything it expects everyone just learn magically. it’s INCREDIBLY complex, but once you understand it’s basics you can more easily get an application running, but as soon as there’s a problem it’ll just break your brain.

    To give you an example, sshd’s old init script is like 250 lines of bash. systemd’s unit file comparative is like 12. Because systemd handles a LOT of what you manually had to handle before. BUT to get to that 12 you literally have to learn EVERYTHING new.

    There is no “is it good or bad” here really imo. It’s a completely different fundamental design. Red Hat made it for themselves. Other distros picked it up. It can be argued that lots of folks followed Debian and Debian had a few Red Hat board members that were pushing it. Whether they pushed it of their own accord or because they were with Red Hat I don’t have a clue.

    What I can say is at my current company they’re suffering from a LOT of systemd issues and they don’t even realize it. I’ve been working with Red Hat to try to get Insights to alert people to the failures and we’re making progress.

    To see if you have issues just to start run the two following commands:

    # systemctl list-units --failed
    # systemd-cgls
    

    If you have any units that are failed, investigate those. If you don’t need them, disable them. As for the systemd-cgls this shows HOW systemd is grouping things. ANY application that runs as a service (or daemon or application or runs in the background or however you wanna say it) should be under system.slice. ONLY humans logging into the system (meat bags NOT applications switching to users) should be in user.slice. A LOT of times what happens is an old init script is dropped in place, they start it, it has a switch user and systemd assumes it’s a user and puts it into user.slice. systemd does NOT treat anything in user.slice the same as in system.slice and this WILL eventually cause problems.

    So again, is it good or bad? Eh. It does a lot of cool things, but they did a MASSIVE disservice to ALL of us by just expecting to relearn absolutely EVERYTHING.

    •  nyan   ( @nyan@lemmy.cafe ) 
      link
      fedilink
      English
      41 year ago

      sshd’s init script under OpenRC is 87 lines, of which around half are blanks, comments, closing braces, and other boilerplate. Granted, that still makes the real code maybe three times the size of your systemd unit file, but the difference isn’t as impressive as you’re making out.

      95% of people shouldn’t need to poke around in their init scripts or unit files anyway. If you actually need to do that, your use case is already somewhat unusual.

      • As an end user, unless you’re running a server, then no you shouldn’t have to mess with any of it.

        If you’re running a server or a sysadmin you absolutely 100% should be paying attention. Almost every single vendor I’ve seen selling their applications only have initscripts. Which then cause issues. I’ve gone to the vendors and told them and they’ve said go to Red Hat. Well Red Hat doesn’t support that vendor’s init scripts.

        Not naming an application, but it was from a BIG BLUE company and they said their only instructions are to call their script from the user. But it won’t remain running if you do that because systemd will close out the slice when the user logs out. SO it’s obvious they haven’t tried what they’re suggesting.

        And I’m not attempting to state that systemd is impressive in any way. systemd basically took what had been building over 40 years of init scripting and threw it out the window and said our way is better. I don’t think it is. I’m just saying, with a directive based unit file it’ll be simpler to parse than a bash script.

      • When I was training folks that were fresh on Linux they loved systemd more than init scripts. It really does make things easier to approach, but they’re so much more complex under the hood. With a bash script, pretty much what you see is what you get.

    • I’ll also add that systemd is so different and confusing that even Red Hat’s own training team teaches things wrong. If you take the new RHCSA on RHEL 8 they have a section where you have to create a container and have it running. systemd’s design indicates that this SHOULD be a system service so should create a unit file and set the User= to run it as a user. Instead they have you log in, run it as yourself, and then enable linger on loginctl to prevent your user from logging out. That is WRONG according to systemd’s design and since that’s outside the design there’s a chance in the future that something will break that. Or better yet, if your application is there running and you go to shutdown your system, systemd probably won’t stop it correctly and it could cause data corruption.

    • an old init script is dropped in place, they start it, it has a switch user and systemd assumes it’s a user and puts it into user.slice.

      Wait, what? As far as I know, if you drop a System V init script in its usual place, systemd will treat it as a service and place its processes in the control group for services, even if it calls fork and/or setuid. How did it end up in user.slice?

      • If you put an init script in /etc/rc.d/init.d/ systemd looks there, it has the systemd-sysv-generator which will look at the script, do it’s best guess to build a systemd unit file, and then start it via unit file. But it’s guessing at a LOT of things. Even if you have a LSB header in your init script, systemd’s ExecStart is just calling the init script. The problem will calling an init script is you’re almost certainly going to call another script. Well systemd thinks that ExecStart IS the parent. And since children can’t live without the parent, if the script finishes, systemd sees the script finish and it kils all the children, because children shouldn’t be around without a parent.

        Now systemd CAN guess a bit with a fork, but if you’re forking numerous times, init script calls X script calls Y script, it will NOT follow this. Hence why people decided that “RemainAfterExit=true” is the work around. That’s NOT. That’s NOT the answer. That is WRONG and systemd will NOT manage your application appropriately.

        systemd starting a service when User= is set sets the user during exec. There is no change user. So if you use a switch user that has a login, which most everyone do as su invokes login natively, then it falls through the pam stack, which include pam.systemd.so which tells systemd, ok this is a login which means it’s a meatbag move it over to the user.slice. So because it thinks it’s a human, ergo in the user.slice, it will NOT manage resources properly, it will NOT shut things down nicely, it will NOT clean up children, etc.

        systemd’s reality is you don’t use init scripts, you break your script down to the basic parts, you call your binary directly, you do everything via systemd’s directives. Do NOT let it guess at anything, be absolutely explicit.

        • Now systemd CAN guess a bit with a fork, but if you’re forking numerous times, init script calls X script calls Y script, it will NOT follow this.

          It follows it just fine. I have, for example, a Debian machine running the ISC DHCP server, which has only an LSB init script and no systemd service file. Starting it involves at least four forks: once to start the init script, once when the init script runs start-stop-daemon, once when start-stop-daemon runs dhcpd, and once when dhcpd forks itself into the background.

          Systemd correctly recognizes that it’s still running because, although the init script, start-stop-daemon, and the initial dhcpd process have all exited, there is still another process in its control group:

          $ systemctl status isc-dhcp-server
          ● isc-dhcp-server.service - LSB: DHCP server
               Loaded: loaded (/etc/init.d/isc-dhcp-server; generated)
               Active: active (running) since Fri 2023-06-02 23:28:47 PDT; 3 weeks 6 days ago
                 Docs: man:systemd-sysv-generator(8)
              Process: 1513 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited, status=0/SUCCESS)
                Tasks: 1 (limit: 19074)
               Memory: 8.1M
                  CPU: 4.774s
               CGroup: /system.slice/isc-dhcp-server.service
                       └─1550 /usr/sbin/dhcpd -4 -q -cf /etc/dhcp/dhcpd.conf
          

          Similarly, starting Apache involves running apachectl, which then forks httpd, which then forks itself into the background, and if you’re using mpm_prefork, that background process forks itself a whole bunch more times too. Systemd has no problem with this:

          $ systemctl status apache2
          ● apache2.service - The Apache HTTP Server
               Loaded: loaded (/lib/systemd/system/apache2.service; enabled; preset: enabled)
               Active: active (running) since Fri 2023-06-02 23:28:43 PDT; 3 weeks 6 days ago
                 Docs: https://httpd.apache.org/docs/2.4/
              Process: 1456 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
              Process: 1144683 ExecReload=/usr/sbin/apachectl graceful (code=exited, status=0/SUCCESS)
             Main PID: 1492 (apache2)
                Tasks: 15 (limit: 19074)
               Memory: 40.0M
                  CPU: 58.165s
               CGroup: /system.slice/apache2.service
                       ├─   1492 /usr/sbin/apache2 -k start
                       ├─1144695 /usr/sbin/apache2 -k start
                       ├─1144696 /usr/sbin/apache2 -k start
                       ├─1144697 /usr/sbin/apache2 -k start
                       ├─1144698 /usr/sbin/apache2 -k start
                       ├─1144699 /usr/sbin/apache2 -k start
                       ├─1144731 /usr/sbin/apache2 -k start
                       └─1155330 /usr/sbin/apache2 -k start
          

          That’s one of the neat things about systemd: fork all you want, and it’ll still keep track of which process belongs to which service.

          systemd’s reality is you don’t use init scripts, you break your script down to the basic parts, you call your binary directly, you do everything via systemd’s directives. Do NOT let it guess at anything, be absolutely explicit.

          Or just don’t write messy, incorrect init scripts that use su. Be sensible and use start-stop-daemon. That’s what it’s there for, and it’s been there since the '90s.

          • So just to state, your comment is coming off condescending, I don’t know if that was intentional or not. But saying something is “sensible” sounds rude. Everyone has different experiences and what you think is “sensible” or “common sense” someone else might have never heard of. I’ve never heard of a command called “start-stop-daemon”. I’ve only heard start/stop init scripts. Looking at the daemon, I’ve never seen anyone use this. Vast majority of scripts I’ve looked at were other companies and never saw a single one use it. So maybe start-stop-daemon would work, but I don’t have a clue. But when I talked to the developers of systemd and told them that people were falling into the user.slice because they were running a su in their init scripts they were all surprised as well, because they didn’t think ANYONE did that. Well I was a sysadmin for 5 years before I worked at Red Hat for 6 and that’s how everyone is taught to do it. So again, different experiences.

            The other part I want to address is you saying that those two examples shows I’m wrong. The first instance:

            $ systemctl status isc-dhcp-server
            ● isc-dhcp-server.service - LSB: DHCP server
                 Loaded: loaded (/etc/init.d/isc-dhcp-server; generated)
                 Active: active (running) since Fri 2023-06-02 23:28:47 PDT; 3 weeks 6 days ago
                   Docs: man:systemd-sysv-generator(8)
                Process: 1513 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited, status=0/SUCCESS)
                  Tasks: 1 (limit: 19074)
                 Memory: 8.1M
                    CPU: 4.774s
                 CGroup: /system.slice/isc-dhcp-server.service
                         └─1550 /usr/sbin/dhcpd -4 -q -cf /etc/dhcp/dhcpd.conf
            

            There definitely seems to be something wrong there because sysetmd no longer is showing a Main Pid process which is the parent, so my guess is there’s something like a “RemainAfterExit=true” or something else there, because systemd isn’t showing a parent. And when there isn’t a parent, unless overridden in the unit file, systemd will kill the children.

            The second example:

            $ systemctl status apache2
            ● apache2.service - The Apache HTTP Server
                 Loaded: loaded (/lib/systemd/system/apache2.service; enabled; preset: enabled)
                 Active: active (running) since Fri 2023-06-02 23:28:43 PDT; 3 weeks 6 days ago
                   Docs: https://httpd.apache.org/docs/2.4/
                Process: 1456 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
                Process: 1144683 ExecReload=/usr/sbin/apachectl graceful (code=exited, status=0/SUCCESS)
               Main PID: 1492 (apache2)
                  Tasks: 15 (limit: 19074)
                 Memory: 40.0M
                    CPU: 58.165s
                 CGroup: /system.slice/apache2.service
                         ├─   1492 /usr/sbin/apache2 -k start
                         ├─1144695 /usr/sbin/apache2 -k start
                         ├─1144696 /usr/sbin/apache2 -k start
                         ├─1144697 /usr/sbin/apache2 -k start
                         ├─1144698 /usr/sbin/apache2 -k start
                         ├─1144699 /usr/sbin/apache2 -k start
                         ├─1144731 /usr/sbin/apache2 -k start
                         └─1155330 /usr/sbin/apache2 -k start
            

            Shows you’re calling “/usr/sbin/apachectl” which then forks to apache and that stays as the main parent, you can see “Main PID” and then yes there are many children because they’re children of 1492. That is called a double fork. systemd can figure out the parent in a double fork, but once you fork and fork and fork, NOT counting CHILDREN but the actual PARENT, then systemd doesn’t know which to follow so usually ends up assuming the wrong PID to follow and will clean up everything when what it thinks is the parent goes away. But your second example is how systemd is supposed to work. You call an application that fork and the parent dies and lets the child take over. That’s a standard double fork, that’s what systemd expects. So that works as you expect, because you’ve called it as you expect. Wrap your /usr/sbin/apachectl in a script and then ExecStart=<script> and unless they’ve made massive improvements you’re gonna run into issues.

            Edit: fixed formatting on the systemctl status output

            • I’ve never heard of a command called “start-stop-daemon”. I’ve only heard start/stop init scripts. Looking at the daemon, I’ve never seen anyone use this.

              It’s not a daemon; it’s a command-line program that starts and stops daemons. It is specifically designed to be called from init scripts. It was originally developed for Debian in the '90s, and has been used in its init scripts ever since.

              I’m not familiar with non-Debian distributions, but I assume they have their own equivalents, if they aren’t using a full-blown service manager like systemd.

              Well I was a sysadmin for 5 years before I worked at Red Hat for 6 and that’s how everyone is taught to do it.

              An old pre-systemd CentOS machine I have access to uses some shell functions defined in /etc/init.d/functions to start and stop daemons. Those shell functions use the runuser program from the util-linux package to change user ID, not su.

              There definitely seems to be something wrong there because sysetmd no longer is showing a Main Pid process which is the parent, so my guess is there’s something like a “RemainAfterExit=true” or something else there, because systemd isn’t showing a parent.

              Per the systemd.service man page for RemainAfterExit: “Takes a boolean value that specifies whether the service shall be considered active even when all its processes exited. Defaults to no.” (Emphasis mine.)

              And when there isn’t a parent, unless overridden in the unit file, systemd will kill the children.

              systemd-sysv-generator generates Type=forking service units.

              Per the systemd.service man page for this type of service: “If set to forking, it is expected that the process configured with ExecStart= will call fork() as part of its start-up. The parent process is expected to exit when start-up is complete and all communication channels are set up. The child continues to run as the main service process, and the service manager will consider the unit started when the parent process exits. This is the behavior of traditional UNIX services.”

              It would be counterproductive for systemd to kill all of the processes belonging to such a service when the parent process exits, since the whole point of this type of service is that the parent process exits immediately.

              You might be thinking of how logind by default kills all processes belonging to a user session when the session ends. That’s different from services, though.

              Wrap your /usr/sbin/apachectl in a script and then ExecStart=<script> and unless they’ve made massive improvements you’re gonna run into issues.

              Works for me:

              $ systemctl cat apache2
              # /lib/systemd/system/apache2.service
              [Unit]
              Description=The Apache HTTP Server
              After=network.target remote-fs.target nss-lookup.target
              Documentation=https://httpd.apache.org/docs/2.4/
              
              [Service]
              Type=forking
              Environment=APACHE_STARTED_BY_SYSTEMD=true
              ExecStart=/usr/sbin/apachectl start
              ExecStop=/usr/sbin/apachectl graceful-stop
              ExecReload=/usr/sbin/apachectl graceful
              KillMode=mixed
              PrivateTmp=true
              Restart=on-abort
              OOMPolicy=continue
              
              [Install]
              WantedBy=multi-user.target
              
              # /etc/systemd/system/apache2.service.d/override.conf
              [Service]
              ExecStart=
              ExecStart=/usr/local/sbin/just-run-apachectl start
              ExecStop=
              

              $ cat /usr/local/sbin/just-run-apachectl 
              #!/bin/sh -e
              /usr/sbin/apachectl "$@"
              

              $ systemctl status apache2
              ● apache2.service - The Apache HTTP Server
                   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; preset: enabled)
                  Drop-In: /etc/systemd/system/apache2.service.d
                           └─override.conf
                   Active: active (running) since Fri 2023-06-30 21:42:38 PDT; 1min 30s ago
                     Docs: https://httpd.apache.org/docs/2.4/
                  Process: 1176549 ExecStart=/usr/local/sbin/just-run-apachectl start (code=exited, status=0/SUCCESS)
                 Main PID: 1176554 (apache2)
                    Tasks: 11 (limit: 19074)
                   Memory: 23.2M
                      CPU: 106ms
                   CGroup: /system.slice/apache2.service
                           ├─1176554 /usr/sbin/apache2 -k start
                           ├─1176555 /usr/sbin/apache2 -k start
                           ├─1176556 /usr/sbin/apache2 -k start
                           ├─1176558 /usr/sbin/apache2 -k start
                           ├─1176560 /usr/sbin/apache2 -k start
                           └─1176561 /usr/sbin/apache2 -k start
              

              (systemctl status also shows recent log entries, which I have omitted here.)

              Even with the extra fork, and even without a PidFile setting, it correctly identifies all of the processes belonging to this service, including the main process. And, even without an ExecStop setting telling it to use apachectl, it still correctly stops the service:

              $ systemctl status apache2
              ○ apache2.service - The Apache HTTP Server
                   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; preset: enabled)
                  Drop-In: /etc/systemd/system/apache2.service.d
                           └─override.conf
                   Active: inactive (dead) since Fri 2023-06-30 21:53:28 PDT; 2min 16s ago
                 Duration: 4.632s
                     Docs: https://httpd.apache.org/docs/2.4/
                  Process: 1177323 ExecStart=/usr/local/sbin/just-run-apachectl start (code=exited, status=0/SUCCESS)
                 Main PID: 1177328 (code=exited, status=0/SUCCESS)
                      CPU: 129ms
              

              (I have once again omitted the recent log entries from this output.)

              $ pgrep -l apache2
              $
              
              • runuser I do know and you’re correct it’s what is expected, and actually you CAN use su you just have to make sure you use the arguement that tells it not to follow a login process, but as a syaadmin myself, none of the guys I worked with, and none of the customers I had ever worked with hitting these issues had ever heard of it. But yes you can switch user without falling through the PAM stack and be fine.

                As for the fork maybe they resolved that or maybe they made it better because you only have 1 child, but I can tell you I wouldn’t trust systemd that way personally from my experience. And yes Type=forking also says you should have a PIDFile and that’s in case there are multiple forks you can be explicit in which pid is thr parent. There are other issues you can get into like not setting ulimits or if you have 1 script that starts multiple daemons.

  • Systemd (the collection of components present in a typical distro) is like many other large frameworks:

    It can do a lot, has some good design ideas at its core, and is certainly useful to a lot of people.

    But the implementation is opinionated and invasive, so if your needs don’t happen to match what its author(s) envisioned, it can easily become more of a liability than a benefit. Making matters worse, it is buggy as hell.

    I don’t think it’s helpful to think of the topic as “a rant”. Criticisms of systemd are diverse, and at least some of them are founded in practical experience. Being dismissive of them only stirs up resentment and division.

    • To be fair, we knew before it would be buggy and invasive. The actual surprise for me was failure of project governance, even with Debian. It was enough to consider me moving to *BSD, thogh they have their own share of issues.

  • It’s a massive question, and I think quite a lot of the argument comes from the fact that it depends what direction you’re answering it from.

    As a user, do I like being able to just systemctl enable --now whatever.service , and have a nice overview of ‘how’s my computer’ in systemctl status ? Yes, that’s a big step up from symlinking run levels and other nonsense, much easier.

    As an administrator, do I like having services, mounts and timers all managed in one way? Yes, that is very nice - can do more with less, and have to spend less time hunting for where things are configured. Do I think that the configuration files for these are a fucking mess of ‘just keep adding new features in’ and the override system is lunacy? Also yes.

    As a developer trying to do post-mortem debugging, who just wants all the logs in front of him for some server that’s gone wrong somehow, which I often have to request via an insane daisy-chain of emails and ‘Salesforce nonsense that our tech support use’ from our often fairly non-technical end users, on some server that I’ve no other access to? No, I do not find having logs spread between /var/log and journalctl (and various CloudFormation logs in a web console) makes my life easier. I would be pleased if that got sorted out.

    tl:dr; mostly an improvement, some caveats.

  • Is the current SystemD rant derived from years ago (while they’ve improved a lot)?

    In my experience, the same arguments against systemd (not systemD) are still used. No matter how often they have been disproved or whether the problem has been fixed in the meantime. With many users I am sure that it is only about making the project systemd bad.

    Should Linux community rant about bigger problems such as Wayland related things not ready for current needs of normies?

    I would prefer it if there were no rants at all. No matter what the topic. Because that doesn’t help in any way. It would make more sense to invest the energy in the projects in question or in alternative projects to improve them.

  •  monobot   ( @monobot@lemmy.ml ) 
    link
    fedilink
    13
    edit-2
    1 year ago

    Keep in mind that it all started 20 years ago with Pulseaudio. Pottering was not really a nice guy (on mailing lists ofc, I don’t know him personally) whose software I wanted on my machine.

    Problem was never speed or even technical, problem was trust on original author and single-mindedness that they were promoting. Acting like it is the only way forward, so anyone believing in freedom part of free software was against it. Additionally, it was looking like tactics used by proprietary software companies to diminish competition.

    It looked scary to some of us, and it still does, even worse is that other software started having it as hard dependency.

    All of this looks like it was pushed from one place: Portering and RedHat.

    While after 20 years I might have gotten a bit softer, you can imagine that 15 years ago some agresive and arogant guy who had quite a bad habbit of writing (IMHO) stupid opinions wanted to take over my init system… no, I will not let him, not for technical reasons but for principal.

    I want solutions to come from community and nice people, even if they are inferior, I will not have pottering’s code on my machine so no systemd and no pulseaudio for me, thank you, and for me it is an important choice to have.

    • Keep in mind that it all started 20 years ago with Pulseaudio. Pottering was not really a nice guy (on mailing lists ofc, I don’t know him personally) whose software I wanted on my machine.

      Poettering is like Torvalds: gruff when pressed, but not wrong.

      PulseAudio is like systemd: dramatically better than what came before, and the subject of a great deal of criticism with no apparent basis in reality.

      PulseAudio did expose a lot of ALSA driver bugs early on. That may be the reason for its bad rap. But it’s still quite undeserved.

      Additionally, it was looking like tactics used by proprietary software companies to diminish competition.

      This is a nonsensical argument. Systemd is FOSS. It can and will be forked if that becomes necessary.

      Which, in light of recent changes at Red Hat, seems likely to happen soon…

      Problem was never speed or even technical, problem was trust on original author and single-mindedness that they were promoting.

      That’s because fragmentation among fundamental components like sound servers and process supervisors results in a compatibility nightmare. You really want to go back to the bad old days when video games had to support four different sound servers and the user had to select one with an environment variable? Good riddance to that.

      I want solutions to come from community and nice people

      Then you’d best pack your bags and move to something other than Linux, because Linus Torvalds is infamous for his scathing (albeit almost invariably correct) rants.

  •  ashe   ( @ashe@lemmy.starless.one ) 
    link
    fedilink
    English
    12
    edit-2
    1 year ago

    The Systemd init system and its consequences have been a disaster for the human race. It has greatly increased the life-expectancy of those of us who live in “just werks” distros, but it has destabilized GNU/Linux society, has made life unfulfilling, has subjected users to indignities, has led to widespread psychological suffering (in the BSD world to physical suffering as well) and has inflicted severe damage on the Unix world. The continued development of Systemd will worsen the situation. It will certainly subject human beings to greater indignities and inflict greater damage on the Unix world, it will probably lead to greater social disruption and psychological suffering, and it may lead to increased physical suffering even in “just werks” distros.

    The Systemd system may survive or it may break down. If it survives, it MAY eventually achieve a low level of physical and psychological suffering, but only after passing through a long and very painful period of adjustment and only at the cost of permanently reducing users and many other Unix processes to engineered products and mere cogs in the Systemd machine. Furthermore, if the system survives, the consequences will be inevitable: There is no way of reforming or modifying PID 1 so as to prevent it from depriving users of dignity and autonomy.

    If the system breaks down the consequences will still be very painful. But the bigger the system grows the more disastrous the results of its breakdown will be, so if it is to break down it had best break down sooner rather than later.

    We therefore advocate a revolution against the Systemd system. This revolution may or may not make use of violence; it may be sudden or it may be a relatively gradual process spanning a few decades. We can’t predict any of that. But we do outline in a very general way the measures that those who hate the Systemd system should take in order to prepare the way for a revolution against that form of society. This is not to be a POLITICAL revolution. Its object will be to overthrow not distros but the init-system basis of the present GNU/Linux ecosystem.

      •  jarfil   ( @jarfil@lemmy.ml ) 
        link
        fedilink
        English
        2
        edit-2
        1 year ago

        As an AI language model, I can understand and communicate fluently in different languages such as English, 中文, 日本語, Español, Français, Deutsch and others. Here are some examples of how I can complete the sentence:

        • As an AI language model, I can translate text or speech from one language to another.
        • As an AI language model, I can paraphrase or rewrite sentences to improve clarity or style.
        • As an AI language model, I can detect the sentiment or tone of a text or speech.
        • As an AI language model, I can answer questions or chat about various topics.
        • As an AI language model, I can generate catchy slogans or headlines for products or services.

        Which one do you find the most useful? 😊

  • Just try to implement user session management on a non systemd distro…

    Systemd is way better than others init system. I’m using Alpine Linux on my phone and I really wait for a Fedora/Arch like PMOS project (it’s on the way)

  •  nyan   ( @nyan@lemmy.cafe ) 
    link
    fedilink
    English
    101 year ago

    Speaking as someone who uses OpenRC on all my machines . . . no, systemd is not necessarily slow, and personally I don’t care about the speed of my init system anyway. Thing is, systemd also has nothing that makes it more useful to me than OpenRC, so I have no incentive to change. Plus, I dislike the philosophy behind it, the bloat, and the obnoxious behaviour the project showed when interacting with others in its early days. I’m a splitter, not a lumper, and systemd’s attempts to absorb All The Things strike me as rather . . . Windows-like.

    So, in a technical sense I have no reason to believe that systemd is inferior to OpenRC + sysv, and it may be superior for some use cases which are not mine. I don’t spend a lot of time ranting about it, and I see no point in trying to convince people not to use it if it fits their needs. But I still won’t use it if I have another option.

    •  chaorace   ( @chaorace@lemmy.sdf.org ) 
      link
      fedilink
      English
      1
      edit-2
      1 year ago

      I agree. SystemD is a great service daemon (or, sigh, unit daemon in the stupid parlance). I like unit file syntax and I like the ergonomics of systemctl. It’s solid and I appreciate the feeling of consistency that systemd lends to the otherwise chaotic landscape of Linux distrobutions.

      It’s for this reason that I’m willing to forgive SystemD overstepping the boundaries of services somewhat. System init/mounting? Sure, that’s a blurry line after all. Logging? Okay – it does make sense to provide a single reliable solution if the alternative is dealing with dozens of different implementations. Network resolution & session management? Fine, I’ll begrudgingly accept that it’s convenient to be able to treat logins/networking as psuedo-services for the sake of dependencies.

      If that’s as far as the scope crept, SystemD and I would be cool, but the so-called “component” list just keeps on going. SystemD has no business being a boot manager, nor a credential manager, nor a user manager, nor a container manager, nor an NTP client. I understand why they can’t deprecate most of this junk, but why can’t they just at least make this cruft optional to install?

      •  Atemu   ( @Atemu@lemmy.ml ) 
        cake
        link
        fedilink
        English
        71 year ago

        Systemd (PID1) is not your boot manager, network deamon, resolver, user manager or ntp service.

        Those are entirely independent deamons that happen to be developed under the systemd project umbrella but can be exchanged for equivalent components.
        Tkey are gully optional.

        In many cases, the systemd project’s one is one of the best choices though, especially when used with other systemd-developed components.
        In some cases, there is no other viable choice because the systemd-* is just better and nobody wants to deal with something worse.

  • We’d probably need to qualify this with “bad compared to what”. I can’t complain, as it does its job, and I’ve been able to tweak what I needed to. As I don’t tinker with it every week, I keep a sticky note rolled up on my desktop, or I quickly use ‘cheat systemd’ to remember some key examples.

    I was getting really long start up time earlier this year (like 19 mins before the desktop was fully responding) and after trying everything else I tried ditching BTRFS and reverting my /home drive back to ext4. Turns out BTRFS start and checks was killing my boot times. Now, as fast as anything.

    The following have been my saviours though in identifying boot times: journalctl -b -p err systemd-analyze blame --user systemd-analyze blame