Interview Prep/Linux/Performance & the USE Method

What is CPU pinning/isolation and when do you use it?

AdvancedProductionPerformance & the USE Method
Answer

Pinning binds a process to specific cores so its cache stays warm and it never competes with noisy processes; isolation removes cores from the general scheduler.

taskset -cp 2-5 <pid>
# kernel cmdline: isolcpus=2-5 nohz_full=2-5 rcu_nocbs=2-5

systemd: CPUAffinity=2-5. Kubernetes: the CPU Manager static policy with Guaranteed pods. Used for trading systems, packet processing (DPDK) and real-time workloads.

All Linux questions Roadmap: Linux

More on Performance & the USE Method