Upon reading the LXD / LXC 2.0 documentation, I have come across some new CPU limit features on this page:
https://www.stgraber.org/2016/03/26/lxd-2-0-resource-control-412/
According to @dietmar Proxmox can do anything LXD does:
So it looks possible to see and use only a limited number of load-balanced CPU cores inside a container. Is there any chance that we get to see these features (already available in LXC 2.0 with LXD) in Proxmox?
https://www.stgraber.org/2016/03/26/lxd-2-0-resource-control-412/
CPU
When it comes to CPU limits, we support 4 different things:
It’s also possible to combine one of the first two with one of the last two, that is, request a set of CPUs and then further restrict how much CPU time you get on those.
- Just give me X CPUs
In this mode, you let LXD pick a bunch of cores for you and then load-balance things as more containers and CPUs go online/offline.
The container only sees that number of CPU.- Give me a specific set of CPUs (say, core 1, 3 and 5)
Similar to the first mode except that no load-balancing is happening, you’re stuck with those cores no matter how busy they may be.- Give me 20% of whatever you have
In this mode, you get to see all the CPUs but the scheduler will restrict you to 20% of the CPU time but only when under load! So if the system isn’t busy, your container can have as much fun as it wants. When containers next to it start using the CPU, then it gets capped.- Out of every measured 200ms, give me 50ms (and no more than that)
This mode is similar to the previous one in that you get to see all the CPUs but this time, you can only use as much CPU time as you set in the limit, no matter how idle the system may be. On a system without over-commit this lets you slice your CPU very neatly and guarantees constant performance to those containers.
According to @dietmar Proxmox can do anything LXD does:
LXD uses LXC, so if LXD can do it, we can also do it. But so far I have not seen any patches.
So it looks possible to see and use only a limited number of load-balanced CPU cores inside a container. Is there any chance that we get to see these features (already available in LXC 2.0 with LXD) in Proxmox?
Last edited: