Skip to main content

net_rx_concentrated

Function net_rx_concentrated 

Source
pub fn net_rx_concentrated() -> bool
Expand description

Whether the network’s receive processing concentrates on one CPU (K12): a NIC with a single receive queue and no RPS runs every packet’s softirq on the CPU that takes its interrupt, as on DigitalOcean’s 4-vCPU droplets (about 65% of that CPU at 165k packets/s). Read from the softirq time per CPU in /proc/stat: true when one CPU spent at least half of all the softirq time since boot, and there was some (2 s). Network receive dominates softirq time on a busy server; timers and the rest are spread over the CPUs. Linux only; false elsewhere or when the file can’t be read.

When true, it also records that CPU for keep_current_thread_off_net_rx. (The NET_RX counts of /proc/softirqs can’t tell it: a NIC’s transmit completions are counted there too, often more often than its receives, but they cost far less: on the K12 droplet 590k on CPU 3 against 342k on CPU 2 in 12 s, with CPU 2 in softirq 65% of the time and CPU 3 10%.)