14 Affinity: Truce with the kernel

This chapter covers

  • Why affinity is an important concern for modern CPUs
  • Controlling affinity for your parallel applications
  • Fine-tuning performance with process placement

We first encountered affinity in section 8.6.2 on the MPI (Message Passing Interface), where we defined it and briefly showed how to handle it. We repeat the definition here and also define process placement.

  • Affinity—Assigns a preference for the scheduling of a process, rank or thread to a particular hardware component. This is also called pinning or binding.

  • Placement—Assigns a process or thread to a hardware location.

We’ll go into more depth about affinity, placement, and the order of threads or ranks in this chapter. Concerns ...

Get Parallel and High Performance Computing now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.