A guide for the perplexed : Results of Debian Referendum on Systemd

while I think a new, more modern init system would be worthwile ...
As I understood, systemd is not only an init system.
But ok, if we need a better init system for FreeBSD the first step is to list goals.

The second step is publishing stable ABI to help the init system to be efficient.
Third party software have to respect this ABI to perform our goals.
This two step are not that hard.

The third step will be developing a tool that consume the ABI to improve rc.

As I use jails, the boot time is not a pain for me. But I probably can vote for some improvements if a real list appear.

Last point, systemd made too much things.
Maybe rc can launch a process with id=2 to resolve some pain point and this process launch id=3 and 4 and 5 to optimize something and so on.
 
Service files are usually scripts —not binaries— that are being parsed during runtime so, ABIs are probably not relevant in this context.
 
Nothing that a s/ABI/API/g cant fix ;)

As for startup speed, servers rarely need to restart, laptops use suspend. Not sure there is a use-case for "fast startup" these days.

Is it just me but I also notice FreeBSD as it is now starts up faster than an Android phone? And consumers seem to like those cretinous pieces of crap.

From what I can see, systemd is only really existing for one thing, hooking up the underlying system to GUIs like RedHat's Gnome in a consistent and uniform manner. And it achieves (somewhat) the task using glorified .ini files. You cannot do this with shell scripts. In this day and age you can not really market a product without a GUI either.

Unfortunately going the other way and using systemd in a purely CLI environment, something feels missing. You are losing a lot of power in the replacement commands. Possibly what is lost is effectively what we know as "Unix-like".
 
Red Hat is just trying to curate (or re-invent, poorly) all low level interfaces into one single entity; a 'base' system, if you will. Albeit being done poorly. As long the GNU / Linux dichotomy exists this will never work in an efficient and cohesive matter. GNU and Linux will never be developed under the same house. Systemd from it's inception was meant to be overbearing, far more than an init system. Lennert knows this.. it's smart, but his (and his kins) execution sucks.
 
As for startup speed, servers rarely need to restart, laptops use suspend. Not sure there is a use-case for "fast startup" these days.
I've written it before, perhaps in a different thread. Even for servers, startup speed *CAN* matter, it doesn't always. From a "total percentage outage" point of view, the startup makes little difference: if a server is rebooted once every 3 months, then the difference between a 10 second and a 10 minute bootup is just 0.01% of uptime. But in many environments uptime is not important, downtime is. And that difference is also the difference between 6 nines and 4-1/2 nines. If you're trying to sell a computing service with 5 nines of availability (not uncommon), that is a HUGE effect. In particular if you need to double the number of servers to get to your desired availability (by having an active/standby setup), that difference could quickly escalate to a factor 2 of hardware cost. Now take that factor of 2 and apply it at the scale of a large data center (which can easily cost 10^9 $), and we're talking real money. Note: In reality, availability is a combination of many factors, including power (to get to anything above 3-4 nines you need batteries and generators) and software. And often boot time is not dominated by the init system, but by the BIOS. But on the other hand, many servers get rebooted regularly. I know that some cloud providers reboot every machine once every week or two, because today's operating systems all have a little bit of leakage (some more, some less); at that point, the difference between 10s and 10m of boot time becomes more relevant. So in the real world, the answer is really complicated, but "fast startup" is still a relevant factor.

... an Android phone? And consumers seem to like those cretinous pieces of crap.
A: Do I care what consumers like or do? No.
B: Many consumers don't have a real choice; they can either get Android, or spend significantly more for iOS, which doesn't boot that much faster.
 
Surely I cannot see a server that boots in 1 second or 15 making any real difference in yearly downtime. The fact that it had to reboot is pretty much the "damage" done.

A: Do I care what consumers like or do? No.

I guess what I was saying is that consumers are governing the direction of Linux more and more these days. Since they do not care about startup speed from the fact that Android seems fairly successful, we can project that systemd's improved startup speed is less important to them and in no way should be a deciding factor on why our init system needs improvement.

significantly more for iOS, which doesn't boot that much faster.

I couldn't comment. I have never booted an iOS device. I don't even think I have touched one before haha.
 
Excuse my ignorance, but I don't understand why FreeBSD should need another init system.
The current one seems simple and pretty well documented.
What kind of issues do you have with it?
 
I often hear that, but I'm wary of the need to have a 'modern' init system. Why? Just so it can be called modern?
I will preempt your possible response of 'parallel startup' to say on a lot of our servers with raid cards the longest time for the entire power cycle time is taken up in uefi/bios boot and the actual freebsd boot is quick. Mind you we avoid booting servers like avoiding the chinese flu (aka novel coronavirus)... ;)

I understand systemd/linux needs a faster boot because of all the guff it loads and they're more focused on the embedded market; neither of these apply to freebsd.
 
Surely I cannot see a server that boots in 1 second or 15 making any real difference in yearly downtime. The fact that it had to reboot is pretty much the "damage" done.

For stand alone servers this is true but it is even more relevant for servers running virtual hosts. We have servers that have not been rebooted for years. Other servers have only had down time for maintenance/repair and then who cares how fast they boot up? Umm, yes, we've had the server down for 3 hours to replace RAM, run tests, prep it, etc but now we fret about 20 seconds lost at boot? I don't think so.

I can only assume the driving force for systemd/linux is fast initial boot for laptops (but as you stated, once booted, you generally sleep/wake them) and embedded devices. Either that or linux servers require frequent rebooting?!?!
 
What I understand from various contributions on this forum is that the concern is with VM instances at cloud operators, not with bare metal, nor embedded systems.

What I don't really understand is why people posting here focus on systemd, whereas it is NOT the only init system out there.
Void Linux uses runit and it boots impressively fast, faster than the other distributions I've tried.
GhostBSD uses OpenRC.
The de-facto monopoly of systemd in the Linux world has political roots, not technical.
FreeBSD not being a Linux distribution, there is no reason to invite Linux politics in our technical choices.
Furthermore, the problem with systemd is not with its init system functionality, but with the fact that it controls everything else, often in unexpected and undesired ways, impacting the source code of applications and making them less portable - if still portable at all.

If FreeBSD really needed to change its init system, choosing or developing another one would require to clearly state the strengths and weaknesses of the current solution so as to improve it in a consistent way.

This is why I've asked my question in the post above. I'm interested in the light experienced people could shed on the strengths and weaknesses of FreeBSD's current init system.

Apparently, as mark_j outlined, parallel startup is one of its weaknesses. From what I've seen browsing rc.d, it could be solved with some refactoring.

Are there any other problems besides this one?
 
Are there any other problems besides this one?

An important one is compatibility with FOSS software originally developed for Linux.

I imagine if systemd does completely take over FOSS developer mindset, we will see a systemd shim within FreeBSD ports at the very least (a couple already exist).

The other init systems to me aren't worth really discussing or looking into until at least a couple of distros share the same system. Otherwise we could be looking into how RISCOS or Windows 3.1 starts its services.
 
An important one is compatibility with FOSS software originally developed for Linux.

If this is really so important, then there is no future for FreeBSD: after changing the init system, you'll realize FreeBSD's kernel is another important obstacle to using software originally developed for Linux. So are its base utilities, too different from their Linux equivalents.

So why use FreeBSD? Why not just do the opposite - a much easier way, i.e. to port the BSD features you'd miss to Linux?

Being different from the masses has never been easy.
Stopping being different has a name: dying.
 
What I understand from various contributions on this forum is that the concern is with VM instances at cloud operators, not with bare metal, nor embedded systems.

As far as an init system is concerned?
As I stated speed isn't everything. If cloud operators are rebooting their servers every day to prevent OS memory leaks then they should be seeking a new OS or becoming competent in discovering those said leaks.


What I don't really understand is why people posting here focus on systemd, whereas it is NOT the only init system out there.

(Apart from it's the subject of this topic? ;))
And the fact is it's not an init system either. It's more than that. That's its problem. Forgetting all the extra parts it has engulfed as it meanders into userland and subsumes GNU, its init system is a horrible design hanging everything off PID 1.

Void Linux uses runit and it boots impressively fast, faster than the other distributions I've tried.
GhostBSD uses OpenRC.
The de-facto monopoly of systemd in the Linux world has political roots, not technical.

And that's just great. Let them keep it there. It would seem almost incomprehensible that any BSD would consider any aspect of systemd to be a worthwhile thing to copy. As I stated earlier, it's deliberately designed to be non-portable and Linux-centric. That was a great decision by its designers because it makes it less likely some poor sod would attempt to port it. Look at a previous committer, Beno Rice's love affair with it. If he had his way it would be under development in FreeBSD. Oh, the inhumanity!

Redhat obviously wants to control the narrative of Linux userland. It can't control the kernel, so systemd is its chance to dictate how things work. It's perfectly understandable from their business perspective. It just amazes me how dumb the average Linux fan of systemd is because they can't see this as being a negative. The average fan spouts about the pre-systemd init systems being full of shell scripts etc and yet most of them would have never written an init shell script in their lives. They'd support systemd even if it was a front for the Taliban. :rolleyes:


FreeBSD not being a Linux distribution, there is no reason to invite Linux politics in our technical choices.
Furthermore, the problem with systemd is not with its init system functionality, but with the fact that it controls everything else, often in unexpected and undesired ways, impacting the source code of applications and making them less portable - if still portable at all.

I freely admit I know less and less about it as I have no interest in it (apart from not wanting it in BSDs). However, I did try it early on and was aghast at its demands for you to change how you program daemons. How it handles system logging. How it handles core dumps. How it handles init services and just waits for minutes for a problem to resolve. How it defaults to not allowing users to leave a process running after logout. It's basically the mantra of "we know best, so change your ways or get out!" (For Star Trek fans: I AM BORG!)

If FreeBSD really needed to change its init system, choosing or developing another one would require to clearly state the strengths and weaknesses of the current solution so as to improve it in a consistent way.

This is why I've asked my question in the post above. I'm interested in the light experienced people could shed on the strengths and weaknesses of FreeBSD's current init system.

Apparently, as mark_j outlined, parallel startup is one of its weaknesses. From what I've seen browsing rc.d, it could be solved with some refactoring.

Are there any other problems besides this one?

Of course you would have to illustrate the current pitfalls of the rc system and how to design around it. But, there's ports and other utilities to give you things like parallel startup. Why complicate something just to "modernize" it? Manpower is obviously an important issue. I'm not sure some Google Summer of Code project could solve it...

Do you want to monitor an init service to re-start it should it fail? There's a port for that (or write a shell script if you're able). Sun wrote all this back 20 years ago in their SMF. They weren't trying to be compatible with other OS's. Same goes for systemd.

Then, as can been seen by observing systemd developers, scope creep engulfs the process as you try and solve more and more problems you've just created with your last great 'enhancement'. It's why systemd will never stop expanding into userland and kernel. Who knows, in ten years time, the linux fraternity might be asking how they can unwind themselves from this systemd mess.
 
Slightly off topic but relevant:
I was surprised to fire up a Devuan ASCii installer and saw that they allow choice at the installer now between SysV and OpenRC.
That is pretty sweet. Personally I am against any change to our startup system.
Devuan is in a unique spot where they are trying to bring user choice to startup systems and systemd refuseniks.
 
I'm more than happy with SysV on Slackware. It boots the system and nothing more. Why do you need a webserver in your init system? Why do you need a huge monolith that does everything? It's against the Unix way, which is to have many small programs that do a specific job and interoperate.

Saying that, I've been using FreeBSD more and more because it's less resource intensive and more sane.
 
I'm more than happy with SysV on Slackware. It boots the system and nothing more. Why do you need a webserver in your init system? Why do you need a huge monolith that does everything? It's against the Unix way, which is to have many small programs that do a specific job and interoperate.

Saying that, I've been using FreeBSD more and more because it's less resource intensive and more sane.
A webserver in the init? You're kidding?
 
A webserver in the init? You're kidding?

It is *so* convenient, because now I can poll dependencies for my init startup script by polling a RESTful API. ;)

Check out this beauty!

Code:
while true; do
  RES=`curl "http://localhost:1/running_services" | grep network`
  RC=$?

  if [ $RC = 0 ]; then
    continue;
  fi

  if [ "$RES" = "network: running" ]; then
    break;
  fi
done

dhclient &
# I can't go on. It is too daft XD

I was surprised to fire up a Devuan ASCii installer and saw that they allow choice at the installer now between SysV and OpenRC.

I am all up for choice but I find something like this a little too much choice. In many ways adding a new init system instantly adds quite a lot of development burdon on the package maintainers.

So not having a choice in the init system is better IMO. But only if they make the *right* choice... which isn't systemd XD
 
It is *so* convenient, because now I can poll dependencies for my init startup script by polling a RESTful API. ;)

Check out this beauty!

Code:
while true; do
  RES=`curl "http://localhost:1/running_services" | grep network`
  RC=$?

  if [ $RC = 0 ]; then
    continue;
  fi

  if [ "$RES" = "network: running" ]; then
    break;
  fi
done

dhclient &
# I can't go on. It is too daft XD

[...]

LOL. Yet another example of scope creep. Provide a solution to a non-existent problem, which then requires a solution to the problem it just created.
Meanwhile rcorder plods along with REQUIRE:
And works.
:)
 
It's against the Unix way, which is to have many small programs that do a specific job and interoperate.
Was it somehow unclear? Gnu is Not Unix.

And that webserver really takes the cake. Who greenlighted that manure? Qi-yah!
 
Slightly off topic but relevant:
I was surprised to fire up a Devuan ASCii installer and saw that they allow choice at the installer now between SysV and OpenRC.
That is pretty sweet. Personally I am against any change to our startup system.
Devuan is in a unique spot where they are trying to bring user choice to startup systems and systemd refuseniks.

That choice seems to be a new feature of Ascii 2.1 installer as it wasn't in 2.0.
 
I was surprised to fire up a Devuan ASCii installer and saw that they allow choice at the installer now between SysV and OpenRC.
That is pretty sweet.

It is sweet. I ran for some time the Beowulf pre-release of Devuan with OpenRC. It was a very fast boot and totally reliable (I've also run the corresponding Debian Buster release and it was not totally reliable. For one thing I ran into the infamous hang at reboot time (that hang would be death to a server which could be left doing absolutely nothing for an indefinite number of minutes of deadtime). Of course systemd stupidities like the old problem of being unable to switch from X into a console (!) get fixed -- and replaced by other stupidities. I've also used OpenRC on FreeBSD via TrueOS and it is quite pleasant. OpenRC good. systemd very bad. (OK it works great for most users most of the time and completely f**ks some of the users some of the time).
 
It is sweet. I ran for some time the Beowulf pre-release of Devuan with OpenRC. It was a very fast boot and totally reliable (I've also run the corresponding Debian Buster release and it was not totally reliable. For one thing I ran into the infamous hang at reboot time (that hang would be death to a server which could be left doing absolutely nothing for an indefinite number of minutes of deadtime). Of course systemd stupidities like the old problem of being unable to switch from X into a console (!) get fixed -- and replaced by other stupidities. I've also used OpenRC on FreeBSD via TrueOS and it is quite pleasant. OpenRC good. systemd very bad. (OK it works great for most users most of the time and completely f**ks some of the users some of the time).

Devuan has been my personal and professional distro of choice since 1.0 was released. But my concern for the future of linux has motivated me to return to Free/Open/NetBSD in a more serious way...specifically using the "need" for a secondary backup server platform as my excuse to load FreeBSD w/ ZFS and tinker around with it. Migrating from RHEL 6 to Devuan 2.0 on our company servers is nearly complete, but should Devuan's future be compromised by Debian's foolishness, I need an escape plan.
 
Back
Top