3 ms·
> Don't use Docker's --cpu flag and instead use --cpu-shares to avoid (mostly useless) quota enforcement. One caveat is that an application can detect when --c
by mratsim 3y ago
> Don't use Docker's --cpu flag and instead use --cpu-shares to avoid (mostly useless) quota enforcement.
One caveat is that an application can detect when --cpu is used as I think it's using cpuset. When quota are used it cannot detect and more threads than necessary will likely be spawned
- cpuguy83 3y agoIt is not using cpuset (there is a separate flag for this). --cpus tweaks the cfs quota based on the number of cpus on the system and the requested amount.
- dilyevsky 3y ago—cpu sets the quota, there is is a —cpuset-cpu flag for cpuset and you can detect both by looking at the /sys/fs/cgroup