Supercharging Packet-level Network Simulation of Large Model Training via Memoization and Fast-Forwarding
Fei Long (PhD student · Tsinghua University), Kaihui Gao (Zhongguancun Laboratory), Li Chen (Zhongguancun Laboratory), Dan Li (Tsinghua University), Yiwei Zhang (Tsinghua University), Fei Gui (Zhongguancun Laboratory), Yitao Xing (Huawei), Wenjia Wei (Huawei), Bingyang Liu (Huawei)
23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26) · Day 2 · Debugging Distributed Systems
Overview
As trillion-parameter large language models (LLMs) continue to scale across clusters comprising millions of GPUs, verifying the underlying AI infrastructure has become an engineering bottleneck. System architects must validate complex network topologies, interconnect schemes, parallelization strategies (such as tensor, pipeline, and data parallelism), and collective communication algorithms prior to physical deployment. Packet-Level Discrete Simulators (PLDS)—such as NS-3—are the gold standard for this task because they deliver high fidelity and generalizability by simulating individual packet transmissions. However, simulating a single training iteration of a massive LLM cluster generates on the order of $10^{12}$ discrete events, causing simulation runtimes to stretch to several weeks.

Key moments
- 0:00 Introduction and background on LLM network simulation
- 1:58 Limitations of existing coarse-grained and parallel simulators
- 4:24 Key observations: steady states and repeated flow patterns
- 6:24 Overall architecture of Wormhole and network partitioning
- 8:00 Flow confliction graphs and memorization mechanism
- 10:00 Steady-state identification and fast-forwarding implementation
- 12:50 Evaluation results on speed, scalability, and accuracy
- 15:20 Conclusion and future research directions
Supercharging Packet-level Network Simulation of Large Model Training via Memoization and Fast-Forwarding
Speakers: Fei Long, PhD student, Tsinghua University; Kaihui Gao, Zhongguancun Laboratory; Li Chen, Zhongguancun Laboratory; Dan Li, Tsinghua University; Yiwei Zhang, Tsinghua University; Fei Gui, Zhongguancun Laboratory; Yitao Xing, Huawei; Wenjia Wei, Huawei; Bingyang Liu, Huawei
Conference: USENIX NSDI
YouTube: https://www.youtube.com/watch?v=0UpZlatoLRY
Overview
As trillion-parameter large language models (LLMs) continue to scale across clusters comprising millions of GPUs, verifying the underlying AI infrastructure has become an engineering bottleneck. System architects must validate complex network topologies, interconnect schemes, parallelization strategies (such as tensor, pipeline, and data parallelism), and collective communication algorithms prior to physical deployment. Packet-Level Discrete Simulators (PLDS)—such as NS-3—are the gold standard for this task because they deliver high fidelity and generalizability by simulating individual packet transmissions. However, simulating a single training iteration of a massive LLM cluster generates on the order of $10^{12}$ discrete events, causing simulation runtimes to stretch to several weeks.
To solve this scaling wall, researchers from Tsinghua University, Zhongguancun Laboratory, and Huawei introduced Wormhole, a novel framework that supercharges packet-level network simulation through structural memorization and fast-forwarding. Presented at USENIX NSDI, Wormhole exploits the inherent traffic redundancy and temporal predictability of large-scale AI workloads. By identifying repetitive flow patterns and stable transmission phases, Wormhole bypasses redundant computational burdens without sacrificing packet-level accuracy.
The implications of Wormhole are profound for infrastructure teams and cluster designers. By slashing simulation times from weeks to minutes while maintaining an average Flow Completion Time (FCT) error of less than 1%, Wormhole bridges the historic trade-off between simulation speed and fidelity. When integrated with parallel discrete event simulation frameworks, Wormhole achieves peak speedups exceeding $1,000\times$, empowering engineers to rapidly prototype and optimize next-generation AI data center networks.
Background
▶ Watch: Introduction and background on LLM network simulation (0:00)
Evaluating large-scale machine learning training clusters requires modeling complex interactions between hardware fabrics, congestion control algorithms (CCAs), and repetitive communication collectives (like AllReduce, AllGather, and ReduceScatter). Historically, systems researchers faced a stark dichotomy when choosing simulation tools: coarse-grained modeling versus parallel distributed discrete event simulation.
Coarse-grained approaches include flow-level simulators, analytical models, and AI-based network approximators that use deep neural networks to predict network performance. While these methods compute simulation outcomes quickly, they fundamentally abstract away fine-grained packet dynamics. By ignoring transient packet-level events that dictate real-world performance fluctuations, coarse-grained models introduce unacceptable error margins ranging from 10% to 25%, rendering them unreliable for precision AI infrastructure design.
Alternatively, Parallel Discrete Event Simulation (PDES) frameworks attempt to accelerate PLDS by distributing simulation workloads across multiple CPU cores or machines. Although PDES maintains packet-level fidelity, it suffers from sublinear scaling. As the number of CPU cores increases, coordination overhead eventually caps the achievable speedup. Furthermore, dedicating multiple CPU cores to a single simulation incurs an opportunity cost, preventing those cores from running independent experiments in parallel.
This tension between the speed of coarse-grained models and the accuracy of packet-level simulations established the core research question addressed by Wormhole: How can the computational burden of packet-level discrete simulators be reduced while strictly maintaining packet-level modeling and high fidelity?
Key Findings
▶ Watch: Key observations: steady states and repeated flow patterns (4:24)
Wormhole's design is underpinned by two empirical observations regarding the nature of AI training traffic:
- High Proportion of Steady States: AI training workloads—including both dense models and Mixture-of-Experts (MoE) architectures—exhibit pronounced steady states. Once congestion control algorithms converge following a disruptive event (such as a flow entering or exiting), flow rates stabilize and exhibit only minor periodic oscillations. Across dense and MoE training runs, Wormhole's authors observed that 98% to 99% of the simulation duration consists of steady states, during which fine-grained packet simulation is computationally redundant.
- Massive Flow Contention Redundancy: Under a fixed parallelization strategy, identical collective communication tasks are invoked repeatedly across training iterations. Consequently, identical flow contention patterns (defined by overlapping flows and the shared links they traverse) reappear constantly. In a single training case analyzed by the researchers, over 65,000 flow contention pattern instances occurred, featuring more than 60,000 redundant repetitions.
Leveraging these insights, Wormhole achieves dramatic performance milestones without compromising precision:
- Massive Speedups: Wormhole accelerates GPT training simulations by $227\times$ to $745\times$ and MoE training simulations by $135\times$ to $510\times$ under HPCC (High Precision Congestion Control). When combined with the multi-threading framework Unison, peak speedups surpass $1,000\times$.
- Deconstructed Speedup Contribution: Steady-state skipping alone yields speedups exceeding $130\times$ for GPT and $50\times$ for MoE workloads, successfully skipping over 99% of simulation events. Memorizing unsteady states provides an additional $1.93\times$ to $8.43\times$ speedup.
- Exceptional Accuracy: Across diverse cluster scales, workload configurations, and congestion control algorithms, Wormhole limits the average FCT error to less than 1% compared to NS-3 ground-truth simulations.
- Minimal Overhead: Database storage costs for memorization remain below the megabyte level, and memory footprints are comparable to baseline NS-3 executions.
Technical Deep Dive
▶ Watch: Flow confliction graphs and memorization mechanism (8:00)
Wormhole introduces a comprehensive systems architecture built on top of NS-3.17 (implemented in C++ with thousands of lines of code) that incorporates network partitioning, database-backed memorization, and mathematical fast-forwarding algorithms.
Port-Level Network Partitioning
To make steady-state identification tractable, Wormhole abandons the notion of waiting for an entire data center network to stabilize—an extremely rare occurrence globally. Instead, it performs port-level network partitioning. Wormhole groups flows sharing common ports or links into disjoint network subsets. This localized partitioning dramatically increases the statistical probability of identifying steady states at a granular level.
Flow Confliction Graph (FCG) and Memorization
When a network partition enters an unsteady state (e.g., due to flow arrival or departure), Wormhole abstracts the network condition into a central data structure called the Flow Confliction Graph (FCG).
- Vertices represent individual flows.
- Edges denote link-sharing dependencies.
- Vertex weights correspond to instantaneous flow rates.
- Edge weights represent the number of overlapping links.
When an unsteady state concludes, Wormhole logs the final FCG, aggregated transmission volumes, and convergence times into a simulation database. In subsequent training iterations, when an identical partition query hits the database, Wormhole completely bypasses the costly convergence and unsteady phases, jumping directly to the steady-state execution logic.
Steady-State Identification and Fast-Forwarding
During query misses, Wormhole executes standard packet-level simulation while continuously monitoring flow sending rates using a sliding window. It calculates the relative fluctuation of flow rates within the monitoring interval. Once relative fluctuation drops below a predefined threshold, the flow is marked as operating in a steady state.
To fast-forward through identified steady states without reconstructing the underlying network architecture, Wormhole utilizes port-level packet parsing to track buffer occupancy, combined with timestamp offset modification. Mathematically, the authors proved that the relative FCT error introduced by this threshold-based skipping has a strict theoretical upper bound bounded precisely by the predefined fluctuation threshold.
Orthogonality to PDES Frameworks
Wormhole is fully orthogonal to multi-threading and distributed simulation optimizations. The authors successfully integrated Wormhole with Unison by mapping logical processes directly to Wormhole’s network partitions, yielding compounding acceleration benefits.
Experimental Setup & Results
▶ Watch: Steady-state identification and fast-forwarding implementation (10:00)
The evaluation of Wormhole was designed to test speed, scalability, accuracy, and parameter sensitivity across a wide array of demanding machine learning environments.
- Workloads: Single training iterations of GPT and Mixture-of-Experts (MoE) models, incorporating expert parallelism (EP), data parallelism (DP), and pipeline parallelism (PP) communication primitives.
- Network Topologies: Evaluated across standard AI cluster interconnects including Dumbbell, Clos, and Fat-Tree topologies.
- Congestion Control Algorithms (CCAs): Tested across multiple CCAs, including HPCC, demonstrating that Wormhole's acceleration is invariant to the underlying congestion control mechanism.
- Baselines: Compared directly against native NS-3 packet-level discrete simulation ground truths, as well as coarse-grained flow-level simulators and analytical models.
Headline Results
- Simulation Throughput: Wormhole reduced GPT simulation time from weeks to minutes, achieving $227\times$ to $745\times$ speedups standalone, and exceeding $1,000\times$ when paired with Unison.
- Event Reduction: The framework successfully skipped over 99% of discrete simulation events.
- FCT Precision: Across all tested scales (ranging from tens to thousands of GPUs) and topologies, the mean Flow Completion Time error remained strictly under 1% relative to NS-3.
- Parameter Insensitivity: Sensitivity analyses confirmed that Wormhole's performance remains stable across a wide range of sliding-window monitoring thresholds. Furthermore, tracking alternative metrics such as in-flight bytes and queue lengths yielded similarly robust convergence behavior.
Practical Implications
▶ Watch: Conclusion and future research directions (15:20)
For infrastructure teams, network architects, and cluster deployers, Wormhole removes a major operational bottleneck in AI systems engineering. Designing the network fabric for a 100,000-GPU cluster typically requires evaluating countless topological variations and routing protocols. Previously, obtaining high-fidelity validation via packet-level simulation was computationally prohibitive, forcing teams to rely on inaccurate analytical models or risk costly misconfigurations in hardware procurement.
By reducing simulation runtimes by three orders of magnitude, Wormhole makes iterative, packet-accurate cluster co-design practical. Infrastructure engineers can now evaluate complex failure scenarios, dynamic traffic interleaving, and congestion control tuning interactively.
Tradeoffs and Limitations
- Workload Specialization: Wormhole currently targets LLM training workloads characterized by highly repetitive collective communication patterns. Extending these memorization techniques to more irregular workloads—such as large-scale distributed inference or reinforcement learning training—remains an area for future work.
- Database Cold Starts: When evaluating completely novel topologies or unmemorized parallelization strategies where database queries miss entirely, Wormhole must fall back to standard packet-level simulation, incurring initial computational overhead until patterns are logged.
Key Takeaways
- The Simulation Wall: Traditional packet-level simulators like NS-3 generate trillions of discrete events during LLM training simulations, leading to multi-week runtimes that impede cluster design.
- High Redundancy in AI Traffic: Empirical analysis reveals that 98% to 99% of LLM training network time is spent in stable steady states, and collective communication primitives generate massive repetition in flow contention patterns.
- Port-Level Partitioning: By breaking networks into disjoint partitions based on shared ports and links, Wormhole localizes traffic analysis and drastically increases the frequency at which steady states can be identified.
- Memorization & Fast-Forwarding: Wormhole records unsteady-state trajectories using Flow Confliction Graphs (FCGs) and uses timestamp offset modification to fast-forward through steady states.
- Unprecedented Performance: Wormhole accelerates LLM network simulations by $227\times$ to $745\times$ independently, and over $1,000\times$ when integrated with PDES frameworks like Unison.
- Strict Fidelity: Despite skipping over 99% of simulation events, Wormhole maintains an average Flow Completion Time error of less than 1% compared to NS-3 ground truth.
About the Speaker(s)
Fei Long is a PhD student at Tsinghua University specializing in AI systems and networking infrastructure. His research focuses on optimizing large-scale distributed training systems, network simulation methodologies, and high-performance interconnects. This work was conducted in close collaboration with researchers from Zhongguancun Laboratory and engineering teams from Huawei.
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)