Professional Documents
Culture Documents
CONICET Digital Nro. A PDF
CONICET Digital Nro. A PDF
This Thesis develops new simulation techniques that combine packet-level and fluid-flow mod-
eling approaches for the study of dynamics in data networks. Novel practical and theoretical
tools for modeling and simulation are introduced to integrate seamlessly these two very disparate
approaches under a unifying hybrid formal framework.
The Trigger and Data AcQuisition (TDAQ) network in the ATLAS particle detector at CERN
is adopted as a large complex real world case study to validate the obtained simulation models.
The latter supported decisions for design, planning and tuning in network engineering projects
aiming at upgrades planned for 2021 and 2027.
Packet-level simulations yield fine-grained results comparable to real events in data networks.
Yet, the underlying complexity makes the approach unsuitable for complex high-speed networks,
as the required simulation times scale at least linearly with the size or aggregate throughput of
the system.
Meanwhile, a fluid-flow approach reduces model complexity by relying on fluid approximations
with Ordinary Differential Equations. This strategy yields faster simulations typically insensitive
to aggregate system throughput, at the cost of capturing only averaged coarse-grained network
dynamics.
Each approach requires substantially different background and tools, making network experts
to adhere to either of them. This usually leads to a diversification of simulation algorithms, models
and type of analyses, hindering their integration.
In this Thesis, new techniques are developed allowing for the coexistence and interaction of
packet-level and fluid-flow models under the Discrete EVent Systems specification (DEVS) for-
malism, helping to reduce the gap between both approaches. We show how hybrid models are
able to retain the performance advantages of fluid-flow models while providing detailed simulation
traces of packet-level models for selected flows. The latter is achieved under formal guarantees
convergence of the underlying numerical integration methods.
In particular, the Quantized State Systems (QSS) family of numerical methods was extended to
support the solution of Retarded Functional Differential Equations with implicit delays, a required
theoretical tool to describe the macroscopic dynamics of network protocols under closed-loop con-
trol.
The overall main outcome is a new generic and reusable library of models that enable the
hybrid (discrete/continuous) study of data networks. Network experts can flexibly choose the
desired simulation granularity, while retaining a unified and intuitive modeling experience centered
in the modular and hierarchical definition of topologies and the setting of properties for network
components.
2
Modelado y Simulación Híbrida de Redes
Complejas de Datos
Resumen
Esta Tesis desarrolla nuevas técnicas que combinan los enfoques de modelado paquete a paquete
y aproximaciones fluidas para el estudio de dinámicas en redes de datos. Se introducen novedosas
herramientas teórico-prácticas de modelado y simulación para combinar indistintamente estos dos
enfoques dispares bajo un marco híbrido, formal y unificador.
La red de adquisición de datos (DAQ) del experimento ATLAS en CERN se tomó como caso
complejo de estudio real para validar los resultados obtenidos por modelos de simulación. Estos
dieron soporte a decisiones de diseño, planificación de capacidad y actividades de puesta a punto
en proyectos reales de ingeniería de redes a implementarse entre 2021 y 2027.
El enfoque paquete a paquete provee resultados de grano fino cercanos a los observables en redes
reales. Sin embargo, la complejidad representada en los modelos hace a este enfoque inapropiado
para la simulación de redes complejas de alta intensidad, ya que los tiempos de simulación escalan
al menos linealmente con el tamaño o la tasa de transferencia total del sistema.
Por otro lado, el enfoque fluido reduce la complejidad del modelo basándose en aproximaciones
de flujos con ecuaciones diferenciales ordinarias (ODE). Este enfoque resulta en menores tiempos
de simulación generalmente independientes de la tasa de transferencia, pero captura únicamente
dinámicas promedio de grano grueso.
Cada enfoque requiere conocimientos y herramientas sustancialmente diferentes, por lo que
expertos en redes suelen adoptar solo uno de ellos. Esto suele conducir a una diversificación de
algoritmos de simulación y a prácticas de análisis que dificultan la integración de estrategias.
En esta Tesis se desarrollan nuevas técnicas que permiten la coexistencia e interacción de mode-
los paquete a paquete con modelos fluidos bajo el formalismo Discrete EVent Systems specification
(DEVS), ayudando a reducir la brecha entre ambos enfoques. Mostramos cómo los modelos híbri-
dos mantienen las ventajas de modelos fluidos en tiempos de simulación, a la vez que proveen trazas
detalladas de los modelos paquete a paquete. Esto se logra bajo garantías formales de estabilidad
y convergencia en los métodos numéricos de integración subyacentes.
En particular, la familia de métodos de integración numérica por cuantificación de estados
(QSS) fue extendida para la aproximación de ecuaciones diferenciales funcionales con retardos
variables, herramienta necesaria para describir la dinámica macroscópica de protocolos con control
a lazo cerrado.
Como resultado final se obtuvieron nuevas bibliotecas de modelos genéricos y reutilizables
para estudio híbrido (discreto/continuo) de redes de datos. Estos permiten elegir flexiblemente
la granularidad deseada para la simulación, manteniendo una experiencia de modelado intuitiva
centrada en la definición modular y jerárquica de la topología de la red y los parámetros de sus
componentes.
3
Agradecimientos
Antes que nada le quería agradecer a Rodrigo, que fue para el doctorado mi director, y para todo
el resto va a ser siempre mi mentor y un gran amigo. Gracias por todo el apoyo con el desarrollo de
la tesis, siempre presente y ayudando desde lo organizativo hasta los mas mínimos detalles técnicos
(¡no es fácil encontrar un director así!). Gracias también por aguantar las ideas y vueltas, por estar
presente con buenos consejos en los momentos difíciles, y hasta fomentar mis planes locos. No me
alcanzan las palabras para agradecer todo lo que Rodri hizo durante estos años. Muchas gracias
también a Matt por su paciencia y al grupo de simulación en la facu: Lucio, Dani, Ale, Eze y
Andy. Gracias por compartir las oficinas (acá y allá) y el trabajo sin el que esta Tesis no hubiera
podido tener los mismos resultados.
Agradezco también a la Universidad de Buenos Aires por la excelente formación que recibí,
a CONICET por la beca de doctorado, y al CERN por los proyectos en colaboración. Gracias
especiales a Giovanna Lehmann Miotto y Wainer Vandelli en CERN por su confianza y por darme
la oportunidad de ser parte de un gran equipo donde aprendí el poder que tiene colaborar con
gente apasionada en su trabajo. Muchas gracias también a todos mis colegas en el CERN: Eukeni,
Fabrice, Giussepe, Jorn, Alejandro y Adam, que fueron importantísimos para avanzar en la Tesis y
mi desarrollo académico. No solo por las tantas discusiones técnicas, sino también por los valores
humanos, humildad, siempre dispuestos a colaborar y buscar mejores soluciones. Por supuesto
tengo que agradecer también al equipo de fútbol del CERN y a Gozo (demasiados para mencionar
de a uno) que fueron claves para hacerme sentir un poco más como en casa y encontrar ese espacio
para distenderme y divertirnos.
Nunca hubiera podido terminar esta Tesis sin el apoyo de mis eternos amigos en Buenos Aires:
Maru, Jinkis, Juancito, Fede, El Negro, Sofi, Zaina, El Blanco, y también sin estar en Argentina
Jony, El Pelado, Rais y Jr. Aunque no me comunique tan seguido cada vez que nos juntamos nos
entendemos como si el tiempo no hubiera pasado. Es hermoso saber que ustedes están siempre ahí
con los brazos abiertos, para compartir opiniones entre birras y asados. Obviamente se extienden
mis agradecimientos a las hermosas familias que formaron con La Brujis, Barbi, Male, Mumi y
Franquito. No paro de maravillarme cada vez que los veo crecer.
En Ginebra también conocí gente hermosa que rápidamente se ganaron mi corazón. Pablo, que
apenas nos conocimos entendimos que íbamos a ser buenos amigos y es ahora como mi hermano
mayor. Gracias a Pablo pasé las noches más divertidas del doctorado y fue quien me mostró el
mundillo de Ginebra a pesar de verse forzado a albergarme tantas veces. A Massimo, mi nuevo
hermano en Ginebra, no puedo dejar de agradecerle por las tantas charlas y salidas divertidas.
Y como no mencionar a las chicas: Vani, Viole, Sandra, Ceci, Stellita, siempre tan divertidas y
compañeras en los momentos buenos y malos. Y con Emi, que me ilumina el día cada vez que
escucho "Tio Mati", terminamos de formar nuestra pequeña familia Argentina. Gracias por todas
4
5
Matías Bonaventura
Contents
Agradecimientos 4
1 Introduction 14
1.1 Main Original Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.2 Supporting Publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.3 Overall Related Work and Relevance of Contributions . . . . . . . . . . . . . . . . . 18
1.4 Thesis Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2 Background 22
2.1 Network Simulation Approaches: Packet-Level and Fluid-Flow . . . . . . . . . . . . 22
2.1.1 Network Performance Evaluation Techniques . . . . . . . . . . . . . . . . . . 22
2.1.2 Scaling Limits: From Stochastic Discrete systems to Deterministic Fluid
Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.1.2.1 Zooming Out to Reduce Complexity . . . . . . . . . . . . . . . . . 24
2.1.2.2 On Markov Processes . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.1.3 Network Simulation Approaches . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.2 Hybrid Dynamic Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.3 Classic Integration Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.4 The Discrete Event System Specification (DEVS) Formalism . . . . . . . . . . . . . 29
2.4.1 DEVS Atomic Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
2.4.2 DEVS Coupled Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.4.3 DEVS Abstract Simulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
2.4.4 Vectorial DEVS Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2.5 The Quantized State Systems (QSS) Methods to Solve ODEs in Hybrid Systems . . 33
2.5.1 Properties of QSS Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
2.5.2 Relationship Between QSS and DEVS . . . . . . . . . . . . . . . . . . . . . 36
2.6 PowerDEVS Simulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
6
Contents 7
Bibliography 160
7 Appendix 172
7.1 Proof of Theorem 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
7.2 New Enhancements for the PowerDEVS Simulation toolkit . . . . . . . . . . . . . . 172
7.2.1 Py2PDEVS: a Python ↔ PowerDEVS interface . . . . . . . . . . . . . . . . 172
7.2.2 Configuration of Simulation Parameters . . . . . . . . . . . . . . . . . . . . . 173
7.2.2.1 Stochastic Distribution parameters . . . . . . . . . . . . . . . . . . 175
7.2.3 Storage of Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . . . 176
7.2.4 Documentation and Docker Development Image . . . . . . . . . . . . . . . . 177
7.3 New PowerDEVS Library of Packet-Level Network Models . . . . . . . . . . . . . . 178
7.3.1 RoutingTable (packet-level, fluid-flow and hybrid) . . . . . . . . . . . . . . . 178
7.3.2 FlowGenerator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
7.4 New Library of Fluid-Flow Network Models . . . . . . . . . . . . . . . . . . . . . . 180
7.4.1 QSS Bounded Integrator Coupled Model . . . . . . . . . . . . . . . . . . . . 181
7.4.2 Reservoir Coupled Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
7.4.3 Buffer-Server system Coupled Model . . . . . . . . . . . . . . . . . . . . . . 182
7.5 New Library of Hybrid Network Models . . . . . . . . . . . . . . . . . . . . . . . . . 183
7.5.1 Packet2HybridFlow Atomic Model . . . . . . . . . . . . . . . . . . . . . . . 184
7.5.2 HybridMerge Atomic Model . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
7.5.3 HybridDemux Atomic Model . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
7.5.4 Hybrid RED Port Coupled Model . . . . . . . . . . . . . . . . . . . . . . . . 185
7.5.5 Hybrid Router Coupled Model . . . . . . . . . . . . . . . . . . . . . . . . . . 186
List of Figures
10
List of Figures 11
4.19 Heatmap of the simulated HLT farm load for different HLTSV assignment policies . 81
4.20 Load-Balancing view of the HTL system. . . . . . . . . . . . . . . . . . . . . . . . . 82
4.21 Load balancing and Dispatcher models in PowerDEVS . . . . . . . . . . . . . . . . 84
4.22 Comparison of IBL scheduling with different number of servers . . . . . . . . . . . . 88
4.23 Comparison of different strategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
4.24 Performance of different strategies in the critical regime . . . . . . . . . . . . . . . . 90
4.25 Sensitivity of load balancing strategies to service time distribution . . . . . . . . . 91
4.26 Comparison of assignment policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
5.36 Hybrid simulation results for the foreground/background traffic experiment . . . . . 150
5.37 Hybrid simulation metrics with 20 packet-level and 20 fluid-flow TCP sessions . . . 152
5.38 Hybrid simulation results increasing the percentage of packet-level traffic . . . . . . 153
5.2 Comparison of the Dynamic and Forward delay approached for FDEs. . . . . . . . 119
5.4 Block interface for the TCP host . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
5.6 Block interface for the RED and tail-drop queue models. . . . . . . . . . . . . . . . 131
5.8 Comparison of fluid-flow and hybrid models . . . . . . . . . . . . . . . . . . . . . . 155
13
Chapter 1
Introduction
Niels Bohr
Simulation modeling is a cornerstone discipline for the study of dynamics in complex networked
systems. Large packet-switching computer networks are a paradigmatic case, where performance
evaluation is a cross-cutting activity in all stages of the conception of future technologies.
The central motivating case study in this Thesis is the Trigger and Data AcQuisition (TDAQ)
network in the ATLAS experiment at CERN [1]. TDAQ transports data generated by the ATLAS
detector and filters throughput from roughly 160Gbps down to approximately 1.6Gbps in quasi-
real time. A combination of complexities in terms of network size, throughput and underlying
algorithms supporting its data flow makes TDAQ a challenging setting to application developers
and network designers.
Simulation models can provide useful tools for the understanding of communication patterns,
the fine-tuning of applications, protocols, and hardware, and also for the design and capacity
planning of network upgrades.
Another sound approach to performance evaluation is analytical modeling, where mathematical
formulations provide means and tools to reason symbolically about systems.
Meanwhile, measurement techniques play also a key role both for inspiring new models based
on quantifiable evidence, or to validate models when their solutions - either analytic or numeric -
become available.
While all models are abstractions of a given system under study, the choice of the right modeling
strategy depends heavily on the types of questions to be answered.
In this setting, there is widespread consensus that simulation models can offer greater degrees
of detail and flexibility than analytical models, at the expense of increasing costs in simulation
time and computing power as the complexity of the system grows [2], [3].
Underlying in the above assessment is the assumption of simulation pertaining to the world of
detailed fine-grained discrete-event simulation (DES), and coarse-grained analytical models pro-
viding results for steady-state network conditions.
14
15
Yet, there is also a special case of analytical models called fluid approximations [4]. They
work on the assumption that valid scaling limits exist for some underlying stochastic processes,
i.e. letting the time and/or space dimensions tend to infinity. The latter gives rise to continuous
dynamic equations that not only can capture the steady state of systems (in case it exists) but
also their transient dynamics.
Fluid approximations are of particular importance in the realm of simulation techniques as
the resulting equations seldom offer closed-form analytical expressions, thus calling for numerical
solutions pertaining to the domain of Ordinary Differential Equations (ODEs). They are almost
inevitably solved by discrete-time techniques, found in the vast body of knowledge for continuous
system simulation [5].
In our view, this represents a turning point in the evolution of network evaluation, where the
simulation community has largely specialized either on discrete event simulation or on continuous
systems techniques and tools.
Our motivating case study in the TDAQ network is not an exception. In the TDAQ network,
a highly distributed system is composed of multiple applications that coordinate to process large
amounts of data in real-time. Communication and data flow patterns challenge standard network
protocols and hardware to achieve maximum performance. In this sense, fine-grained packet-level
models are needed to understand and fine-tune detailed network behavior.
On the other hand, the TDAQ network presents a farm with over 2000 servers interconnected
with Ethernet links of 1 and 10Gbps. Simulation execution times impose a practical limit on the
kind of questions that can be answered by packet-level models and for the level of details which
can be simulated within reasonable time frames.
Future upgrades are scheduled for 2021 and 2027 which will considerably increase the network
size and throughput, worsening the gap between packet-level performance capabilities and real-
world requirements [6]. In this sense, fluid-flow models can provide a practical solution to model
such high-throughput large-scale networks.
Unfortunately, in fluid-flow simulation, only averaged metrics can be obtained making it im-
possible to analyze detailed per packet events which are sometimes crucial to understand relevant
dynamics of network protocols and applications.
A fundamental question arises: can we aim at having the best of both worlds?
The so-called hybrid simulation modeling treats the system as an interaction between discrete
and fluid parts. This idea first appeared in the mid 90s mainly driven by the concept of “cells”
in ATM networks, where a cell (a data packet of small and fixed-length) can be metaphorically
compared to an atom in a continuous fluid.
Although the idea is appealing and several studies tried to develop it, the approach did not
scale up. Currently the bibliography on hybrid network simulation is way too scarce as compared
to the tremendous growth in network modeling and simulation literature, let alone data network
evaluation at large.
We claim this is a consequence of a lack of theoretical and practical tools to provide a sound
framework for hybrid systems simulation. At the heart of the problem is the issue of trying to
force one paradigm fit into another.
Even when there exist solutions to deal with discrete events in the context of continuous
16 Chapter 1. Introduction
simulation methods, often discontinuities are treated as exceptions and involve costly iterative
algorithms. Yet, in network simulation, a discrete event is a first-class citizen, on equal footing
with synchronous time steps required to solve ODEs. Dealing with approximations of continu-
ous dynamics while treating exactly very frequent asynchronous events brings about several time
management problems. The approaches found in the literature are either smart ad-hoc algorithms
covering certain cases or forceful adaptations of particular discrete event network simulation pack-
ages.
In this Thesis we develop new theory and simulation techniques to unify the simulation of
fluid-flow and packet-level representations of data networks under a common formal framework.
A modeler should be able to adopt the same tool and formalism for dealing with diverse represen-
tations of the system under study, at very different levels of abstraction.
We rely on DEVS [7], a formalism that can cope simultaneously with the exact representation
of discrete systems and the approximation of continuous systems with any desired level of accuracy.
The DEVS abstract simulator acts as a universal scheduler that can accommodate naturally the
simulation of Quantized State Systems (QSS) [8]. The QSS methods are a family of numerical
integration algorithms based on the quantization of state variables rather than the slicing of time
into discrete steps, an approach that makes QSS belong to a discrete event class of solution for
continuous systems simulation [5].
We consider that one of the main reasons why hybrid approaches did not scale up is due to
an undesirable intertwinedness of modeling concerns with simulation techniques [9], [10]. In this
regard, DEVS imposes a strict separation between models and simulators. Thus, the contributions
made at the simulation technique level are independent on any particular model, and therefore
much more generalizable than ad-hoc solutions (e.g. tool-specific, language-specific, etc.) The
DEVS framework is not linked to any particular software tool nor programming language. There-
fore, a DEVS-based solution to a given problem offers a longer survival horizon than tool-based
solutions.
Yet, in this Thesis we also advocate strongly for practical and flexible tools usable in real-world
projects.
The TDAQ network provides an ideal real-world case study that motivates the development,
test and validation simulation models. In this context, a DEVS-based development methodology is
tailored to frame different modeling and simulation activities. The models developed throughout
this work have served to support decisions made for design, capacity planning and fine-tuning
projects in TDAQ.
Finally, although the focus is made on networked computer systems, several modeling and
simulation techniques contributed by this work can be naturally extended to a broader class of
complex networked systems, e.g. those found in physics, natural and social sciences.
hierarchical way. Packet-level models are described in Chapter 4, and fluid-flow and hybrid models
are presented in Chapter 5.
We developed a new library of reusable, general purpose packet-level models based on the
DEVS formal framework. We proved that these models are effective to study large complex real
networks, such as the TDAQ network at the ATLAS experiment (Section 4.4).
Using this library we then studied load balancing dynamics. Through systematic simulations
we found new evidence that there is a class of efficient decentralized load balancing policies that
share a common critical regime and, moreover, can be interpreted as a generalization of well-known
regimes for which the blocking probability has a closed-form analytic expression. This regime is
the desired point of operation as it takes the best advantage of the available resources. Our results
indicate that it is possible to design decentralized load balancing policies that could reach the
same performance (in the fluid limit) as centralized policies, and using previously existing closed-
form equations. Guided by these findings, in Section 4.5, we proposed enhancements in the load
balancing algorithms of TDAQ. The changes were first verified in our TDAQ simulation model,
and then experiments in a real network validated the predictions.
We also present a novel library for hybrid simulation, described in Section 5.6, where fluid-
flow and packet-level models interact without resorting to ad-hoc time synchronizations or traffic
smoothing techniques. Experiments show that simulation times can be reduced by orders of
magnitude while the packet-level portions preserve very satisfactory levels of accuracy.
Additionally, a new modeling capability is presented to compose fluid-flow networks modularly,
allowing users to build fluid topologies resembling classic computer network diagrams. Moreover,
this is achieved without having a user to deal explicitly with the underlying system of ordinary
differential equations (which gets composed -and later solved- automatically and transparently).
This is discussed in Section 5.5.
From the theoretical point of view, a new Forward Delay QSS (FDQSS) numerical method is
presented. FDQSS supports the numerical approximation of Retarded Functional Delay Equations
(RFDE) with Implicit Delays, in the context of QSS integration. We prove that under reason-
able assumptions FDQSS provides guarantees of numerical asymptotic convergence at any desired
accuracy for RFDE type of systems. This is a general result, applicable to any kind of system
represented by RFDEs, which are of crucial importance to deal with ubiquitous delayed dynamics
in data networks (where delays depend on complex dynamics, including the delays themselves, in
a recursive fashion).
• In [13], we present our modeling approach to unify the experience of designing network
simulation models both with fluid-level and packet-level techniques under a single modular
and hierarchical formal framework. This is discussed in Chapter 4 along with the additional
development of hybrid models.
• The publications [14] and [15] describe MASADA and TopoGen, respectively. These are
tools to systematize and automate modeling, simulation and analysis tasks in general, and
were applied to assist practical simulation-based studies for the TDAQ system. A scenario
that uses TopoGen is included in Chapter 4.
A synthesis of the above listed results was presented in the form of an extended abstract at
the 51st. Winter Simulation Conference (Gothemburg, Sweden, 2018) for the Ph.D. Colloquium
(Awarded with the Best Ph.D. Student Paper Award by ACM-SIGSIM) [16].
Also, in [17] a generic tool named Py2PDEVS was developed to compose large topologies with
the Python language, to interconnect PowerDEVS blocks programmatically as an alternative to
the drag and drop-oriented PowerDEVS GUI.
Packet-level network simulation. The amount of literature and network simulation tools is
vast, both in the academic and commercial environments [3]. Some of the most common network
simulators mentioned in the literature are: ns-2 [18], ns-3 [19], OMNET++ [20], OPNET [21], JiST
[22], just to name a few. Each tool has its advantages and disadvantages, while available network
simulators provide a great variety of features, off-the-shelf network protocols, traffic/topology
generation, parallelization algorithms, graphical interfaces, etc. These tools have been widely used
both for research and commercial projects where they proved very useful for network performance
evaluation [23].
In this sense, our approach to packet-level simulation follows a similar strategy as most of the
main simulation tools already available: use discrete-event simulation to provide detailed models
for as many network components as possible. A clear distinction of our approach is that we rely on
a formal discrete-event specification and methodology DEVS. One of the many possibilities which
are opened is the representation of other modeling structures within the same formal specification,
in particular continuous dynamic systems among others. The tools developed in this Thesis are
not intended to compete with well-established network simulation tools in terms of the number of
features. The goal here is to demonstrate that a formal discrete-event modeling and simulation is
able to represent big complex real networks. This is demonstrated in Chapter 4 in the context of
the DAQ network in the ATLAS experiment were we show simulation is able to reproduce network
and application metrics as well as predict the impact of proposed changes.
1.4. Thesis Organization 19
Fluid-flow network simulation. The literature is not so abundant and is found mainly in
academic papers or specialized textbooks [4]. There is salient work in the development of analytical
models which demonstrated empirically to accurately approximate real-network dynamics while
obtaining considerable reductions in simulation execution time. There exist fluid-flow models for
several network protocols (especially different TCP versions) and varied network conditions.
For the models in this Thesis we chose to base equations on one of the most referenced fluid-flow
models in the literature, namely [24]. We do not focus on the mathematical model or techniques to
infer equations, but rather on the numerical simulation method to approximate the equations and
on the network modeling experience. In this sense, most of the fluid-flow literature approximate
equations with classical numerical methods which result in discrete-time simulations. Instead,
we rely on the QSS numerical approximation methods which can be naturally represented as as
discrete-events DEVS models. This allows the simulation of fluid-flow models within the same for-
malism and tools as used for packet-level simulations [5]. Chapter 5 describes our proposed models
and shows simulation execution time and accuracy is comparable to results found in the litera-
ture. On the other hand, in the fluid-flow literature there is a strong coupling of the mathematical
model, the numerical approximation methods, and the network modeling experience. To repre-
sent a communication network, the modeler needs to have strong knowledge in these three areas.
On the contrary, as shown in Section 5.5, the proposed approach decouples these three domains
of knowledge providing the network modeler with the same visual interface (or generation tools)
as for packet-level models enabling the specification of network topologies without knowledge on
ODEs or numerical methods. Network models encapsulate equations which are specified in block
diagrams, so researchers can develop new ODE models independent of the numerical methods use
to simulate it.
Hybrid network simulation. Few authors proposed the integration of fluid-flow models into
well-know network simulators [9], [10], [25], [26]. These models report to maintain the performance
advantages of fluid-flow models while keeping accurate packet-level flows. In all cases, on top of
the packet-level and fluid-flow challenges there exists the need to synchronize time management
systems of discrete-events and discrete-time simulators. A key difference of our hybrid approach,
described in Section 5.6, is that no such synchronization is necessary. We profit from both packet-
level and fluid-flow simulations being represented under a discrete-event formalism to build hybrid
simulations that do not require time synchronizations and interact smoothly.
unified framework. Finally, a short review of the PowerDEVS simulator is presented as it is the
practical tool chosen in this Thesis to implement the new methods and techniques.
Chapter 3 describes the methodological modeling and simulation aspects followed throughout
the development of the Thesis. An overview of the motivating case study of the DAQ network
in the ATLAS experiment at CERN is presented. A DEVS-based methodology tailored for the
modeling and simulation of the DAQ network is described together with other aspects that provided
a methodological framework for the rest of the developments.
In Chapter 4, the packet-level model developed under the DEVS formalism is described. Fol-
lowing the bottom-up approach, first the simulation model of the network layer is presented. The
TCP protocol model is described and compared against the OMNET++ implementation. Then,
models supporting the construction of network topologies are described and a case study of a
medium sized topology is shown. Later, models for the applications for the DAQ network are
presented and two scenarios are used to compare real world metrics with simulation results. Fi-
nally, load balancing strategies are studied through packet-level simulation and compared against
analytic results from queuing theory. Findings from this study are applied back into the simulation
model of the DAQ network and then real world metrics confirm the performance improvements
predicted by the simulation.
In Chapter 5, the fluid-flow and hybrid models developed also under the DEVS formalism are
described. The buffer-server system, which will be the central component of fluid-flow and hybrid
models, is first presented. The set of equations that describe the buffer-server system are charac-
terized as Functional Delay Equations (FDE) and the challenges for its numerical approximation
are described. For solving the delay nature of the equations, a new QSS method is developed to
support the numerical approximation of Retarded FDEs with implicit delays. A new QSS bounded
integrator is described to enforce maximum and minimum integration boundaries by appropriately
handling sharp discontinuities present in continuous network variables. Later, the Chapter de-
scribes the models that encapsulate ODEs describing network dynamics. A modular approach is
presented in which fluid-flow topologies are constructed without requiring knowledge of underlying
equations. These models are compared against packet-level equivalent models where it is shown
that the fluid model performance is independent of link speed and can approximate packet-level
metrics with acceptable accuracy. Finally, a novel hybrid approach is presented to integrate the
packet-level and fluid-flow models taking profit from the common DEVS representation and QSS
properties. Experiments show the hybrid model does not require clock synchronization or smooth-
ing techniques, maintains the performance advantages of the fluid-model, and provides detailed
packet-level tracks.
Chapter 6 wraps up the Thesis with overall conclusions and discusses possibilities for future
research.
Resumen: Introducción
El modelado y simulación (M/S) es una disciplina clave para el estudio de dinámicas en sistemas
complejos de redes conmutadas. El caso de estudio central en esta Tesis es la red de Filtrado y
Aquisición de Datos (TDAQ) en el experimento ATLAS en CERN [1], que reduce aproximadamente
160 Gbps a aproximadamente 1.6 Gbps en tiempo real. Los modelos de simulación son una
herramientas útil para el estudio de protocolos, el diseño y la planificación de futuras redes [2].
Existen dos enfoques para la simulación de redes. Por un lado, la simulación paquete a paquete
brinda resultados de grano fino cercanos a las métricas reales [3]. Este enfoque utiliza un paradigma
a eventos discretos. Por otro lado, la simulación por aproximaciones fluidas [4] utiliza ecuaciones
diferenciales ordinarias (ODE) que capturan el comportamiento promedio del sistema. Existe una
vasta literatura [5] para la resolución de ODEs, donde los métodos clásicos utilizan un paradigma
a tiempo discreto.
La comunidad de simulación se ha especializado ya sea en simulación de eventos discretos ó
en técnicas y herramientas para sistemas continuos. Para el MS de la red TDAQ, son necesarios
modelos detallados a nivel de paquetes para estudiar el comportamiento de la red, pero los tiempos
de simulación imponen un límite práctico que se acrecentará en el futuro [6]. Por otro lado,
los modelos de aproximaciones fluidas proporcionan una solución escalable, pero únicamente se
obtienen métricas promediadas que no son suficientes para comprender los detalles relevantes del
sistema.
Surge entonces una pregunta fundamental: ¿es posible obtener lo mejor de ambos mundos?
La simulación híbrida trata la interacción entre partes discretas y fluidas. Aunque la idea es
atractiva el enfoque no prosperó. Actualmente, la bibliografía sobre simulación de redes híbridas
es escasa y los enfoques existentes son algoritmos ad-hoc inteligentes que cubren ciertos casos o
son adaptaciones de herramientas particulares.
Afirmamos que esto es una consecuencia de la falta de herramientas teóricas y prácticas para
proporcionar un marco sólido para la simulación de sistemas híbridos. Las herramientas paquete
a paquete y la resolución clásica de ODEs son intrínsecamente dispares. El corazón del problema
está en tratar de forzar que un paradigma que encaje en el otro.
Planteamos entonces la siguiente hipótesis de investigación: "Modelos de tipo paquete a paquete,
fluido e híbrido pueden representarse bajo un único formalismo de modelado y simulación, apor-
tando ventajas de expresividad para modelado y de desempeño para simulación". Desarrollamos
a lo largo de esta Tesis nuevas bases teóricas y prácticas para unificar los tres enfoques con el
objetivo central de proveer modelos de red formales que sean genéricos, reutilizables y modulares.
Parte de los aportes de esta tesis fueron publicados en una revista indexada y 4 publicaciones
con referato en conferencias internacionales. La Tesis esta organizada en 6 capítulos y un anexo.
21
Chapter 2
Background
22
2.1. Network Simulation Approaches: Packet-Level and Fluid-Flow 23
they can provide limited insights and coarse-grained results, and also require strong mathemat-
ical backgrounds. In many cases their solutions can not be obtained analytically and numerical
methods are then used to simulate the equations [4].
Testing real network hardware, applications and protocols, on the contrary, provide accurate
and (hopefully) credible measurements. This requires an implementation of the system to be
studied, which is often too expensive or requires too much effort to setup, or it is actually impossible
to access in a timely manner. Direct experimentation also provides less flexibility on experimental
conditions and it is often difficult to record very detailed metrics and understand corner case
behaviours. Real implementation approaches generally suffer from scalability limitations. [2].
Simulation modeling techniques rely on executable abstractions of the real system which
can later be run in a computer. Compared to analytical models, they require more effort to code
the simulation and usually require more computing resources to produce results making them less
appealing for high-speed large scale scenarios. On the other hand, simulation models require less
assumptions than analytical models, and yield more accurate and credible results. Compared to
testing real systems, models can never take all aspects into consideration and simulations results
are then usually less credible (although cases exist where bad testing practices can be detected
by having simulations to contrast results against). Simulation models provide more flexibility to
change experimental conditions, are usually (although not always) less costly, and can be used to
evaluate a technology which does not exist yet [3].
Lastly, Emulation employs an experimental setup containing both real world and simulated
components [30] resulting in a technique with the advantages and disadvantages it constituents.
On the one hand, it requires both the development of a simulation model and the availability of
real hardware with the associated costs and efforts. On the other hand, it is less costly and more
flexible than a fully realistic setup, and results are generally more credible than fully simulated
results. Also, the interaction between simulated components and real ones is a challenge in itself,
often restricting the simulation execution to be in real-time only.
We shall focus on simulation modeling techniques, which provide reliable and flexible ways to
develop and test ideas on large-scale network scenarios.
In this Thesis we assume that all conditions are given to obtain a fluid approximate
model as a correct scaling limit for an underlying stochastic discrete network.
This is, we are not interested in deriving new fluid models, but rather in their simu-
lation aspects as combined with discrete models, and more specifically, in the efficient
simulation of their transient behavior.
Yet, some comments are in order to provide a broader view for the sake of completeness.
24 Chapter 2. Background
Deterministic fluid approximations can describe the large scale behavior of these stochas-
tic discrete systems using simpler Ordinary Differential Equations (ODE), i.e., a deter-
ministic, continuous state and continuous time type of model.
Such scaling limits (also called “mean-field limits” when agents are asymptotically interacting
through the averaged measure of the system, or “hydrodynamic limits” for more general cases in the
context of particle systems) are used in many fields from population biology, physical sciences, to
queuing networks. They are also known as “fluid limits” usually in the context of queuing models.
Several mathematical tools are required to extract a correct ODE fluid limit candidate out of the
underlying discrete system. Aspects about existence and uniqueness of the solutions, convergence
in probability, transient vs. asymptotic limits etc. must be considered carefully. They involve
deep aspects of probability theory, and their analysis can change drastically even with apparently
small variations in the underlying discrete system. For instance, the mathematical treatment of the
mean stationary occupancy of a buffer fed by a Poisson-driven arrival process changes considerably
if we study a finite or infinite buffer.
The basic idea of scaling limits [37] is that, when counting the number of discrete agents
that are in a given state, the fluctuations due to stochasticity become negligible as the
number of agents N grows.
For sufficiently large N the system becomes essentially deterministic.
2.1. Network Simulation Approaches: Packet-Level and Fluid-Flow 25
A series of results, e.g. [38], [39], have established that when the state space of each agent
is finite and the dynamics are sufficiently smooth, the system’s behaviour converges as N → ∞
to a limiting behaviour described by a system of ODE. The dimension of said system is equal to
the number of states of the individual agents, but independent of the population size N . This
dimension is typically small, and hence the numerical integration of these ODE can be extremely
fast (at least compared to a detailed simulation of the original discrete stochastic system).
√ These
results show that the intensity of the fluctuations around fluid limit goes to zero with 1/ N .
To conclude, in this Thesis we will make extensive use of models obtained by means of scaling
techniques when we deal with fluid-flow (and later, hybrid) simulation. Also, fluid models serve as
a useful first approximation tool when we deal with the simulation of load balancing models.
26 Chapter 2. Background
In the classical packet-level approach, network entities are modeled relying on different sched-
ulers to make the simulation advance in a discrete-event fashion. In general, they enforce a
packet-by-packet treatment where messages are sent from one model to another whenever a real
data packet would be sent through real network layers. In this sense, discrete-event simulation al-
gorithms fit very well, as they allow to schedule events (e.g. packet departures) at arbitrary points
in time. Just to name a few, ns-2 [18], ns-3 [19], OMNET++ [20], OPNET [21] use discrete-event
schedulers for their simulations. These tool have been widely used in academic studies and com-
mercial projects and provide a wide variety of networking features readily implemented [3]. Few
packet-level network simulators are supported by formal specifications that guarantee correctness.
Packet-level models implement applications, control logic, and protocols very closely to the
algorithms actually implemented in the real software/hardware products. Models provide fine-
grained results that can match closely real networks at the cost of increasing model complexity.
Unfortunately, it is well known that there exist issues in packet-level simulation performance scal-
ability when the complexity of the network grows (either due to topology complexity, throughput
intensity, or a combination of both).
Simulation time grows (at least) linearly with the number of nodes and link speed, making
them unsuitable for large high-speed networks. Such issues often impose a limitation in the qual-
ity and/or time-to-delivery of the answers that can be obtained via simulation. Moreover, network
technologies have witnessed an exponential growth in terms of the bandwidth [41] and topology
size (from massive clusters to the Internet itself). This situation increases the gap between the
performance capabilities of current network simulation techniques and real-world networks.
The fluid-flow approach proposes models of higher abstraction to describe network behavior
through a set of equations, trading speedups for coarser-grained accuracy. These models do not
see the individual packet-by-packet behaviour (they "zoom out" and represent data as a fluid
flow of information). Dynamically changing packet rates are modeled as ODE capturing averaged
behaviour. ODE models can get complex resulting in expressions that require numerical solutions.
The biggest advantage of this approach is that, contrary to packet-level models, the performance
of numerically solving fluid models grows linearly only with the number of nodes, but is (a priori)
independent of link speeds.
The first successful fluid models for packetized networks date back from the sixties with the
development of ARPANET [42]. Throughout the years, new models were proposed for different
protocols, network conditions, traffic patterns, congestion control techniques [4]. The dynamics of
congestion control and more specifically the TCP protocol is one of the most studied topics in the
fluid-flow literature as it represents more than 90% of Internet’s traffic today [31].
2.2. Hybrid Dynamic Systems 27
A prominent fluid-flow model of TCP is the one presented by Misra, Gong, and Towsley (MGT)
in [24], [43], [44]. They proposed a set of ODEs based on a stochastic Poisson processes to describe
the steady state throughput of a TCP connection over a network of routers implementing Random
Early Detection (RED). MGT showed empirically that equations approximate quite well real TCP
connections [43]. Another key strength of the MGT model is its simplicity. For example, the
congestion window and throughput can be modeled as a function of the packet loss rate and
round-trip time by the following ODE:
W (t)
di (t) = (2.1)
τi (t)
dWi (t) dt Wi (t)
= − µi (t − τi (t)) (2.2)
dt τi (t) 2
where d(t) is throughput (departure rate), W (t) is the TCP congestion window size, τ (t) is
the round-trip time, and µ(·) is the packet loss rate, with subindex i denoting the i-th flow in the
system.
Although the MGT model makes several assumptions like bulk long-lived TCP flows, routers
implementing RED, and represents only some TCP phases, it has been successfully used in different
contexts and extended with additional features throughout the years [10], [24], [45]–[47].
As one can observe from Equation (2.2), solving this model involves numerical integration.
Luckily for researchers that invest efforts in coming up with reasonable equations, there is a vast
literature for continuous system simulation to approximate ODEs [5], [48]–[50]. Most of these
ODE solvers result in discrete-time simulations as the time variable advances with discrete steps
to produce Taylor series approximations of the original continuous system.
Some tools that allow solving ODEs include Matlab [51], Modelica [52], libraries for specific
languages (e.g. GSL for C++ [53] or Python [54]) and more [55]. It is nevertheless not uncommon
to find custom implementations of the methods to incorporate specific features [10], [24].
Packet-level and fluid-flow approaches entail completely different set of tools, knowledge and
expertise. Mastering any of them requires considerable effort and the knowledge acquired using one
approach can rarely be used for the other approach. This comes from the fact that each approach
relies on different theoretical foundations in the discrete-event, discrete-time and continuous realms.
create discontinuities in the differential equations which are not easily handled by classic numerical
integration methods. The difficulty arises when integration algorithms need to detect the exact
instants at which discontinuities occur, and restart simulation from there on, with an important
increase in computational costs [5].
A similar problem occurs in numerical methods for Delayed ODEs, namely Delay Differential
Equations (DDE), where the evolution of variables depend on both the current and past times
(just like Equation 2.2). There, discontinuities in the derivatives are an intrinsic phenomenon.
To tackle these issues, special algorithms have been developed [56], [57] and hybrid systems with
DDEs combine both challenges [58].
Hereinafter, we will see some characteristics of time discretization methods and discrete event
approaches to showcase the importance of adopting a common framework for hybrid systems, and
ultimately for the unifying of packet-level and fluid-flow network simulation.
where x(t) ∈ Rn is the state vector, y u(t) ∈ Rw is the input parameter vector, x0 are initial
conditions, and t is the independent variable which represents the time. Each component xi (t) of
the state vector represents the trajectory of the i-th state variable as a function of time [5].
If the state equations do not contain discontinuities in fi (x(t), u(t)) nor in its derivatives, then
the solution xi will also be a continuous function. Moreover, the function can be approximated
with any degree of desired accuracy by the expansion of the Taylor series around any point in the
trajectory. These properties are the central basis for any integration method.
If we wanted to approximate the function xi in the instant t∗ using Taylor series and evaluate
the approximation at time t∗ + h, then the value of the trajectory can be described as follows:
dfi (t∗ ) h2
xi (t∗ + h) = xi (t∗ ) + fi (t∗ )h + + ... (2.6)
dt 2!
Different integration algorithms vary in how they approximate the higher state derivatives, and
in the number of terms of the Taylor–Series expansion that they consider in the approximation.
2.4. The Discrete Event System Specification (DEVS) Formalism 29
There exists vast literature on multiple methods with different features that make each method
suitable for solving different type of problems. Just to name a few well know algorithms: Euler
[59], Runge-Kutta [60], DASSL [61], or for a more complete introduction to continuous system
simulation the reader can refer to [5].
All classical methods make a time discretization of the original ODE to simulate the system
within a computer. Algorithms are strongly based on the discrete advancement of time controlled
by a fixed (or adaptive) step (h in Equation (2.6)). Discrete representation of time makes it chal-
lenging to incorporate events that arrive in between consecutive steps at any (continuous) point
in time.
Previous efforts to combine fluid and discrete simulation of networks must struggle, in one
way or another, to accommodate the asynchronous nature of packets with the synchronous step h
embedded at the core of classical methods. We shall instead explore other avenues, in an attempt
to get rid of the synchronous time slicing paradigm, and relying on features offered by the DEVS
formal framework introduced next.
DEVS models are described as a hierarchical composition of atomic models (Ms) and coupled
models (CMs). CMs define system structure (interconnections between Ms and other CMs models),
whereas Ms define dynamic behaviors. Mathematically they are defined by the tuples as shown in
Figure 2.2.
Figure 2.2: Basic DEVS atomic models (left) and coupled models (right)
where
• X is the set of all possible input event values,
• δint , δext , λ, and ta are functions that define the dynamics (behaviour) of the model
Figure 2.3 shows illustrative dynamics of a DEVS atomic models along with its main functions.
Each possible model state, s ∈ S has an associated lifetime defined by the time advance function
ta : S → R0+ . When the model is in the state s = s1 , at time t1 = ta(s1 ) units of time the system
performs an internal transition evolving into a new state s2 = δint(s1 ). δint : S → S is called the
internal transition function. In this case, at the same instant, an output event is produced with
value y1 = λ(s1 ). The function λ : S → Y is called the output function.
When an atomic model receives an input event x ∈ X a transition is triggered that instantly
changes the model state to s4 = δext(s3 , e, x1 ), where s3 is the model state when the input event
arrives, and e is the elapsed time since the last state transition time (with e ≤ ta(s3 )). The function
δext : S × R0+ × X → S is called the external transition function.
X → Xd if i = N
Zi,d : Yi → Y if d = N (2.9)
Yi → X otherwise
• Select : 2D → D is tie breaking function between two simultaneous events and must satisfy
Select(E) ∈ E, with E ⊂ 2D where 2D is the subset of components that produce the
simultaneous events.
Figure 2.4: Hierarchical simulation of DEVS models and DEVS abstract simulator
where q(t) is the quantized state vector related to the state vector x(t) by a hysteresis quanti-
zation function:
34 Chapter 2. Background
Figure 2.5: Quantized state function with hysteresis from Equation (2.11)(left). Quatification with
hysteresis = ∆Q (right) [8]
Based on the idea of QSS1, a second-order (QSS2) and third-order (QSS3) methods were devel-
oped replacing the piecewise constant approximations by piecewise linear and piecewise parabolic
trajectories ones, respectively [72]. Similar methods were developed for stiff and marginally stable
systems: Backward QSS (BQSS), Centered QSS (CQSS), and Linearly Implicit stiff QSS methods
of orders 1 and 2 (LIQSS1 and LIQSS2) [73], [74].
As an example of the application of the QSS2 method, Figure 2.6 shows a QSS Plot for the
approximation of a dynamic system with the different quantized trajectories. As it is a second-order
accurate method, the quatization produces a first-order approximation, and hence the trajectories
of q(t) are piecewise linear. This can be seen in the first row of the plot with the variables x(t)
and q(t) superimposed. The plot is shown for a generic state variable x3 that represents the third
element in the state space vector x in Eq. 2.10. The dots denote the (asynchronous) instants
where the method decides that the internal x(t) needs to be updated, either because an external
update value arrives to the integrator or because of the internal error control mechanism. The
second row in the plot shows the approximation error (difference between x and q)). The following
rows show the evolution of internal error-control variables at the integrator: the quantum ∆q,
relative quantum ∆qrel . The last three rows show the coefficients of orders zero, one and two of
the polynomial approximation of x(t).
2.5. The Quantized State Systems (QSS) Methods to Solve ODEs in Hybrid
Systems 35
Figure 2.6: QSS Plot for the approximation of the state variable x(t) with the quantized trajectory
q(t) (top row), along with internal variables for error control (second to sixth rows)
all variables are calculated in each integration step, in QSS each variable is updated only
when needed (|qi (t− ) − xi (t)| > ∆Qi ) at different time instants. This provides significant
performance advantages for system with sparse matrices.
• Dense output: output is represented by piecewise polinomial trajectories according the QSS
method order. Figure 2.7 shows how QSS1 generates piecewise constant trajectories, QSS2
generate piecewise linear trajectories, and QSS3 generates piecewise parabolic trajectories.
This allows for a straightforward output interpolation which is ensured to remain inside the
theoretical error bound. This is an interesting and important characteristic very useful for
asynchronous and hybrid systems.
(a) Zero order, piecewise constant (b) First order, piecewise linear (c) Second order, piecewise
quantizer. quantizer. parabolic quantizer.
Figure 2.7: Input and output trajectories in the quantization procedure for different QSS orders
of accuracy [5], [72].
The QSS approximation can be exactly simulated by a DEVS model consisting of the coupling
of quantized integrators, static functions, and signal sources [8], [79].
Figure 2.8: Block diagram representation of QSS the state system Equation (2.10)
Figure 2.9: PowerDEVS GUI. Model library (left). inverted pendulum model (right).
In the last decade PowerDEVS has been being extended with new several domain-specific
model libraries. In particular to include data network models, and has been used for packet-level
simulation (queues, servers, traffic generators, an implementation of TCP, etc.) [81].
Resumen: Antecedentes Preliminares
La literatura distingue tres enfoques para estudiar el rendimiento de redes de datos: modelado
matemático (o analítico) [28], [29], modelado y simulación [3] y pruebas en los dispositivos reales
[2]. Nos centraremos en las técnicas de modelado de simulación al ser flexibles en escenarios de
redes a gran escala.
Existen muchas herramientas de simulacion paquete a paquete (ej., ns-2 [18], ns-3 [19], OM-
NET++ [20], OPNET [21]). Pocos simuladores son compatibles con especificaciones formales. El
tiempo de simulación aumenta (al menos) de forma lineal con el número de nodos y la velocidad
de enlace, lo que los hace inadecuados para redes grandes de alta velocidad.
Un modelo prominente de aproximaciones fluidas basado en ODEs es el presentado por Misra,
Gong y Towsley (MGT) [24], [43], [44]. Las ODE requieren soluciones numéricas cuyo desempeño
crece linealmente unicamente con el número de nodos, y es (a priori) independiente de la velocidad
de los enlaces. Algunas herramientas que permiten resolver ODEs incluyen Matlab [51], Modelica
[52], bibliotecas para idiomas específicos (ej., GSL para C ++ [53] o Python [54]) y es común
encontrar implementaciones personalizadas de los métodos clásicos [10], [24].
Clásicamente, cada enfoque requiere diferentes conocimientos y herramientas, lo que hace que
los expertos en redes adhieran unicamente a uno de ellos. Esto se debe a que cada enfoque se basa
en diferentes paradigmas de eventos discretos, tiempo discreto y continuo.
Los sistemas dinámicos pueden dividirse en tres categorías según la evolución (discreta o con-
tinua) de sus variables en el tiempo. Los sistemas continuos requieren aproximaciones numéricas
que tradicionalmente discretizan la variable temporal [48]–[50]. Los sistemas que combinan car-
acterísticas continuas y discretas se denominan sistemas híbridos y las discontinuidades en las
ecuaciones diferenciales no se manejan fácilmente en los métodos tradicionales [5].
DEVS [7], [62], [63] es un formalismo matemático para el M&S que permite la construcción
modular y jerárquica de los sistemas utilizando modelos DEVS atomicos(comportamiento) y
acoplados (descripción estructural). DEVS permite describir exactamente cualquier sistema dis-
creto y aproximar numéricamente sistemas continuos con cualquier grado de precisión deseada. Los
sistema de estado cuantificado (QSS) son una familia de métodos numéricos [5], [8], [72] que reem-
plaza la discretización del tiempo por la cuantización de las variables de estado. Las propiedades
probadas de QSS incluyen convergencia [8], estabilidad [8], error globalmente acotado [77], avance
de tiempo asincrónico, salida densa y simulación eficiente de discontinuidades [78]. Los métodos
QSS pueden representarse mediante un sistema a eventos discretos DEVS [79].
Varias herramientas prácticas implementan el formalismo DEVS [64]–[68]. PowerDEVS [66] es
un simulador de propósito general que implementa DEVS y todos los métodos de integración QSS.
Se concibió específicamente para la simulación de sistemas híbridos y es la herramienta elegida
para el desarrollo de esta Tesis.
39
Chapter 3
George Box(1978)
Robust engineering methodologies for product life cycle control have proven to be a cornerstone
in modern software/hardware development projects.
Simultaneously, various modeling and simulation (M&S) techniques have been increasingly
adopted in complex systems design, particularly in scenarios where it is difficult to predict system’s
behavior as changes are introduced.
In this Chapter we introduce the complex networked system that motivates our developments
of simulation models all across the Thesis. To set the context, a brief description of the ATLAS
experiment at the LHC accelerator in CERN is presented.
The Thesis comprises a M&S project spanning ∼ 5 years of development of simulation models
for varied purposes and different contexts within the LHC schedule (Run2, LS2 and LS3). Thus,
a well-defined methodology was required in order to keep a coherent evolution of simulation tools
and simulation models, while keeping a focus on the project’s goals.
A salient feature of DEVS is its strict separation between a model’s definition (the model ) and
an algorithm capable of simulating such model (the simulator ). While a technical introduction to
DEVS was presented in Chapter 2, now we leverage DEVS properties from a methodological point
of view. DEVS can also be a convenient framework to organize phases such as systems analysis,
experimental frame definition, model-to-simulator verification, and model-to-system validation.
We present a custom DEVS-based methodology for M&S-driven engineering projects. It in-
tegrates software development best practices that are further tailored to a large-scale networked
data acquisition system in the ATLAS particle detector at CERN [1]. This project poses M&S
challenges from several viewpoints, including system complexity, tight delivery times, the quality
and flexibility of the developed models and tools, interdisciplinary communication of results to
collaborators (mostly scientists). The methodology presented here is used throughout the Thesis
for the development of all models, tools and methods.
The development of simulation software shares some characteristics with classic software de-
velopment but requires the inclusion of specific M&S concepts.
40
3.1. Case Study Scenario: The ATLAS Data Acquisition Network at CERN 41
The LHC operates in alternating cycles of data-taking (usually called "Runs") and upgrade
periods (usually called "Long Shutdown (LS)") as shown on Figure 3.2. Currently the LHC
schedule is planned until 2035 and studies for Future Circular Colliders are ongoing to take the
collision energy to 100 Tev in the following years [86].
Figure 3.2: The LHC upgrade schedule and associated luminosity [87].
Figure 3.4: ATLAS wide-area network use with a trend-line showing a 164% increase [6]
44 Chapter 3. Motivating Case Study and Methodology
confidence, but they require access to the hardware in advance. In the end, testing the system as
a whole happens only at the final integration phase of a project.
The full TDAQ system was available for testing only about one out of every six weeks (during
scheduled technical runs), which delays the testing on new control algorithms that are continuously
improved but can’t be fully validated until the full system is in place.
Table 3.2 lists the resulting requirements obtained during system analysis meetings. Moreover,
these initial requirements are likely to change dynamically throughout a project’s lifetime, with
varied experts having different analysis requirements on same components.
Requirement Goal
Evaluate candidate changes for the network Early risk assessment
and control algorithms before their commis-
sioning
Define in advance the best set of tests to be Harnessing the test window to focus on the
performed on the real system, during scarce most relevant questions
windows of availability
Flexibility for choosing the level of detail/ac-
Dynamically adapt to different and complex
curacy with which the evaluations are obtainedmodifications that need to be assessed, and to
schedule changes
Table 3.2: TDAQ requirements obtained during system analysis meetings
maintained to read and compute DEVS models efficiently within their EFM . This establishes
a simulation relation. The compute experimental frame (EFC ) defines new questions and pa-
rameters θC for experimenting with (simulating) the computable model. It also hosts simulation
results in a compute behavior database λC . The validation relationship lets us relate back to the
original real system to validate correctness (λS versus λC ) or to perform scans over EFS due to
unexpected/surprising observations discovered in the EFC .
Figure 3.6: Modeling and Simulation-Driven Engineering. Methodology diagram based on the
DEVS formal framework. Iterative cycles and incremental phases
objective is to provide quality models that, once simulated, will exhibit an adequate degree
of validation against the original system
• Hypothesis (on the system) in orange: The hypothesis cycle exercises several candidate
changes on the model, which are candidates to be applied onto the system. Its goal is to
find improvement opportunities for the system when it is still unavailable or when direct
experimentation is too expensive or inaccessible.
• Explore (simulation results) in green: The explore cycle starts with analyzing the large
amounts of information produced by simulations; its goal is to discover properties and cor-
relations unthought-of during the experimentation phases.
Cycles need not occur in any specific order (although a build cycle is usually required at the
beginning of a project).
Two parallel and cooperative phases are defined for each evolution throughout a cycle:
• System study phase: drives progress according to questions about the system under study
• Tools development phase: seeks to improve the supporting software algorithms and inter-
faces, leveraging modeling, simulation, and analysis capabilities
This approach leads to a models that reproduce relevant behaviors of the real system within
reasonable simulation times: less relevant dynamics are kept out of the model (e.g. details of
the network physical layer). The relevancy and reasonability aspects change dynamically with
each new question to be answered and each new project context (e.g. delivery times, available
computing power).
The methodology also offers a guideline for development phases of the underlying M&S software
tools; new features are added to the tools at specific phases, responding to specific needs, framed
within unambiguous cycle goals.
and data analysis are crucial assets that impose their own requirements alongside those of the
model itself. The proposed methodology naturally satisfies this need.
Large sets of simulation results can support data-driven hypotheses and predictive analytics. A
well-structured simulation database together with reusable data analysis libraries can systematize
different layers of information aggregation, enabling stratified levels of analyses. The proposed
methodology fosters this approach.
En este Capítulo se presenta el caso de estudio real de la red de filtrado en el experimento ATLAS
en CERN y la metodología utilizada a lo largo de la Tesis.
El Gran Colisionador de Hadrones (LHC) [82] es el más grande acelerador de partículas, ubicado
en la Organización Europea para la Investigación Nuclear (CERN). El LHC acelera conjuntos de
partículas (protones o iones) hasta una energía de 14 TeV y una luminosidad de 1034 cm−2 s−1 . Las
colisiones se producen cada 25 ns cerca de grandes detectores, incluido ATLAS (A LHC ApparatuS
[1], un detector de partículas de propósito general compuesto por sub-detectores que identifican una
amplia gama de partículas producidas durante las colisiones. La señales inducidas por las partículas
se digitalizan produciendo una cantidad de información que supera los 60 Terabytes/segundo. Para
asimilar este información, ATLAS utiliza el sistema altamente distribuido de Filtrado y Adquisición
de Datos (TDAQ) [89] para filtrar los datos en tiempo real.
El sistema TDAQ se compone de dos niveles. El primer nivel (L1) utiliza componentes de
hardware para filtrar los datos hasta ∼ 160 Gigabytes/segundo y los almacena temporalmente el
Sistema de ReadOut (granja de computadoras ROS). El segundo nivel (HLT), accede a los datos
almacenados de forma selectiva según una serie de algoritmos físicos. El sistema TDAQ y su red
HLT-ROS es nuestro sistema en estudio rel (ver Figura 3.5, para la cual se describieren técnicas
y procesos de modelado y simulación. Otros modelos de simulación del sistema TDAQ que se
tomaron en consideración incluyen [93]–[98]
La figura 3.6 describe la metodología propuesta basada en procesos iterativos que implementa
una estrategia de ingeniería dirigida por M&S. El enfoque está parcialmente inspirado por el ciclo
de vida de Balci-Nance [90] en combinación con la visión de Zeigler de marco experimental [7].
En el núcleo de la metodología, las entidades Sistema, Modelo y Simulador están estrictamente
separadas pero relacionadas formalmente bajo el marco de DEVS. El flujo de tareas se organiza en
tres ciclos: Construcción (del modelo); Hipótesis (en el sistema); Exploración (de resultados
de simulación). Se definen dos fases paralelas y cooperativas: fase de estudio del sistema y fase
de desarrollo de herramientas.
Este enfoque conduce a modelos que reproducen los comportamientos relevantes del sistema
real dentro de tiempos de simulación razonables: las dinámicas menos relevantes se mantienen
fuera del modelo (por ejemplo, detalles de la capa física de la red). Los modelos paquete a paquete
se diseñan con el nivel de detalle requerido por el caso de estudio de la red TDAQ, prevaleciendo
los modelos más simples que cumplen con los objetivos del proyecto, en lugar de alternativas
innecesariamente más complejas. Adoptamos un enfoque de abajo hacia arriba, siguiendo las
pautas del modelado conceptual en [92], comenzando con un modelo simple y agregando detalles
progresivamente hasta obtener la precisión suficiente. Este enfoque permite un comportamiento
emergente a nivel del sistema, que puede validarse contra el sistema real.
49
Chapter 4
50
4.2. Preliminaries and Related Work 51
models developed, which will be presented in Section 4.3. Also concepts of queuing theory for load
balancing are introduced, as required for the results presented in Section 4.5.2 for this domain.
The reader knowledgeable with any of these topics can skip them at convenience.
• Slow Start (SS): This is generally the starting phase where for each ACK received Ws is
increased by one packet, effectively allowing two new packets to be transmitted. This quickly
increases Ws until the slow start threshold ssthre is reached and the connection transitions
to the CA phase.
52 Chapter 4. Packet-Level Network Simulation
• Congestion Avoidance (CA): This phase updates Ws following algorithms that tend to
converge to share fairly the bandwidth of a link among multiple flows. TCP-Reno and TCP-
Tahoe use Additive Increase-Multiplicative Decrease (AIMD) [104] algorithm with linear
growth of Ws when there is no congestion and an exponential reduction when a conges-
tion occurs. TCP-BIC uses an additional binary search increase, and TCP-CUBIC uses a
cubic function. In TCP-Reno, upon receiving an ACK packet the window is increased as
Ws = Ws + W1s (Additive Increase). Upon sensing congestion the window is roughly halved
Ws = min(1, W2s ) (Multiplicative Decrease). The actual decrease value will depend on the
congestion signal: after an RTO the window is set to Ws = 1 and the connection transitions
to the EB phase with ssthre = W2s . In TCP versions with a FR phase, the connection
transitions to that phase upon receiving a Triple Duplicate ACK (3DACK).
• Exponential Backoff (EB): During this phase each time an RTO is signaled, a single packet
is retransmitted and the RTO is duplicated. Upon receiving a valid ACK the connection
transitions to the SS phase.
• Fast Retransmit (FR): Upon receiving a 3DACK in the CA phase some TCP version infers
that the missing packet was dropped due to congestion and retransmits without waiting for
an RTO. In TCP-Tahoe, the slow start threshold is set to ssthre = W2s , the window to
Ws = 1 and transitions to SS phase. TCP-Reno sets ssthre = Ws = W2s and transitions
to FR/FR phase. TCP-NewReno, sets ssthre = W2s , Ws = ssthre + 3, and transitions to
FR/FR phase.
• Fast Recovery (FR/FR): TCP-Reno retransmits the missing packet, waits for the entire
window to be ACKed and then transitions to CA (otherwise an RTO occurs and transitions
to SS). TCP-NewReno does the same, but additionally sends a new packet for every DUP-
ACK received.
Different TCP versions update the congestion window differently but their dynamics are highly
dominated by the Round Trip Time (RTT). The Round Trip Time (RTT) is defined as the time
between a packet is sent and the time the ACK for that packet arrives back to the sender. Most
TCP implementations calculate an estimated RTT, and also reflects the time it takes TCP to
detect congestion.
discards packets according to a probabilistic function based on the buffer size. In most cases RED
responds to a time-averaged queue length qb(t) rather on the instantaneous q(t), making it less
sensitive to packet bursts. If the queue has been mostly empty, RED will not tend to drop packets
even when the buffer is almost full, and tail-drops can still occur.
RED has two main stages: 1) estimation of the average queue size qb(t) and 2) decision of whether
or not to drop an incoming packet [108]. Queue size estimation uses an exponentially weighted
moving average (EWMA) which acts as a low-pass filter: qb(tk ) = (1 − α)b q (tk−1 ) + αq(tk ), where α
is the time constant of the filter. To drop packets, RED uses a drop probability function p(b q (t))
as defined by Equation 4.1, where the queue estimate qb(t), maximum and minimum thresholds
(tmax , tmin ) define the assigned probabilities (pmin , pmax ). The p(b
q (t)) is shown in Figure 4.3.
Note that it is very counter intuitive that packets that could be perfectly buffered are actually
dropped to prevent congestion.
Another common AQM mechanism found in routers is Explicit Network Notification (ECN)
[RFC 3168]. On top of using missing packets to implicitly signal congestion, special packet header
fields are used to explicitly mark congestion on the path. At the routers similar mechanisms as
RED are used, but instead of randomly dropping packets, these packets are set with a Congestion
Experience (CE) field which are read by end nodes that react accordingly. This technique requires
that both ends of a TCP connection, and all routers and switches along the path, support ECN
features.
4.2. Preliminaries and Related Work 55
0 0 ≤ qb(t) ≤ tmin
qb(t)−tmin
p(b
q (t)) = p
tmax −tmin max
tmin ≤ qb(t) ≤ tmin (4.1)
tmax ≤ qb(t)
1
Meanwhile, scheduling algorithms (at routers) determine which packets, among those already
buffered, are to be sent immediately next. Scheduling is primarily used to manage the allocation
of bandwidth among competing flows and provide Quality of Service (Qos) guarantees to specific
traffic. The router must classify each incoming packet, which is done differently by hardware
manufacturers and ranges from simple rules (e.g. matching IP addresses and ports) to more
complex connection-aware algorithms. Routers implement scheduling policies to decide the service
order for each traffic class. Logically separated queues are used for each class which are served
based on priorities. A simple, commonly found scheduling algorithm is the Weighted Round Robin
(WRR) where queues are visited in a round-robin fashion proportionally to weights assigned (each
class will get a bandwidth share proportional to their priorities).
can soon become too complex to understand, debug and maintain. A number of simulation tools
(e.g. OPNET, OMNET++, etc) provide graphical editors which allow for an easy and compact
understanding of the network topology, separating topology from model behaviour.
The dominant simulation technique used by majority of network simulation tools is discrete-
event simulation [3]. Discrete-event simulation is used for all layers of computer networks: signal
processing in the physical layer, medium access in the link layer, routing in the network layer,
protocols in the transport layer, and finally modeling application data flow.
There is a plethora of surveys comparing available network simulators, focusing on diverse
aspects.
Regarding performance, the fairness of comparisons can get very tricky. The performance of any
non-trivial network model in a given simulator depends on many, difficult to compare properties
of specific tools. For example, a trade-off between performance and available metrics should be
considered together with the metrics relevant for each particular study. The number of simulated
network layers and features in each layer has also a big trade-off with performance, and simulating
more features is not necessarily better in all case studies. Also, a simulator could take longer to
simulate the first run of a model, but learn about its structure and simulate subsequent runs faster
(e.g. in a parameter sweeping study). Then, bunches of runs should be compared. These types
of studies require very thorough considerations that are beyond the scope of our interest, because
our focus is on performance scalability when a system’s size grows.
Table 4.2 from [110] provides a non-comprehensive list of network simulator surveys and com-
parisons found in the literature.
4.2. Preliminaries and Related Work 57
In this chapter, we shall resort to a specific subclass of results in queuing theory related to
load balancing problems, as they are relevant for our motivating case study in the ATLAS TDAQ
network and the results obtained in Section 4.5.
Load balancing is an essential, often crucial mechanism to improve performance in call centers,
server farms, and various applications that operate on parallel servers. On top of defining efficient
balancing schemes (in terms of delay and blocking probability), applications with a large number
of servers typically require cheap schemes in terms of exchanged messages, required memory and
computing efforts at the dispatcher. There is often interest in characterizing load regimes (ratio
between the amount of incoming load and the service capacity) that can lead to efficient utilization
of resources, and finding rules of thumb to dimension systems with dynamic load balancing schemes.
Two main ideas are usually adopted to gain insights analytically: to assume large scale networks
and then obtain asymptotic results using propagation of chaos, on the one hand, or to restrict the
load balancing schemes to obtain computable bounds, on the other.
Since the 80s strong attention has been given to mean-field results for different classes of
networks with load balancing schemes. In particular, a great deal of research was devoted to prove
mean-field limits for schemes like join the shortest of d among n queues (also called Power of D)
where n is large, starting with the seminal work of [131] and [132], and quickly complemented
by several papers on the mean-field behavior of such systems. Transient functional law of large
numbers and propagation of chaos have been obtained for instance in [133] and [134] for First-In-
First-Out (FIFO) scheduling, and more recently, propagation of chaos properties and asymptotic
behavior of the number of occupied servers were obtained under very general assumptions [135].
All these results concern systems without blocking and sensitive to the job size distribution.
Meanwhile, researchers have considered schemes that lead to the insensitivity of the queuing
system to the job size distribution. This path was first taken in [136] (see also [137], [138] or [139])
For small networks with a single class of traffic, it was shown that the insensitive load balancing
(ILB) compares very accurately to optimal policies for a given job size distribution to estimate
blocking probabilities, while delay estimations are a less accurate [136], [140].
The penalization imposed by reversibility is greater for multi-class networks while the sensitivity
(of optimal sensitive policies) also deteriorates [137], [139].
Hence, a small-to-moderate price must be paid for robustness and simplicity. It is perhaps
counter intuitive that for models with infinite buffers, this price becomes very high. It was indeed
proven that if the state space is infinite, and assuming absence of blocking, the optimal insensitive
load balancing is static (i.e., it does not depend on the queue-length) and it is hence much less
efficient than a state-dependent sensitive load balancing [141].
Both research directions described above shed light on the possible performance of dynamic
load balancing, but also present strong limitations:
• The performance of the limiting system might not be informative. For instance the blocking
probability or the delay will be 0 for a large class of policies,
• The price to impose insensitivity to the job size distribution is largely unknown.
In [142], the intersection of both research directions was considered by studying the asymptotics
of large networks (i.e., a finite but arbitrarily large number of servers) for ILB schemes. It was
shown that a qualitative phase transition occurs at a critical load ρc (n) = 1 − an−θ/(θ+1) where θ is
the buffer depth, a is a constant value and n is the number of queues. The blocking probability is
4.2. Preliminaries and Related Work 59
θ
exponentially small until ρc (n), and then changes to order O(n− θ+1 ) at the critical load, and to a
higher order thereafter. This generalizes the Halfin-Whitt-Jagerman (H-W-J) regime established
for M/M/n/n systems. In [143], [144], critical regimes for optimal use of resources were identified
for single queues. In particular the blocking probability for M/M/n/n systems is O(n−1/2 ) only
√
if the number of servers scales as ρ + a ρ, where ρ is the load of the system. Before this critical
regime the blocking probability is exponentially small, while it is of constant order after that
critical point.
In [142] it was shown that a rule similar to the popular staffing rule established for the
M/M/n/n system is valid, but must depend critically on the value of θ when dynamic load
balancing is employed.
Whether this critical regime is a general phenomenon or not (i.e., is it verified for a large class
of dynamic load balancing schemes ?) remains an important and completely open question that
we will investigate via packet-level simulation in Section 4.5.2.
Figure 4.4 shows the communication among various applications in the HLT during Run2.
Upon selection by L1, Event data is transferred to the ROS, and the specialized application HLT
supervisor (HLTSV) is notified. The HLTSV assigns Events to trigger processing unit (TPU)
servers, which run an application called a data collection manager (DCM) to centralize commu-
nication between the TPU and the rest of the system. DCMs interface with instances of the
application processing unit (PU)—one per available core, between 8 and 24 per host. Each Event
is assigned to a single PU instance that analyzes it and decides whether it should be permanently
stored or discarded. This system represents is the focus for the M&S process in this Chapter.
Applications communicate over an Ethernet network with link capacities of 1 and 10 Gbps.
Two core routers and approximately 100 switches interconnect roughly 2,000 multicore servers
using TCP/IP protocols. The farm is composed of 50 racks for TPU servers and 25 racks for ROS
nodes. Each TPU rack contains from 30 to 40 servers (DCMs and PU applications), and each ROS
rack contains 8 servers. Within each rack, servers are connected to a shared top-of-rack (ToR)
switch via 1 Gbps links. The HLTSV node and the ToRs are connected to the core switches over
10 Gbps links.
Several other studies were taken into consideration for the development of simulation models in
this Thesis.
In [93], an early design of the DAQ system was studied before its construction. ATM and
Ethernet measurements on prototypes were extrapolated with simulation models to evaluate the
feasibility on a larger scale system. Using the discrete-event module of the Ptolemy simulator,
network nodes use queuing models to represent NICs and CPUs. Simulations were used to study
60 Chapter 4. Packet-Level Network Simulation
Level1
Readout Drivers L1 Accept Trigger
(ROD) (L1T)
clear
fragments requests
scalability, robustness, fault-tolerance, and what-if scenarios to predict the effect of increasing link
bandwidth and node processing power.
[94] resorts to a mathematical queuing model of the HLT system and sets upper limit require-
ments for the network delay, loss, and processing time. For data networks, authors propose a
component-wise quality attenuation approach to incorporate loss and delay into topological queu-
ing compositions. A correlation between traffic load and quality attenuation is established.
In [95], [96], a simulation of the ATLAS DAQ system is modeled in OMNET++. Communica-
tion patterns with particular focus on the TCP incast pathology are addressed. What-if scenarios
are performed to evaluate the behavior of the system using different traffic shaping and scheduling
policies, and with network hardware modifications.
In [97], [98], a large buffer area envisioned for the DAQ upgrade in 2024 is modeled in the
OMNET++ simulation framework. The model is verified and calibrated against real operational
data and then be evolved toward the future architecture. Simulations allow exploration of dif-
ferent strategies for resource provisioning and trade-offs between buffering space and processing
capabilities are studied.
For 2025, the ATLAS experiment is planning full deployment of the new Front-End LInk eXchange
(FELIX) system [146], shown in Figure 1, that aims at interfacing between detector electronics and
the TDAQ system. FELIX will replace the custom point-to-point connections with a Commercial-
Off-The-Shelf (COTS) network technology (e.g. Ethernet, Infiniband, Omnipath). FELIX servers
will act as routers between 24-48 detector serial links and 2-4 standard 40Gbps/100Gbps links.
4.2. Preliminaries and Related Work 61
FELIX servers will communicate with a smaller set of commercial servers, known as Software
ReadOut Drivers (SW ROD), used for data collection and processing of physics data.
When a simulation model of the FELIX systems was to be implemented in 2015, different
components were envisioned to connect to the FELIX servers. For example, the Detector Con-
trol System (DCS) monitors and controls the detector front-end electronics while the Control &
Configuration system sets up and manages data acquisition applications. The various types of
traffic differ in their throughput, latency, priority and availability requirements. The DCS elec-
tronics requires the highest priority and low latency to react fast, but is expected to require low
throughput. Meanwhile, the detector’s data will use most of the network bandwidth so it can
have less priority to avoid saturation. Table 4.3 summarizes the different traffic types and their
requirements as designed in 2015. The communication patterns are also different for each type of
traffic. While DCS traffic follows a many-to-one pattern (all FELIX servers communicate with a
single DCS server), Control and Monitoring traffic require a many-to-few pattern. Detector data,
on the other hand, uses a simple one-to-one or two-to-one pattern from a FELIX server to SW
RODs.
Part of this effort consists of designing and implementing a network that can meet the demands
of the system (high-availability, high-throughput, low-latency, redundancy, etc.). Modeling and
simulation supports the design of the network and aids in the decision process (e.g. for selecting
technologies, topologies, node distributions, etc.).
62 Chapter 4. Packet-Level Network Simulation
Comm.
Traffic type Throughput Latency Priority
Pattern
Many
DCS Low Low High to
one
Many
Control and
Med. - High to
Config.
few
One
Detector Data High - Med. to
one
Many
Monitoring High - Low to
few
5Mbps 3.5Mbps
TCP R ED TCPr
R ED
Figure 4.6: PowerDEVS and OMNET++ topologies used to cross-compare TCP behaviour.
Figure 4.7 and Table 4.5 show comparisons of PowerDEVS and OMNET++ simulations for
detailed and long run metrics, respectively. Figure 4.7 compares the congestion window for 10
seconds of simulation. At the beginning, both simulations start in SS phase showing a quick
increase of the TCP congestion window. At around 0.2s, the SS threshold is reached and the
CA phase starts with a slower increase of the congestion window. The first packet drops occur
at approximately 0.5s as a consequence of the stochastic RED algorithm. Both models detect
a 3DACK and start FR/FR phases. It can be observed a different dynamic only for the first
FR/FR phase after receiving the first valid ACK. Both models deflate the window back to the SS
64 Chapter 4. Packet-Level Network Simulation
PowerDEVS OMNET++
Parameter Name Value Parameter Name Value
packetSize 4376 bits tcpseg 547 bytes
startTime 0 seg tOpen 0 seg
bandwidth (host) 5 Mbps datarate (host) 5 Mbps
bandwidth (router) 3.5 Mbps datarate (router) 3.5 Mbps
propagationDelay 0.0565 us delay 0.0565 us
TCP
MSS 500 bytes MSS 500 bytes
WND_SSTHRESH 131 pkts ssthresh 65535 bits
T_RTT 3 seg RTTVAR 3 seg
RTT_alpha 0.125 g 0.125
DUP_ACK_LIMIT 3 pkts DUPTHRESH 3 pkts
delayedAcksEnabled False
nagleEnabled False
sackSupport False
tcpAlgorithmClass TCPReno
RED
tmin 437.6 Kb minth 50 pkts
pmin 0 – –
tmax 218.8 Kb maxth 100 pkts
pmax 0.1 maxp 0.1
alpha 0.001 wp 0.001
Table 4.4: PowerDEVS and OMNET++ configuration parameters to compare TCP behaviour
threshold, but OMNET++ detects an RTO while PowerDEVS detect several consecutive 3DACK.
This discrepancy is being investigated. Later both models restart with CA phases. Although with
some differences, both simulators produce qualitatively similar traces for the TCP behaviour under
this scenario. A broader range of tests were reported in [147].
Table 4.5 shows the total data sent, total drops and mean round-trip time captured after 20
seconds of warm-up in a simulation of 400 seconds. Both models yield comparable metrics in terms
of orders of magnitude, that we consider satisfactory for the purposes at hand. More refinements
can be implemented using this cross-tool comparison techniques.
Table 4.5: Comparison of some relevant TCP accumulated metrics in OMNET++ and PowerDEVS
for a run of 400 seconds (the first 20 seconds are not measured, for warm-up purposes).
4.3. Simulation model of the Network layer 65
CA FR/FR
FR/FR FR/FR
3DACK
SS CA
CA
valid ACK
valid ACK
RTO
Figure 4.7: Qualitative comparison of TCP congestion window evolution in OMNET++ and
PowerDEVS.
The PowerDEVS network model library was extended to include more than 40 DEVS atomic
models to represent different functions. A detailed description of the low-level model library is
described in Appendix 7.3. Figure 4.9a shows some of the most relevant ones, which are outlined
66 Chapter 4. Packet-Level Network Simulation
NetworkPacket
// Application Payload
getPayload():void*
getPayloadSize():void*
IProtocol
getId():uint
getOSILayer():uint
getSize_bits():double
clone():IProtocol
getPortSrc():uint
getPortDst():uint
getACK:uint
getIpSrc():uint
getIpDst():uint ... getTypeOfService():uint
...
...
getSEQ:int
...
next.
• Bandwidth Delay and Propagation Delay: Receive packets and output them after a
delay. The propagation delay model uses a fixed configured delay. The bandwidth delay
model determines the delay based on the packet size and a configured bandwidth. These are
used in conjunction with other models to represent links.
• Tail-drop Queue: Implements a FIFO queue with limited buffering capacity. When the
capacity is exceeded new incoming packets are discarded (tail-drop). Packets are dequeued
when requested from external models which allows reusing the queue for different buffering
mechanisms (e.g. at links, routers, applications, etc).
• Random Early Discard (RED) and Explicit Congestion Notification (ECN): Im-
plement AQM mechanisms based on the incoming packets, tracking a weighted average queue
size. Packets are randomly discarded (or set the ECN flag) based on the calculated discard
probability as described in 4.2. This is used in conjunction with the tail-drop queue to
model RED-enabled routers. There are also priority queue models which use Weighted-
Round-Robin (WRR) to implement Quality of Service (QoS) features.
• TCP sender/receiver protocol: Models the TCP protocol at sender and receiver ends as
described in Section 4.3.1
• Routing Table: Demultiplexes packets incoming at a router based on a routing table. In the
TDAQ system routing protocols are omitted, so in that case the routing table model static
4.3. Simulation model of the Network layer 67
RED
R ED
Router REDRouter
ACK
1
TCP TCPr
TCPSender_Single TCPReceiver_Single
ACK
TCP TCPr
TCPSender TCPReceiver
egressPort
• Egress Port: Represent the Network Interface Controller (NIC) cards and cables. These are
intermediate-level models as they are composed of queues, bandwidth delay and propagation
delay atomic models. Depending on the kind of egress port, the models might also include
RED, ECN, priority queues, etc.
• TcpSession: Intermediate-level (coupled DEVS) models that represent a TCP session within
a host. It includes a flow generator (to model an application), a queue (to model TCP
buffer), and a TCP sender (to model TCP sliding-window logic), and TCPPacketization (to
split messages up into IP packets).
High-level components are DEVS coupled models that represent top level nodes in a network
topology, such as routers or hosts. Figure 4.9b shows the new packet-level library included in
PowerDEVS. These models are composed of the low-level atomic models described before.
High-level components can be built in different ways to represent the varied hardware and
software present in real networks. Figure 4.10 shows a topology built up by composing some of the
models in the PowerDEVS high-level network library. The high-level library includes the following
basic components (which can, in turn, assume very different behavior depending on the initial
configuration of its constituting low-level models described above):
• Host: Models the edge nodes that send and receive data using either TCP or UDP. Multi-
ple TCP sessions can be easily configured and applications are represented by flexible flow
generators.
These basic models often suite well for early stages of network design, when exact details are
still unknown (e.g. an exact application logic). An example of this situation is shown in section
4.3.3.3. Depending on the type of network modeled, high-level coupled models can be incremen-
tally updated with more detailed application behaviour or specific queuing mechanisms at routers.
An example for this is the TDAQ model discussed in Section 4.4.
When modeling topologies high-level models can be interconnected via DEVS ports and links
mimicking real network ports are links. This one-to-one mapping between models and real system
entities allows network experts unfamiliar with M&S tools to become productive quickly, as the
intricacies of the DEVS formalism are hidden away (although not restricted) from the modeling
activity. Our models can be created and connected through the visual user interface providing a
graphical topological view natural to network experts. Figure 4.10 (center) shows a simple topol-
ogy with 6 hosts and 3 Router/Switches defined in the PowerDEVS graphical interface.
4.3. Simulation model of the Network layer 69
TCP
<- ACK
RED
TCPSender1 TCPReceiver1
Z
R ED
RED
Router1 Router2 Router3
RED
TCPSender3 TCPReceiver3
<- ACK
Figure 4.10: Simple packet-level topology using PowerDEVS network library. Top elements from
the high-level library are composed of more basic models from the low-level library.
Yet, this convenient approach can hit a limit on practicality1 when a topology becomes large.
This problem was tackled before with Vectorial DEVS [71], which we use extensively in our models,
though the approach is not suitable for defining network topologies. We developed two ancillary
code-based tools to tackle this problem at different levels: TopoGen [15] and Py2PDEVS [17].
TopoGen is a Ruby-based tool that can compose automatically large topologies based on struc-
tured descriptions of a system. Of particular interest in this Thesis, the topology can be retrieved
from (possibly very large) real world networks compliant with the increasingly adopted Software
Defined Network paradigm. TopoGen then generates a simulation model by accessing a description
of the network stored at the SDN Controller node. This strategy permits the model to keep up
with frequent topology changes in real systems. In the next section we describe an application of
TopoGen to build a medium-sized model in the context of TDAQ.
Meanwhile, Py2PDEVS is a Python-based tool that offers a programmatic interface to func-
tions of the PowerDEVS simulator and DEVS atomic models through a well defined Python-C++
interface. Then, by coding in a scripting-like manner using standard Python constructs, DEVS
models in the library can be retrieved, instantiated, parameterized and interconnected, composing
arbitrarily large/complex topologies.
Both TopoGen and Py2PDEVS are general purpose, open and extensible tools for meta-
modeling, focused on the automated composition of topologies, and are not restricted to modeling
network systems. These tools are described with more detail in Chapter 7.
case study simple in terms of the real application details. More complex examples are discussed
in Section 4.4
The future FELIX network (see Section 4.2.4.2 above) will provide connectivity between dif-
ferent components of the FELIX system (see Figure 4.5) and will handle various types of traffic
which differ in their throughput, latency, priority and availability requirements (see Table 4.3).
To increase confidence about the coexistence of these traffic types while meeting TDAQ perfor-
mance requirements a modeling and simulation approach was used to study expected throughput
and latency, and anticipate possible bottlenecks.
Although high level requirements are well defined by the FELIX team, each subsystem’s spec-
ification is updated often during the design process. Specific, measurable metrics (throughput,
processing times, etc.) will not be known until the real final system is in place. We then provide
guidelines based on M&S for realistic ranges of candidate parameter values (parameter sweeping).
The FELIX network topology contains more than 100 nodes. The network team uses a Mininet
emulated environment that is continuously evolving to test connectivity options in the topology.
We applied TopoGen to eliminate the task of manually defining the topology making it faster and
less-error prone. Also, the simulation model is automatically created directly from the topology
used by the networking team, helping the simulation team to keep the model updated with the
real network.
The TopoGen tool is conceived around a workflow of model transformations. The one used in
this case study is depicted in Figure 4.11.
Figure 4.11: Semi-automated topology modeling workflow with TopoGen for network simulation.
It consists of three phases: automatic topology retrieval, augmentation with dataflow patterns,
and serialization into a simulation model. These are commented below:
• Phase 1 - Automatic topology retrieval: TopoGen retrieves the topology from an ONOS
SDN controller installed within the emulated environment. The topology is serialized to Ruby
code classes (named NTM in Figure 4.11). The fact that the original topology was specified
in an emulated environment or a real network is transparent for TopoGen.
• Phase 2 - Topology Augmentation: Additional nodes are added manually to the topology
to also capture some nodes of the HLT network which were not included in the emulated
environment. Data flows for traffic generated by different servers (along their respective
parameters) are added programmatically. For this case study, only the Detector Data traffic
type and the Monitoring traffic type were considered.
4.3. Simulation model of the Network layer 71
Figure 4.12 shows the final modeled network. It includes FELIX network nodes (automatically
retrieved from the SDN controller), the HLT network nodes, the Detector Data and Monitoring
traffic flows (added programmatically). This provides an example of a real medium sized topology
being modeled using the low-level and high-level libraries described earlier in this Section.
We are now ready to investigate via simulation the impact of Monitoring traffic on Data traffic
when they are merged. One question to be answered is how average latency changes when choosing
between two candidate link capacities. Figure 4.13a shows the average packet latency using 1Gbps
links for Monitoring flows with increasing throughput in all servers. As Monitoring traffic grows,
72 Chapter 4. Packet-Level Network Simulation
(a) Link capacity allocated to monitoring traffic (b) Link capacity allocated to monitoring traffic
1 Gbps links 10 Gbps links
Figure 4.13: Simulated mean packet latency seen by the Traffic Monitoring servers. Blue area:
standard deviation. Red lines: min-max range.
the latency slightly increases until a transition is observed at a point when each server injects
650Mbps of Monitoring data. Thereafter the latency increases rapidly denoting the presence of
congestion. The buffer sizes and link utilization at the switches (not detailed in this report) indicate
that the sources of congestion are the 1Gbps links at monitoring servers. Figure 4.13b shows the
same experiment but replacing the 1Gbps link of Monitoring servers with 10Gbps links. The figure
shows how the saturation point moves up to 6500Mbps of Monitoring traffic. The congestion point
in the topology remains at the links directly connecting the monitoring servers.
Figure 4.14: Topology and applications in the HLT TDAQ farm for Run2.
• Processing Units (PU): Single threaded processes (usually one per server core) in charge
of analyzing Event data and making decisions on whether to accept or reject each given
Event.
- The analysis includes complex triggering algorithms which depend on several physics-
related configurations out the scope of this Thesis.
- Event portions called Fragments are requested in multiple stages and very seldom PUs
need the Full Event information to make a final decision.
• ReadOut System (ROS): Set of ∼100 servers and their applications that temporarily
store Event data that was accepted by the preceding L1 Trigger system.
- Data related to a single Event is spread across all ROS servers in the form of smaller
structures: Fragments.
- Each sub-detector is directly connected to a fixed set of ReadOut Drivers (ROD) and
Frontend Electronics (FE) as shown in Figure 3.5.
- ROS applications respond to Fragment requests coming from PUs which are stored in
local buffers until a clear request is received.
- From the network point of view, the DCM plays a key role in controlling the
traffic with the ROS servers. The DCM adds a custom credit-based (token-bucket type)
algorithm, called DCM Traffic Shaping.
Figure 4.15: Sequence diagram of TDAQ applications involved in filtering a single Event. The
processing units (PUs) request information from the read-out system (ROS) in two stages: level-
two (L2) filtering and Event building (EB).
4.4. Simulation model of the TDAQ Network Data Flow 75
• Sub-Farm-Output (SFO): Set of servers and related applications that store Events ac-
cepted by the HLT until they can be sent out to the CERN permanent storage for ulterior
offline analysis.
ROS
TPU
PU
At the top level, DEVS coupled models represent the main HLT components described above
connected according to the topology in Figure 4.14, preserving real system’s semantics and struc-
ture. The latter is very important for communication purposes of the model with the network
team in a real world project.
Within TPUServer and ROSServer models, Vectorial DEVS (denoted with a green border) is
used to create multiple (equivalent) model instances that represent the ∼ 2000 processing nodes
and the ∼ 100 ROS nodes respectively. The ROS and DCM coupled models rely on the TCP
sender and TCP receiver blocks described before.
The sequence diagram in Figure 4.15 depicts the interaction between models that take part in
Event filtering. The PUs request information from the ROS (through the DCM) in two stages:
L2 filtering and Event building (EB). In L2, a small portion of the Event is first requested and
analyzed; this step can be repeated several times until EB takes place and all pending information
is requested at once.
TPU servers model the communication with the ROS and HLTSV, and are composed of DCM
and PU models. The DCM model plays a critical role in network traffic.
Thus, key control logic was extracted from C++ algorithms at the real DCM application
and mapped directly into a DEVS model (e.g. the credit-based algorithms), therefore increasing
substantially the homomorphism with the real system under study. The same strategy was applied
for the HLTSV assignment algorithm, by extracting C++ code directly from the real HLTSV
application.
The mapping between PU requests and the specific ROS node which contains the Fragments
is also implemented in the DCM, and is configured to follow realistic request patterns measured
from online metrics.
The PU model represents processing times and Fragment requests in the multiple iterations of
L2 and a final EB stage. Examples of some probabilistic simulation parameters of the PUs are
Acceptance/Rejection probability in each stage, order of fragments requested at each stage, mean
number of L2 steps, and processing time distribution in each step.
The simulation model assumes the following simplifications, where the possible impact on the
TPU ↔ ROS communication is explained:
• Network: Focuses on the network traffic between the TPU and ROS servers and assumes
ideal communication (no network) between other components.
• L1 Trigger: L1 Trigger filter is not modeled. The HLTSV is assumed to receive L1 notifi-
cations described by a configurable stochastic distribution.
• ROS: Interaction with the L1 Trigger and storage of fragments (subdetector → FE → ROD
path) is not modeled. ROS servers are always able to respond to fragment requests. Fragment
sizes follow a configurable stochastic distribution taken from real system measurements as
will be described next
• SFOs and Permanent Storage: The simulation model uses sinks to represents the Storage.
SFOs applications and Permanent Storage (Tier 0) are not modeled.
• PUs: Execution of triggering chain algorithms is abstracted and only processing time,
EF/EB stages, and fragment request patterns are modeled. These are configurable stochastic
distributions taken from real system measurements as will be described next.
4.4. Simulation model of the TDAQ Network Data Flow 77
• Other network traffic: Only traffic related to Events data is considered. Interaction with
other traffic (Monitoring, DCS, Configuration and Control, etc) was studied in [15] but not
described here.
Model parameterization is done considering data from the real system. Parameters for network
models are usually taken from the switch/router model specifications (e.g. switch/router buffers,
link speed, etc). Some model parameters are also parameters of the real HLT applications (stored
in the TDAQ OKS [150] distributed database) and might require basic transformations (e.g. DCM
credits, PUs per server, etc). Other model parameters are taken from the online operation metrics
(stored in the TDAQ PBeast [151] scalable archiving system) and require more advanced analysis
and transformations (e.g. ROS request rate distributions, PU execution times, etc).
We developed a thorough approach to tackle simulation parameterization challenges, tools and
methods for the TDAQ network in [152], not described in this report.
directly connected to both core switches. The switches connecting TPUs and core routers
were expanded with additional 10Gbps links to both core switches. The overall throughput
supported at the network level increased by one order of magnitude. The resulting network
architecture is depicted in Figure 4.14.
- Simulation goal: Characterize the Event filtering latency for increasing L1 rates in
the new network architecture.
Event filtering latency was selected as the main performance metric to observe as it is of
utmost importance for the TDAQ system. It represents the time elapsed since the HLTSV assigns
an Event to a given PU until when the Event is either discarded or permanently stored.
Figure 4.17: Filtering latency versus initial DCM credits. The red curve shows average latency,
and blue dots show individual latencies; larger dot clusters denote higher number of occurrences.
There is an optimum configuration in which average latency stabilizes at 20ms (close to the
theoretical minimum) within a range of about 100 to 600 DCM credits. With fewer credits (12
4.4. Simulation model of the TDAQ Network Data Flow 79
to 100), latency increases (DCM can send fewer simultaneous requests, under utilizing network
capacity). Using more than 600 credits, latency increases rapidly and stabilizes at around 500ms.
Packet discards were observed on the ToR switches when more than 600 credits were used, thus
confirming that the latency increase is due to network congestion and TCP retransmissions (no
packet loss was observed at core switches).
The simulation was configured to follow the real system setup described earlier (controlled
θS → θM → θC translation), sweeping the number of initial DCM credits. Figure 4.17b shows the
results. The simulation reproduces the individual filtering latencies (blue dots) following the same
clustered patterns which gather around discrete ranges (close to 15 ms, 200 ms, 400 ms, and 600
ms). This validates the emergent behaviour of the DCM credits affecting filtering latencies as a
consequence of TCP dynamics (retransmissions and TCP Incast effect).
The simulated average latency approximates real measured latencies (λS ∼ λC ), with 100 to
600 credits attaining minimum latency and fewer than 100 credits slightly increasing latency. For
credits above 600, the simulation showed congestion and packet drops on the ToR switches, but the
increase in the average latency was much steeper compared to the real system. Another difference
was the stabilization point under congestion: the real system latency stabilizes at 500 ms, whereas
the simulated latency grows up to 700 ms. Although these differences shall require further studies,
the simulation reproduces very closely the intervals of major interest for the question at hand,
underlining the well-known trade off between degrees of model details, simulation accuracy, and
delivery times for a given engineering concern.
Latency clusters correspond to emergent behaviour related to exponential backoff in TCP
retransmissions. An early version of TCP model was not able to explain the cluster around 600ms
which is quite frequent in real measurements.
A detailed comparison against the real system led to the finding of a bug in the official Linux
SCL6 TCP implementation. It is responsible for the unexpected retransmissions (full details on
this bug reported in the official Red Hat issue tracker can be found at https://bugzilla.redhat.
com/show_bug.cgi?id=1203742). The simulation model was then tailored to mimic this TCP bug.
We think this is a salient example of a formal model (the DEVS TCP model ) serving as a point
of reference for a practical implementation (the Linux TCP code, rather intricate to review and
understand).
An important advantage of the simulation model is that it allowed for fine-grained analysis
(packet by packet if required). For example, link utilization and queue occupancy can be studied
and visualized in great detail in the simulation, while it is impossible to sample the instantaneous
evolution of queue occupancy at real network devices (e.g. to pinpoint queuing bursts that are
critical for TDAQ, and occur in less than 8ms).
signment rates. When the HLTSV assigns Events at 50 Hz, latency is minimal (13ms) because
there is no sharing of resources and the network is completely free when applications start filter-
ing Events. For increasing assignment rates, latency rises as several PUs simultaneously request
Events competing for finite network resources and DCM credits. For rates above around 3.2kHz,
latency increases exponentially as the network approaches a bottleneck point (93% utilization).
Simulations are validated against the real system replicating previously conducted experiments
to sweep the HLTSV assignment rate parameter. 9 experiments were executed, each simulating 60
seconds (180,000 filtered Events in the most stringent case) in three different nodes, completing all
simulations in 120 minutes. Figure 4.18 shows the simulation results closely reproduce the latency
curve measured in the real system with a root mean square error (RMSE) of 63.708. The absolute
latency values and network load on the simulation differ from reality within an acceptable range:
less than 5 percent difference.
Averaged Event Build Latency (ms)
700
Real TDAQ system
600 Simulated TDAQ model
500
400
300
200
100
00 500 1000 1500 2000 2500 3000 3500 4000
HLTSV assigned event rate (Hz)
Figure 4.18: Average Event latency sweeping the HLTSV assignment rate (200 ROS, 1 TPU rack
with 40 DCMs, 960 PUs) comparing simulation and real measurements. Red and blue backgrounds
show standard deviation.
Figure 4.19(top) is an example data analysis performed on the simulation results. It shows how
Events are distributed across the farm in different time slots using the HLTSV assigment policy
(FIFO). Other policies in the plot will be discussed later.
Simulations were configured with 250 DCMs (75 DCMs with 24 PUs and 175 DCMs with 24
PUs). The reddish area in Figure 4.19(bottom) shows that DCMs with more PUs receive higher
loads. All DCMs are heavily assigned in the first time bins. Another detected system-level behavior
is that individual DCMs differ significantly in the number of Events they process, i.e., the color
intensities vary noticeably along any single row and along any single column. These observations
led us to infer that a potentially uneven load-balancing mechanism might be the cause of overall
higher filtering latencies, and motivated deeper M&s-driven studies of load-balancing strategies.
Figure 4.19: Heatmap of the simulated load in the HLT farm for different HLTSV assignment
policies. Tile color represents the maximum amount of PUs simultaneously processed in each
DCM (230 DCM IDs in the vertical axis) in 0.5 s (5 s binned in the horizontal axis).
• it should distribute Events fairly among TPUs to avoid overloading their resources
In this context, an important goal is to verify, through simulation studies, different load bal-
ancing strategies guided by theoretical insights.
Incoming Events
λ=100kHz
each server) available at the dispatcher. Decentralized load balancing, on the contrary, refers to
policies where the dispatcher manages only partial (or local) information.
Usually, centralized policies yield better service time and blocking probabilities while decen-
tralized schemes minimize the utilization of communication channels between the processors and
the dispatcher (which have limited capacity in real world systems).
The following schemes were considered in our study:
• Join the shortest queue (JSQ) This centralized strategy dispatches to one (of possibly
many) shortest queues, breaking ties at random. It is optimal for a wide class of job size
distributions but is also known not to be optimal for size distributions with high variance
(see [155] and references therein).
• Insensitive load balancing (ILB) This centralized strategy has been extensively studied
in [136], [139] and more recently in [142]. It has the desirable property to be insensitive to
the job size distribution, i.e., the stationary measure of the number of concurrent jobs in
each server depends only on the first moment of the job size distribution. An incoming job
is routed to server i with the following probability:
θ − xi
pILB
i (x) = Pn .
j=1 (θ − xj )
This load balancing rule was proved to be optimal (in the sense that it minimizes the blocking
probability for any convex criterion) in the set of insensitive load balancing for a single class
of traffic in [136].
• Join the idle queue (JIQ) This partially centralized strategy uses only as state information
whether each server is idle or not (and dispatches at random otherwise). It is hence a first step
towards decentralization while its efficiency is potentially much better than fully decentralized
schemes.
• Random (RND) This completely decentralized strategy uses no information from the sys-
tem and chooses at random a single server for each new incoming request.
• Power of D (PoD) This partially decentralized strategy corresponds to choosing at random
a subset of d servers among n and then send to the shortest queue within this subset.
• First-Finished-First-Assigned (FFFA) This centralized strategy is the one currently
implemented in the TDAQ farm. It imposes a small computing effort on the dispatcher.
It assigns new jobs to servers in the same order in which they finish processing jobs. The
bootstrap assignment starts with nθ random (unique) assignments.
• Centralized Random (CRND). This strategy uses as its only state information whether
each server is fully busy or not (and dispatches at random otherwise).
Remark 1 (The particular case θ = 1) When θ = 1 all centralized policies coincide, and the
system corresponds to the M/M/n/n queue. Measures such as the mean delay and the blocking
probability can be explicitly calculated and the critical regime corresponds to the well-known
Halfin-Whitt-Jagerman regime.
84 Chapter 4. Packet-Level Network Simulation
In1 ? finishedID
Out0 ! assignment
Figure 4.21: Load balancing model implementation in PowerDEVS (bottom) and Dispatcher model
state machine (top).
top left) and they all implement a common IDispatcherStrategy interface, which decouples the
Dispatcher and strategy logics. This modeling approach facilitates the addition of new strategies,
which should only implement the common interface, without changing the Dispatcher logic nor
the rest of the system.
The Processor Sharing Servers model uses Vectorial DEVS [71] to create automatically N
instances of a same DEVS model (depicted with a green border), possibly with different values for
its parameters. Each server model identified by its index i, has a parameterizable finite capacity
θi and processing power ci (the latter fixed all to 1 in this work).
When servers receive an assigned job from the Dispatcher the current number of jobs being
processed xi is checked: if it exceeds θi the job is discarded, otherwise the job is accepted and
processed.
Figure 4.22 shows the ILB blocking probabilities for systems with different number of servers,
with the case n = ∞ representing the theoretical limiting formula (4.3). Note that the x-axis
depends on the a parameter which is a handy link to the load nρ according to formula (4.2) that
facilitates looking at limiting values when n → ∞.
Figure 4.22a shows results for high loads, where the blocking probability of the simulated
systems get closer to the theoretical system as n increases. Note that the expected asymptotic
blocking probability for large ρ (Bnθ = 1) is not predicted by the formula (which shows that the
limits in n and ρ do not commute here). For light loads, the formula predicts quite well the
blocking probabilities for all systems (independently of the number of servers).
Figure 4.22b is a close-up view around the critical load a = 0 with a log scale in the ILB blocking
probability. The figure shows that the theoretical formula predicts very well the inflection point
for the ILB blocking probability in the critical regime. The formula precisely predicts (B̄nθ = 0.5)
for all systems (independently of the number of servers) in the critical load (a = 0). For loads in
the vicinity of a = 0 the theoretical predictions get precise for n > 100 and deteriorate for large
|a|.
86 Chapter 4. Packet-Level Network Simulation
In particular, for critical loads lower than a = −5 the theoretical formula gets a significant
bias and predicts much lower blocking probabilities than those obtained with simulations. It
is interesting to observe that all simulated systems start their phase transition (passing from
an exponentially small blocking to a polynomially small blocking) at approximately the same
normalized load (at a ' −5) and with approximately the same normalized blocking probability
(B̄nθ ' 10−6 ). As expected, this is not predicted by the asymptotic formula (4.3) (which does not
depend on n).
Finally, in view of the simulation results we can propose the following conjectures:
Conjecture 1 The JSQ policy, the JIQ policy and the FFFA policy belong to C.
Conjecture 2 The Power of D policy does not belong to C for any fixed D (i.e., not depending
on n).
√
Conjecture 3 There exists d(n) ≤ n such that the Power of D(n) policy belongs to C.
88 Chapter 4. Packet-Level Network Simulation
Figure 4.22: Normalized blocking probability for IBL scheduling with different number of servers.
Theta=3, Service=exp(1). Bars represent the standard deviation.
4.5. Exploring TDAQ Load Balancing Options Through Modeling and Simulation89
Figure 4.23: Comparison of different strategies. Theta=3, Service=exp(1). Bars represent the
standard deviation.
90 Chapter 4. Packet-Level Network Simulation
Figure 4.24: Performance of different strategies in the critical regime. N=200, theta=3, ser-
vice=exp(1).
4.5. Exploring TDAQ Load Balancing Options Through Modeling and Simulation91
The proposed hypothesis is: Under an improved assignment policy the sharing of resources
should be reduced with the direct consequence of improving the overall event filtering latency.
Guided by results in the previous sections, JSQ is chosen as the optimal policy. In the sequel,
JSQ is also referred to as LEAST_ BUSY_DCM which is a more meaningful name under the
TDAQ context.
RANDOM policies, respectively. This shows that the model is capable of reproducing measurable
behaviors, and represents a valuable tool to provide insights on the impact of changes in the real
system.
Averaged Event Build Latency (ms)
200
Real LEAST_BUSY_DCM (new)
Simulated LEAST_BUSY_DCM (new)
150 Real RANDOM (current)
Simulated RANDOM (current)
100
50
00 5 10 15 20 25
HLTSV Event rate (KHz)
Figure 4.26: Comparison of assignment policies (RANDOM versus LEAST_BUSY_DCM) and
simulation predictions versus real metrics. Error bars represent standard deviation. The RANDOM
algorithm exhibits the same behavior as the FIFO algorithm, while the new algorithm maintains
average Event latency close to a minimum (16 ms) for all frequencies below 24 kHz.
4.6 Conclusions
In this Chapter the development of a packet-level simulation model under the DEVS formalism
was described.
New protocol, network and DAQ application models are now part of the reusable PowerDEVS
network library. The TCP protocol model was compared against the OMNET++ implementation
showing behaviours of acceptable similarity.
The modular construction of topologies was described, supported by graphical interfaces, and a
case study showed an effective automatic generation of a medium sized topology directly retrieved
from SDN controllers.
Real metrics from the TDAQ network were taken in two different case study scenarios and
compared against simulation results. These studies showed that simulations reproduce relevant
behaviour of DAQ network and applications, specifically, a Traffic-Shaping application and Event
Build Latency.
94 Chapter 4. Packet-Level Network Simulation
Then, load balancing strategies were studied through extensive simulations from the queuing
theory perspective. Simulations showed that there is a class of efficient policies for which a common
critical regime can be identfied and interpreted as a generalization of the Halfin-Whitt-Jagerman
regime for one-server systems. This can provide new insights for future theoretical studies.
These finding motivated the implementation of an alternative load-balancing strategy to dis-
tribute Events among TDAQ processors. Simulations showed improvements in the overall Event
filtering time. In turn, this improved load-balancing strategy was implemented in the HLTSV
application and tested in a controlled environment within the real TDAQ network. Measurements
from these tests showed that simulation predictions matched accurately with the real measure-
ments.
This Chapter offered evidences for the suitability of our new packet-level library to represent
complex high-speed networks, while the next Chapter will focus on performance scalability relying
on fluid approximations.
All packet-based discrete simulators scale, in one way or another, at least linearly on the size
of the system. And so does our discrete approach.
But, how does the performance of our DEVS-based library compares against other simulation
tools?
Our assessment is that the order of magnitude of our packet-level simulation times lie within
expected ranges shared with other tools. To provide an intuition, simulations in PowerDEVS
for the models presented in Chapter 4.4.3 resulted in comparable execution times with similar
scenarios using the OMNET++ tool reported [96]. The order of magnitude is ca. half a minute
per each virtual simulation second for 1/50 of the full HLT network.
It remains as a broad area of research to find techniques to automatically optimize DEVS-
based packet-level models (i.e. beyond the usual code reviews for performance enhancements). For
instance, by automatically reducing the hierarchy complexity (model flattening, see e.g. [157]).
Such symbolic manipulation is only possible by relying on a formal model specification, as it is the
case with DEVS.
Resumen: Simulación Paquete a Paquete
95
Chapter 5
Leonardo da Vinci
96
5.1. Introduction and Motivation 97
cases where there is light inter-subnetworks traffic, meanwhile clock synchronization techniques
can also present technical difficulties [158].
Fluid-flow models, briefly introduced in Chapter 2 (and the focus of this Chapter) propose a
higher abstraction level to represent averaged (fluid) packet data rates, instead of resorting to a
packet-by-packet approach. These analytical models can be much faster to solve numerically and
yield results with acceptable accuracy when compared to fine-grained packet-level simulations. On
the hand, there inevitably exists a trade of accuracy for speed: in fluid approximations only the
first order moment (mean value) is preserved for probabilistic sequences of discrete events (i.e. of
packet arrivals and departures from network nodes).
Several fluid-flow approximations have been proposed and refined incrementally since the early
days of packet network modeling [42]. We are interested in fluid models that are represented by
sets of Ordinary Differential Equations (ODEs). They have been successfully applied to study
complex end-to-end dynamics in TCP data flows, initiated in [43] and [24] continued in this work.
We identify, though, several limitations in the existing methods and tools for ODE-based fluid-
flow network simulation. At the heart of the fluid approximation approach is the need of verifying
results against packet-level simulations. Unfortunately, existing methods and tools for network
simulation are of a very different nature than those required to solve ODEs. In network model-
ing the natural approach is to compose topologies modularly, through the interconnection (links,
queues) of network nodes (hosts, routers, etc.) each one embedding particular behavior (discrete
event algorithms) to deal with streams of packets. In ODE numerical solving, different tools (e.g.
Matlab, Octave, SciPy, etc.) provide algorithms that require the specification of equations in forms
that are alien to network descriptions. The modeler is then left with the task of implementing
98 Chapter 5. Fluid-Flow Network Simulation
a packet-level model, inspect the network topology and discrete behavior of its nodes, come up
with a set of approximating ODEs, encode them in a separate tool (or develop a custom ODE
solver), simulate both systems separately, and compare results. We claim that this approach is
heavyweight, error prone, and hinders true synergy between specialists at the discrete and con-
tinuous domains of network M&S. The network modeler needs to be well acquainted with ODEs,
numerical solving methods and their correct implementation. These are well studied topics but
are generally not part of the knowledge of network experts and designers. Also developing and
maintaining customized code is time-consuming and error-prone for ODE experts.
In this Chapter, we propose novel methods for efficient modeling and simulation for fluid-flow
network approximation.
We present a modular and scalable integrated approach to combine the modeling and numeri-
cal solving of fluid network models along with their packet-level counterparts under a unified and
consistent mathematical description and practical tool. Modularity provides the modeler with the
ability to graphically interconnect self contained models of network elements that can embed either
a packet-level algorithm or its fluid-flow approximation, depending on the task at hand. In the
case of fluid models, the overall set of ODEs gets automatically defined and ready to solve under
a discrete event-based framework. Basic network nodes can then be reused to create arbitrary,
possibly complex topologies, without the need to manually redefine a new set of ODEs for each
new simulation scenario.
One step further is to consider hybrid models, where fluid-models are integrated and inter-
act with well-know packet-level simulators. These models report the performance advantages of
fluid-models while preserving detailed results of packet-level models. On the other hand, it posses
the challenges of the packet-level simulation together with the need to master fluid-flow ODE and
numerical solvers. Moreover, the time management of discrete-event simulators and discrete-time
time solvers must be synchronized.
In Section 5.6 we propose a novel hybrid approach that takes advantage of representing packet-
level and fluid-flow models under a same formalism. Consequently, there is no need to synchronize
time as both models, fluid and packet, are represented as discrete-events of a same class.
variations and consider multiple packets as a constant fluid rate [160] allowing buffer size to be
calculated analytically.
FluidSim [26] proposes a model for ATM networks following an event-driven approach in which
events are associated only with rate changes in fluid flows. A custom scheduling algorithm is
proposed to handle event types specific for this model, and a sort of integration is done for piece
wise constant throughput rates.
A widely referenced model in the literature, which we use as baseline for our work, is the one
proposed by Misra, Gong, and Towsley in [44]. We shall hereafter refer to it as the MGT model or
the MGT study. A set of ODEs is developed relying on a Stochastic Differential Equation (SDE)
analysis to describe the behavior of TCP on a network of routers implementing Random Early
Detection (RED, 4.2.1).
The first versions of the MGT were empirically validated with real network traffic [43]. More-
over, it was shown that when the network is scaled to infinity fluid models capture the limiting
behavior of TCP and follow the sample path behavior [161]. MGT was later extended and other
versions of TCP (NewReno, SACK) were proposed in [24]. This triggered several research efforts
including short-lived TCP sessions in [47], explicit congestion notification (ECN) in [46], and paral-
lelization techniques using GPUs [10]. In [81] an early version of the MGT model was implemented
using QSS, where only a single flow class is considered and equations describe the dynamic of a
single queue that cannot be connected in tandem.
For the MGT, the ODEs were originally solved in Matlab and with later additions using
fixed-step discrete-time Runge-Kutta (RK) algorithm programmed in C [24]. The custom RK
solver includes ad-hoc hooks to handle time delays present in the equations. Figure 5.2 shows
the simulation flowchart used for this particular set of ODEs, which specifies the order in which
variables’ values are updated. During the initialization phase a model reduction procedure takes
place to remove inactive nodes from the topology, which greatly reduces the computation time as
less variables must be computed at each discrete-time step.
Although fluid-flow models are feasible to simulate accurately and efficiently large data net-
works, they are still far from being adopted by network experts.
On the one hand, developing correctly (and even understanding) ODEs that model real world
dynamics requires strong mathematical background. On the other hand, a set of ODEs representing
a full network gets defined by a combination of the topology (a macro property) and the dynamics
of each node (a micro property) living in that particular topology. Furthermore, once ODEs are
obtained, they must be re expressed into formats specific to an existing numerical solver of choice.
Alternatively, the network modeler ends up faced with the task of coding himself an ad-hoc ODE
solver, where several new risks and error-proneness arise.
Moreover, for experts in ODEs and numerical methods, the effort to develop and test new
network models is twofold. On the one hand, to solve ODEs they need to code and maintain
software to translate topologies into equations, possibly implement ODE-solvers for particular
challenges as Delay Differential Equations (DDE) (we shall see this in detail in Section 5.2.3), and
in some cases custom simulations cycles are developed. On the other hand, to verify new models
they still need to develop packet-level models in a completely different software context.
100 Chapter 5. Fluid-Flow Network Simulation
Figure 5.2: Flowchart of Fluid Model Solver for the MGT model in [24]
simulated with packet-level (ns-2 simulator) and some routers use fluid-flow (FluNet). At the edges
(packet-level/fluid-flow) ingress interfaces average packet arrivals and forward rate information into
FluNet. Egress interfaces apply fluid metrics to discrete packets.
The authors of the MGT model proposed to integrate the fluid-flow model with the ns-2
packet-level simulator [9]. The network is split by placing nodes either in a fluid-flow subnetwork
or in a packet-level subnetwork. For the interaction of both type of simulations, two incremental
approaches are proposed. They refer to the "one-pass model" were fluid metrics of background
traffic are retrieved from the Runge-Kutta solver and applied to discrete packets to influence
foreground traffic. In a "two-pass model" an additional pass is required to transform the packet-
level traffic into a fluid-flow representation, then solving the resulting fluid model.
The fluid solver is synchronized to the ns-2 simulator periodically every a fixed smoothing
internal which must be chosen smaller than the minimal propagation delay of links that are the
last hops on the packet paths inside the fluid network. Experiments show correct hybrid simulations
reaching speedups of up to 6.53 as compared to the pure packet-level simulation.
In [10], the authors combine the foreground packet-level discrete-event simulation on CPUs
with background fluid-flow numerical calculations on GPUs. Authors propose a "fix-up computa-
tion" as an approximation method for mixing fluid and packet flows within a fixed Runge-Kutta
interval. They accept that the approximation may introduce errors due to possible queue overflow
events which are expected not to be significant when using sufficiently small Runge-Kutta step
sizes (which can be seen as a convergence towards the basic Euler 1st order method). Experiments
show that the GPU-assisted hybrid model can achieve substantial performance improvements over
the CPU-only approach, while still maintaining good accuracy.
In all cases, proposals maintain separated simulation techniques to represent fluid-flow and
packet-level simulations, namely discrete-time and discrete-events, respectively. This leads to
the need of implementing clever ad-hoc synchronization algorithms to make the different time
management systems match, such as constraints in choosing step sizes, smoothing of packet-level
traffic, and handling possible approximation errors. Special considerations must be enforced to
synchronize correctly the simulation clocks of the discrete-event packet simulator and the time-
stepped fluid solver. Moreover, different tools must be maintained for both discrete/continuous
domains, which need to be mastered for each approach (namely, packet-level simulators and ODE
solvers).
An exception is the work presented in [81], a predecessor of the work in this Thesis, where
DEVS is used to represent both packet-level and fluid-flow models under a same formalism and
tool (using QSS to approximate ODEs). For the interaction of fluid and packet models, the packet-
level queue accepts a new type of hybrid packet structure for each new discrete packet. Hybrid
packets contain the original packet size plus an artificial hybrid size that represents the number of
fluid packets that should be interspersed in between adjacent discrete packets. The service time is
calculated based on both sizes, thus effectively influencing queuing wait time with fluid metrics.
Under the assumption that background throughput is much larger than foreground traffic, fluid-
flows can affect packet-level flows. Yet, the inverse option is not available. Also, as mentioned
before, the fluid model can only represent a single overall background flow, and does not allow for
hybrid queues to be connected to create fluid topologies.
102 Chapter 5. Fluid-Flow Network Simulation
dx
(t) = f (t, x(t − τ1 ), ..., x(t − τn )), t ≥ t0 (5.1)
dt
DDEs can be categorized depending of the dynamics of the delay as follows:
1. Constant delays: τi = Ki
Figure 5.3: Bouncing ball simulation result using Runge-Kutta with step sizes h = 0.002, h = 0.001,
and h = 0.0005 [165]
Variable step integration methods are often able to pass through discontinuities in the quite
an inefficient way. Step size control algorithms will detect sudden very steep gradient changes
and will consequently reduce the step size. The step size is made smaller and smaller until the
algorithm finally gives up, either because the step size reached smallest tolerable value or because
104 Chapter 5. Fluid-Flow Network Simulation
the step–size control is getting fooled. As a consequence, the discontinuity is passed through with
a very small step size, steep gradients disappear, and the step size is cautiously increased again .
Although inefficiently, usually decent results are produced but in many cases this is not the case
[5].
If the step size is not sufficiently small discontinuities can be even more problematic for discrete-
time methods. Figure 5.4 shows the results using a variable–step Runge–Kutta method (ode45
of MATLAB) with two different accuracy settings to depict the problem. Using a sufficiently
large tolerance value, the method totally skips the discontinuity and is not able to detect the ball
touching the ground.
A classical way to avoid these situations is to use a rather simple idea: all that is needed
is a variable step method which performs a step at the exact instant t∗ where the discontinuity
occurs. This way, the method would always integrate a continuous function before t∗ and another
continuous function after t∗ .
For time events, in which the instant at which the discontinuity will occur is known in advance,
this idea works in classical numerical integrator without much changes: known times at which
discontinuities occur are scheduled and whenever t + h >= t∗ the method is setup to restart with
simulation time t∗ instead of continuing with t + h.
On the contrary, for state events the instants at which discontinuities occur are a function of
the state variables and thus can not be know ahead of time. This is the case of the bouncing ball
problem, and the idea of executing a step at the exact instant t∗ where the discontinuity occurs is
not so simple. Functions that determine discontinuities must be evaluated at every time step. If
a discontinuity condition is detected the method should start an interactive procedure to find the
instant t∗ backwards in time with a given precision. Once the iteration finishes, the method can
restart from the time which was found.
These techniques for handling discontinuities in discrete-time methods incur an important
computational cost. In systems where discontinuities occur faster than the continuous system
dynamics, simulation times can become prohibitive.
Coming back to data networks, similar issues were reported in [10] in the context of buffer size
approximation in hybrid simulations were discontinuities occur at buffer underflow and overflow.
Given the queue length approximated with ODEs, the simulation needs to determine whether a
packet will cause the network queue to overflow. The fluid model only calculates the differences
in queue length at each Runge-Kutta step with size h and is assumed to stay constant in between
intervals. This approximation may introduce important errors.
Figure 5.5 shows an example on how fluids and packets are integrated in [10]. Suppose at time
t and t + h the fluid model calculates the network queue length q(t) and q(t + h), respectively.
The problem occurs when packets arrive during the Runge-Kutta time interval between time t and
t + h, the fluid queue length at time t + h is not yet available. Figure 5.5a shows the situation
where a packet which is supposed to be admitted is dropped due to queue overflow. Figure 5.5b
shows a packet is admitted when it is supposed to be dropped. The Runge-Kutta step size must
be kept small to maintain numerical accuracy. Similar situation occurs when the queue length gets
close to zero were clever ad-hoc mechanisms are used to correctly schedule packet delays. Linear
interpolation of the values at the Runge-Kutta steps t − h and t allows to reduce approximation
error.
In QSS methods, all the problems related to discontinuities disappear. While in discrete-time
methods discontinuities are challenging to handle because trajectories are approximated by func-
5.2. Preliminaries and Related Work 105
(a) The third packet is supposed to be admitted (b) The third packet is supposed to be dropped
but is dropped but is admitted
Figure 5.5: Mixing of fluids and packets. Approximation errors due to queue overflow[10]
tions that do not exhibit discontinuities (polynomials of Taylor-Series), in QSS the discontinuities
in the input and quantized variables are in fact responsible for time advance [5].
On one hand, QSS integrators provide dense piecewise constant, lineal or parabolic output for
state variables according the the order of the method. This allows to analytically calculate the
instant at which a state variable will trigger a discontinuity condition. The analytical calculation
106 Chapter 5. Fluid-Flow Network Simulation
implies solving the root of a polynomial (fast) and the method guarantees that the value will always
stay within the QSS error boundaries. On the other hand, the arrival of a discontinuous event is
handled naturally and without requiring a restart. In QSS, discontinuities occur regularly even in
systems without discontinuities as input trajectories qi (t) are discontinuous. Thus, a discontinuous
condition in QSS has the same effect and is handled just like a normal integration step [165].
Figure 5.6 shows the QSS simulation results for an enhanced bouncing ball problem that con-
siders ball moves in two directions (x and y), bouncing down a stairway and with the addition of
air friction as described in [5].
We propose the following set of differential equations to represent a network buffer-system with
finite capacity and multiple input flows:
0 < q(t) < Qmax
or
P
q(t) = 0 and ai (t) − C > 0
P
ai (t) − C, if
dq(t) i
i
= or (5.5)
dt
P
q(t) = Qmax and ai (t) − C < 0
i
0, otherwise
(
0 q(t) < Qmax
µi (t) = Pai (t) (
P (5.6)
j aj (t) − C) q(t) = Qmax
j aj (t)
(
ai (t) q(t) = 0
di (t) = Pai (t−τ ) C
(5.7)
q(t) > 0
j aj (t−τ )
q(t − τ (t))
τ (t) = (5.8)
C
where:
• Qmax and C are parameters that define the maximum buffer size and output capacity
of the buffer-server system.
• q(t) represents the buffer (queue) size at time t.
Buffer size will grow/shrink according to the difference between the output capacity C and
the sum of all input rates as shown by Equation (5.5). When the buffer size reaches its
limits (0 or Qmax ) the growth rate is 0 to guarantee limits are not exceeded. More on these
conditions is discussed later.
• a1 (t), ..., an (t) represent the arrival (input) rates at time t of flows 1, ..., n respectively.
Input rates are assumed arbitrary functions here. We shall see later that in the context of a
network topology input rates are defined by server rates or departures rates of neighbouring
queues.
• µ1 (t), ..., µn (t) represent the drop (discard) rates at time t of flows 1, ..., n respectively.
Packet discards occur only when the buffer is full (q = Qmax) and its rate equals the
difference between the service capacity C and the sum of all input rates. The total discard
rate is shared among all flows proportionally to their current input rate as shown by Equation
(5.6).
• d1 (t), ...,dn (t) represent the departure (output) rates at time t of flows 1, ..., n respectively.
When the buffer is empty (q = 0) there is no queuing wait time so the departure rate of each
flow will equal its arrival rate. When the buffer is not empty (q > 0), the router sends at
full capacity sharing the bandwidth among incoming flows proportional to their input rates
as shown by Equation (5.7). Incoming flows are delayed before departing according to the
experienced queuing waiting time described by τ (t).
108 Chapter 5. Fluid-Flow Network Simulation
• τ (t) is the experienced queueing delay, i.e. the waiting time that has been experienced by a
packet departing now, at time t.
Note that τ (t) is different from the current queuing delay, i.e. the waiting time that will be
experienced by a packet arriving now, at time t, and that responds to q(t)
C
.
These equations present certain characteristics that make its numerical simulation challenging and
that will be addressed in the following subsections, namely:
• Equations (5.5), (5.6), and (5.7) exhibit sharp discontinuities in the evolution of the differen-
tial equation when the buffer occupancy reaches certain limits. Depending on the simulation
method important considerations must be made to handle efficiently the switching conditions
(see Section 5.2.4). Section 5.4.4 discusses the approach taken in this Thesis.
• Equation (5.5) is an ODE and Equations (5.7) and (5.8) use retarded dynamics, i.e. depend
on time delays. Yet, in Section 5.3.1 we show that the system of equations is not characterized
as a typical Delay Differential Equation.
• In Equation (5.8) we find an implicit form for the delay τ (t). That is, the value of τ (t) is
expressed in terms of τ (t) itself. Section 5.4 describes different approaches for this particular
kind of dynamics.
If we look at Eq.(5.5) it is a classic ODE with no particular characteristics other than the boundary
conditions that must be observed when the queue is either empty or full. Let us shift our attention
for a moment only to the ca ses when 0 < q(t) < Qmax in order to remove the intricacies of
handling discrete events
P within the simulation of a continuous system. We are then left with the
dq(t)
simpler form dt = ai (t) − C which can be straightforwardly solved with QSS methods.
i
But we are also particularly interested in determining the behavior of the departure rates di (t).
When q(t) > 0 we have that di (t) depends on q(t − τ (t)) as in Eq.(5.7) which is a delayed version
of the state variable q(t) in Eq.(5.5).
Is this system a Delay Differential Equation (DDE)?
dq(t) X
= ai (t) − C (5.9)
dt i
dq(t) X X
= ai (t) − dj (t) (5.10)
dt i j
dq(t) X X aj (t − τ (t))
= ai (t) − P C (5.11)
dt i j
a k (t − τ (t))
k
dq(t) X X aj (t − q(t − τ (t)))
= ai (t) − P C (5.12)
dt i j
ak (t − q(t − τ (t)))
k
dq(t) X C X
= ai (t) − P aj (t − q(t − τ (t))) (5.13)
dt i
ak (t − q(t − τ (t))) j
k
dq(t)
= f (t, p1 (t − q(t − τ )), ..., pi (t − q(t − τ ))) (5.14)
dt
where
ai (t)
pi (t) = P , (5.15)
aj (t)
j
X X
f (t) = ai (t) − C pi (t − q(t − τ )) (5.16)
i i
Eq.(5.14) appears similar to a DDE in the form of Eq.(5.1). Yet, it does not fall in any of the
known DDE flavors presented above.
The delayed components pi (·) are not directly the variable being differentiated (as in Eq.(5.1))
but are functions that use the state variable q(·) to represent delays. I.e., the differentiated variable
appears affecting the delay itself. Moreover, q(·) appears also retarded in the form q(t − τ ). But
again, as q(·) shows up only modulating the delay of a function, it makes Eq.(5.14) a different kind
of mathematical object other than a DDE.
The correct characterization of this buffer-server system, to the best of our knowledge, is that
of a Functional Differential Equation (FDE) [166], in particular of the Retarded type (RFDE).
A direct implication of this assessment is that existing DQSS methods are, a priori, not the
appropriate tool to solve numerically the RFDE system (5.5)-(5.8) that in turn includes an implicit
formulation for the delays in (5.8).
q(t − τ (t))
τ (t) = (5.8)
C
Incoming packets for the i-th flow are represented at time t by their arrival rates ai (t). They
will be served after a (dynamically changing) queuing time τ (t). Eq. (5.8) shows the implicit
definition where τ (t) depends on τ (t) itself.
Solving for this dynamic delay in buffer-server systems is challenging, and can greatly influence
the departure rates di (t) we are interested in, as will be shown in Section 5.5.5. In remarkable
studies such as [44] this delay is simply not considered.
In the following, we will address the solution of the RFDE system with implicit delays in the
context of the QSS theory, resorting to two different approaches:
1. In Section 5.4.1 we shall derive analytically an ODE system that is equivalent to the original
RFDE but without an implicit form for the delays. The resulting system can then solved
using standard QSS blocks for ODEs and DDEs developed in [8] and [80]
2. In Section 5.4.2 we approach the problem from a different perspective. We develop a new
algorithm that is able to solve the implicit delay directly, by programming events forward in
time, yielding a new Forward DQSS method (FDQSS).
Finally in Section 5.4.3 we compare both approaches.
q(t − τ (t))
τ (t) = (5.8)
C
1
= .q(u(t, τ (t))) ← auxiliary function (5.17)
C
dτ (t) 1 dq(u(t, τ (t)))
= . (5.18)
dt C dt
1 dq(u(t, τ (t))) du(t, τ (t))
= . . ← chain rule (5.19)
C du dt
1 dq(u(t, τ (t))) ∂u ∂u dτ (t)
= . .( + ) ← partial derivative (5.20)
C du ∂t ∂τ dt
5.4. Numerical Solving of Retarded FDEs with Implicit Delays 111
Equation (5.20) holds for any form of buffer dynamics q(·). By substituting now the specific
buffer size (5.9) into (5.20) we get:
dτ (t) 1 X dτ (t)
= ( ai (u(t, τ (t))) − C).(1 − 1 ) (5.21)
dt C i dt
1 X dτ (t)
= ( ai (t − τ (t)) − C).(1 − ) (5.22)
C i dt
P
ai (t − τ (t)) − C
i
= P (5.23)
ai (t − τ (t))
i
Eq.(5.23) has the same general form as Equation (5.14). Again, the delayed variable ai (·) is not
the same variable being differentiated τ (·), while the latter still appears in the form of the delay
itself. Equation (5.23) is still a Retarded FDE. Yet, it doesn’t present any implicit form anymore.
We want now to apply the QSS family of methods to solve (5.23). According to the quantization
procedure described in Section 2.5 we would get the following quantized system.
Note: Let us momentarily use x(t) for a generalized state variable and qx (t) for its quantized
version, not to confuse it with q(t) used so far for the buffer (queue) size.
dx(t)
= f (t − x(t)) (5.24)
dt
dx(t)
≈ f˜(t − qx (t)) (5.25)
dt
Unfortunately, the QSS theory provides guarantees of convergence and stability only for systems
quantized as:
dx(t)
= f (t, x(t)) (5.26)
dt
dx(t)
≈ f˜(t, qx (t)) (5.27)
dt
where the quantization function responds to qx (t) = Q(x(t), ∆q) as shown in 2.5.
With the following theorem we prove that if a generalized aggregated arrival function a(t) is
globally Lipschitz at all times, then a QSS simulation of the RFDE in Eq.(5.23) provides guarantees
of numerical asymptotic convergence at any desired accuracy.
Theorem 2 Consider the following RFDE on the state variable x(t):
and assume that a(t) is (globally) Lipschitz with a(t) ≥ > 0 ∀t and C > 0.
Then, the QSS approximation of (5.28) converges to the analytical solution, i.e., the global
error goes to zero when the quantum ∆Q goes to zero, for any initial condition x(t = 0).
112 Chapter 5. Fluid-Flow Network Simulation
Relying on Theorem 2 we are now ready to use standard preexisting QSS and DQSS blocks in
a simulator such as PowerDEVS to solve Eq. (5.23) as shown in Figure 5.7.
Figure 5.7: PowerDEVS implementation to obtain the dynamic delay as defined by Eq. (5.23)
(
ai (t) q(t) = 0
di (t + τ (t)) = P i (t) C
a (5.29)
q(t) > 0
j aj (t)
q(t)
τ (t) = (5.30)
C
Equations (5.7)-(5.8) in the original system express the current departure rate di (t) in terms
of the past arrival rates ai (t − τ (t)), which required the implicit form of τ (t). The set of Equations
(5.29) - (5.30) are equivalent, only that they express the future departure rate di (t + τ (t)) in terms
of the current arrival rates ai (t). This removes the implicit form for τ (t) but requires special
5.4. Numerical Solving of Retarded FDEs with Implicit Delays 113
Equation (5.30) can be trivially calculated from q(t). For solving Equation (5.29), a new QSS
method is developed to approximate forward delay equations with the general form:
5.4.2.1 Definitions
Figure 5.8 shows a block diagram of the input and expected output signals. The output delayed
signal d(t) is computed based on the input signals y(t) and τ (t).
τ(t) τ(t) D
d(t+τ(t)) = y(t) d(t)
y(t) y(t)
Figure 5.8: New FDQSS block. The mathematical operation for the expected input and output
signals (left). DEVS equivalent block diagram model (right).
Congruent with QSS, the output delayed signal d(t) can be expressed as a sequence of polyno-
mial segments valid on adjacent time intervals given by:
where tdl is a sequence of time instants with tdl < tdl+1 , and d0,l , d1,l , d2,l , ... are the corresponding
sequences of polynomial coefficients for d(t). We need to compute the time sequences tdl and the
coefficient sequences d0,l , d1,l , d2,l , ....
Similarly, the input signals y(t) and τ (t) can be expressed as a sequence of polynomial segments:
where tyk is a sequence of time instants with tyk < tyk+1 , and y0,k , y1,k , y2,k , ... are the corresponding
sequences of polynomial coefficients for y(t). Similarly tτj and τ0,j , τ1,j , τ2,j , ... are the equivalent
counterparts for τ (t).
Note that under this representation, the polynomial coefficients can change their values only
at the beginning of each interval. E.g. by taking the case of y(t) intervals commence at instants
tyk , so the coefficients remain constant throughout any time interval t ∈ [tyk , tyk+1 ). Also, there is no
predefined relationship between the time instants tyk and tτj for input signals y(t) and τ (t), which
evolve independently. The resulting timing sequence tdl for the output signal d(t) will depend on
tyk and tτj in a way that we will describe next.
• the sequences of polynomial coefficients d0,l , d1,l , d2,l , ... corresponding to each time instant in
the sequence above
'= +
'=
[ ]
[ ]
[ ]
'= +
Figure 5.9: FDQSS algorithm based on polynomial segments. Sequences of time instants and
polynomial coefficients
5.4. Numerical Solving of Retarded FDEs with Implicit Delays 115
For the calculation of the coefficients of d0,l , ..., dn,l , we shall take an arbitrary point in time t∗
where y and τ are in their k th and j th time instants respectively as shown in Figure 5.9. At time
t∗ + τ (t∗ ), d shall be in its lth time instant, and must verify that d(t∗ + τ (t∗ )) = y(t∗ ) by setting
the coefficients as follows. We shall omit hereafter the j, k, and l sub-indices of the corresponding
sequences to avoid notation clutter.
Removing all coefficients for orders higher than 1 (as would be done for QSS2) we obtain the
following expressions for the coefficients of d:
−n
d1 = (5.44)
2tr r2 − r1 − 1
with n =4t3r d2 r22 + 2tr d2 r12 + 2td d2 − 2d2 r0 +
2r1 [(td + tr )d2 − d2 r0 ]−
2r2 [3t2r d2 r1 − 2tr d2 r0 + (2td tr + t2r )d2 ] + 2ty y2 − y1
Regarding the time instants td0 , ..., tdl (at which d(t) is updated) we observe that its coefficients
depend on all coefficients of y(t), τ (t) and also on the time instants of their changes (tyk and tτj ).
Thus, coefficients of d(t) will remain valid until either y(t) or τ (t) polynomials change at time t0
(i.e we let t0 = min(tyk+1 , tτj+1 )).
Thus, at time tdl+1 = t0 + τ (t0 ), d(t) shall update the coefficients of its (l + 1)th time instant as
calculated before.
116 Chapter 5. Fluid-Flow Network Simulation
Morever, if t00 , ..., t0m is the ordered sequence of time changes for both y(t) and τ (t), with
(t0i ∈ ty ∪ tτ , t0i < t0i+1 and m = k + j), we can define the sequence of time instants tdl as follows:
t0i + τ0,j + τ1,j (t0i − tτj ) + ... < t0i+1 + τ0,j + τ1,j (t0i+1 − tτj ) + ...
t0i − t0i+1 < τ1,j (t0i+1 − tτj ) + ... − τ1,j (t0i − tτj ) − ...
(for QSS2)
t0i − t0i+1 < τ1,j (t0i+1 − t0i )
−1 < τ1,j (5.51)
(for QSS3)
t0i − t0i+1 < τ1,j (t0i+1 − t0i ) + τ2,j ((t0i+1 − tτj )2 − (t0i − tτj )2 ) (5.52)
t0i + τ0,j + τ1,j (t0i − tτj ) + ... < t0i+1 + τ0,j+1 + τ1,j+1 (tτj+1 − tτj+1 ) + ... (5.53)
t0i − t0i+1 < τ0,j+1 − τ0,j − τ1,j (t0i − tτj ) − ... (5.54)
– q = {q0 , ..., qn } where qi ∈ {R, P}: sorted list of the output time instants tdl and the
corresponding polynomial dl
5.4. Numerical Solving of Retarded FDEs with Implicit Delays 117
– y ∈ {R, P}: lastly arrived polynomial for the input signal y with it corresponding arrival
time ty
– τ ∈ {R, P}: lastly arrived polynomial for the input signal τ with it corresponding arrival
time tτ
• Time Advance Function: returns infinite if q is empty. Otherwise, the next internal
transition is scheduled to occur at q0 .f irst (the time in the first element of the queue)
• Output Function: sends an output event with the polynomial of q0 which was already
calculated in the external transition
• Internal Transition Function:
– Advance1 the y and τ polynomials with the elapsed time
– Pop q0 from the queue (removes the polynomial that was just sent)
• External Transition Function: Upon receiving a new y or τ segment at time t:
– Update either y or τ polynomial with the newly arrived segment. Update its corre-
sponding arrival time setting either ty = t or tτ = t
– Advance1 elapsed time the polynomial y or τ which was not updated in the previous
step.
– Enqueue a new element qn in the queue q with the following values:
∗ Output time tdl : calculated as in Equation (5.46) using t0i = t (the current time)
and τ (t0i ) = τ0 (τ was just updated or advanced1 so we can use its first coefficient
directly)
∗ Output polynomial dl : calculated as in Equation (5.40) using the coefficients of y,
τ , and its corresponding arrival times ty and td .
Note: calculations can be greatly simplified when using the coefficients of the
advanced1 polynomials of y and τ . For example, d0 simplifies to d0 = y0 when
replacing td with its corresponding value td = tr + τ (tr ) = tr + r0 or td = ty + τ (ty )
according to Equation (5.46)
The atomic DEVS model just described was implemented as a new generic, standalone and
reusable FDQSS block in the PowerDEVS continuous systems library. Figure 5.10 compares ex-
isting QSS delay blocks with the new FDQSS block, all of which calculate dynamic signals by
applying delays in different ways:
• The Delay block computes: d(t) = y(t − D).
• The VariableDelay block computes: d(t) = y(t − τ (t)).
• The ForwardDelay block computes: d(t + τ (t)) = y(t),
where y(t) and τ (t) are input dynamic signals and D is a constant parameter.
1
By "advancing ∆t time a polynomial p(t) = p0 + p1 (t − tp ) + ... (which is based on time tp )" we refer to the
operation of updating the polynomial coefficients so as to get an equivalent polynomial p0 based on time tp + ∆t
(e.g. p00 = p0 + p1 ∆t)
118 Chapter 5. Fluid-Flow Network Simulation
(a) Fixed Delay QSS (b) Delay QSS (c) Forward Delay QSS
Figure 5.10: Comparison of QSS Delay Blocks available in the PowerDEVS continuous systems
library.
q(t)
a1
d1(t)
μ1(t)
UDP
Host1
d1(t)
μ1(t)
a2
Buffer-Server UDP
Host2
Packet Queue Bandwidth Delay
Figure 5.11: Experiment setups to compare the packet-level queue and the fluid buffer-server
system.
Figure 5.12 shows results for the first experiment were the buffer-server system is configured
with a capacity C = 100Kbps and a maximum buffer size of Qmax = 600Kb. The input flows
a1 (t), a2 (t) to the buffer-server system follow very simple piece-wise constant trajectories, as shown
in the top row. The second row shows the queue size q(t) calculated from Equation (5.5). The
third row shows the departure rates d1 and d2 calculated as per Equation (5.7), and the bottom
row shows the drop rate µ(t) as per Equation (5.6).
The effect of the delay in the departure rate can be observed. For example, at 17s the second
host stops, but the queue has a waitT ime = 600Kb/100Kbps = 6s so there are still packets from
the second host departing until 23s. Similarly, it is easy to observe how the queue size q(t) re-
spects the limits [0, 600Kb] thanks to the boundedIntegrator. At 14.5s the queue gets full and starts
generating drops proportional to the input rates. The fluid buffer-server system shows excellent
5.4. Numerical Solving of Retarded FDEs with Implicit Delays 119
Figure 5.13 shows the results for the second experiment. More complex input patterns are
used to compare further each approach to solve Retarded FDEs and test the accuracy of the fluid
buffer-server against packet-level simulations with stochastic packet sizes. The buffer-server system
is configured as before and the input flows follow a linear a1 (t) and sinusoidal a2 (t) trajectories,
as shown in the top row. The second and third rows show the departure rates d1 and d2 , and
include results for modeling τ as a dynamical system and using the new FDQSS block. In this
case, packet-level UDP hosts use packet sizes following a exponential probabilistic distribution
with mean=1000Kb.
Both approaches to solve Retarded FDEs yield very similar results (with expected minimum
differences). By using stochastic packet sizes we confirm that the fluid model captures an averaged
behavior only, ignoring the variance of the stochastic process. We conclude that the buffer-server
system provides an excellent approximation to the packet-level queue even in the presence of input
noise.
Table 5.2 shows a comparison of both approaches to solve Retarded FDEs. The FDQSS blocks
provide a 10% of performance improvement over the dynamic delay calculation. Also, FDQSS
is easier to use as it requires no extra parameters. The implementation of the dynamic delay
calculation relies on an additional integrator (which requires choosing dqmin, dqrel, x0 , Qmax , and
Qmin parameters) along with a DQSS block (which requires an initial history and initial values
parameters). Moreover, the FDQSS block can be reused in other models which use equations
in the form f (t + τ (t)) = y(t), whereas the dynamic delay calculation approach is specific for
the buffer-server system. Also, for the buffer-system in particular, the forward delay equations
provides a more intuitive way of understanding the delay: to schedule the currently incoming flow
to departure after the current queuing time.
On the other hand, the dynamic delay approach can be implemented with already developed
and tested blocks so it is in principle more reliable. Also, it implements the implicit equation as
originally written, although it requires to express the dynamics of the delay.
In the rest of the models included in this Thesis we will use the new Forward Delay unless
explicitly stated. The following table summarizes advantages and disadvantages of each approach:
Figure 5.12: Comparison of the fluid buffer-server system and packet-level simulations using step-
wise inputs and constant packet sizes.
5.4. Numerical Solving of Retarded FDEs with Implicit Delays 121
Figure 5.13: Comparison of FDQSS, dynamic calculation of τ and discrete packet simulation using
a buffer-server system
122 Chapter 5. Fluid-Flow Network Simulation
1. When the integrated value q(t) would cross either boundary (saturation condition). Here
q˙b (t) is set to 0 to guarantee q(t) stays constant at the saturation value.
2. When the value of q̇(t) allows q(t) to leave the saturation condition. In this case q˙b (t) is set
to q̇(t) to continue with the standard QSS integration.
Formally, q˙b (t) within the QBI block is defined by the following expression:
q(t) = Qmax AND q̇(t) ≥ 0 Persistent HIGH SATURATION
0, if OR
q˙b (q(t), q̇(t)) = q(t) = Qmin AND q̇(t) ≤ 0 Persistent LOW SATURATION
q̇(t), otherwise
(5.55)
where:
• q(t) is calculated by a standard QSS block, and is bounded with Qmin <= q(t) <= Qmax .
q'(t) q(t)
QSS Bounded
Integrator (QBI)
(a) Modular QBI block (b) QBI internal overview. Reuses a standard QSS integrator and imple-
ments Equations (5.55)
Figure 5.14: QBI block available in the hybrid library implemented in PowerDEVS
Equation (5.55) is implemented within the q_der_b coupled model in figure 5.14. For the
detection of switching conditions it relies on a Comparator and a Switch standard QSS blocks.
Figure 5.15 shows illustrative examples comparing the behavior of a standard QSS integrator,
a QBI integrator, and an integrator with capped output at saturation levels. In 5.15b the QSS
integrator imposes no boundaries and performs the usual integration throughout the simulation. In
5.15c the QBI exactly detects boundary conditions, halts integration when boundaries are reached,
and releases properly from saturation when the derivative signal changes. Meanwhile, the third
option in 5.15d caps output at saturation levels. Yet, this is not an option, as the internal state
variable continues integrating the input signal and therefore it takes some extra time to leave the
upper saturation level, which is not the expected behavior (see values at t = 3s or t = 5s).
124 Chapter 5. Fluid-Flow Network Simulation
600
400 Input
200
Value f'
0
200
400
6000 2 4 6 8 10
600
400 QSS Integrator
200
Value f
0
200
400
6000 2 4 6 8 10
Time [s]
(a) Integrator Test Model (b) Standard QSS integrator
600 600
400 Input 400 Input
200
Value f'
Value f'
200
0 0
200 200
400 400
6000 2 4 6 8 10 6000 2 4 6 8 10
300 300
250 QBI Integrator 250 Integrator+Saturation
200 200
Value f
Value f
150 150
100 100
50 50
00 2 4 6 8 10 00 2 4 6 8 10
Time [s] Time [s]
(c) QSS Bounded Integrator (d) Standard QSS Integrator with a capped out-
put
Figure 5.15: Example comparing the available QSS integrators. Boundaries for (c) and (d) are set
to Qmin = 0 and Qmax = 250.
topologies without knowledge on ODEs, using fluid blocks from a pre-defined fluid-flow library.
Equations for the continuous dynamics get defined with the PowerDEVS block-based diagrams,
which can be tested independently from other network elements and are easily interchangeable.
Meanwhile, ODE experts can focus on better expressing mathematically network dynamics in the
form of their fluid limits, without concerning on issues such as topological information, simulation
techniques or numerical solvers. The latter is handled transparently by the QSS methods and
the DEVS simulation engine, being able to switch between available solvers without changing the
equation’s block diagrams.
• Flow ID: unique identifier for streams of data that share common characteristics. This
field is also present in the packet-level data structure as allows common behaviour such as
flow-based routing. Noted as a subscript of other attributes (e.g. d1 (t) denotes the departure
rate of Flow ID=1)
• Rate: amount of data transmitted per unit of time. Noted as ai (t) or di (t) for input (arrival)
and departure rates, respectively.
• Accumulated Drop Rate: total drops per unit of time experienced by the flow along its
route. Noted as µi (t).
• Accumulated Delay: total delay experienced by the flow along its route. Noted as τi (t).
The units for parameters and input/output signals are a choice of the modeler and needs to
be consistent. E.g. they can be measured in packets and seconds, so that rates (ai , di , µi and C)
126 Chapter 5. Fluid-Flow Network Simulation
will be measured in packet/s, while q, Qmax and Qmin will be measured in packets. Other typical
alternative is bit/s.
To enable the creation, transmission and manipulation of attributes of Entities, the following
models were added to the PowerDEVS library:
• Entity class hierarchy: it is depicted in Figure 5.16. The IEntity abstract interface
generalizes all possible entities while the IAttribute interface represents attributes. Concrete
entities (such as a FluidFlow ) combine related attributes (fields and QSS signals).
• Entity Creator block: This DEVS atomic model shown in Figure 5.17a has as many input
ports as attributes exist for an Entity. The Entity Creator groups together all incoming
signals and outputs DEVS events containing the new Entity. The lifetime of Entity objects
is related to the validity of its attributes. Every time a new input is received (e.g. an update
of a QSS polynomial) a new instance of the Entity is created with the corresponding attribute
marked as updated.
In other words, each new instance of an entity represents a discrete event that updates at
least one of the Entity’s attributes (very similar to the concept of updating the polynomial
coefficients for a QSS signal, i.e. a QSS update event).
Two Entity objects with the same ID might have different attribute values at different points
in a large model topology. For example, a FluidFlow entity for "flow1" Accumulated De-
lay=0, but at the end of its route it will have experienced some Accumulated Delay.
• Attribute Selector block: Attribute selector atomic models shown in Figure 5.17b receives
an Entity and outputs only a selected attribute. This allows for the manipulation of indi-
vidual attributes with any standard DEVS block. An Attribute selector model will generate
a new output event only if the entity has its corresponding attribute marked as "updated".
This prevents from generating redundant, useless events when a new Entity arrives but its
attribute of interest remains the same as in its predecessor Entity.
• Attribute Composer block: An attribute composer atomic model shown in Figure 5.17b
performs the inverse operation of the attribute selector: it receives QSS signals and sends
Fluid Entities with the corresponding attribute marked as updated. The creator groups
together all signals and sends DEVS events containing the new Entity.
In data network models Fluid Entities improve modeling by allowing network topologies to be
represented in a similar fashion as packet-level topologies, much like modeling a pipeline network.
Instead of using one DEVS port per signal (rate, drop rate, delay, etc.) top level components
(e.g. hosts, routers) connect with each other using a single DEVS port wherever a real connection
would exist in the real world. Moreover, it enables the routing of fluid flows throughout the network
topology based on Fluid Entity attributes (such as the ID) and operations can be performed as
they traverse a non-predefined route (e.g. each queue adds its own delay, to obtain finally a fluid
flow round-trip time measurement).
5.5. A Modular Approach for Fluid-Flow Network Modeling 127
IEntity IEntity
Attribute<string> id Attribute<string> id
Extends
Extends IFlow:IEntity
0..n
Extends Extends
Relation
Packet:IFlow FluidFlow:IFlow
IAttribute<T>
1
uint length_bits; // QSS signals
bool updated std::shared_ptr<void> payload; Attribute<double*> rate;
T value ...... Attribute<double*> acumDrops;
Attribute<double*> acumDelay;
Figure 5.16: Class Hierarchy for Fluid-Flow Entities. The Packet class, same as defined in Figure
4.8, shares same data structure hierarchy with Packet-Level models.
Attribute Attribute
FluidFlow Selectors Manipulation
FluidFlow
rate (bps)
FluidFlow
mechanisms, communication links and multiplexing. These models receive, manipulate and output
Fluid Entities but will be described in terms of the flow attributes to simplify the notation.
5.5.2.1 Fluid Data Network Sources: TCP Window and Unresponsive Sources
Data flow sources generate the input into the network by creating flow entities with a dynamic
rate di (t). These can be modeled as simple continuous functions which are independent of external
inputs to represent unresponsive network protocols, or more complex functions that depend on the
state of the network (such as round-trip time or drops) to represent congestion control protocols.
Basic unresponsive sources, shown in Figure 5.18a, set the flow rate independently of external
signals. Basic sources might be useful in early stages of network design when traffic pattern
specifications are vague. Hosts’ traffic can be represented with simple continuous functions, such
as step-wise constant rates (to represent UDP hosts), oscillatory or trapezoidal (for cyclic data
rates over longer time periods), or other customly shaped functions of time. They can be easily
replaced afterwards by more complex blocks. Some examples are given in Section 5.5.5. This type
of traffic shaping is not considered in the MGT study.
Regarding congestion control protocols, sources with throughput controlled by the TCP pro-
tocol (Reno flavor) are considered. The TCP Window source is described in Table 5.4 and shown
in Figure 5.18b. It sets the flow rate di (t) according to a dynamic equation that depends on its
flow attributes after traversing the network. A TCP model for bulk transfer (with unlimited data
to send by the host) is modeled after the equations proposed in MGT:
W (t) ∗ N
di (t) = (5.56)
τi (t)
dWi (t) 1 Wi (t) µi
= − (t − τi (t)) (1 ≤ Wi (t) ≤ Wmax ) (5.57)
dt τi (t) 2 aN
The throughput di is calculated based on the TCP window size W , the round trip time τi , and
the total number of TCP sessions N . a is a parameter included in [24] which calibrates the loss
probability to compensate for the fact that TCP window size and perceived loss are not indepen-
dent, as assumed by this mean-value type of model. Note that here τi and µi are, respectively, the
accumulation of delay (round-trip time, RTT) and discards that the flow experienced after travers-
ing each of the queues and links in its path. The TCP window size models additive increase in the
first term, increasing by 1 every round trip time, and multiplicative decrease in the second term,
halving the window according to the discard rate. TCP senses packet losses after approximately 1
RTT, so the discard rate is considered with a dynamic τi (t) delay transforming the equation into a
DDE (see Section 5.2.3) with the same considerations as discussed earlier for Equation (5.7). Also,
the sharp discontinuities introduced by the maximum and minimum size of the window deserve
the same considerations as discussed earlier for Equation (5.5).
5.5. A Modular Approach for Fluid-Flow Network Modeling 129
Attribute/
Name Description
Parameter
Input Accum. De- τi (t) Delay experienced by the flow to traverse the
Attributes lay network and back (RTT)
Accum. µi (t) Total drop rate experienced by the flow after
Drop Rate traversing the network and back.
Flow Id i A unique ID is set for each flow.
Modified Departure di (t) Send rate as defined by (5.56)
Attributes Rate
Accum. µi (t) Flows are created with 0 drop rate at the
Drop Rate source.
Accum. De- taui (t) Flows are created with 0 delay rate at the
lay source.
Config. Maximum Wmax Maximum allowed TCP Window Size, usu-
Parameters Window ally 65535 bits
#Sessions N Number of TCP sessions within the host
Table 5.4: Block interface for the TCP host
Flow<di(t)>
UDP TCP
Flow<τi(t), μi(t)> Flow<di(t)>
blocks that are part of the larger (DEVS coupled) RED queue block as depicted in Figure 5.19.
REDqueue
ai q
queue
μi
ai μi
q μi
RED
db
q (t) loge (1 − α) loge (1 − α)
= qb(t) − .queue:q(t) (5.58)
dt δ δ
0 0 ≤ qb(t) ≤ tmin
qb(t)−tmin
RED:µRED (t) = p tmin ≤ qb(t) ≤ tmin (5.59)
tmax −tmin max
1 tmax ≤ qb(t)
queue:ai (t) = ai (t).(1 − RED:µRED (t)) (5.60)
µi (t) = queue:µi (t) + ai (t).RED:µRED (t) (5.61)
Attribute /
Name Description
Parameter
Input Arrival Rate ai (t) N signals with the input rate of each in-
Attributes coming flow denoted by the subindex i ∈
{1, ..., N }.
Accum. De- µi (t) Increments the flows’ delay with the queuing
Modified lay waiting time calculated as q(t)/C
Attributes Departure di (t) Sets the flows’ departure rate according to
Rate Equation (5.7)
Accum. µi (t) Increments the flows’ discard rate with the
Drops value calculated in (5.6)
Output Queue Size q(t) Evolution of the queue size as described by
Signals (5.5)
Config. Buffer Size Qmax , Qmin Upper and lower limits for q(t). Qmin <
Parameters Limits Qmax with Qmin , Qmax ∈ [−∞, +∞] where
typically Qmin = 0, Qmax = K
Capacity C Service capacity of the outgoing link of the
queue
Drop Prob. tmin , tmax , pmax In RED queues, definition for the drop prob-
Function ability function in as defined in (5.59)
(only RED)
Queue Size α ∈ [0, 1], δ ∈
In RED queues, weight and sampling rate
Estimate R for the exponentially weighted moving aver-
(only RED) age (5.58). δ canP
be statically set to 1/C or
dynamical to 1/ i ai (t)
Table 5.6: Block interface for the RED and tail-drop queue models.
Flow1..n Flow1..n
Flow1..n Flow1..n
q(t) q(t)
Figure 5.20: Fluid-Flow Queue blocks. Send/Receive Fluid Entities and reuses the buffer-server
system blocks.
132 Chapter 5. Fluid-Flow Network Simulation
• Static Flow Demultiplexer: Demultiplexes incoming flows based on their IDs and static
configuration. The mapping between output port and flow ID is done at configuration time,
as shown in Figure 5.22
• Dynamic Flow Demultiplexer: Demultiplexes incoming flows using a different port for
each flow ID. The mapping between output port and flow ID can be changed at simulation
time, choosing port 0 for the first arriving ID, port 1 for the second arriving ID, and so on.
• Fluid-Flow Routing Table: Demultiplexes incoming flows based on a routing table taken
from configuration. The configuration maps Flow IDs with an outgoing port number for
each routing table block. This uses the flowId attribute (see Figure 5.16) allowing routing of
fluid-flow QSS signals to use the same mechanisms as used for flow-based routing of discrete
packets described in Chapter 4.
Flow<ai(t)> Flow<di(t)>
EgressPort
(a) EgressPort DEVS coupled model composed by a Queue and StaticDelay submodels
to represent Network Interface Cards (NIC)
Flow1..n Flow1..n
Router
(b) Router DEVS coupled model composed by a Routing Table and EgressPort sub-
models
Flowi
ACK
TCPr
Flowi
TCP Receiver
(c) TCP Receiver DEVS coupled model sets the flows rate to 0
TCP
RED
ACK
TCP TCPr
R ED
ACK
TCP TCPr
ACK
TCPr
TCP
Figure 5.24: Simple Fluid-Flow topology using PowerDEVS network library. DEVS models en-
capsulate ODEs and topological connections define the final dynamic system.
We remark that in all cases the topologies look very similar, both in the fluid and the packet-
level models. The network modeler drags and drop (or code) fluid- or packet-based blocks, and
interconnects them to build full topologies. This is done within the same tool and requires no prior
knowledge about the internal implementations, thus decreasing the learning curve. Conversely, in
most existing fluid approaches, topology gets implicitly defined by the set of ODEs, hiding away
their graphical view. Also, pre-defined blocks provide different versions for network elements
(e.g. RED or tail-drop queues, UDP or TCP hosts, etc.), which can be easily replaced fostering
lightweight experimentation with different alternatives.
5.5. A Modular Approach for Fluid-Flow Network Modeling 137
TCP
<- ACK
RED
TCPSender1 TCPReceiver1
Z
R ED
RED
Router1 Router2 Router3
RED
TCPSender3 TCPReceiver3
<- ACK
Figure 5.25: Packet-Level topology. Repeated from Chapter 4 to be compared with the Fluid-Flow
topology in Figure 5.24.
R ED R ED
(a) Fluid-flow topology using TCP hosts (b) Packet-level topology using TCP hosts
the two results probably due to fast-retransmit/fast-recovery (FRFR) not being modeled in the
fluid TCP block. The fluid RED queue follows a similar path as the packet-level queue both for
effective and estimated buffer sizes (again with a phase shift).
This experiment verifies that the dynamics of the new fluid TCP and RED queue blocks
yield similar results to the reported for the MGT model. The fluid equations approximate the
mean values of common network metrics such as latency, buffer sizes, link utilization, etc. and
additionally follow similar dynamics as the packet-level metrics.
The packet-level topology, shown in 5.25, is analogous to the fluid topology. Here the queues in
return path are omitted for simplicity as they do not contribute with queuing delay.
Queues and links are configured as in the previous example. Traffic from the first host traverses
both queues, while traffic from host 2 and 3 only traverses queue 1 and 2 respectively. Simulation
starts with 40 TCP sessions per host (120 in total), after 10s sessions reduce to 10 per host, and
after 20s all 40 sessions per host restart.
Figure 5.28 compares the TCP windows and buffer sizes. Again, the fluid-flow model follows
the expected averaged behavior and exhibits dynamics similar to the packet-level model which
shows steeper peaks. With 120 TCP sessions, the averaged TCP window and buffer sizes stabilize
around the RED tmin , tmax values. When TCP sessions reduce to 30, RED is unable to control the
buffer size and TCP window size oscillate. Fluid equations are able to capture both transient and
stable phases dynamics.
This experiment shows the qualitative accuracy of TCP equations for a larger number of con-
nections. When using simple data patterns (such as UDP) the fluid queue yields very satisfactory
results. When modeling more complex flows (such as TCP), as reported for the MGT model,
the fluid model yields acceptable approximations. Fluid TCP captures relevant dynamics in send
patterns and key features such as fair link sharing. Depending on the case study, the sacrificed
accuracy is a price to pay for significant execution speedups. As the modular approach allows to
easily replace and test different implementations of a same element, a new TCP host that models
FRFR might yield better approximations.
Figure 5.28: Comparison of packet-level and fluid simulations metrics: 2 RED queues and 3 TCP
hosts with 120 sessions .
140 Chapter 5. Fluid-Flow Network Simulation
• does not require multiple overall "rounds" (the two-pass model [9] that requires a master
ad-hoc algorithm to scan the full model multiple times)
To understand the hybrid approach we turn our attention back to the discussion about lev-
els of abstraction. We have stated that a packet-level model provides a detailed description of a
problem while the fluid-flow approach offers a higher-level, averaged, view. This is certainly true
at a "system" level but, what if we turned this view around only for certain system components ?
We could then profit from this flexibility to integrate fluid-flow and packet-level models. We shall
take a closer look at the representation of packets, links and queues.
Simulated packets can carry any fine-grained detail or information required by real-world net-
work protocols. Yet, as with any model, simulated packets are also abstractions of their real word
counterparts. A key abstraction we will benefit from is the behaviour of a packet when it is fed
into a communication channel. When a packet arrives at the incoming end of a link (assume a
half-duplex channel for the moment), the link model reads the packet size and schedules it to go
out after packetDelay = packetSize/linkBandwidth + linkP ropagationDelay.
In the real world things are different. A packet is just a set of bits, to which transmitters
(at NICs) apply complex encoding and/or modulation techniques to transform then into analog
signals.
For the hybrid approach we take an intermediate startegy. We represent packets as a sustained
stream of bits, and use continuous signals to represent a link’s ON/OFF state (ON: sending bits,
OFF: not sending). This way, discrete packet arrivals are transformed into piece-wise continuous
signals without loss of accuracy (as it would occur if we used smoothing techniques, e.g. like in
[9]). This approach relies heavily on the DEVS’ ability to represent both discrete events and QSS
continuous signals within the same formal framework. QSS (asynchronous) integration steps and
packet-level (stochastic) arrivals occur at independent time instants, and yet both can interact
seamlessly. This is possible due to the inherent discrete-event nature of QSS combined with its
dense, piece-wise polynomial representation of signals.
Similarly, a packet-level queue model receives packets and store them by increasing its buffer
size by the new packet size. The queue model receives the complete packet information (all of its
content) at one sharp instant in time, and the buffer jumps from having size q bits to q + packetsize
bits instantaneously (without intermediate states). This can certainly not be possible in real-world
queues which receive, store, and remove streams of bits on a bit-wise basis. This is what the fluid
buffer-server system represents.
Thus, we argue that the model for a packet-level queue does not necessarily imply a more
detailed representation when compared with the fluid-flow queue model. Section 5.5.5 showed
examples on how the fluid-flow queue yields almost exactly the same behaviour as the packet-level
queue when inputs are equivalent.
For the new hybrid approach only the fluid-flow queue representation is used instead of the
packet-level queue. Queue inputs are continuous signals representing bit streams coming either
from the hybrid link (packets transformed into continuous signals) or directly from fluid-flow
142 Chapter 5. Fluid-Flow Network Simulation
models. We reuse the same buffer-server and fluid-flow system models described in Sections 5.3
and 5.5, as well as the same packet-level models described in Chapter 4. This provides a seamless
integration with the hybrid link, while avoiding overflow and underflow issues present in other
hybrid approaches [10].
IEntity
Attribute<string> id
Extends
IFlow:IEntity
Extends
Figure 5.30: HybridFlow class within the complete network data structure hierarchy
Bandwidth 150bps
bits/second
Packet #1
Packet #2
Packet #3
(22 bits)
(33 bits)
Packets HybridFlow
(19 bits)
HybridLink time
(a) Block diagram view (b) Example output generated with bandwidth C = 150bps
Figure 5.31: Hybrid link receiving discrete packets and generates fluid-flow continuous signals.
Figure 5.31a show a block diagram for a hybrid link. It represents a communication channel
receiving discrete packets and emitting hybrid flows with continuous signals. Discrete packets are
transmitted passing a link with bandwidth C and propagation delay D. The hybrid link replaces
the bandwidth-delay behaviour while the propagation delay is still modeled by the packet-level
model. The continuous fluid-flow signal generated can be directly used as an input for a fluid
buffer-server system.
From an algorithmic point of view the idea is very simple: every time a packet p arrives to the
communication channel it generates a continuous output signal d for the departure rate as follows:
p.size
• After a time C
elapsed, set the rate back to zero d = 0
• The discrete packet is sent along with the continuos signal using the HybridFlow data struc-
ture.
Figure 5.31b shows a sample output generated by a hybrid link model configured with band-
width C = 150bps after receiving three packets of different sizes. The generated output value is
either 0 or 150 bps representing the ON/OFF state of the communication channel. When the first
22
packet of 22 bits is received, the ON state is set and maintained during 150 = 0.14666 seconds. The
33
OFF state is kept until the second packet of 33 bits arrives, setting the ON state during 150 = 0.22
seconds.
On the one hand, the hybrid queue strongly relies on the fluid buffer-server system. The
continuous part of hybrid flows is sent as input to the fluid queue on top of the usual fluid-flows.
In this sense, the buffering is simulated as a full fluid model, which in Section 5.4.3 was shown to
provide excellent accuracy.
HybridFlows HybridFlows
RED
On the other hand, discrete packets are impacted by the fluid buffer-server queuing delay
and discard probability metrics. The HybridMerge DEVS atomic model shown in Figure 5.32
implements this behaviour. The current queuing delay q(t)/C is directly applied to discrete packets
by delaying the time they depart from the queue. Regarding discards, an arriving packet is
discarded with probability µaii(t)
(t)
taken from an uniform distribution.
It is important to note here the importance of QSS dense output. The fluid-flow model, as
approximated with QSS methods, produce output trajectories that describe the variables dynam-
ics at any point in time (not only at time-stepped integration instants). For hybrid models, this
implies that the value of buffer-server metrics (such as the drop rate µ(t)) can be accurately calcu-
lated (within the QSS guaranteed error bounds ∆Qrel , ∆Qmin ) at the exact instant when a discrete
packet arrives into the queue. This allows the QSS buffer-server integrator to produce outputs at
independent time instants, and they still can interact accurately and straightforwardly.
hybrid links are used instead of bandwidth delays. For this purpose, the model library includes
hybrid egress ports as shown in Figure 5.33. At the receiver side, the corresponding attribute
selectors should be used to unwind the hybrid flow into the corresponding type (PacketSelector or
FluidSelector for the packet-level and fluid-flow receivers, respectively.
Also similarly to packet-level and fluid-flow topologies, using PowerDEVS provides an intuitive
graphical design interface, while tools such as Py2PDEVS or TopoGen provide algorithmic means
to generate automatically much larger, complex topologies too difficult to compose by hand.
Fluid-flow
ACK
TCP TCPr
ACK
TCP TCPr
Packet-level
TCP
HybridLink
Figure 5.33: Hybrid topology: a fluid-flow and a packet-level host sharing an hybrid bottleneck
queue
Note that here we chose to build hybrid topologies having every queue in the path accepting
both packet and fluid flows. Another approach that could be explored is to use the same com-
ponents already available to define a subnetwork to be fully packet-level, the rest of the network
fully fluid, and then have packet/fluid interaction only at hybrid edges (similar to what is done in
146 Chapter 5. Fluid-Flow Network Simulation
[9]). In this sense, packet flows could enter an hybrid queue at the edge of the network as they do
now, traverse a sequence of fluid queues, an then be applied accumulated fluid delay and discard
rates already available only at the other end of the network. This could be achieved with the
same HybridLink and HybridMerge atomic models, but coupling them differently (i.e. using the
HybridMerge only at the final edges of the fluid network).
5.6.6.1 Experiment 1
In the first experiment, the hybrid queue accuracy is tested when fed with packet-level only input.
Testing with fluid-flow only input is skipped as the hybrid queue is equivalent to the fluid-flow
buffer-server if there is no packet-level input. A packet-level and an hybrid router are config-
ured with a 600Kb buffer, 5Mbps bandwidth, 1ms delay, and RED parameters (tmax=400Kb,
tmin=300Kb, pmax=0.1, weight=0.001, samplingPeriod = 0.8ms (only hybrid)). Additionally,
QSS integrators in the fluid queue are configured with ∆Qmin = 1E − 3 and ∆Qrel = 1E − 6. The
packet-level host has a 10Mbps bandwidth, 1ms delay.
Figure 5.34 compares simulation results when the same packet-level input (shown in the top
row) is sent to the hybrid router and the packet-level router. The fluid-flow queue size (shown in
the second row) follows almost perfectly the packet level queue. It could be somehow surprising
that although the fluid buffer-server system tracks only an averaged behaviour, here it seems to
follow short-term variations closely. This is because of the rapid ON/OFF behaviour of the ar-
riving signals which triggers not so fast queue size changes according to the ∆Qmin and ∆Qrel
parameters. Packet discards (shown in the third row) are equivalent and at the time ranges when
the queue size activates RED discards. Packet discards are stochastic, so exact packet drop times
occur at slightly different moments in each router.
160
140
120
sender_packet CWND (packet)
CWND [pkts]
100
80
60
40
20
00 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
600000
500000 Queue Size (packet)
Queue size [b]
15000
10000
5000
00 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Time [s]
Figure 5.34: Comparison of hybrid and packet-level queues fed by the same packet-level flow.
5.6.6.2 Experiment 2
In the second experiment, a fluid-flow TCP session is added to test the hybrid queue accuracy
when packet-level and fluid-flows share the same link.
148 Chapter 5. Fluid-Flow Network Simulation
The fluid-flow host is configured as the packet-level host with 10Mbps bandwidth, 1ms delay,
and a single TCP session Nf = Np = 1. Figure 5.34 shows the simulation results where both
packet-level and fluid-flow TCP sessions share the same hybrid bottleneck queue. In each row the
plot shows the TCP congestion window sizes, the sending rate of each host, the queue size and
RED estimate of fluid-flow buffer-server within the hybrid router, and discrete packet discards
together with the fluid discard rate. The packet-level and fluid-flow TCP windows have similar
values and dynamics. Some differences are due to the stochastic behaviour in the packet-level flow
as it would happen in full packet-level simulations. For example at time t ∼ 7, RED increases the
discard rate but no actual packet discard takes place. As a consequence, the fluid window does fall
but not the discrete window. The second row shows that both TCP host adapt to the bottleneck
bandwidth sharing the 10Mbps link fairly, as expected.
120
CWND (packet)
CWND [pkts]
100
80
60 CWND (fluid)
40
20
00 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Queue size [b] Send Rate [bps]
5000000
4000000 sent rate (packet)
3000000
2000000
send rate (fluid)
1000000
00 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
450000
400000
350000
300000
Queue Size (fluid)
250000
200000 RED avg (fluid)
150000
100000
50000
00 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
45000
40000
35000 Drops (hybrid-fluid)
Drops [b]
30000
25000
20000 Drops (packet)
15000
10000
5000
00 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Time [s]
Figure 5.35: Hybrid simulation with fluid-flow and packet-level flows sharing the same hybrid
bottleneck link.
5.6.6.3 Experiment 3
The third experiment evaluates the hybrid queue performance in a background/foreground traffic
scenario. In this scenario there is a small fraction of the network traffic which is the center of
the study, and is modeled in great detail with the packet-level approach. This detailed traffic is
called the probe, or foreground flow. The rest of the traffic, called background flow, takes the
biggest share of the network bandwidth. The background flow is only interesting to the modeler in
terms of the effects it imposes on the foreground flow, and thus it is modeled using the fluid-flow
approach.
We evaluate the performance of the hybrid queue when increasing the amount of fluid-flow
traffic. The packet-level host is set with a fixed bandwidth of 1Mbps. Each execution defines K =
5.6. Hybrid Network Simulation: Integrating Fluid-Flow and Packet-Level models
149
[1, 2.5, 5, 10, 25, 50, 100, 250, 500, 1000, 2500, 5000] and increases the router, fluid-flow sender and
receiver bandwidth to KM bps. The router is set to use buf f er = K ∗ 800Kb, tmin = K ∗ 200Kb,
tmax = K ∗ 500Kb, pmax = 0.01, and weight = 0.001. An equivalent packet-level only topology is
used for comparison. The packet size is taken from an exponential distribution with mean 3000b.
100 seconds are simulated and the total throughput of both traffic flows is measured in a window
between 30s to 90s.
Figure 5.36a shows the hybrid simulation throughput of the background and foreground traffic
in each execution. When the bottleneck link is 1Mbps, the packet-level and fluid-flow TCP connec-
tions adapt to share fairly the link. As the router and background server bandwidth increase, the
foreground throughput remains always close to 1Mbps (limited by the server bandwidth) taking a
smaller share of the total throughput.
Figure 5.36b compares the hybrid and full packet-level simulation execution times. The packet-
level simulation performance is directly proportional to the number of packets that traverse the
network and increases linearly with the bottleneck link bandwidth. In the hybrid simulation
execution times are roughly constant and independent of the bottleneck bandwidth. The fluid-
flow throughput increases with the bottleneck link bandwidth but the amount of generated packets
is about the same. Fluid-flow simulation times are independent of the link bandwidth and thus
in hybrid simulations the performance is driven by the packet-level throughput share. On the
other hand, hybrid simulation performance is worst than the full packet-level simulation when the
bottleneck bandwidth is small and the fluid-flow share is equivalent to the packet-level share. This
is studied further in the next example.
150 Chapter 5. Fluid-Flow Network Simulation
(b) Execution times of the packet-level and hybrid models for 100s of simulation.
Figure 5.36: Hybrid simulation results for the foreground/background traffic experiment. Fore-
ground traffic is represented with packet-level models and background traffic with fluid-flow models.
The packet-level server bandwidth is set to 1Mbps.
5.6. Hybrid Network Simulation: Integrating Fluid-Flow and Packet-Level models
151
5.6.6.4 Experiment 4
The fourth experiment studies the accuracy and performance of the hybrid queue when interacting
with an increasing packet-level traffic. The bandwidth is fixed at 200Mps for the packet-level and
fluid-flow hosts, and the router is the bottleneck link with a bandwidth of 100Mbps. In every
execution there are 40 simultaneous TCP sessions, where the packet-level host is configured with
Np TCP sessions and the fluid-flow hosts with Nf = 40 − Np TCP sessions. The fluid-flow TCP
window is configured with a drop compensation parameter a = 2 (refer to Equation (5.57)) The
router is set to use buf f er = 5M b, tmin = 300Kb, tmax = 5M b, and pmax = 0.005. An
additional hybrid simulation uses a smoother configured with deltamin = 1 to disable it and a
window of 10ms as the propagation delay. An equivalent packet-level only topology (40 packet-
level TCP sessions and a packet-level router) is used for comparison with the same stochastic
packet sizes as in the previous experiment. 70 seconds are simulated and the total throughput of
both traffic flows is measured as from 10s.
Figure 5.37 shows the smooth hybrid simulation metrics when there are 20 packet-level and 20
fluid-flow TCP sessions. On the first plot, the 20 packet-level windows are averaged and a single
probe packet-level is included to verify the behaviour of detailed foreground traffic. The fluid-flow
congestion window approximates very closely the packet-level average. The plot on the second
row shows the throughput of both types of traffic interact to quickly share the 100Mbps link. The
fluid-flow rate shows a fast fluctuations regardless of the smoothing and mean-value foundations.
This is a consequence of the queue size, shown in the third row, which is affected by the hybridized
traffic which changes its rate according to the smoothing.
Figure 5.38a shows the total throughput of the packet-level and fluid-flow hosts for the smooth
hybrid model.The figure show different executions increasing the percentage of packet-level TCP
sessions Np . Results show that the percentage of packet-level throughput increases proportional
to the number of packet-level TCP sessions. This supports the fact that in the hybrid simulation
with smoothing both types of flow have similar behaviour and adapt to sharing the bottleneck
link. The hybrid simulation without smoothing yields very similar results. On one hand, it further
validates the fluid-flow model and additionally shows the ability of the hybrid queue to correctly
simulate the interaction between fluid-flow and packet-level traffic.
Figure 5.38b compares the execution times of the hybrid simulation with smoothing (in green)
and without smoothing (in blue) when packet-level TCP sessions Np increase. The full packet-
packet model execution time with 40 TCP sessions is also included for comparison (in red). In this
scenario, the hybrid simulation without smoothing quickly becomes slower than the full packer-
level simulation making it useless (slower and less detailed). A high level rate of discrete packets
generates a high number of ON/OFF state changes into the fluid-flow queue within the hybrid
router. The fluid-flow queue performs more operations (QSS approximations) than the packet-
level queue which just enqueues and dequeues packets. When percentage of packet-level traffic
is high compared to the fluid-flow traffic it is worth to smooth the ON/OFF state changes of
the hybridized flow. Figure 5.38b shows the performance advantage brought about by using a
smoothing window of 10ms (in green). The hybrid execution time greatly reduces and is lower
than the packet-level simulation even when only packets are simulated. As expected, the hybrid
simulation performance is still driven by the number of packets traversing the network. Compared
to the packet-level simulation, the experiment shows that the hybrid simulation presents a speed
up of 5.9 when there is 10% of packet-level traffic and 90% of fluid-flow traffic.
152 Chapter 5. Fluid-Flow Network Simulation
250
200 Probe (packet-level)
CWND [Pkts]
70
60
50 Packet-level Total
40
30
Fluid-flow Total
20
10
00 10 20 30 40 50 60 70
3.0
2.5 Hybrid Queue Size
Queue Size [Mb]
Figure 5.37: Hybrid simulation metrics with 20 packet-level and 20 fluid-flow TCP sessions using
a smoothing window of 10ms.
5.6. Hybrid Network Simulation: Integrating Fluid-Flow and Packet-Level models
153
Packet-level traffic
Total Throughput (Mb) - 30s to 70s
5000
Fluid-flow traffic
4000
3000
2000
1000
0 0 4 8 12 16 20 24 28 32 36 40
Number of packet-level TCP sessions (40 total sessions)
(a) Throughput share between packet-level and fluid-flow traffic
400
Hybrid model (no smoothing)
Simulation Execution Time (s)
350
Hybrid model (smoothing=0.01)
300 Packet-level model
250
200
150
100
50
0 0 4 8 12 20 24 28 32 36 40
Number of packet-level TCP sessions (total 40)
(b) Execution times of the packet-level and hybrid model with and without smoothing for 70s of virtual
simulation time and aggregated throughput of ∼ 7Gb .
Figure 5.38: Hybrid simulation results increasing the percentage of packet-level traffic. A smooth-
ing window of 10ms is used.
154 Chapter 5. Fluid-Flow Network Simulation
5.7 Conclusions
We presented a novel simulation approach to unify the experience of designing network models
both with fluid- and packet-level techniques.
Under the DEVS M&S framework both types of models boil down to a common discrete event
simulation, rely on a same mathematical framework, modeling methodology, and practical tool,
thus reducing the learning curve and simplifying model description.
Also a novel hybrid approach was presented to integrate the packet-level and fluid-flow models,
profiting from the DEVS representation and QSS properties.
A prototypical fluid buffer-server system was characterized as a Retarded Functional Delay
Equations (RFDE) with Implicit Delays, and proposals to tackle the challenges of its numerical
solutions were described. A new FDQSS method was developed to support the numerical ap-
proximation of retarded FDEs with implicit delays. New modular blocks are now available in the
PowerDEVS continuos library and can be easily reused in other continuous dynamic systems.
Besides, a new QSS Bounded Integrator was presented for handling efficiently sharp disconti-
nuities, by enforcing maximum and minimum integration boundaries present in fluidified variables
such as queue size and congestion window sizes.
Also, a new set of modeling data structures for DEVS was developed, that allows the simul-
taneous manipulation of multiple QSS signals and attributes as a group of related Fluid Entities.
This greatly simplifies the modeling of complex continuous systems with routing schemes across
network topologies.
Leveraging on the above listed contributions, we presented a new modular approach to modeling
fluid-flow networks which allow users to build network topologies without dealing directly with
the underlying differential equations, nor the numerical methods to solve them. We hope this
facilitates the adoption of fluid-flow models into network engineering projects, which are usually
hard to incorporate as very different mathematical background and tools are required.
Table 5.8 shows some of the available fluid and hybrid models comparing some features with
our approach.
Experimentation with canonical network scenarios corroborated that the presented models and
tools provide flat simulation times when total throughput is increased for fluid-based abstractions,
compared to linearly increasing simulation times in the packet-based models. Fluid-flow models
offer accurate approximations of packet metrics in different experiments.
Experiments corroborated our initial conjectures that hybrid models with QSS do not require
ad-hoc clock synchronization or smoothing techniques, retain the performance advantages of the
fluid-model, and provide detailed packet-level tracking features.
Meanwhile, the strategy of developing libraries of reusable, block-oriented and self-contained
models proved successful: the visual design of network topologies can now be implemented almost
indistinguishably from the underlying representation of the network, be it fluid- or packet-based.
Fluid-Flow Simulation Packet-Level Hybrid Simulation
Model Technique / Network Model Technique / Clock Syn- Packet-Fluid Integration
Solver Specification Simulator chronization
MGT Discrete-time ODEs coupled Discrete-events fixed intervals - Two pass model
[24] Runge Kutta with numerical ns-2, pdns, back- - smoothing packets
solver (C++) plane - fixed updates on fluid metrics
5.7. Conclusions
En este capítulo se describen modelos de simulación por aproximaciones fluidas e híbridos bajo
el formalismo DEVS. El nuevo enfoque modular unifica el diseño de topologías de red para las
técnicas paquete a paquete, de aproximaciones fluidas e híbridas. Bajo el marco de M&S DEVS
estos modelos se reducen a una simulación unificada a eventos discretos, se basan en un mismo
marco matemático, una misma metodología de modelado y la misma herramienta práctica, lo que
reduce la curva de aprendizaje y simplifica la descripción los modelos.
El capitulo comienza describiendo el sistema cola-servidor que es la pieza central para los
modelos fluidos. Este sistema se caracteriza como una Ecuación Funcional Diferencial con Retardos
implícitos (RFDE), y se proponen nuevas soluciones para su aproximación numérica bajo. Se
presenta un un nuevo método Forward Delay QSS (FDQSS) para simulación de RFDE y un nuevo
integrador QSS acotado para el manejo eficiente y preciso de discontinuidades ( Sección 5.3).
Luego, se introducen nuevas estructuras de datos para el modelado DEVS que permiten la
manipulación de múltiples atributos y señales QSS como una única entidad de fluida (consulte
la Sección 5.5.1. Esto simplifica enormemente el modelado de sistemas continuos complejos que
posean esquemas de ruteo a través de topologías.
Aprovechando las contribuciones anteriores, se presenta un nuevo enfoque modular para el
modelado de redes por aproximaciones fluidas. El nuevo enfoque permite a los usuarios crear
topologías de red sin tratar directamente con las ecuaciones diferenciales subyacentes, ni con los
métodos numéricos para resolverlas (consulte la Sección 5.5). El objetivo es facilitar la adopción
de modelos fluidos en proyectos de ingeniería de redes, que tradicionalmente suelen ser difíciles de
incorporar ya que se requieren herramientas y antecedentes matemáticos muy diferentes.
Posteriormente, se corrobora que los modelos fluidos proporcionan tiempos de simulación planos
al aumentar la capacidad de los enlaces, en comparación con los tiempos de simulación que au-
mentan linealmente en los modelos paquete a paquetes (consulte la Figura 5.29). Los modelos
fluidos ofrecen aproximaciones precisas al compararlos en diferentes experimentos con métricas de
modelos paquete a paquete (ver Figuras 5.13, 5.27, y 5.28).
Finalmente, se presenta un nuevo enfoque híbrido que integra los modelos paquete a paquete
y los fluidos, aprovechando la representación bajo DEVS y las propiedades de QSS (consulte la
Sección 5.6). Diversos experimentos corroboran que los modelos híbridos con QSS no requieren
técnicas ad-hoc de suavización o para la sincronización del reloj de simulación. Adicionalmente,
conservan las ventajas de rendimiento de los modelos fluidos (ver Figura 5.36b) y proporcionan
trazas detalladas de los modelos de paquetes (ver Figuras 5.34 y 5.35), permitiendo ajustar la
relación de precisión frente al desempeño según los requerimientos (ver Figura 5.36a).
156
Chapter 6
In this Thesis we presented new techniques for the development of packet-level, fluid-flow, and
hybrid network simulation models under the unifying DEVS formalism. The introduced simulation
techniques, their theoretical support, and practical tools allow users to seamlessly specify network
topologies at different abstraction levels, in a modular and hierarchical way.
The novel library for hybrid simulation enables the mutual influence of fluid-flow with packet-
level under the same simulation technique and tool, without resorting to ad-hoc time synchroniza-
tions or traffic smoothing techniques.
Chapter 4 showed packet-level models are well suited to study detailed network performance
and communication patterns in applications and protocols. The highly distributed TDAQ system
at CERN served as a challenging motivating case study. In this context, experiments showed that
simulation models can reproduce network behaviour at the protocol, topology, and application
levels. Packet-level proved useful to study detailed communication patterns in the TCP protocol
and TDAQ applications. These were validated against real metrics taken from the TDAQ system
(Section 4.4.3). Additionally, simulations supported the design of future DAQ network upgrades
(Section 4.3.3.3), served for parameter tuning in the HLT application and helped with what-if
scenarios to analyze load balancing schemes aiming at reducing the critical Event filtering latency.
In Chapter 5 fluid-flow models were presented as an alternative to packet-level models, mainly
to tackle scalability challenges in simulation execution times for high-speed network scenarios. Ex-
periments showed that while packet-level simulation times grow linearly with the network size and
throughput, while the performance of fluid-flow models are insensitive to the overall throughput.
This can provide great advantages for the simulation of future Ethernet speeds.
Additionally, the modeling approach for fluid-flow models, presented in Section 5.5, showed
that topologies can be created graphically (or automatically generated) similar to packet-level
topologies, without dealing directly with the underlying differential equations or their numerical
solvers. This reduces the learning curve for the utilization of fluid-flow models, as the mathematics
involved are encapsulated within each fluid/hybrid queue.
Although fluid-flow models do not capture packet-by-packet information, results shown in Sec-
tion 5.5.5 confirmed that Ordinary Differential Equations are able to capture accurately mean
averaged behaviour as well as transient protocol dynamics.
The hybrid modeling approach presented in Section 5.6 was developed building on the previous,
standalone packet- and fluid-based libraries. Results showed that the hybrid models are a promis-
ing solution for the performance evaluation of current and future large-scale high-speed networks.
157
158 Chapter 6. Conclusions and Future Work
Experiments in Section 5.6.6 showed that hybrid models are able to retain the performance ad-
vantages of fluid-flow models (i.e simulation execution time independent of link bandwidth) while
providing detailed simulation traces for packet-level models of selected sources (i.e packet-by-packet
communications can be studied). The same modeling techniques and tools as for packet-level and
fluid-flow models are used to create hybrid topologies (see Section 5.6.4), thus not increasing the
learning curve for network experts to incorporate hybrid models.
A novelty of the new hybrid approach lies in the fact that discrete and continuous portions of
the networks are guided by a common simulation scheduler, namely the DEVS abstract simulator.
The consequence is that both type of simulations interact smoothly, without calling for ad-hoc
time synchronization algorithms (also termed co-simulation) that can only be useful for particular
integrations of specific software packages, as shown in Section 5.6.2.
configuration traffic could be well represented by the TCP sources developed here, while ROS to
DCM traffic is better modeled by ON/OFF bursty sources similar to the UDP models developed
here.
Regarding the hybrid models, although experiments showed promising results there is a number
of issues that deserve further studies. For instance, the trade-off between accuracy and performance
for different parameters and smoothing techniques. Also, the performance for tandems of queues
should be characterized; in particular, focusing on the fact that changes in departure rates at one
fluid queue could impose an undesired "ripple effect" on other queues downstream [169].
There are also several alternative TCP fluid models in the literature which might provide better
approximations in different scenarios. A promising model to be implemented in the context of QSS
is the one described in [25]. It provides a fluid-flow TCP representation with different states accord-
ing to the connection phase (called hybrid in the sense that ODEs have many discontinuous states).
Another line worth pursuing is to characterize the impact of QSS on network topologies due
to its asynchronous nature. With classic discrete time methods, equations describing uncongested
links (or inactive hosts) take as much computing time to solve as congested links (or active hosts)
-all links and hosts need to be visited by the discrete time scheduler at each new synchronous
step-. Conversely, QSS balances dynamically computing efforts, as each integrator (e.g. a fluid
queue) adapts its activity according to the dynamics required at different phases. If no dynamics
are present, QSS will not perform new computations. This is, QSS handles efficiently alternating
busy/free periods at each queue, without requiring special model reduction analyses as is done
e.g. in [24]. In fact, a QSS subtype of methods known as Linearly Implicit (LIQSS) [74] provides
formal guarantees of exactly zero computations for a state variable that reached equilibrium. This
strongly suggests further studies are worthwhile on using LIQSS for the fluid and hybrid models
presented in this Thesis.
To conclude, the possibility of having continuous and discrete models of networks interacting
under a common representation could potentially be profited from in areas not related to computer
networks. For instance, a closely related example is city traffic flow control [170] where similar
queuing dynamics are dealt with. Moreover, cross-domain models should be easier to represent,
e.g. to combine city traffic with mobile networked devices, which is currently a research hot topic
in the Internet of Things for Smart Cities.
Bibliography
[1] A. Collaboration, “The ATLAS experiment at the CERN large hadron collider,”
Journal of Instrumentation, vol. 3, no. 08, S08003, 2008.
[2] S. Fernandes, Performance evaluation for network services, systems and protocols.
Springer, 2017, isbn: 3319545191.
[3] K. Wehrle, M. Günes, and J. Gross, Modeling and tools for network simulation.
Springer, 2010.
[4] L. Kocarev and G. Vattay, Eds., Complex dynamics in communication networks,
Springer, 2005, isbn: 9783540243052.
[5] F. E. Cellier and E. Kofman, Continuous system simulation. Springer Science &
Business Media, 2006.
[6] S. McKee and A. Collaboration, “Networks in ATLAS,” Journal of Physics: Confer-
ence Series, vol. 898, no. 05, p. 052 006, 2017, issn: 1742-6596. doi: https://doi.
org/10.1088/1742-6596/898/5/052006.
[7] B. P. Zeigler, A. Muzy, and E. Kofman, Theory of modeling and simulation 3rd edi-
tion: Discrete event and iterative system computational foundations. Elsevier, 2018.
[8] E. Kofman and S. Junco, “Quantized-state systems: A devs approach for continu-
ous system simulation,” Transactions of The Society for Modeling and Simulation
International, vol. 18, no. 3, pp. 123–132, 2001.
[9] Y. Gu, Y. Liu, and D. Towsley, “On integrating fluid models with packet simulation,”
in INFOCOM 2004. Twenty-third AnnualJoint Conference of the IEEE Computer
and Communications Societies, IEEE, vol. 4, 2004, pp. 2856–2866.
[10] J. Liu, Y. Liu, Z. Du, and T. Li, “Gpu-assisted hybrid network traffic model,” in Proc.
of the 2nd ACM SIGSIM Conference on Principles of Advanced Discrete Simulation,
ACM, 2014, pp. 63–74.
[11] M. Bonaventura, D. Foguelman, and R. Castro, “Discrete event modeling and simulation-
driven engineering for the atlas data acquisition network,” IEEE Computing in Sci-
ence & Engineering, vol. 18, no. 3, pp. 70–83, 2016.
[12] M. Bonaventura, M. Jonckheere, and R. Castro, “Simulation study of dynamic load
balancing for processor sharing servers with finite capacity under generalized halfin-
whitt-jagerman regimes,” in Proceedings of 2018 Winter Simulation Conference (WSC),
2018.
160
Bibliography 161
[13] M. Bonaventura and R. Castro, “Fluid-flow and packet-level models of data net-
works unified under a modular/hierarchical framework: Speedups and simplicity,
combined,” in Proceedings of 2018 Winter Simulation Conference (WSC), 2018.
[14] D. J. Foguelman, M. A. Bonaventura, and R. D. Castro, “Masada: A modeling and
simulation automated data analysis framework for continuous data-intensive vali-
dation of simulation models,” in 30TH annual European Simulation and Modeling
Conference, (SIANI, University of Las Palmas, Spain, Oct. 26–28, 2016), vol. 30,
2016, pp. 34–42.
[15] A. Laurito, M. Bonaventura, M. Eukeni Pozo Astigarraga, and R. Castro, “Topogen:
A network topology generation architecture with application to automating simula-
tions of software defined networks,” in 2017 Winter Simulation Conference (WSC),
2017, pp. 1049–1060. doi: 10.1109/WSC.2017.8247854.
[16] M. Bonaventura, “Unified packet-level and fluid-flow simulation of large-scale net-
works,” in Ph.D. Colloquium of 2018 Winter Simulation Conference (WSC), ACM
SIGSIM Best Ph.D. Student Paper Award, 2018. [Online]. Available: https://www.
acm-sigsim-mskr.org/bestPhDpaperAwardRecipients.htm.
[17] L. Santi and M. Bonaventura, Py2pdevs: A python to powerdevs interface, https:
//gitlab.cern.ch/tdaq-simulation/powerdevs/, 2018.
[18] S. McCanne, “Network simulator ns-2,” Http://www.isi.edu/nsnam/ns/, 1997.
[19] G. Carneiro, “Ns-3: Network simulator 3,” in UTM Lab Meeting April, vol. 20, 2010.
[20] A. Varga and R. Hornig, “An overview of the omnet++ simulation environment,”
in Proceedings of the 1st international conf. on Simulation tools and techniques for
communications, networks and systems, ICST, 2008, p. 60.
[21] I. Katzela, Modeling and simulating communication networks: A hands-on approach
using opnet. Prentice Hall PTR, 1998.
[22] R. Barr, Z. J. Haas, and R. van Renesse, “Jist: An efficient approach to simulation
using virtual machines,” Software: Practice and Experience, vol. 35, no. 6, pp. 539–
576, 2005.
[23] E. D. Ngangue Ndih and S. Cherkaoui, “Simulation methods, techniques and tools
of computer systems and networks,” in Modeling and Simulation of Computer Net-
works and Systems: Methodologies and Applications, M. S. Obaidat, F. Zarai, and
P. Nicopolitidis, Eds., Morgan Kaufmann, 2015.
[24] Y. Liu, F. Lo Presti, V. Misra, D. Towsley, and Y. Gu, “Fluid models and solutions
for large-scale ip networks,” in ACM SIGMETRICS Performance Evaluation Review,
ACM, vol. 31, 2003, pp. 91–101.
[25] S. Bohacek, J. a. P. Hespanha, J. Lee, and K. Obraczka, “A hybrid systems mod-
eling framework for fast and accurate simulation of data communication networks,”
in Proceedings of the 2003 ACM SIGMETRICS Conference on Measurement and
Modeling of Computer Systems, ACM, vol. 31, 2003, pp. 58–69, isbn: 1-58113-664-1.
doi: 10.1145/781027.781036.
162 Bibliography
[26] J. Incera, R. Marie, D. Ros, and G. Rubino, “Fluidsim: A tool to simulate fluid models
of high-speed networks,” in International Conference on Modelling Techniques and
Tools for Computer Performance Evaluation, Springer, 2000, pp. 230–246.
[27] M. S. Obaidat and N. A. Boudriga, Fundamentals of performance evaluation of com-
puter and telecommunication systems. Wiley-Interscience, 2010, isbn: 0471269832.
[28] S. Keshav, Mathematical foundations of computer networking. Addison-Wesley, 2012.
[29] M. Harchol-Balter, Performance modeling and design of computer systems: Queueing
theory in action, 1st. New York, NY, USA: Cambridge University Press, 2013, isbn:
1107027500, 9781107027503.
[30] R. Beuran, Introduction to network emulation. Pan Stanford, 2012, isbn: 9814310913.
[31] R. Srikant, The mathematics of internet congestion control. Springer Science & Busi-
ness Media, 2012.
[32] R. W. R. Darling and J. R. Norris, “Differential equation approximations for markov
chains,” Probability Surveys, vol. 5, p. 37, 2008. doi: doi:10.1214/07-PS121.
[33] G. Grimmett and D. Stirzaker, Probability and random processes. Oxford university
press, 2001.
[34] D. J. Wilkinson, Stochastic modelling for systems biology. Chapman and Hall/CRC,
2006.
[35] H. Andersson and T. Britton, Stochastic epidemic models and their statistical anal-
ysis. Springer Science & Business Media, 2012, vol. 151.
[36] J.-Y. Le Boudec, Performance evaluation of computer and communication systems.
Epfl Press, 2011.
[37] L. Bortolussi and N. Gast, “Mean-field limits beyond ordinary differential equations,”
in International School on Formal Methods for the Design of Computer, Communi-
cation and Software Systems, Springer, 2016, pp. 61–82.
[38] T. G. Kurtz, “Solutions of ordinary differential equations as limits of pure jump
markov processes,” Journal of applied Probability, vol. 7, no. 1, pp. 49–58, 1970.
[39] M. Benaim and J.-Y. Le Boudec, “A class of mean field interaction models for
computer and communication systems,” Performance evaluation, vol. 65, no. 11-12,
pp. 823–838, 2008.
[40] G. Bolch, S. Greiner, H. De Meer, and K. S. Trivedi, Queueing networks and markov
chains: Modeling and performance evaluation with computer science applications.
John Wiley & Sons, 2006.
[41] E. Alliance, Ethernet roadmap, www . ethernetalliance . org / roadmap, Accessed:
2018-04-04, 2015.
[42] L. Kleinrock, “Models for computer networks,” in Proc. of the IEEE International
Conference on Communications, Boulder, Colorado, 1969, pp. 21/9–21/16.
[43] J. Padhye, V. Firoiu, D. Towsley, and J. Kurose, “Modeling tcp throughput: A simple
model and its empirical validation,” ACM SIGCOMM Computer Communication
Review, vol. 28, no. 4, pp. 303–314, 1998.
Bibliography 163
[44] V. Misra, W.-B. Gong, and D. Towsley, “Fluid-based analysis of a network of aqm
routers supporting tcp flows with an application to red,” in ACM SIGCOMM Com-
puter Communication Review, ACM, vol. 30, 2000, pp. 151–160.
[45] X. Liu, E. Chong, and N. Shroff, “A framework for opportunistic scheduling in wire-
less networks,” Comp. Netw., vol. 41, pp. 451–474, 2003.
[46] S. Kunniyur and R. Srikant, “End-to-end congestion control schemes: Utility func-
tions, random losses and ecn marks,” IEEE/ACM Transactions on Networking (TON),
vol. 11, no. 5, pp. 689–702, 2003.
[47] M. A. Marsan, M. Garetto, P. Giaccone, E. Leonardi, E. Schiattarella, and A. Tarello,
“Using partial differential equations to model tcp mice and elephants in large ip
networks,” IEEE/ACM Transactions on Networking, vol. 13, no. 6, pp. 1289–1301,
2005.
[48] J. C. Butcher, “The numerical analysis of ordinary differential equations: Runge-
kutta and general linear methods,” 1987.
[49] J. D. Lambert, Numerical methods for ordinary differential systems: The initial value
problem. John Wiley & Sons, Inc., 1991.
[50] E. Hairer, S. P. Nørsett, and G. Wanner, Solving ordinary differential equations i:
Nonstiff problems (springer series in computational mathematics) (v. 1). Springer,
2011, isbn: 3540566708.
[51] L. F. Shampine and M. W. Reichelt, “The matlab ode suite,” SIAM journal on
scientific computing, vol. 18, no. 1, pp. 1–22, 1997.
[52] P. Fritzson and V. Engelson, “Modelica—a unified object-oriented language for sys-
tem modeling and simulation,” in European Conference on Object-Oriented Program-
ming, Springer, 1998, pp. 67–90.
[53] B. Gough, Gnu scientific library reference manual. Network Theory Ltd., 2009.
[54] T. E. Oliphant, “Python for scientific computing,” Computing in Science & Engi-
neering, vol. 9, no. 3, 2007.
[55] W. Perruquetti and J.-P. Barbot, “Tools for ordinary differential equations analysis,”
in Chaos in Automatic Control, CRC Press, 2005, pp. 65–119.
[56] D. R. Willé and C. T. Baker, “Delsol—a numerical code for the solution of systems of
delay-differential equations,” Applied numerical mathematics, vol. 9, no. 3-5, pp. 223–
234, 1992.
[57] L. F. Shampine and S. Thompson, “Solving ddes in matlab,” Applied Numerical
Mathematics, vol. 37, no. 4, pp. 441–458, 2001.
[58] S. Corwin, S Thompson, and S. White, “Solving odes and ddes with impulses,” JNA-
IAM J. Numer. Anal. Indust. Appl. Math, vol. 3, pp. 139–149, 2008.
[59] L. Euler, “De integratione æquationum differentialium per approximationem,” in
Opera Omnia, Institutiones Calculi Integralis, Teubner Verlag, Leipzig, Germany,
1913, 424–434.
164 Bibliography
[92] S. Robinson, R. Brooks, K. Kotiadis, and D.-J. Van Der Zee, Conceptual modeling
for discrete-event simulation. CRC Press, 2010.
[93] G. Lehmann, “Data acquisition and event building studies for the atlas experiment,”
PhD thesis, Bern University, 2000.
[94] L. Leahu, “Analysis and predictive modeling of the performance of the atlas tdaq
network,” PhD thesis, Bucharest, Tech. U., 2013.
[95] T. Colombo, H. Fröning, P. J. García, and W. Vandelli, “Modeling a large data-
acquisition network in a simulation framework,” in 2015 IEEE International Confer-
ence on Cluster Computing, 2015, pp. 809–816. doi: 10.1109/CLUSTER.2015.137.
[96] T. Colombo, H. Fröning, P. J. Garcìa, and W. Vandelli, “Optimizing the data-
collection time of a large-scale data-acquisition system through a simulation frame-
work,” The Journal of Supercomputing, vol. 72, no. 12, pp. 4546–4572, 2016.
[97] A. Santos, P. J. García, W. Vandelli, and H. Fröning, “Modeling resource utilization
of a large data acquisition system,” in International conference on Technology and
Instrumentation in Particle Physics, Springer, 2017, pp. 346–349.
[98] A. Santos, W. Vandelli, H. Froening, and P. J. Garcia Garcia, “Buffer provisioning for
large-scale data-acquisition systems,” in Proceedings of The 12th ACM International
Conference on Distributed and Event-based Systems (DEBS ’18), ACM, New York,
NY, USA, 2018.
[RFC793] J. Postel, “Transmission Control Protocol,” RFC Editor, RFC 793, 1981. [Online].
Available: https://tools.ietf.org/html/rfc793.
[99] H. Zimmermann, “Osi reference model–the iso model of architecture for open systems
interconnection,” IEEE Transactions on communications, vol. 28, no. 4, pp. 425–432,
1980.
[100] S. Tarbouriech, C. T. Abdallah, and J. Chiasson, Advances in communication control
networks. Springer Science & Business Media, 2004, vol. 308.
[101] V. Jacobson, “Congestion avoidance and control,” in ACM SIGCOMM computer
communication review, ACM, vol. 18, 1988, pp. 314–329.
[RFC 7414] M. Duke et al., “A Roadmap for Transmission Control Protocol,” RFC Editor, 7414
7414, 2015. [Online]. Available: https://tools.ietf.org/html/rfc7414.
[102] D. Chkliaev, J. Hooman, and E. De Vink, “Verification and improvement of the
sliding window protocol,” in International Conference on Tools and Algorithms for
the Construction and Analysis of Systems, Springer, 2003, pp. 113–127.
[103] J. Padhye, V. Firoiu, D. F. Towsley, and J. F. Kurose, “Modeling tcp reno perfor-
mance: A simple model and its empirical validation,” IEEE/ACM Transactions on
Networking (ToN), vol. 8, no. 2, pp. 133–145, 2000.
[104] Y. R. Yang and S. S. Lam, “General aimd congestion control,” in Icnp, IEEE, 2000,
p. 187.
[105] S. Jero, E. Hoque, D. Choffnes, A. Mislove, and C. Nita-Rotaru, “Automated attack
discovery in tcp congestion control using a model-guided approach,” 2018. doi: 10.
14722/ndss.2018.23119.
Bibliography 167
[120] E. Egea López et al., “Simulation scalability issues in wireless sensor networks.,”
2006.
[121] V Efthimia, Free tools for network simulation, 2006.
[122] P. P. Garrido, M. P. Malumbres, and C. T. Calafate, “Ns-2 vs. opnet: A comparative
study of the ieee 802.11 e technology on manet environments,” in Proceedings of the
1st international conference on Simulation tools and techniques for communications,
networks and systems & workshops, ICST (Institute for Computer Sciences, Social-
Informatics and . . ., 2008, p. 37.
[123] D. Cavin, Y. Sasson, and A. Schiper, “On the accuracy of manet simulators,” in
Proceedings of the second ACM international workshop on Principles of mobile com-
puting, ACM, 2002, pp. 38–43.
[124] E. Weingartner, H. Vom Lehn, and K. Wehrle, “A performance comparison of re-
cent network simulators,” in Communications, 2009. ICC’09. IEEE International
Conference on, IEEE, 2009, pp. 1–5.
[125] D. M. Nicol, “Scalability of network simulators revisited,” in Proceedings of the Com-
munication Networks and Distributed Systems Modeling and Simulation Conference,
2003, pp. 1–8.
[126] D. Albeseder, M. Függer, F. Breitenecker, T. Löscher, and S. Tauböck, Small pc-
network simulation-a comprehensive performance case study. 2005.
[127] X. Zhou and H. Tian, “Comparison on network simulation techniques,” in Paral-
lel and Distributed Computing, Applications and Technologies (PDCAT), 2016 17th
International Conference on, IEEE, 2016, pp. 313–316.
[128] S. Siraj, A Gupta, and R. Badgujar, “Network simulation tools survey,” International
Journal of Advanced Research in Computer and Communication Engineering, vol. 1,
no. 4, pp. 199–206, 2012.
[129] J. H. Dshalalow, Frontiers in queueing: Models and applications in science and en-
gineering. CRC press, 1997, vol. 7.
[130] M. Harchol-Balter, Performance modeling and design of computer systems: Queueing
theory in action. Cambridge University Press, 2013.
[131] M. Mitzenmacher, The power of two choices in randomized load balancing, ser. Ph.D.
Thesis.
[132] N. D. Vvedenskaya, R. L. Dobrushin, and F. I. Karpelevich, “Queueing system with
selection of the shortest of two queues: An assymptotic approach,” Problems of In-
formation Transmission, vol. 32, no. 1, pp. 15–27, 1996.
[133] C. Graham, “Chaoticity on path space for a queueing network with selection of the
shortest queue among several,” J. Appl. Probab., vol. 37, no. 1, pp. 198–211, Mar.
2000. doi: 10.1239/jap/1014842277.
[134] A. Mukhopadhyay, A. Karthik, R. R. Mazumdar, and F. Guillemin, “Mean field
and propagation of chaos in multi-class heterogeneous loss models,” Performance
Evaluation, vol. 91, pp. 117 –131, 2015, Special Issue: Performance 2015, issn: 0166-
5316. doi: 10.1016/j.peva.2015.06.008.
Bibliography 169
[149] N Garelli, “The evolution of the trigger and data acquisition system in the ATLAS
experiment,” vol. 513, 2014. doi: 10.1088/1742-6596/513/1/012007.
[150] J Almeida, M Dobson, A Kazarov, G. L. Miotto, J. Sloper, I Soloviev, and R Tor-
res, “The ATLAS DAQ system online configurations database service challenge,” in
Journal of Physics: Conference Series, IOP Publishing, vol. 119, 2008, p. 022 004.
[151] A. D. Sicoe, G. L. Miotto, L. Magnoni, S. Kolos, and I. Soloviev, “A persistent back-
end for the ATLAS TDAQ online information service (P-BEAST),” in Journal of
Physics: Conference Series, IOP Publishing, vol. 368, 2012, p. 012 002.
[152] D. J. Foguelman, M. A. Bonaventura, and R. D. Castro, “Masada: A modeling and
simulation automated data analysis framework for continuous data-intensive valida-
tion of simulation models,” in 30th European Simulation and Modelling Conference,
2016.
[153] S. Kulkarni, P. Agrawal, et al., Analysis of tcp performance in data center networks.
Springer, 2014.
[154] T. Colombo, A. Collaboration, et al., “Data-flow performance optimisation on unre-
liable networks: The atlas data-acquisition case,” in Journal of Physics: Conference
Series, IOP Publishing, vol. 608, 2015, p. 012 005.
[155] R. Righter and J. G. Shanthikumar, “Scheduling multiclass single server queueing
systems to stochastically maximize the number of successful departures,” PEIS, vol.
3, pp. 323–333, 1989.
[156] G. Christen, A. Dobniewski, and G. Wainer, “Modeling state-based devs models in
cd++,” in Proceedings of MGA, advanced simulation technologies conference, 2004,
pp. 105–110.
[157] B. Chen and H. Vangheluwe, “Symbolic flattening of devs models,” in Proceedings of
the 2010 Summer Computer Simulation Conference, Society for Computer Simulation
International, 2010, pp. 209–218.
[158] G. F. Riley, R. M. Fujimoto, and M. H. Ammar, “A generic framework for paral-
lelization of network simulations,” in Proc. of the 7th International Symposium on
Modeling, Analysis and Simulation of Computer and Telecommunication Systems,
IEEE, 1999, pp. 128–135.
[159] J. S. Ahn and P. B. Danzig, “Packet network simulation: Speedup and accuracy
versus timing granularity,” IEEE/ACM Transactions on Networking (TON), vol. 4,
no. 5, pp. 743–757, 1996.
[160] D. Anick, D. Mitra, and M. M. Sondhi, “Stochastic theory of a data-handling system
with multiple sources,” Bell Labs Technical Journal, vol. 61, no. 8, pp. 1871–1894,
1982.
[161] S. Deb, S. Shakkottai, and R Srikant, “Stability and convergence of tcp-like conges-
tion controllers in a many-flows regime,” in INFOCOM 2003. Twenty-Second An-
nual Joint Conference of the IEEE Computer and Communications. IEEE Societies,
IEEE, vol. 2, 2003, pp. 884–894.
Bibliography 171
[162] Y. Yi and S. Shakkottai, “Flunet: A hybrid internet simulator for fast queue regimes,”
Computer Networks, vol. 51, no. 18, pp. 4919–4937, 2007.
[163] R. Castro, “Integrative tools for modeling, simulation and control of data networks,”
in Spanish, extended summary in English, PhD thesis, National University of Rosario,
Argentina, 2010.
[164] A. Bellen and M. Zennaro, Numerical methods for delay differential equations. Oxford
university press, 2013.
[165] E. Kofman, “Discrete event simulation of hybrid systems,” SIAM Journal on Scien-
tific Computing, vol. 25, no. 5, pp. 1771–1797, 2004.
[166] J. K. Hale and S. M. V. Lunel, Introduction to functional differential equations.
Springer Science & Business Media, 2013, vol. 99.
[167] G. Mao and L. R. Petzold, “Efficient integration over discontinuities for differential-
algebraic systems,” Computers & Mathematics with Applications, vol. 43, no. 1-2,
pp. 65–79, 2002.
[168] C. Kiddle, R. Simmonds, C. Williamson, and B. Unger, “Hybrid packet/fluid flow
network simulation,” in Proceedings of the seventeenth workshop on Parallel and
distributed simulation, IEEE Computer Society, 2003, p. 143.
[169] B. Liu, D. R. Figueiredo, Y. Guo, J. Kurose, and D. Towsley, “A study of networks
simulation efficiency: Fluid simulation vs. packet-level simulation,” in Proc. of the
20th Annual Joint Conference of the IEEE Computer and Communications Societies,
IEEE, vol. 3, 2001, pp. 1244–1253.
[170] K. Aboudolas and N. Geroliminis, “Perimeter and boundary flow control in multi-
reservoir heterogeneous networks,” Transportation Research Part B: Methodological,
vol. 55, pp. 265–281, 2013.
[171] M. Folk, G. Heber, Q. Koziol, E. Pourmal, and D. Robinson, “An overview of the
hdf5 technology suite and its applications,” in Proceedings of the EDBT/ICDT 2011
Workshop on Array Databases, ACM, 2011, pp. 36–47.
Chapter 7
Appendix
dx(t) a(t − x) − C
= f (x, t) = (7.1)
dt a(t − x)
In order for Eq.(7.1) to be solvable by QSS methods we require that f (x, t) be globally Lipschitz
both in t and x.
Assume that a(t) is globally Lipschitz with a(t) ≥ > 0 ∀t and |a(t2 ) − a(t1 )| < La |t2 − t1 |,
considering C ∈ R+ , ∈ R+ and arbitrarily small.
Let La and Lf be the Lipschitz constants of a(·) and f (·) respectively.
Then,
1 1
|f (x1 , t) − f (x2 , t)| = C
− (7.2)
a(t − x2 ) a(t − x1 )
a(t − x1 ) − a(t − x2 )
= C (7.3)
a(t − x1 )a(t − x2 )
|x1 − x2 |
≤ C.La (7.4)
2
≤ Lf |x1 − x2 | (7.5)
with Lf = C.L2
a
Therefore, according to Theorems 1 to 6 in [8], the QSS approximation of system (7.1) is a well
posed simulation method since the stability properties are conserved from the original system and
the error can be reduced to arbitrary small values
172
7.2. New Enhancements for the PowerDEVS Simulation toolkit 173
specification of big topological models using Python code as an alternative the the PowerDEVS
GUI.
Figure 7.1 shows how Py2PDEVS integrates with PowerDEVS compilation. A Python ab-
straction layer generates C++ classes based on the Boost.Python library which allows exporting
them to Python. The PowerDEVS compilation process was updated to automatically generate a
Boost.Python class for every DEVS atomic model in PowerDEVS so that they can be available
also from Python code.
Execution of simulation models defined in Py2PDEVS does not impose performance penalties.
This is because Python is only used to define the model structure, but the simulation cycle and
atomic models code are all executed from the C++ as in the usual workflow.
The development of Py2PDEVS allows for a cleaner and more powerful development pipeline.
Model definition, parameter initialization, parameter sweeping and finalization tasks can be per-
formed via Python scripts.
Having atomic models accessible by Python code allows for the definition of Python classes
that mimic DEVS coupled models. Figure 7.2 shows an example for the definition of a simple
network topology using Python code.
• Scilab workspace: variables can be read directly from the Scilab workspace. Therefore,
the user can define in the Scilab workspace a variable with any value which will be read by
the PowerDEVS atomic model. Strings are not allowed as variable values.
• Scilab file (.sce) (new): The file is loaded into the Scilab workspace at the start of the
simulation and then works just as the previous item. This allows for more flexibility by
having all parameters defined in a single file. Any Scilab expression or function can be used,
for example a parameter can be specified depending on the values of other parameters.
• Command line (new): parameters can be specified in the command line using the format:
− < parameterN ame >< parameterV alue >
• .ini file (new): a file to be loades can be specified in command line. This allows for more flexi-
bility than command line and having all parameters in a single file is more convenient. The file
must be in .ini format, i.e. each line must be a < parameterN ame >=< parameterV alue.
In this case expressions are not allowed and thus parameters can not depend on each other.
Strings are allowed in this case.
It is possible to combine the .ini file with command line parameters, where command line
parameters take precedence.
A command line parameter is used to choose where atomic models will read parameters from.
For example, the model can be executed as follow to read parameters from an .ini file and overwrite
the value of the ’ExperimentNumber’ variable:
1 . / model − t f 70 −−parameter_reading_backend Cmdline −c . . / myModel .
params −ExperimentNumber 12
Atomic models read their parameters in the init function. To use the parameter configuration
infrastructure, the readDefaultParameterValue function must be used as follow:
7.2. New Enhancements for the PowerDEVS Simulation toolkit 175
• ReproducibleSimu=1 : the default seed is used, which will generate always the same sequence
of random numbers. This is useful in many situations in which it is necessary to reproduce
exactly the same simulation, for example for tracking bugs.
176 Chapter 7. Appendix
• ReproducibleSimu=value: with value different from 0 and 1, the value is used as the seed for
the simulation. This is useful to reproduce a specific simulation using a same known seed.
1 # Constant d i s t r i b u t i o n
2 sender1 . packetSize = 0
3 s e n d e r 1 . p a c k e t S i z e _ v a l u e = 3567
4
5 # Exponential d i s t r i b u t i o n
6 sender1 . packetSize = 1
7 s e n d e r 1 . packetSize_mu = 3567
8
9 # Pareto d i s t r i b u t i o n
10 sender1 . packetSize = 2
11 sender1 . packetSize_shape = 1
12 sender1 . packetSize_scale = 0.1
• Scilab workspace: after the simulation ends, all variables become available in the Scilab
workspace as two arrays: one for the time changes and another for the values.
• Comma separated values (CSV) (new): generates a comma separated value file.
• Hierarchical Data Format (HDF) (new): HDF file formats are specifically designed
to store and organize large amounts of data. PowerDEVS generates specifically version 5
(HDF5) [171]. These file formats provide libraries for most programming languages, making
them easily consumable from external programs. Some Python functions are also included
as part of PowerDEVS to open and plot HDF5 generated files.
The backend to be used can be set with a configuration parameter. For example from command
line, the model can be executed as follows to store parameters in a HDF5 file:
1 . / model − t f 7 0 . 0 0 0 0 0 0 −−v a r i a b l e _ l o g g i n g _ b a c k e n d hdf5
It is important to note that the storage backend and the method to read parameters are
independent of each other. I.e, it is possible for example to read parameters from Scilab and store
results in HDF5 files, as well as read parameters from command line and store results in Scilab.
Atomic models are responsible for logging variable values. This is done using the IPowerDEVS-
Logger interface which gets instantiated according to the configuration by the ConfigurationLogger
class or available for atomic models extending BaseSimulator. For example, the packetQueue
atomic model logs the discards_bits variable using the following code:
7.2. New Enhancements for the PowerDEVS Simulation toolkit 177
1 // a t i n i t
2 IPowerDEVS l o g g e r = s t d : : make_shared<C o n f i g u r a t i o n L o g g e r >( t h i s ) ;
3 ...
4
5 // when v a r i a b l e c h a n g e s
6 l o g g e r −>l o g S i g n a l ( t , p a c k e t S i z e , " d i s c a r d _ b i t s " ) ;
The library includes specific atomic models which log every event they receive. For example
the QSSLogger and PacketLogger, for QSS events and network packets, respectively.
Additionally, each individual variable can be configured to be sampled for logging purposes. In
this case, not all event arrivals are logged, but instead the maximum, minimum, averaged value,
sum, count, etc. There are 2 possible options to sample events assuming discrete values or QSS
values: 1) Discrete variable sampling and 2) Continuous variable sampling. They differ in the
way they interpret new events. For example, the discrete sampler logs the rate in Hz, while the
continuous sampler assumes values hold piecewise constant until the next event arrives (e.g. to
calculate the max/min for example).
A usage example is for instance when a packet rate is to be plotted. It is convenient to
sample outgoing packets instead of logging every single packet. This can be done configuring the
packetLogger as follows:
1 sender_packet . s e n t . s i z e _ b i t s . l o g L e v e l =99999999 # t u r n on l o g g i n g
2 sender_packet . s e n t . s i z e _ b i t s . l o g g e r =2 # d i s c r e t e sampler
3 sender_packet . s e n t . s i z e _ b i t s . sample_period =0.1 # s a m p l i n g p e r i o d
Also, a new pcap sampler atomic model receives simulated network packets and generates
standard .pcap output files. These files can be further opened by e.g. the Wireshark packet
analyser. More details can be found in [147].
Additionally, to reduce the learning curve for new developers, we built a Docker image. The
Docker image contains all the software packages and tools to develop PowerDEVS models, Python
for post-processing, Scilab, Eclipse for writing code, and C++ compilation and debugging tools,
Boost libraries, etc. The Docker image is available online hosted in DockerHub in the project
camisa/powerdevs_devel:latest accessible at: https://hub.docker.com/r/camisa/powerdevs_
devel
The image can be started directly with the command:
1 d o c k e r p u l l camisa / powerdevs_devel
Although, it is recommended to use the script in the PowerDEVS repository to map a project
folder, user settings, etc. Instructions on how to start and use the PowerDEVS Docker image can
be found at https://twiki.cern.ch/twiki/bin/view/Main/PowerDEVSDocker
178 Chapter 7. Appendix
The following code shows an example of configuring the paths for 2 different flows. Each
flow must be specified using the variable FlowIDs. In this example we define 2 flows with
names "sender1" and "sender2" . For each flow, there must be defined the variables <flow-
Name>.routerNames and <flowName>.routePorts, which specify router name and output port
respectively. In this example, when flow "sender1" arrives to the router "router1" it will departure
from outport 0, and when it arrives to "router2 it will departure from outport 1
7.3. New PowerDEVS Library of Packet-Level Network Models 179
1 # define a l l flows
2 FlowIds = { s e n d e r 1 , s e n d e r 2 }
3
4 # Path f o r s e n d e r 1
5 s e n d e r 1 . routeNames = { r o u t e r 1 , r o u t e r 2 }
6 sender_packet . r o u t e P o r t s = { 0 , 1}
7
8 # Path f o r s e n d e r 2
9 s e n d e r 2 . routeNames = { r o u t e r 1 }
10 s e n d e r _ f l u i d . r o u t e P o r t s = {2}
Value/Description
In Ports inPort0..N std:shared_ptr<IFlow>
Out Ports outPort0..M std:shared_ptr<IFlow>
Parameters see description
Header atomics/network/FlowRouter.h
7.3.2 FlowGenerator
Description: Generates packets according to the specified configuration. The configuration allows
to set stochastic distributions for packet sizes and inter-generation times. Also to set a sequence
of time instants at which the packet generation stats and stops. Distributions are configured as
specified in section 7.2.2
It has an additional input port which allows to force the generation of a new packet at the
moment of the event arrival. This can be used to generate packets following an outside source
distribution.
The following code shows an example of configuring the generation of the "sender1" flow. Each
flow generation must be specified using the variable PacketFlowNames. In this example we define
2 flows with names "sender1" and "sender2" . For each flow, the following variables must be
specified:
• <flowName>.period defines the amount of time which elapses between 2 consecutive packet
generations. It is distribution parameter, so it’s supporting parameters should also be speci-
fied. After each packet generation, a random number is taken from the configured distribution
to schedule the time for the next generation.
• <flowName>.packetSize defines the payload size of the generated packet. Total packet size
is determined by the payload size plus the size of headers according to protocol used. It
is distribution parameter, so it’s supporting parameters should also be specified. When a
packet is created, a random number is taken from the configured distribution and set as
payload size.
180 Chapter 7. Appendix
• <flowName>.startStopTimes defines the time instants at which packet generation starts and
stops. It is an order list with t1 , .., tn time instants. Odd time instants are interpreted as the
time to restart generating packets. Even times are interpreted as the time to stop generation
packets.
1 # define a l l flows
2 PacketFlowNames = { s e n d e r 1 , s e n d e r 2 }
3
4 # sender1
5 s e n d e r 1 . p e r i o d=0 # Constant
6 s e n d e r 1 . p e r i o d _ v a l u e =0.5 # 2 p e r second
7 s e n d e r 1 . p a c k e t S i z e =1 # E x p o n e n t i a l
8 s e n d e r 1 . packetSize_mu =3624 # mean i n b i t s
9 s e n d e r 1 . s t a r t S t o p T i m e s= { 0 , 2 , 5} # s t a r t / s t o p t i m e s
10 s e n d e r 1 . t y p e O f S e r v i c e= 0 # f o r QoS
11 . . .
Value/Description
In Ports InPort0 event value is not used.
Out Ports outPort1 std:shared_ptr<NetworkPacket>
Parameters see description
Header atomics/network/FlowRouter.h
Coupled Implementation
There are outports with the reservoir total fill Q(t) and delay qDelay(t) that represents the
time since a fluid enters until it departures. Additionally, for each incoming flow, there are related
ports for the departure rate departureRate_ai (t) and drop rate dropsRate_ai (t) for that flow.
Parameters include the maximum allowed size maxSize, the output rate capacity Capacity(C),
and QSS quantums dQmin , dQrel .
The model implements equations described in Section 5.3.
Coupled Implementation
Coupled Implementation
Value/Description
In Ports inPort0 std:shared_ptr<NetworkPacket>
Out Ports outPort0 std:shared_ptr<HybridFlow>
Parameters Bandwidth C capacity of the link in bps
Header atomics/hybrid_network/Packet2hybridFlow.h
Value/Description
inPort0 std:shared_ptr<NetworkPacket>
In Ports
inPort1 std:shared_ptr<FluidFlow>
Out Ports outPort0 std:shared_ptr<NetworkPacket>
Parameters
Header atomics/hybrid_network/hybridMergeFluidIntoPacket.h
Value/Description
In Ports inPort0 std:shared_ptr<HybridFlow>
outPort0 std:shared_ptr<HybridFlow>
Out Ports
outPort1 std:shared_ptr<HybridFlow>
Parameters
Header atomics/hybrid_network/hybridDemultiplex.h
Coupled Implementation
Coupled Implementation
Table 7.15: Hybrid Router coupled model with 3 ingress and 2 egress ports