I need to run docker container on different VMs with 80% cpu processing time limit. At the same time I don't know how many cpu/cores/threads target VM will have. Docker offers a few arguments to control cpu limits. The most suitalbe for me - cpu-quota. But looks like it's per cpu. For instance I have VM with the following configuration:
CPU(s): 2 On-line CPU(s) list: 0,1 Thread(s) per core: 1 Core(s) per socket: 2 Socket(s): 1 NUMA node(s): 1 When I set cpu-quota to 80000 (which is 80% of 10K) then it uses just one cpu, not 2 available cpus.
Is there nay way to put 80% cpu limit in a common way to not adjust it for each VM? Literally I need to say "hey, regardless of how many cpus/cores/threads etc you have, pls let this container to use only 80%"? Is it possible? If no, what would be the way to go, put limit for each VMs individually?