Jump to content

Multi-core network packet steering

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by FrancioT (talk | contribs) at 13:53, 9 July 2025 (added RPS description). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Network packet steering of incoming traffic for multi-core architectures is needed in modern network computing environment, especially in data centers, where the high bandwidth and heavy loads would easily congestion a single core's queue.

Simple graph showing the path receiving packets need to travel to reach the cores' queues

For this reason many techniques, both in hardware and in software, are leveraged in order to distribute the incoming load of packets across the cores of the processor.
As shown, by the figure beside, packets coming into the network interface card (NIC) are processed and loaded to the receiving queues managed by the cores. The main objective is being able to leverage all the cores available within the processor to process incoming packets, while also improving performances like latency and throughput. [1] [2] [3] [4] [5]

Hardware techniques

Hardware accelerated techniques like RSS and aRFS are used to route and load balance incoming packets across the multiple cores' queues of a processor.
Those hardware supported methods achieve extremely low latencies and reduce the load on the CPU, as compared to the software based ones. However they require a specialized hardware integrated within the network interface controller (which could be for example a SmartNIC). [5] [6] [7]

RSS

simple view of the receive side scaling architecture

Receive Side Scaling (RSS) is an hardware supported technique, leveraging an indirection table indexed by the last bits of the result provided by an hash function, taking as inputs the header fields of the packets. The hash function input is usually customizable and the header fields used can vary between use case and implementations. Some notable example of header fields used are the layer 3 IP source and destination addresses, the protocol and the layer 4 source and destination port. In this way, packets corresponding to the same flow will be directed to the same receiving queue, moreover all incoming flows will be load balanced across all the available cores thanks to the hash function. [8] [4] [9] [1] [5]

aRFS

simple view of the accelerated receive flow steering architecture

Accelerated Receive Flow Steering (aRFS) is another hardware supported technique, born with the idea of leveraging cache locality to improve performances by routing incoming packet flows to specific cores. RSS simply load balance incoming traffic across the cores; however if a packet flow is directed to the core i (as a result of the hash function) while the application needing the received packet is running on core j, many cache misses could be avoided by simply forcing i=j.
To do this aRFS doesn't forward packets directly from the result of the hash function, but using a configurable routing table (which can be filled and updated for instance by the scheduler through an API) packet flows can be steered to the specific consuming core. [7] [6] [10]

Software techniques

Software techniques like RPS and RFS employ one of the CPU cores to steer incoming packets across the other cores of the processor. This is achieved by leveraging inter-processor interrupts (IPIs).
The benefits of a software solutions is the ease in implementation, without having to change any component (like the NIC) of the currently used architecture, but by simply deploying the proper kernel module. This benefit can be crucial especially in cases where the server machine can't be customized or accessed (like in cloud computing environment), even if the network performances could be reduced as compared the hardware supported ones. [11] [12] [3]

RPS

diagram showing how RPS load balance incoming packets across the CPU cores

Receive Packet Steering (RPS) is the RSS parallel implemented in software. All packets received by the NIC are load balanced between the cores' queues by implementing an hash function using as configurable key the header fields (like the layer 3 source and destination IP and layer 4 source and destination ports), in the same fashion as RSS does. Moreover thanks to the hash function, packets belonging to the same flow will always be steered to the same core. This is usually done within the NIC driver, before the packets can be loaded in any of the receiving queues. [11] [12] [13]

RFS

diagram showing how the RFS logic distribute each incoming packet to the core running the corresponding application

Receive Flow Steering (RFS) [2] [3] [14]









XPS (in transmission)

Transmit Packet Steering (XPS) [15] [16] [17]

See also

References

  1. ^ a b "RSS kernel linux docs". kernel.org. Retrieved 2025-07-08.
  2. ^ a b "RFS by redhat". docs.redhat.com. Retrieved 2025-07-08.
  3. ^ a b c "RFS by nvidea". docs.nvidia.com. Retrieved 2025-07-08.
  4. ^ a b "RSS overview by microsoft". learn.microsoft.com. Retrieved 2025-07-08.
  5. ^ a b c Barbette, Tom and Katsikas, Georgios P. and Maguire, Gerald Q. and Kostic, Dejan (2019). "RSS++: load and state-aware receive side scaling". Association for Computing Machinery.{{cite journal}}: CS1 maint: multiple names: authors list (link)
  6. ^ a b "aRFS by redhat". docs.redhat.com. Retrieved 2025-07-08.
  7. ^ a b "aRFS by nvidea". docs.nvidia.com. Retrieved 2025-07-08.
  8. ^ "RSS intel doc" (PDF). earn.microsoft.com. Retrieved 2025-07-08.
  9. ^ "RSS by redhat". docs.redhat.com. Retrieved 2025-07-08.
  10. ^ "aRFS kernel linux docs". kernel.org. Retrieved 2025-07-08.
  11. ^ a b "RPS linux news (LWM)". lwn.net. Retrieved 2025-07-08.
  12. ^ a b "RPS by redhat". docs.redhat.com. Retrieved 2025-07-08.
  13. ^ "RPS kernel linux docs". kernel.org. Retrieved 2025-07-08.
  14. ^ "RFS kernel linux docs". kernel.org. Retrieved 2025-07-08.
  15. ^ "XPS intel overview". intel.com. Retrieved 2025-07-08.
  16. ^ "XPS linux news (LWM)". lwn.net. Retrieved 2025-07-08.
  17. ^ "XPS kernel linux docs". kernel.org. Retrieved 2025-07-08.