What types of Linux server applications should have their CPU affinity set?

I'm wondering in what scenarios is there value in setting the CPU affinity.


Generally, CPU affinity is used for process isolation or to reduce contention for resources. High-frequency trading is the application in which I use CPU sets and CPU shielding, but I've also seen applications in scientific/computational computing (HPC), realtime applications and e-commerce. Professional audio applications are another common example that requires realtime kernels and CPU affinity sets.

At the basic level, the taskset command is used to assign affinities.

This is a tutorial for creating groups of CPUs for specific applications/processes using cset, which is a little more organized than taskset. https://rt.wiki.kernel.org/index.php/Cpuset_management_utility/tutorial