ArticleslgStudy

computer science

Multi-core network packet steering

Multi-core network packet steering is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Multi-core network packet steering rather than just read about it. In short: Network packet steering of transmitted and received traffic for multi-core architectures (multi-core network packet steering) is needed in modern network computing environments, especially in data centers, where the high bandwidth and heavy loads would easily congest a single core's queue. For this reason, many techniques, both in hardware and in software, are used in order to distribute the incoming packets across…

Multi-core network packet steering — main illustration
Multi-core network packet steering — illustration

Key takeaways

  • Multi-core network packet steering belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Multi-core network packet steering to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Multi-core network packet steering from memory before moving on to harder problems.

Reference excerpt

Network packet steering of transmitted and received traffic for multi-core architectures (multi-core network packet steering) is needed in modern network computing environments, especially in data centers, where the high bandwidth and heavy loads would easily congest a single core's queue. For this reason, many techniques, both in hardware and in software, are used in order to distribute the incoming packets across the cores of the processor. On the traffic-receiving side, the most important techniques are RSS, aRFS, RPS and RFS. For transmission, XPS is important. Packets coming into the network interface card (NIC) are processed and loaded to the receiving queues managed by the cores (which are usually implemented as ring buffers within the kernel space). The main objective is being able to use all the cores available within the CPU to process incoming packets, while also improving latency and throughput.

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, for example, is usually available on more advanced cards, like the SmartNIC).

RSS

Receive Side Scaling (RSS) is a hardware supported technique, leveraging an indirection table indexed by the last bits of the result provided by a 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 examples of header fields chosen as keys for the hash are the layer 3 IP source and destination addresses, the protocol and the layer 4 source and destination ports. In this way, packets corresponding to the same flow will be directed to the same receiving queue, without losing the original order, causing an out-of-order delivery. Moreover, all incoming flows will be load balanced across all the available cores thanks to the hash function properties. Another important feature introduced by the indirection table is the capability of changing the mapping of flows to the cores without having to change the hash function, but by simply updating the table entries.

aRFS

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. Differently from RSS which is a fully independent hardware implementation, aRFS needs to interface with the software (the kernel) to properly function. 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, so that packets are received exactly where they are needed and consumed. 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.

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 comes at the cost of introducing additional inter-processor interrupts (IPIs); however the number of hardware interrupts will not increase and potentially, by employing an interrupt aggregation technique, it could even be reduced. 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.

RPS

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 properties, packets belonging to the same flow will always be steered to the same core. This is usually done in the kernel, right after the NIC driver. Having handled the network interrupt and before it can be processed, the packet is sent to the receiving queue of a core, which is then notified thanks to an inter process interrupt. RPS can be used in conjunction with RSS, in case the number of queues managed by the hardware is lower than the number of cores. In this case after having distributed across the RSS queues the incoming packets, a pool of cores can be assigned to each queue and RPS will be used to spread again the incoming flows across the specified pool.

RFS

Receive Flow Steering (RFS) upgrades RPS in the same direction as the aRFS hardware solution does. By routing packet flows to the same CPU core running the consuming application, cache locality can be improved and leveraged, avoiding many misses and reducing the latencies introduced by the retrieval of the data from the central memory. To do this, after having computed the hash of the header fields for the current packet, the result is used to index a lookup table. This table is managed by the scheduler, which updates its entries when the application processes are moved between the cores. The overall CPU load distribution is balanced as long as the applications in user-space are evenly distributed across the multiple cores.

… excerpt ends here. Continue reading the full article.

Illustrations

Multi-core network packet steering: Simple graph showing the path receiving packets need to travel to reach the cores' queues
Simple graph showing the path receiving packets need to travel to reach the cores' queues
Multi-core network packet steering: Simple view of the receive side scaling architecture
Simple view of the receive side scaling architecture
Multi-core network packet steering: Simple view of the accelerated receive flow steering architecture
Simple view of the accelerated receive flow steering architecture
Multi-core network packet steering: Diagram showing how RPS load balance incoming packets across the CPU cores
Diagram showing how RPS load balance incoming packets across the CPU cores
Multi-core network packet steering: Diagram showing how the RFS logic distribute each incoming packet to the core running the corresponding application
Diagram showing how the RFS logic distribute each incoming packet to the core running the corresponding application

Worked examples

Example 1 — a first encounter with Multi-core network packet steering

Start with the simplest possible case. Write down what Multi-core network packet steering claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Multi-core network packet steering before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Multi-core network packet steering ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Multi-core network packet steering

In research
Multi-core network packet steering appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Multi-core network packet steering in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Multi-core network packet steering is common in secondary-school and first-year university syllabi. It links to neighbouring topics Cache (computing), Load balancing (computing), Manycore processors, so understanding it makes those chapters shorter.
In everyday life
Look for Multi-core network packet steering outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Multi-core network packet steering in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Multi-core network packet steering means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Multi-core network packet steering out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Multi-core network packet steering in simple terms?

Network packet steering of transmitted and received traffic for multi-core architectures (multi-core network packet steering) is needed in modern network computing environments, especially in data centers, where the high bandwidth and heavy loads would easily congest a single core's queue. For this…

Why does Multi-core network packet steering matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Multi-core network packet steering?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Multi-core network packet steering.

Tags

  • Cache (computing)
  • Load balancing (computing)
  • Manycore processors
  • Network flow problem
  • Networking hardware

Keep exploring