Re: Runit questions

From: Jan Bramkamp <crest_at_rlwinm.de>
Date: Tue, 11 Oct 2016 11:53:38 +0200

On 11/10/16 09:33, Andy Mender wrote:
> Hello,
>
> I am a "journeyman" UNIX user, currently trying to implement runit
> as a substitute for systemd on a number of GNU/Linux distributions.
> I already have the ./run service scripts per the original documentation for
> runit (http://smarden.org/runit/).
> However, I don't fully understand how logging and dependency resolution
> works.
>
> 1. When running several services with the service script as ./run and the
> logging daemon's service as ./log/run,
> does it mean that there are several instances/PIDs of the logging daemon?
> Each attached to the service
> it monitors?

runsvdir spawns (fork+exec) one runsv instance per service directory.
If the service directory contains a "./log" subdirectory it creates a
pipe and connects "./run" with "./log/run" into a pipeline. So yes every
services gets its own logging process if it uses the runit logging
scheme. Don't worry about the resource consumption because these are
very small processes.

> 2. If several services rely on a common daemon, like dbus or udev/eudev, is
> the said daemon launched multiple times?

Runit doesn't track dependencies directly, but it can handle them. This
is done by calling sv start $DEP_1 $DEP_2 etc. in the ./run script.

> 3. I noticed the ./run scripts are essentially Shell scripts by default.
> Does this resolve the commonly perceived
> limitations of System V init scripts?

Runit contains just enough features to offer comfortable service
management as long as all services are represented by a long running
process.

Most "./run" scripts are very simple but highly repetitive (start
dependencies, some simple setup, limit the process resources, drop
privileges, exec into service process).
Received on Tue Oct 11 2016 - 09:53:38 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC