[systemd-devel] how to set net_cls.classid cgroups argument for a service?

Lennart Poettering lennart at poettering.net
Wed Nov 27 09:25:49 UTC 2019


On Di, 26.11.19 15:27, Andrew Gurinovich (altmind at gmail.com) wrote:

> What is the recommended way to assign cgroups prop net_cls.classid to a
> systemd service?
> Seems that a rule of thumb that whatever service property that is supposed
> to be systemd-managed, got a property in service file. However,
> https://systemd.io/CGROUP_DELEGATION says that:
>
> >>This means systemd currently does not and will never manage the following
> controllers on cgroup v1: freezer, cpuset, net_cls, perf_event, net_prio,
> hugetlb.
>
> Do It mean I'm on my own and need to write a custom ExecStartPost shell
> script to handle cgroups creation and cleanup myself just to change a
> single cgroup argument?

Yes.

These controllers are not supported by systemd, and this will not
change (at least for their cgroupsv1 implementations) even with
current systemd versions. On cgroupsv2, we now support "cpuset"
starting with the upcoming v244 of systemd, and "freezer" is currently
pending as PR. The other 4 do not exist and have no future on cgroupsv2.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list