Days: Discrete-Event Network Simulation on Steroids

Authors: Baochun Li

Abstract

As large foundation models are routinely trained with hundreds of thousands of GPU compute nodes, the need for simulating a computer network at scale has become more critical and relevant than ever. Without a doubt, packet-level discrete-event simulation (DES) offers the finest granularity, and thus the highest accuracy. Unfortunately, conventional discrete-event simulators were widely known to be slow, and thus unable to accommodate the scale of modern networks. Recent work in the literature attempted to estimate the performance of large-scale networks using deep neural network models, but such estimation inevitably leads to a loss of packet-level accuracy, when compared to the ground truth from discrete-event simulators.But is it really the case that discrete-event simulators are not performant at scale? In this paper, we advocate that a process-based design is a simpler, more scalable, and performant choice than the current event-based design. We challenge the conventional wisdom that discrete-event simulators lack scalability, and progressively introduce the design and implementation of two new DES frameworks, ns.py and Days, built using Python and Rust, and with modern development advances in generators, asynchronous programming, and stackless coroutines. Our new simulation frameworks are designed to be lean and performant, outperforming existing discrete-event simulators and performance estimators by up to three orders of magnitude.

Open original