2 ms·
>This is because when a single process is running, it uses as much CPU as necessary, regardless of which cgroup it is placed in. The CPU limitation only comes i
by Arnavion 12y ago
>This is because when a single process is running, it uses as much CPU as necessary, regardless of which cgroup it is placed in. The CPU limitation only comes into effect when two or more processes compete for CPU resources.
So doesn't this mean cgroups can't be used in the same way as cpulimit? cpulimit lets me limit the total max CPU usage of a process regardless of the rest of the system. The article makes it look like cgroups only allows setting the _partitioning of CPU_, not _total allowed CPU_.
Edit: Looks like the way to do it is to use cpu.cfs_period_us and cpu.cfs_quota_us instead of cpu.shares
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/sec-cpu.html https://access.redhat.com/documentation/en-US/Red_Hat_Enterp...
- rodgerd 12y agoYes, they can. cgroups can set absolute or share-based limits.