I’d like to know: is there any way to strictly reserve a specific (like cpu2 or cpu3, not simply using “docker run -c 1”) whole CPU core for a specific container?
I tried to use the flag “–cpuset-cpus 1” but I get the following error : “unknown flag: --cpuset-cpus”
As you’ve tried, --cpuset-cpus will ordinarily place a container on a specific CPU id (or set of CPU ids). However, the underlying, host OS, must support this feature. The engine and client version must also support this feature. If you are using a modern docker engine (1.13 or 17.03 or later), then I suspect the host OS may not fully support CPU reservations.
Another potential impact of --cpuset-cpus is that it may conflict with other containers or host processes that have reserved the same CPU. I don’t think that’s your problem here, but did want to mention it.
I reinstalled docker and the problem was solved…
“In the doubt, reboot”.
Thank you !