You pinned a market-data thread to core 4 on socket 0. The NIC reports numa_node: 1, and its receive-queue IRQs sit on cores 2 and 3 — also socket 0. p99 got worse after the pinning. Why?
- The NIC is attached to socket 1 while both the IRQ handlers and the consumer thread are on socket 0, so every packet's DMA and every interrupt cross the interconnect; move the IRQs and the thread to socket 1 cores, or move the NIC. Locality must include the device: the packet lands in memory near the NIC's socket.
- Two IRQ cores is too many; one is always better. Queue count and IRQ spread are separate from the NUMA problem shown here.
- Core 4 is too low a core number; use a higher-numbered core. Core numbering has no latency meaning by itself.
- Pinning always hurts unless hyperthreading is disabled. Sibling threads matter, but the cross-socket path is the dominant effect here.
The NIC is on socket 1 while the thread and its interrupts are on socket 0, so move the thread and the interrupts to socket 1 cores.
Locality has three parts: thread, memory and device. /sys/class/net/<if>/device/numa_node tells you where the NIC lives; numastat -p confirms whether the process is reaching across. Pinning that ignores the device usually makes things worse than no pinning at all.
Pinning the thread and the IRQs to the same socket and calling it done. The socket that matters is the one the NIC's PCIe root complex hangs off.