|
|
|
|
|
by seabrookmx
636 days ago
|
|
It's actually quite difficult to get a "single core" container (ie: a container with access to only one logical processor). When you set "request: 1" in Kubernetes or another container manager, you're saying "give me 1 CPU worth of CPU time" but if the underlying Linux host has 16 logical cores your container will still see them. Your container is free to use 1/16th of each of them, 100% of one of them, or anything in-between. You might think this doesn't matter in the end but it can if you have a lot of workloads on that node and those cores are busy. Your single threaded throughout can become quite compromised as a result. |
|
On Docker, --cpuset-cpus=0 will pin the container to the first core.
K8s: https://kubernetes.io/docs/tasks/administer-cluster/cpu-mana...
CPU affinity and pinning is something I think you should be able to achieve without too much hassle.