Forum › Forums › New users › New Users and General Questions › SysVinit vs runit
Tagged: runit sysvinit init init.d
- This topic has 10 replies, 6 voices, and was last updated Dec 23-9:29 pm by fungalnet.
-
AuthorPosts
-
December 22, 2020 at 7:14 am #47938Member
blur13
Hello!
I’ve been using antiX with SysVinit since the release of 19.3 on an old Asus EEEpc 1015bx from 2012 with great results. Yesterday I installed antiX with runit on an old Sony VAIO SVE1112M1EW laptop from circa 2014. Played around with it for a while and everything works great. Was surprised to see that RAM usage was about the same as for SysVinit. Did an unscientific experiment on boot time by hitting the power button at the same time on the Asus and the VAIO, and was surprised that the Asus reached the login screen a few seconds faster, despite running on older hardware. From my understanding, one of the key selling points of runit is parallelization of the start up of system services, which can speed up the boot time of the operating system. Granted, an even better experiment would be running this on identical hardware.
What are the technical pros and cons of using runit instead of SysVinit?
Thanks!
December 22, 2020 at 7:38 am #47941Member
sybok
::Hi, I am not an expert (I never modify/tinker with these low-level parts of the system).
The announcement in this forum mentions it as an experiment, without any underlying reasoning why to try it (though it may be present elsewhere in the forum).Try search the web, e.g.
https://www.slant.co/versus/12957/12960/~sysv-init_vs_runit <– contains (sometimes contradicting) opinions, not necessarily facts
http://smarden.org/runit/benefits.html- This reply was modified 2 years, 4 months ago by sybok.
December 22, 2020 at 3:08 pm #47948Member
userzero
December 22, 2020 at 8:37 pm #47953Anonymous
::this is not runit. It’s a crazy mix of Debian …
Would you please provide some details?
Are you comparing the runit implementation seen in experimental antiX version,
comparing it to that seen in VoidLinux? or in Gentoo?
What are the noticeable (er, “crazy”) differences between the various implementations?December 23, 2020 at 7:03 pm #47991Member
userzero
::Been banging my head agains a wall to get a <#sv status slim> working, 🙂
http://smarden.org/runit/ … https://wiki.artixlinux.org/Main/Runit … https://docs.voidlinux.org/config/services/user-services.html … https://wiki.archlinux.org/index.php/runit
>_ sudo sv status slim fail: slim: unable to change to service directory: file does not existClue number one, /etc/inittab which is a conffile of sysvinit-core.
Number two,
man sv, SYNOPSIS sv [-v] [-w sec] command services /etc/init.d/service [-w sec] commandNumber three,
berbellon @:[/etc/rc2.d] >_ ls -lEntonces,
List services: ls /etc/init.d/ Start service: /etc/init.d/{SERVICENAME} start or service {SERVICENAME} start Stop service: /etc/init.d/{SERVICENAME} stop or service {SERVICENAME} stop Enable service: cd /etc/rc3.d ln -s ../init.d/{SERVICENAME} S95{SERVICENAME} (the S95 is used to specify the order. S01 will start before S02, etc) Disable service: rm /etc/rc3.d/*{SERVICENAME}Now, I understand that even Debian needed years to really switch toward systemd unit.
December 23, 2020 at 7:16 pm #47993MemberDzhigit
::Been banging my head agains a wall to get a <#sv status slim> working,
I don’t think SLiM provides a runscript. The program sv uses the directory /etc/service by default, while most Debian packages only provide /lib/systemd or /etc/init.d
December 23, 2020 at 7:27 pm #47994Anonymous
::>_ sudo sv status slim fail: slim: unable to change to service directory: file does not existClue number one, /etc/inittab which is a conffile of sysvinit-core.
Number two,
man sv, SYNOPSIS sv [-v] [-w sec] command services /etc/init.d/service [-w sec] commandPlacement in init.d directory is mentioned in the sv project’s own docs.
“The sv program can be sym-linked to /etc/init.d/ to provide an LSB init script interface.”
(In other words, that detail is not a proprietary quirk of debian’s implementation.)
http://smarden.org/runit/sv.8.html
December 23, 2020 at 7:30 pm #47995Anonymous
::> I don’t think SLiM provides a runscript
Yes, it does.
dpkg-query -L slim | grep init
^—v
/etc/init.d/slimedited, to add:
or, possibly, you meant “a runit run script”.
No, I’ve never encountered any *.deb which additionally installs a file to /etc/service/
(I haven’t checked; that may be one of the curation details in assembling the runit-flavored antiX version)December 23, 2020 at 7:50 pm #47998MemberDzhigit
::I meant native runit script for sv.
No, I’ve never encountered any *.deb which additionally installs a file to /etc/sv/
dpkg-query -L getty-runDecember 23, 2020 at 8:00 pm #47999Anonymous
::not booted to a system using runit
dpkg-query: package ‘getty-run’ is not installed
so I looked here https://packages.debian.org/buster/all/getty-run/filelist but I learned nothing by doing so.December 23, 2020 at 9:29 pm #48009Member
fungalnet
::ls -al /etc/runit/runsvdir/defaultlists the links to the service files that run when the system boots up.
The service files are in /etc/sv
ln -s /etc/sv/sshd /etc/runit/runsvdir/default/starts sshd
rm /etc/runit/runsvdir/default/sshdremoves the link and stops the service supervision.
Pretty damn simple. You have service files and you have a crunch directory where you link and unlink the service files you want running or not.
Beware that different cpus may use different amount of ram for the same exact system. It may have to do with what the kernel loads up to utilize the particular machine’s hw. So don’t draw quick conclusions on the init system.
Also if you look at processes with something like htop or lxtask and order the ram use running services must be identical to draw conlusions on ram use. Then boot time is also based on what services are running. If for example you have wpa-supplicant running and have no wifi, or have wifi but it doesn’t access any networks, it slows down booting somewhat as it is unnecesseraly waiting for response. Systemd is really terrible with net devices, if it is not connecting it takes by default 90s to move further down the list of services to run.
Then there is the issue of running runit as true init (pid1) or having sysv scripts run stage1 and runit taking over as a service supervisor. From what I’ve seen you can do either with antix/debian.
-
AuthorPosts
- You must be logged in to reply to this topic.