Configure cpu limits of containers parent cgroup

Hi,

I am trying to adjust the the realtime budget

lxc.cgroup.cpu.rt_runtime_us = 95000

in my lxc container config. However starting the container then fails, because the container’s parent cgroup “lxc.payload” has that attribute set to 0:

> cat /sys/fs/cgroup/cpu/lxc.payload/cpu.rt_runtime_us
0

From my understanding the cgroup “lxc.payload” is created implicitly by lxc. Is there a way to override the cpu limits on that parent cgroup?

Cheers
Flo

Hi,

I solved it by executing a script in lxc.hook.start-host which raises the runtime budget of the base cgroup.

Cheers
Flo