Time boot on runit


(Marco Fioretti) #1

Hi all, I’ve the intent to switch from arch to void, but I’ve one little question. On arch, or owever on all systemd distros, I can use systemd-analyze for watching boot time. With runit how can I do it?


(dommer) #2

With a stop watch as far as I know. Runit is very simple, yet elegant with its capabilities. It only wants to do a few things and do them damn well, and it does.


#3

I agree. Runit = few simple scripts. That’s it. And that’s enough. :slight_smile:

EDIT:
@zar_marco I should mention that I’m an ex archer too and you should avoid to compare arch with void, especially the systemd topic. Void is different - In a good way and follows the KISS principle even more than arch. So try to think simple and be welcomed to the void ! :smile:


(oliver) #4

bootchart and bootchart2 are both in the repo.

I got bootchart working but it didn’t do what I really wanted (I just saw time and CPU usage)
Couldn’t get bootchart2 working (but didn’t really give it more than 5 minutes effort before giving up)


(Gus Fun) #9

Arch minimal does boot very fast but emphasis on minimal. All systemd systems take much longer to boot than those without it, especially runit and s6. In my experience it is a fraction of the time, not just slightly faster. Void and Obarun are among the best I have tried, with very similar pkg selection on all tested. Both boot time and resources used are minimal compared to anything else that is ready and functional to do work on.


#10

VOID IS FAST. YOU DO NOT NEED TO MEASURE IT. MEASURING IT IS A SIGN OF WEAKNESS. YOU MUST JUST ACCEPT. ONE OF US.

Back to a more serious note: yes you can analyse boot times and performance, but there’s no off-the-shelf solution like systemd-analyze. Instead you will need to edit boot shell scripts and add the time reporting yourself.

Do you have any experience with shell scripting? If so, have a read of the files in /etc/runit. Most of them are actually quite short.

My best recommendation (based off some guesses on what sort of information you want): add some lines to all of the scripts that log when they start and when they stop. Something like this function might help:

timereport() { echo "$(date +%s.N): $1" >> /var/mybootlog.txt }

If you are curious then I definitely recommend benchmarking and recording. There will be lots of people claiming that XYZ is faster, but I suspect you are after hard numbers and patterns :slight_smile:


#11

Most init systems are so slow that a stop-watch is overkill, and a wall clock will suffice. When the Debian systemd fiasco was running, I compared boot times for Debian 8 and Devuan 1, just to get to a tty login prompt: BOTH took 40 seconds. Stock Void using Runit takes 30 seconds.

My init script, rc.init, can be used with Runit [replaces /etc/runit/{1,2}] or sinit. In either case, the login prompt appears after 10 seconds. The slowest part of this is the “dhcp” negotiation [I use sdhcp, but they are all as slow as each other].

The conclusion from this is that fancy init systems are slow because they do too many [possibly] unnecessary tasks. It is ironic that boot times was once a selling point for systemd; now they can only boast about the size of their attack surface. Sorry, couldn’t resist.


#12

boot times was basically a straw man argument used by systemdOS fans (of various flavours, red hat especially)…

On a modern laptop with a cheap SSD, my machine is logged in fetching email within 5-6 seconds (if that) and that includes me typing the password…

really who cares if you could do it 10% quicker, (which I’m not convinced would be the case…) runit just works without complication and its robust, two things I really value…


(Masato the Empty) #13

seconded re: boot times.
I have a hard time believing anyone seriously marketed boot times. Was it really a selling point, or just a thing for users who were just following their chosen gurus and were unqualified to hold an opinion themselves, and needed to get in on the hottest debate going? (there were and are plenty of those on all sides).

Considering that most sysadmins would be accustomed to systems that take 10 min just to POST

And then I remember Windows ME being released and so noticeably faster to boot then 98SE. Too bad it was so horrendously unstable on a lot of hardware compared to its predecessor… to think people 15+ years later (and in Linux) were still falling for that line…