Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] Which init system uses least ram and boots faster (including systemd)? (Read 7407 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[SOLVED] Which init system uses least ram and boots faster (including systemd)?

Which init system uses least ram and boots faster (including systemd)?

Re: Which init system uses least ram and boots faster (including systemd)?

Reply #1
I can't speak for least ram, but on boot speed IMO is either s6 or runit. I am currently on s6 and it boots fast and I've used runit before and it is fast as well.

Re: Which init system uses least ram and boots faster (including systemd)?

Reply #2
The least amount of RAM is probably runit. The fastest boot speed is probably either s6 or runit. To be honest, these things are all minimally different from each other. Not even systemd uses that much RAM, I guarantee the web browser you used to post this thread uses magnitudes more.

Re: Which init system uses least ram and boots faster (including systemd)?

Reply #3
i believe that this is depending on the system used and services enabled. network connectivity takes much time on systemd, while on non-systemd, init does not wait if an internet connection is established.

coming from void, and recently running s6 (not artix-s6), i could say that s6 gives be the least time to see the login prompt.

BUT, the use of init systems should not be measured by how much ram is used or how fast it boots (unless you're on systemd).

Re: Which init system uses least ram and boots faster (including systemd)?

Reply #4
There's better metrics to use, to be honest.  Overall simplicity and robustness.

Boots quick was the excuse that they used for systemd...which it fails miserably in many cases.  Which depending on your device or use case was of some small importance (Embedded, maybe containers, but definitely not any of the other cases, really...) but didn't rate the stuff we've seen systemd go and do.

If you're aiming for the simplest functional solution in the space, runit wins (Note: I maintain a fork of runit...)  If you're amining for the lightest-weight, conceptually and functionally, init and supervision solution, it's the winner.  Do you need deterministic start-up?  It has a bit of an issue there because of how Gerrit Pape designed it- it has service check bars to startup, but that's only sort of the same thing.  Your execution of the services is partially at the whim of the process scheduler of your POSIX/*BSD-like OS there because of how runsvdir does things.

That being said, for most of the things you're going to do in this space, deterministic startups is nice but absolutely not needed.  It comes up fully in <X> seconds and does it right with ways for you to easily know what failed when it doesn't.   There's work ongoing in the meta-runit Yocto layer to instill some solid determinism as it helps with the speed of startup of some of the projects leveraging that with Yocto.  But that's something that I'm bolting onto the service startup run-files in /etc/sv that leverages what is there within runit.  I've got a good idea how to clean some of this up- but it's not been officially implemented...yet...   Without the automation tools I am providing in meta-runit to do this, you can do it in packaging/by hand easily enough.  But...do you honestly need that?  If so, you might want to look at s6.  If not, it's a push, to be truthful.

s6 is a bit more complex.  That has consequences in some applications.  It can be much more deterministic (which is why it's oftentimes faster to a login prompt than runit...) but it's larger in footprint on flash, combined with details like that- which is why I initially passed on it for what I was doing at the time I forked the original runit codebase.  I have less experience with s6, so it might be that I'm not telling you the whole truth there.  I'll own that.

To be honest...as long it boots, boots cleanly and reliably (This can't be said of systemd...  X-D) it's all good.  Do you understand how the system works and can fix things when they break on you?  It's a win. 


Re: Which init system uses least ram and boots faster (including systemd)?

Reply #6
Deterministic startup means that the services start in the same, specified order every time. So for example, openrc, if you don't enable the parallel option, is deterministic. Old sysvinit was as well. systemd, runit, and s6 are all inherently parallel so there's no telling what order services are started in. Of course, they have some level of dependency-management for services that do depend on other services being up (many services depend on dbus running for example).


 

Re: Which init system uses least ram and boots faster (including systemd)?

Reply #8
Because s6-rc (the service manager) has support for dependency management. This lets you order services to some extent.