Question on applying both of limits.cpu and limits.cpu.allowance

Hello,

I’m new to INCUS World, and I’m in love with INCUS!!

So, I have read this topic before about cpu.allowance and limits.cpu :
https://discuss.linuxcontainers.org/t/question-on-using-limits-cpu-and-limits-cpu-allowance-together-at-the-same-time/19798

But I want to clarify one more thing, is it possible to limit CPU based on total Load on Incus?

For example, I have 4 CPU (on a VDS), I want to limit a container to use 80% CPU load max.

I’ve tried to use

incus config set container limits.cpu=4 limits.cpu.allowance=80ms/100ms

but now the max load of each CPU is 20% only max.
I want each CPU can utilize 80% load.

What is the best way to do that?

Thank you for your help.

If you have 4 CPUs, then 400ms/100ms would be 100% of the system’s CPU.
So you’d want 320ms/100ms to achieve the 80% that you want.

1 Like

Hi,

Thanks for your reply.
I will try this.

Cheers