3 ms·
Pro tip: if you care about performance, and especially if you care about reliable performance measurements, you should pin and accelerate your threads. Using is
by dahfizz 5y ago
Pro tip: if you care about performance, and especially if you care about reliable performance measurements, you should pin and accelerate your threads. Using isol CPUs is the next step.
In other words: if your application is at the mercy of Linux making bad decisions about what threads run where, that is a performance bug in your app.
- spockz 5y agoHow would you do this when running in kubernetes? Afaik it just guarantees that you get scheduled on some cpu for the “right” amount of time. Not on which cpu that is. I only know that there is one scheduler that gives you dedicated cores if you set the request and limit both to equal multiples of 1000.
- ncmncm 5y agoAnother reason to put off moving to kubernetes.
- watt 5y agoWe use Kubernetes to host apps running Node.js, and K8s is great in keeping the apps running, scaling the pods and rolling out upgrades. Use the right tool for the job. If you are trying to saturate 24-core server with CPU-bound computation, don't think Kubernetes.
- spiddy 5y agoOn post-docker pre-kubernetes time I used `--cpuset-cpus` on docker args to dedicate specific cpus to redis instances, using CoreOS and fleet for cluster orchestration.
- rossmohax 5y ago> Afaik it just guarantees that you get scheduled on some cpu for the “right” amount of time. Not on which cpu that is. If you set cpu request == cpu limits, then container will be pinned to CPU cores using cpuset command [0]. There is also a way to influence NUMA node allocation using Memory Manager [1] [0] https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/ https://kubernetes.io/docs/tasks/administer-cluster/cpu-mana... [1] https://kubernetes.io/docs/tasks/administer-cluster/memory-manager/ https://kubernetes.io/docs/tasks/administer-cluster/memory-m...