Re: The "Unix Philosophy 2020" document
Sat, Dec 28, 2019 at 06:41:56PM +0100, Oliver Schad wrote: > > The reason I think it's mostly useless is because the only use case > > for cgroup supervision is supervising double-forking daemons, which > > is not a very smart thing to do. A much better approach is to get rid > > of double-forking and then just directly supervise the resulting long > > running process. > > I can't think of any other cases where it would be useful. > > I definitly have to correct you: cgroups are *NOT* designed to catch > wild forking processes. This is just a side-effect ot them. Er, that whole quoted part, including the last sentence, is about using cgroups to supervise processes. Not about the use of cgroups in general. I can't think of any other use cases where cgroup supervision would be useful, other than for double-forking daemons. Also, wrt process supervision, calling it a side effect is bit misleading. The interfaces are not really made for that kind of use at all. Strictly speaking, anything doing kill `cat .../cgroup.procs` is racy and unreliable. Including that runcg tool that I wrote. In practice, the race is pretty much irrelevant, but it's still there, inherent to the interfaces.
Re: The "Unix Philosophy 2020" document
On Sun, 29 Dec 2019 18:07:39 +0200 Alex Suykov wrote: > Er, that whole quoted part, including the last sentence, is about > using cgroups to supervise processes. Not about the use of cgroups in > general. I can't think of any other use cases where cgroup > supervision would be useful, other than for double-forking daemons. Agree. > Also, wrt process supervision, calling it a side effect is bit > misleading. The interfaces are not really made for that kind of use > at all. Strictly speaking, anything doing kill `cat .../cgroup.procs` > is racy and unreliable. Including that runcg tool that I wrote. In > practice, the race is pretty much irrelevant, but it's still there, > inherent to the interfaces. Yes, that is true - but the freezing cgroup can handle that race. As I already mentioned it has corner cases, where a freezed process can't be killed. As far as I read with cgroup v2 this corner case is gone. This whole thing itself (double forking) is a corner case and you should somewhen(!) give an easy interface to catch that case in a supervision toolbox(!) IMHO. You can think of providing that for marketing purposes earlier. However supporting system specific stuff like cgroups is useful (and not just a marketing gag to compete against systemd) and you should support that in a system specific toolbox as part of the supervision suite (read as it is referenced as optional dependency or directly packaged). I don't see a reason to implement such stuff inside of a supervision daemon itself - a system specific toolbox is the right place for that. Best Regards Oli -- Automatic-Server AG • Oliver Schad Geschäftsführer Turnerstrasse 2 9000 St. Gallen | Schweiz www.automatic-server.com | oliver.sc...@automatic-server.com Tel: +41 71 511 31 11 | Mobile: +41 76 330 03 47 pgpKdmEP3HB0p.pgp Description: OpenPGP digital signature