HNS: A streamlined hybrid network simulator

This article was motivated by the need to speed up complex network simulation, especially in telecommunications settings, where high bandwidth translates into exorbitant numbers of packets that take inordinate CPU time to simulate. Since the simulation complexity of fluid workload is invariant under bandwidth scaling, flows of discrete units of workload may be replaced by (approximate) fluid streams for savings in CPU time and memory storage.To this end, the article outlines the design of a new hybrid Java simulator, called HNS (Hybrid Network Simulator). HNS simulates the movement of workload in a queueing network, where transactions may be of two types: traditional discrete transactions (e.g., packets) and continuous (fluid) transactions, all of which arrive discretely at the network in traffic flows, and each discrete arrival carries a workload. Arriving transactions only differ in the way their workloads are transported: the user specifies whether the workload should be packetized or fluidized, respectively, for transport across the network. The novel feature of HNS is that it admits models with both discrete and continuous traffic flows, and collects detailed statistics for both, including arrival, loss, buffer contents, departure, and delay statistics. HNS facilitates the fundamental tradeoff between the modeling accuracy of discrete flows and savings in simulation time and storage often afforded by continuous flows by providing a common testbed for both discrete and continuous flows, where the user can readily select transport modes and achieve a good deal of variance reduction in assessing the accuracy and speeds of model versions with different mixtures of flow types. We caution, however, that while HNS is a generic hybrid simulator of discrete and continuous flows, mixed models should be handled with care, since they tend to counteract the advantages of pure-packet or pure-fluid models.In order to achieve a high degree of speedup for fluid-flow models, HNS introduces and utilizes the so-called streamlining methodology to identify and modify algorithms that cause "turbulent" fluid flow (namely, scenarios where fluid-flow rates have a large number of minor fluctuations, which are computationally expensive but have a minor impact on simulation statistics). Streamlining removes these fluctuations so as to speed up the simulation at a moderate loss of statistical accuracy. HNS can be extended by writing additional Java classes; in particular, stream behavior can be modified by extending built-in protocol classes. For example, HNS already has dual implementations (packet and fluid) of various telecommunications-specific protocols, such as ATM (Asynchronous Transfer Mode), User Datagram Protocol (UDP), and TCP (Transport Control Protocol), the latter with a streamlined fluid protocol approximation.In this article, we describe the architecture of HNS and its operational features, including traffic injection at network sources, generic workload transport, some telecommunications-specific protocols, and statistics collection and display via a graphic user interface (GUI). We then use HNS to validate the streamlining methodology and to study appropriate tradeoffs of simulation speed and accuracy in telecommunications networks by comparing pure-packet, pure-fluid, and mixed versions of the same network model.