Limiting cpu allowance for multiple containers


#1

Hello, I am currently working on a server running Ubuntu server 18.04. On this server, I am running multiple lxd containers and would like to know how I could set the cpu allowance so that each container only gets a fraction of the overall cpu. I have tried setting “limits.cpu.allowance” to 10% for each container, but it did not seem to take effect (the documentation says it only works under load). I have also tried setting “limits.cpu.allowance” to 25ms/200ms, which did have a noticeable effect for each individual container. However, when running multiple containers the cpu usage did not go up, making me think they all share the same “fraction” or time on the cpu. With that said, is there a better way to set the cpu allowance for these containers?