So... I may have fallen in love with the #runit #init system lol

#linux #unix

@charadon

Tell me a little about it

@RL_Dane Well...

  • It's incredibly fast
  • Barely uses any memory
  • Uses shell scripts to create services, but aren't has asinine as sysvinit scripts are (Runit services are one line, versus sysvinit init, which can get up to 40 lines of shell for a simple daemon)
  • Logging is incredibly easy compared to sysvinit
  • Works on top of any existing init system if you don't want it to replace the old one outright. Yes, it can even be used alongside systemd.
  • Very unixy way of managing services. It's basically just a bunch of symlinks and touch files.

@charadon

Was it you that said a while back that #NetBSD's init was their favorite?
If so, how do the two compare?

@RL_Dane NetBSD's is still my favorite, but the two don't really compare. Runit is definitely more Service oriented than NetBSD, which is more daemon oriented

@charadon

I'm not sure I understand the difference XD

@RL_Dane @charadon

Mewburn rc still uses PID files, a mechanism that people knew to be broken back in the middle 1980s. daemontools-family systems like runit do not.

There's no universal agreement on what a "service" is as opposed to a dæmon. But the concrete differences between the systems start with PID files, and continue with chain loading, logging, and composition.

http://jdebp.info/FGA/unix-daemon-design-mistakes-to-avoid.html#DoNotCreatePIDFiles

http://jdebp.info/FGA/daemontools-family.html

#runit #s6 #daemontools #nosh

FGA: Mistakes to avoid when designing Unix dæmon programs

@charadon @RL_Dane

The whole "init scripts are massive shell scripts" was always a bit misleading, although I _have_ seen several lengthy Mewburn rc scripts, especially in the networking parts of the system.

Mewburn rc was designed with a bunch of shell function helpers to cut down on common script code. Even van Smoorenburg rc, in a push to modernize in the early 2010s that was spurred on by the advent of systemd, gained a mechanism for much shorter scripts.

#rc #Mewburn #vanSmoorenburg

@charadon @RL_Dane

van Smoorenburg #rc was never the thing to compare to. They realized this in the big Debian Hoo-Hah over systemd in ~2014, and almost everyone ruled it out as a reasonable option.

Mewburn rc pre-dated systemd by about a decade and a comparison to it would have ruined the whole "but-but-but look at the long shell scripts!" argument.

So too did comparison to the #daemontools family:

http://jdebp.info/FGA/run-scripts-and-service-units-side-by-side.html

#s6 #nosh #runit

FGA: A side-by-side look at run scripts and service units

@charadon

Is it your first encounter with a daemontools-family system?

#runit #s6 #daemontools