Mitigating CPU Frontend for Complex Data Plane Applications

Yihan Dang (Xi'an Jiaotong University), Hao Li (Xi'an Jiaotong University), Ze Xia (Xi'an Jiaotong University), Jiajun Luan (Xi'an Jiaotong University), Peng Zhang (Xi'an Jiaotong University)

23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26) · Day 3 · Virtualization Revisited

Overview

Modern high-speed networks rely heavily on a diverse range of data plane applications (DPI), including software firewalls, software routers, and load balancers. As networks grow increasingly sophisticated, complex data plane applications (CDPA) have emerged to handle intensive tasks such as deep protocol parsing, payload reassembly, pattern matching against complex signatures, and state tracking across connection lifecycles. While simpler packet processing systems can scale up to 100 Gbps per core, CDPAs suffer from severe throughput limitations and high resource consumption. This talk, presented at USENIX NSDI by Yihan Dang from Xi'an Jiaotong University, investigates the root causes of these performance bottlenecks and introduces NanoPipeLine, a novel systems approach that redesigns packet execution flows to bypass CPU front-end starvation.

Watch on YouTube · Slides

Visual summary for Mitigating CPU Frontend for Complex Data Plane Applications by Yihan Dang, Hao Li, Ze Xia, Jiajun Luan, Peng Zhang
Visual summary for Mitigating CPU Frontend for Complex Data Plane Applications by Yihan Dang, Hao Li, Ze Xia, Jiajun Luan, Peng Zhang

Key moments

  1. 0:00 Introduction and motivation for Complex Data Plane Applications
  2. 2:00 Profiling IPC and identifying the CPU front-end bottleneck
  3. 4:00 Analysis of I-cache thrashing caused by long processing paths
  4. 6:00 Introduction of NanoPipeline and execution path redefinition
  5. 8:00 Addressing semantic consistency and variable preservation challenges
  6. 11:40 Profile-guided partitioning policy for efficient scheduling
  7. 14:10 Evaluation results and performance throughput improvements

Mitigating CPU Frontend for Complex Data Plane Applications

Speakers: Yihan Dang (Xi'an Jiaotong University); Hao Li (Xi'an Jiaotong University); Ze Xia (Xi'an Jiaotong University); Jiajun Luan (Xi'an Jiaotong University); Peng Zhang (Xi'an Jiaotong University)

Conference: USENIX NSDI

YouTube: https://www.youtube.com/watch?v=0DQdjUw-Tdg

Overview

Modern high-speed networks rely heavily on a diverse range of data plane applications (DPI), including software firewalls, software routers, and load balancers. As networks grow increasingly sophisticated, complex data plane applications (CDPA) have emerged to handle intensive tasks such as deep protocol parsing, payload reassembly, pattern matching against complex signatures, and state tracking across connection lifecycles. While simpler packet processing systems can scale up to 100 Gbps per core, CDPAs suffer from severe throughput limitations and high resource consumption. This talk, presented at USENIX NSDI by Yihan Dang from Xi'an Jiaotong University, investigates the root causes of these performance bottlenecks and introduces NanoPipeLine, a novel systems approach that redesigns packet execution flows to bypass CPU front-end starvation.

The core motivation behind this research stems from a surprising micro-architectural finding: CPU inefficiency in CDPAs is not merely a symptom of heavy processing logic, but a consequence of hardware front-end stalls. Through top-down micro-architectural profiling, the authors discovered that CDPAs spend an average of 45.1% of their CPU cycles stalled in the CPU front-end—specifically due to instruction cache (I-cache) thrashing caused by excessively long execution paths. Existing compiler optimizations, such as binary layout reordering or dead-code elimination, fail to solve this problem because they leave the fundamental execution path untouched. NanoPipeLine addresses this gap by redefining packet processing execution order, chopping monolithic code paths into I-cache-friendly stages without altering application semantics.

This work matters deeply to systems engineers, infrastructure teams, and network architects deploying software-defined networking (SDN) and Network Function Virtualization (NFV) pipelines on commodity CPUs. By demonstrating that instruction cache efficiency—rather than raw compute or data-cache access—often dictates modern data plane throughput, the research provides a blueprint for unlocking double-digit performance gains in software middleboxes without requiring specialized hardware accelerators.

Background

▶ Watch: Introduction and motivation for Complex Data Plane Applications (0:00)

In the systems and networking machine learning space, packet processing performance is traditionally analyzed through the lens of algorithmic complexity, memory bandwidth, or Data cache (D-cache) locality. Simple data plane applications—such as basic IP forwarders or stateless packet filters—exhibit compact instruction footprints that fit comfortably inside modern CPU L1 instruction caches. Consequently, these simple pipelines scale linearly with core counts and can saturate multi-100 Gbps interfaces.

However, the proliferation of L7 proxies, stateful firewalls, intrusion detection and prevention systems (IDPS), and Quality of Service (QoS) controllers in core networks has transformed data plane software. CDPAs require long, branching execution paths that span tens or hundreds of thousands of instructions. When processing packets sequentially, a packet triggers instructions from the start of the program to the end. In a classic run-to-completion model, once packet $N$ finishes execution, the I-cache is saturated with the tail-end instructions of that workflow. When packet $N+1$ immediately begins processing from the entry point of the application, it triggers an avalanche of I-cache misses because the initial code blocks have long since been evicted.

Prior work has attempted to mitigate this overhead through two primary avenues:

  1. Binary Layout Optimization: Aggregating frequent function callers, callees, and related basic blocks together in the application binary to maximize single cache-line utility.
  2. Domain-Specific Compiler Hints: Introducing annotations (such as stripping unnecessary L3 assumptions in L7 processing) to enable more aggressive dead-code elimination and compiler optimizations.

While these approaches help, they fail when confronted with execution paths that are orders of magnitude larger than L1 I-cache capacity. No matter how tightly a binary is packed, a monolithic code path exceeding cache size will inevitably thrash the I-cache during run-to-completion packet processing. This systemic hardware limitation motivated the authors to look beyond static layout restructuring and rethink the dynamic execution order of packet processing itself.

Key Findings

▶ Watch: Analysis of I-cache thrashing caused by long processing paths (4:00)

The central discovery of this work is that CDPAs are fundamentally bounded by CPU front-end stalls rather than back-end compute or memory access latency. Using top-down micro-architectural analysis, the researchers uncovered the following headline results:

  • Front-End Dominance: On average, 45.1% of total CPU cycles in representative CDPAs are wasted in the CPU front-end due to instruction fetching bottlenecks and I-cache thrashing.
  • Throughput Improvements: Deploying NanoPipeLine yields consistent end-to-end throughput performance gains ranging from 17% to 30% across a suite of complex data plane applications.
  • Inadequacy of D-Cache Optimizations: Applying D-cache-focused optimizations (such as flow-aware packet reordering ala Reframe) yields negligible performance gains for CDPAs because their primary bottleneck is instruction access (I-cache), not data access (D-cache).
  • Inadequacy of Static Layouts: Traditional binary layout optimizations fail to resolve long-path I-cache misses, occasionally degrading performance further by misaligning branch predictions.
  • Instruction Retirement Ratios: By breaking execution into I-cache-friendly stages, NanoPipeLine successfully increases the ratio of retired CPU cycles, proving that the CPU spends significantly more time executing useful work and less time stalling.

Technical Design

▶ Watch: Introduction of NanoPipeline and execution path redefinition (6:00)

To overcome I-cache thrashing without modifying native application logic or breaking stateful semantics, NanoPipeLine introduces an automated code-transformation and runtime scheduling framework comprising two main components: an offline static analyzer and an online runtime scheduler.

Offline Analysis and Scheduling Site Injection

The offline analyzer parses the application's LLVM Intermediate Representation (LLVM IR) to identify safe insertion points—termed scheduling sites—where packet processing can be temporarily suspended and resumed. Inserting scheduling sites arbitrarily, however, introduces severe risks of semantic corruption. For instance, if packet 1 is suspended mid-flow (e.g., after checking a flow table but before creating an entry), a subsequent packet 2 belonging to the same flow might inspect an empty table, take an erroneous code branch, and corrupt application state.

To guarantee semantic consistency, NanoPipeLine classifies all program variables into two distinct categories:

  • Per-Packet Variables: Non-pointer function arguments and stack variables accessed exclusively by a single packet instance. These are safely preserved by assigning each packet its own private execution stack.
  • Cross-Packet Variables: Global variables and shared state structures accessible by multiple packets.

For every cross-packet variable, the analyzer executes classic alias analysis tools over the application's Control Flow Graph (CFG) to map read and write reference pairs. It then calculates a commitment window—the continuous range of CFG nodes bounded by the read-write pair of that variable. CFG edges falling outside these commitment windows represent safe locations for scheduling sites, as suspending execution at these points ensures that intervening packets cannot prematurely modify or read uncommitted shared states.

Profile-Guided Partitioning Policy

A naive placement of scheduling sites can introduce excessive runtime overhead. Because CDPA codebases can be one to two magnitude sizes larger than L1 I-cache capacity, a single packet could theoretically hit scheduling sites over 100 times during its lifecycle, completely neutralizing any I-cache caching benefits through context-saving and scheduling tax.

To solve this, NanoPipeLine employs a profile-guided partitioning policy. Execution paths in network applications are highly skewed; certain basic blocks execute rarely while others form hot execution loops. By collecting runtime path traces (including basic block entry frequencies and cache-line consumption metrics), the offline analyzer computes the relative cost and weight of each CFG block. Heavy, cache-consuming blocks are identified and managed to ensure that runtime stages strictly adhere to L1 I-cache capacity limits while minimizing the total number of scheduling interventions.

Runtime Execution Model

During runtime, when a packet's execution hits an injected scheduling site, its current processing state is suspended, control is handed over to the runtime scheduler, and the scheduler saves the execution context, selects the next packet in the queue, and resumes its processing stage. Because multiple packets cycle through the same compact code stage sequentially, instructions remain hot in the I-cache, effectively eliminating thrashing. Despite the interleaved execution order, the state machine guarantees that every packet resumes deterministically from where it paused, preserving native program semantics down to the instruction level.

Experimental Setup & Results

▶ Watch: Profile-guided partitioning policy for efficient scheduling (11:40)

The evaluation of NanoPipeLine was conducted using a suite of representative complex data plane applications implemented using standard software packet processing frameworks (such as Click Modular Router elements and custom L7 proxy implementations).

  • Baselines: The authors compared NanoPipeLine against three baseline configurations:
  1. Native Run-to-Completion: Unmodified CDPA implementations.
  2. Reframe: Flow-aware packet reordering optimized for D-cache locality.
  3. Binary Layout Optimizations: Compiler-driven basic block reordering tools.
  • Metrics: Primary evaluation metrics include end-to-end application throughput (measured in packets or Gbps per core), top-down micro-architectural breakdown of CPU cycles (front-end bounds, back-end bounds, bad speculation, and retired cycles), L1 I-cache miss rates, and Instructions Per Cycle (IPC).
  • Headline Results:
  • NanoPipeLine delivered consistent throughput improvements between 17% and 30% across tested CDPAs.
  • Micro-architectural performance counters confirmed a dramatic reduction in L1 I-cache misses, directly corresponding to an expanded ratio of retired CPU cycles and higher overall IPC.
  • Comparative evaluations showed that applying D-cache reordering (Reframe) yielded marginal speedups, verifying that instruction cache starvation—not data access latency—is the dominant bottleneck in complex packet processing workloads. Similarly, standalone binary layout optimizations failed to stabilize throughput, underscoring the necessity of dynamic path-splitting implemented by NanoPipeLine.

Note: Due to the systems-focused nature of this work, specific hardware server models and dataset generation parameters (beyond trace-driven profiling inputs) were omitted from the transcript details.

Practical Implications

▶ Watch: Evaluation results and performance throughput improvements (14:10)

For infrastructure teams, network operators, and systems architects building high-performance software networking stacks, this research offers critical lessons:

  1. Shift Optimization Focus from Data to Code: When scaling software firewalls, load balancers, and deep packet inspection engines, developers frequently over-index on data layout and D-cache locality. This work proves that for CDPAs, software bottleneck analysis must prioritize the instruction cache and CPU front-end.
  2. Limitations of Compiler-Only Solutions: Standard compiler flags and static binary layout tools are insufficient for massive codebases whose execution paths dwarf L1 instruction cache capacities. Dynamic execution restructuring (such as cooperative packet pipelining) is required to break monolithic paths into cache-resident stages.
  3. Compatibility with Existing Codebases: Because NanoPipeLine operates at the LLVM IR level via automated static analysis and injects scheduling sites without altering native algorithmic logic, infrastructure teams can integrate it into existing C/C++ data plane codebases without manual source-code rewrites.
  4. Tradeoffs: The primary trade-off introduced by NanoPipeLine is scheduling and context-switch overhead. If partitioning is overly aggressive, the CPU overhead of context management can outweigh I-cache savings—highlighting the absolute necessity of profile-guided cost analysis.

Key Takeaways

  • The Front-End Bottleneck: Complex data plane applications spend an average of 45.1% of their CPU cycles stalled in the front-end due to severe I-cache thrashing caused by long, monolithic execution paths.
  • Run-to-Completion Flaws: Classic sequential packet processing evicts instruction cache lines between packets, triggering constant cache misses as each new packet starts execution from the entry point.
  • NanoPipeLine Framework: An automated compiler and runtime system that injects scheduling sites into application binaries, chopping execution into I-cache-friendly stages while maintaining program semantics.
  • Semantic Preservation via Alias Analysis: Uses LLVM IR-level alias analysis to map commitment windows of cross-packet global variables, ensuring that interleaved packet execution never violates program state consistency.
  • Profile-Guided Optimization: Avoids excessive scheduling overhead by weighting basic blocks based on trace data, ensuring scheduling sites are placed only where necessary to maintain cache residency.
  • Proven Speedups: Delivers consistent 17% to 30% throughput improvements across representative CDPAs, outperforming traditional D-cache reordering and static binary layout techniques.

About the Speaker(s)

The research presented in this talk was conducted by a research team from Xi'an Jiaotong University, featuring Yihan Dang as the primary presenter, alongside colleagues Hao Li, Ze Xia, Jiajun Luan, and Peng Zhang. The team specializes in computer systems, operating systems, and high-performance network data plane architectures.

Reviews

→ Top-rated talks at 23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26)

All talks from 23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26)