Documentation
¶
Overview ¶
Package affinity pins a goroutine to a CPU.
A packet loop that migrates between cores loses its caches and, on a machine with more than one memory node, may end up a long way from the NIC. Pinning is also what makes a measurement mean anything: "four workers" is only a number if each one has a core to itself.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NUMANodeOf ¶
NUMANodeOf reports which memory node a CPU belongs to, or -1 if that cannot be told. It is for reporting: a run whose workers and NIC are on different nodes is worth knowing about before the numbers are believed.
func NUMANodeOfInterface ¶
NUMANodeOfInterface reports which memory node a network interface's card is attached to, or -1 if that cannot be told.
Types ¶
This section is empty.