Just be cautious, the long-term goal with the cgroup API is to redesign it so there's only a single hierarchy. Which is one of the reason systemd took to encapsulating it with dbus.
systemd took to encapsulating it with dbus because systemd encapsulates everything as objects ("Units", in their terms) not because of the cgroups API redesign
the redesign started to "simplify things" i think the redesign is stupid, but hey whatever one can read a biased explanation here i'm sure there's a more objective one on LKML somewhere
cgroups interfaces are file or netlink and there are multiple daemons and libraries to control them that one would "need systemd to use cgroups" is simply because systemd grabs cgroups for no good reason without systemd one can use cgroups in any way one sees fit (usually with simpler interfaces)
edit: it's still good to read the kernel doc on cgroups, to understand their simplicity in design
I didn't really want to dive into the reasons because I can't say I have the experience with the API to think critically about it - they say its unnecessarily complicated and racy because of the multiple hierarchies. I can see how that be entirely plausible.
Anyways, I don't think what you're suggesting isn't a good or useful idea. I just wanted to put a disclaimer on it because I don't think you should treat the cgroup filesystem like a stable API just yet.
i'm saying that there are other daemons that do that, not just systemd and that when systemd grabs cgroups the other userspace implementations have to use the systemd interface so on systems that don't use systemd one can use whatever (and on all systems, that "whatever" can abstract)
the Lennart post you posted says that using many different controllers at the same time can lead to race conditions when miss-used, not that cgroups are inherently racy
systemd uses cgroups to track processes, that it does not have to use at all on systems without systemd one can use anything they want, including the kernel interface that is simple
i understand what you are saying but i am saying that the systemd provided dbus interface is not the only way to use cgroups and will never be the only way to use cgroups the example of libcg (that Lennart is advising to switch to the systemd interface) will most probably work regardless of that change
cgroups are a kernel thing, that is what i'm saying that one will need to use systemd to use cgroups on systems with systemd is the result of systemd using cgroups, not of anything else systemd and logind could use proc events to do their tracking, but they are designed to use cgroups (that fit into what logind does but not entirely in what the process tracking part of systemd does) edit: funny thing, i remember reading that they want to put every process into its own cgroup
Lennarts explanations are always from the POV of systemd, thus most of the time are tautological
But someone still need to grab cgroup as I understands it. If not systemd you need an other userspace part doing the same thing in the future. As I understands it the kernel devs is planning to remove the old interface longterm?
I see what you mean, but Red Hat is, like it or not, the 400 pound gorilla in the room. When RH took over CENTOS they pretty much have taken over the enterprise space.
Meh, this whole "systemd has won" thing doesn't phase me, it's a different world than I live in.
systemd has only won in "just works" distros. Distros that attempt to give users more direct control over their system like Slackware, Gentoo, Void etc will continue to let users pick their own init system and make their packages agnostic of the init. / service manager. Gentoo supports systemd to the point of ebuilds shipping systemd service units. But few users use it. Gentoo is all about manual control and choice and in the end systemd as a monolithic program gets in your way for that.
systemd can continue to exist and do what it wants. In the end, it's almost like a Windows program, it doesn't actually affect me much. It's a completely different world.
Personally, what I like about systemd is the ease of writing unit files. Any of my systems that require custom services get CentOS because systemd. Outside of that, it doesn't provide any advantages to me over e.g. runit, as you mentioned.
Personally, what I like about good ole standard init systems, is the ease in which I can have a daemon run reliable using a shell script to launch it.
Unit files remove control of how your daemon starts, and lets something else (Which may or may not have insight into how your daemon is written) decide how it thinks is the best way to launch your daemon.
Huh? Unit files have every common option for daemon launches - and you can always wrap your daemon in a shell script if other things need to be done...and with unit files, you don't have to deal with each distro's arcane crap for init scripts. inittab is also fine for my purposes, but not as much fine-grained control as a unit file.
systemd provides many advantages over runit, just like runit provides many advantages over systemd. But the ease of writing unit files isn't one of them. Runit service files are considerably easier than systemd units. Runit service files are basically nothing more than what you would put in the Exec= field of a systemd unit.
But yes, it's all personal, that's why being able to mix and match and choose is important. If I had a need for cgroups systemd would be more attractive to me, currently runit fills all my needs except one for which I had to write my own functionality as it seems it doesn't actually exist.
All my use cases for cgroups are just OS containers as a replacement for VMs, and I've got a Proxmox 3.4 cluster for that (which is still on an ancient kernel and sysvinit), so no need there.
No, as opposed to "works in the way you want it to" distros.
"Just works" is pretty useless if it doesn't work in the way you want it to. Yeah, fantastic, Debian gives you a fully functional GNOME 3 out of the box. But then you spend three times the time you would spend on Gentoo to make it work the way you want it to that you don't gain any time at all.
What can you accomplish in Gentoo that you can't do in Debian or Arch?
Absolutely nothing, they are free software, thus they can be modified to whatever you want in theory, you can turn Debian into a racing game if you want.
The point is that Gentoo makes it easier and less time consuming than Arch or Debian to end up with the system you want. It's possible for all of them, but easier on Gentoo.
The purpose of a OS isn't to make you feel good about it's design. The purpose of a OS to make it easy to run applications, servers, and write software.
Quite right. And Gentoo makes it easier to run that software that I want. Not only that, it makes it easier to run it in a lower memory and CPU profile. Can you build everything from source on Debian to do that? Yes, but the toolset isn't there to automatically track conditional dependencies that Gentoo has, thus you have to manually administrate that stuff which is extremely time consuming compared to using the work Gentoo has already put into automating that.
So what is the MASSIVE advantage to switching from a OS that takes 15 minutes to setup from scratch or just seconds if you have decent automation... to one that takes hours, or even day and you have to write all the automation yourself?
Because like I said, it takes way longer on Debian to arrive at the system I have right now than on Gentoo and it is considerably more time consuming to maintain it.
I like to use the office chair analogy myself because it some-how fits:
Debian is an already built office chair, but it may not fit your back, it may not have the appropriate height, sure, it's an office chair with settings but that can only go so far.
Arch is an IKEA office chair, you put it together yourself, it comes with instructions, but ultimately you cna't go much further easily than deciding whether you want to leave out the wheels and armrests or not.
Gentoo is a set of deluxe power tools and infinite free raw materials to make the chair you want that fits your back perfectly, has everything you need, and as it has ntohing you don't need it's far lighter and easier to move around.
Now, of course you can just get your non power tools and take your Debian chair and make your perfect chair of it with nothing more than a primitive saw and a screw driver? But why would you? It's a lot easier to use the deluxe power tools that Gentoo offers which are advanced enough that they automatically measure stuff up for you and bolt it together at the press of a button. Portage is almost declarative, you specify the system you want in your world file, do a world update and a world clean afterwards and you have the specified system you desire.
Why bring up 'runit' in article comments like this? What is the advantage? Why should anybody give a shit? Why not just comment on what is in the art article? Why try to derail the discussion with your own personal obsessions?
Because someone said that systemd was better than sysvinit, as if sysvinit was the only alterative to systemd. I'm just pointing out more alternatives exist than sysvinit.
What is the point? There is no point.
Why do you ask if you already think you know the answer?
I am perfectly fine with people screwing around and having fun with OSes. Hobby OSes like KfreeBSD/Debian is great stuff.. and I know Gentoo is used for some embedded things. All that is fine and perfectly OK. If you like runit then fine. Make a blog post about how awesome it is and subtmit it to r/linux.
This has nothing to do with whether runit is good or not, it has to do with runit existing and that thus the argument in favour of systemd of "sysvinit is old and archaic and no longer fills modern needs" is flawed. It would only work if sysvinit and systemd were the only things existing, which isn't true.
View all comments
Show parent comment
-1
u/teh_kankerer Oct 15 '15
There are other things than sysvinit or systemd though.
I use runit which serves my needs very well and boots a lot more quickly because it's far smaller than systemd.
Turns out I never use stuff like socket activation, seats and all that stuff that systemd offers.