Remix.run Logo
tapoxi 4 days ago

Why would a server use a different init system than a desktop or embedded device?

Why wouldn't you want unit files instead of much larger init shell scripts which duplicate logic across every service?

It also enabled a ton of event driven actions which laptops/desktops/embedded devices use.

bonzini 4 days ago | parent | next [-]

> Why wouldn't you want unit files instead of much larger init shell scripts which duplicate logic across every service?

Indeed, that criticism makes no sense at all.

> It also enabled a ton of event driven actions which laptops/desktops/embedded devices use.

Don't forget VMs. Even in server space, they use hotplug/hotunplug as much as traditional desktops.

throw0101a 3 days ago | parent [-]

>> It also enabled a ton of event driven actions which laptops/desktops/embedded devices use.

> Don't forget VMs. Even in server space, they use hotplug/hotunplug as much as traditional desktops.

I was doing hot plugging of hardware awo+ decades ago when I still administered Solaris machines. IBM/mainframes has been doing it since forever.

Even on Linux udevd existed before systemd did.

throw0101a 4 days ago | parent | prev | next [-]

> Why would a server use a different init system than a desktop or embedded device?

The futzing around with resolv.conf(5) for one.

I take to setting the immutable flag on the file given all the shenanigans that "dynamic" elements of desktop-y system software does with the file when I want the thing to never change after I install the server. (If I do need to change something (which is almost never) I'll remove/re-add the flag via Anisble's file:attr.)

Of course nowadays "init system" now also means "network settings" for some reason, and I have often have to fight between system-networkd and NetworkManager on some distros: I was very happy with interfaces(5), also because once I set the thing on install on a server, I hardly have to change it and the dynamic-y stuff is an anti-feature.

SystemD as init replacement is "fine"; SystemD as kitchen-sink-of-the-server-with-everything-tightly-coupled can get annoying.

yjftsjthsd-h 4 days ago | parent | prev | next [-]

> Why would a server use a different init system than a desktop or embedded device?

The server and desktop have a lot more disk+RAM+CPU than the embedded device, to the point that running systemd on the low end of "just enough to run Linux" would be a pain.

Outside embedded, though, it probably works uniformly enough.

nottorp 3 days ago | parent [-]

Heh. I still have a pre systemd machine around. It uses 300 M of RAM for the OS and a few services I use in my home.

I recently set up a "modern" systemd based Ubuntu server in a VM and it used closer to 1 G before I installed any service.

op00to 3 days ago | parent | next [-]

Why compare a "full-featured", do-everything OS like Ubuntu with something pre-systemd when you're concerned about memory consumption?

I just checked a random debian 12 system (with systemd) running a bunch of services at home, and here's what I see:

$ free -m

total used free shared buff/cache available

Mem: 3791 320 2235 1 1313 3471

Swap: 99 0 99

Seems like usage is pretty much on par with your expectation. The largest consumers are systemd-journal which is storing logs in RAM, and filebeat which is relatively wasteful w/ memory. systemd itself (without the journal buffer log) consumes maybe 20-30 MB.

bonzini 2 days ago | parent | prev | next [-]

I have checked three smaller machines.

On one (coreelec) systemd has 7M of resident data, of which 5.5M are shared libraries; by comparison, the numbers for sshd are respectively 6M and 3.5M.

On an OpenWRT machine without systemd (it's using procd) there are 700k of resident data. So the "cost" of systemd seems to be ~5M. Certainly I wouldn't run systemd on an old router with 16MB of RAM, but the cost is two orders of magnitude less than 1G-300M.

tapoxi 3 days ago | parent | prev [-]

Is systemd using 700MB?

4 days ago | parent | prev [-]
[deleted]