Todos os livros

Profissional

Apps Sobre Coach Entrar Começar a ler

Quantitative Finance · Glossário

O que é CPU affinity, core isolation, housekeeping core?

Também chamado de: CPU affinity · core isolation · housekeeping core

Definition 13.1 Low-Latency Software · Capítulo 13 — Linux Tuning

The CPU affinity of a thread is the set of CPUs the scheduler may run it on; it is set with sched_setaffinity (or taskset from a shell) and inherited by the threads a thread creates. Core isolation removes CPUs from the scheduler’s load balancing, so that no thread runs on them unless its affinity names them explicitly, and moves the kernel’s own unbound work away from them. A housekeeping core is a CPU left out of the isolated set, which runs everything else: the kernel’s work, the interrupts of devices the hot path does not use, and the process’s cold threads.

The hiccup meter: how often a thread spinning on the time-stamp counter is kept from running for at least x, over five seconds, pinned to a CPU no other program of ours uses, free to move, and pinned to a CPU shared with a second spinning thread. Measured on a laptop (Intel Core Ultra 7 155H) under WSL2, no isolated cores, benchmark at normal priority on an otherwise idle machine. Data: bench_tuning.py.
Figure 13.1. The hiccup meter: how often a thread spinning on the time-stamp counter is kept from running for at least xx, over five seconds, pinned to a CPU no other program of ours uses, free to move, and pinned to a CPU shared with a second spinning thread. Measured on a laptop (Intel Core Ultra 7 155H) under WSL2, no isolated cores, benchmark at normal priority on an otherwise idle machine. Data: bench_tuning.py.
A tuned host for chapter 4’s two-socket fixture: each column is a physical core with its two hardware threads. The boot line isolcpus=21-23,29-31 nohz_full=21-23 rcu_nocbs=21-23 irqaffinity=0-15 with the siblings taken offline, the card’s interrupt queues bound to CPUs 16–20; the build’s audit accepts this host (the tuned fixture).
Figure 13.2. A tuned host for chapter 4’s two-socket fixture: each column is a physical core with its two hardware threads. The boot line isolcpus=21-23,29-31 nohz_full=21-23 rcu_nocbs=21-23 irqaffinity=0-15 with the siblings taken offline, the card’s interrupt queues bound to CPUs 16–20; the build’s audit accepts this host (the tuned fixture).
Ler no capítulo →