Network Planning Lab 2
Traffic Patterns
6 de marzo de 2023
1. Objectives
The main objective of this lab in to introduce the student in the effects that the
traffic pattern can have on the performance of some networks. Another objective
of this lab will be to learn the use of Jsimured, a multicomputer network simulator
written in Java. This simulator graphically shows the network performance for
different configurations, network topologies and traffic characteristics.
2. Previous work
In this Lab session we will use Jsimured V3.3, which can be downloaded
from [Link] and whose user manual
(in Spanish) is available at [Link]
Each workteam should download the simulator and its user manual, an try
to generate a network simulation for any kind of network topology. Then, they
should try to obtain network performance graphics (performance curves) using
the multiple simulation button of the simulation window (refer to the user manual
or the teacher for more information).
3. Lab session
The first task in the lab session will be the realization of an individual, written
exam, to assess to which extend each student has carried out and understood the
previous work.
1
3.1. Using Jsimured for obtaining graphic results
Next, each workteam will simulate a network with the network, packets, si-
mulation and results configuration with values shown in the following Figures
(WARNING!! the ”Guardar estadisticas en fichero CSV”box in the Results tab
MUST be ticked BEFORE the simulation is run):
Figure 1 shows the configuration that should be introduced in the Network
Tab (Red) and in the Packets tab (Paquetes):
Figura 1: Configuration of the network and packets tabs
Figure 2 shows the configuration that should be introduced in the Simulation
(Simulación) and Results Tabs:
Once the values in all the tabs have been introduced, then the student should
go to the Simulation tab and click on the ”Mostrar/Ocultar ventana de simulacion”
button, which will open a simulation window like the one in Figure 3
The student should then click on the ”Simular” button in the top-left corner
of the window, just below the ”Simulacion multiple” label. It will start multiple
batch simulations, concretely 18 simulations. Since the simulation tab specifies 6
points for the first variable (labeled as ”Primera Variable”), it means that it will
2
Figura 2: Configuration of the Simulation and Results Tabs
start 6 simulations for computing 6 points of the first plot (Throughput, labeled
as ”Productividad”). The values introduced for the second variable establishes 3
points from values 1 to 4 virtual channels (that is, for 1, 2 and 4 virtual channels).
So, each plot (composed of 6 points or simulations) will be repeated for the same
network configuration but using 2 and 4 virtual channels, for a total number of 18
simulations.
When the multiple simulations finish (at that moment the ”Terminar” button
in the simulation window is disabled) then we can go to the Results tab and click
on the ”Recargar/Mostrar Grafico” button. It will open a new window showing
three plots, similar to the ones shown in Figure 4. If the window with the graphic
does not open, then the csv file for making the graphic should be edited. If the
first line is a blank line, then this line should be deleted, and then the click on the
”Recargar/Mostrar Gráfico ” button will work properly.
The most-left legend of the plots in Figure 4 correspond to the lower values.
Thus, in this case the red plot corresponds to the network simulations with 1 vir-
tual channel (second variable) and the offered traffic increasing from 0.001 to 0.5
flits/node/cycle (first variable). The blue one correspond to the network simula-
tions with 2 virtual channels and the same offered traffic, while the green plot
3
Figura 3: Simulation window for starting simulations
corresponds to the simulations with 4 virtual channels.
Figura 4: Graphic results from the 18 simulations
Figure 4 shows on the X axis the average injected traffic in the network in
each simulation. Each point in the plots correspond to the values introduced in the
boxes of ”Primera variable” in the Simulation tab. Thus, the most-left point in the
three plots start with an injected traffic of 0.001 flits/node/cycle, and each plot has
six points. The highest injected traffic is 0.5 flits/node/cycle. On the Y-axis, this
figure shows the average latency (”Latencia paquete”) yielded by the simulator in
each simulation (point in the plots). In this case, Figure 4 shows that depending
4
on the number of virtual channels the average latency increases so much that the
”traffic jam” makes the network throughput to decrease in such a way that it affects
the traffic injected to the network (the network is so congested that the injection
channels should wait a lot, injecting less traffic per cycle and node than the one
actually generated), and none of the points reaches the maximum rate of injected
traffic. In fact, the simulation showing the maximum injected traffic is the 4th
simulation of the simulation with 3 virtual channels (green plot) with around 0.2
flits/node/cycle.
3.2. Jsimured with traces
A different way of using simured is using simulation traces. However, a single
trace file will result in a single simulation, which would produce a single point in
a plot, resulting from the average rate of injected traffic appearing in the traces,
and the average resulting latency from simulating the injection of those traces.
Jsimured allows the command line execution of simulations, using a network
configuration which should be defined in a configuration file named as [Link].
This configuration files defines the same parameters as the ones in the graphical
interface, and allows the use of trace files. The command to run Jsimured in the
command-line mode is
$ java -jar ../[Link] -c <[Link] >[Link]
This command would store the simulation results in the file ”[Link]”
in the correct format for its presentation as part of a plot. Then, using the ”Resul-
tados” tab we should select this file as the csv file for the graphics. Clicking on the
”Recargar grafico” button, we get the graphic displayed on the screen. However,
one simulation would produce a single point in the results plot. Thus, when clic-
king on the ”Recargar grafico” button simured will not show a graphic plot unless
the csv file contains the results for 2 simulations or more).
3.2.1. Exercises (0.5 points each)
1. Modify the example configuration file [Link] in order to achieve a
simulation of network like the one described in Section 3.1.
2. Modify the example configuration file [Link] to use the file trace
unif/[Link], and store the result in the file unif/[Link]
3. Edit the unif/[Link] and try to identify each number with each
network performance metric, comparing them with the ones delivered by
the simulator in section 3.1
5
Nevertheless, the file unif/[Link] contains the result of a single si-
mulation, with a single offered traffic (0.1 flits/node/cycle) an a single average
packet latency. So, the display of these results in a graphic cannot still be achie-
ved, as it would result in a single point. In order to build a plot for a given traffic
pattern, we should use several trace files, all of them with the same configura-
tion (topology, traffic pattern, etc) except the rate of offered traffic. This is the
reason for each sub-folder in the ”trazas” folder containing different trace files.
All the trace files in the same directory contain the same configuration, except
the offered traffic. Thus, for example, the file unif/[Link] describes a
file trace assuming a topology of 64 nodes (64n), a packet length of 32 flits (32n)
plus 3 header flits, injected in the network at a rate of 0.1 flits/node/cycle. The
network topology and other details as the delays should be described in the .conf
file. The file unif/[Link] contains the configuration of the network to be
tested in this lab session. The injected traffic rate (offered traffic) in this case is
0.1 flits/node/cycle).
3.3. Jsimured for testing different traffic patterns
3.3.1. Building the plot for the uniform traffic pattern
Therefore, in order to build the plot for the uniform traffic pattern, we should
run 7 simulations, each one using each of the trace files in the unif/ folder. In order
to run the simulations with the rest of the traffic rates, the student should copy and
modify the [Link] file to adjust the correct file trace to be used in the
simulation.
Thus, for the uniform traffic pattern the student should execute 7 times the
command
$ java -jar ../[Link] -c < [Link] > [Link]}
changing xx by the corresponding value according to the trace files available
at Aula Virtual. We will obtain the results for the 7 points in the plot by executing
7 times this command. The next step will consist of putting all the results together
in a single file. We can use the ”cat” command to merge the 7 files into a single
one. For example, the command
$ cat [Link] [Link] [Link] [Link]
[Link] [Link] [Link] > resultados\_unif.csv
would result in a text file like the one shown in Figure 5
(WARNING!!: Be aware of the order in which you invoke the merged csv
files: they should be merged in INCREASING order of the injected traffic
rate (0.01, 0.005, 0.11, 0.12, and so on). Otherwise, it may result in impossible
and absurd plots):
6
Figura 5: Resulting csv file from the ”cat” command
This csv file, however, contain one header line per results line, indicating jsi-
mured that it has to plot seven one-point plots instead one seven-point plot. The-
refore, we should delete (using any text editor) all the header lines except the first
one, leaving a a csv file like the one in Figure 6
Figura 6: Modified csv file, ready to be used for displaying the plot
At this point, we should execute the command
$ java -jar ../[Link] &
Click on the ”Resultados” tab, and select the file unif/resultados [Link] to
be used as the graphics file. Then, by clicking on the ”Recargar grafico” but-
ton we will obtain a graphics like the one in Figure 7 by selecting the csv file
unif/resultados [Link] as the csv file to be used in the graphics.
7
Figura 7: Graphic plotted for a single plot composed of 7 simulations
If an error appears in the console window when clickon on the ”Recargar/mostrar
grafico” and/or the graphics with the plot does not appear, then the format of the
.csv file should be reviewed, paying atenttion to tabs, commas, and quotes, as well
as the character encoding (charset) used in the csv file.
3.3.2. Building the plot for other 3 traffic patterns
The students must build the plots for all the traffic patterns in the ”trazas” fol-
der. All the simulations should be configured for the same network configuration,
except for the trace files to be used (which in turn define a different injected traffic
rate).
Once the students have four different graphics (one corresponding to each
traffic pattern), the students should merge the four graphics with a single plot into
a single graphic with four plots, each one for a different traffic pattern. In this way,
the performance yielded for each pattern can be easily compared. The order of the
traffic pattern plots should be the following one: first plot the uniform pattern,
second plot the butterfly pattern, third the shuffle pattern, nd the last the hot-spot
traffic pattern. Thus they should obatin a graphic with four plots composed of 7
points each.
In order to achive a graphic with the four plots (uniform, butterfly, shuffle, and
hot-spot, respectively) the .csv file resulting from merging the four csv files must
look like the one in Figure 8
8
Figura 8: Final csv file for displaying four plots, one for each traffic pattern
3.3.3. Exercises
Answer the following questions, in the light of the graphic comparing the per-
formance of the four traffic patterns:
1. Research the Internet and describe the Butterfly, Shuffle and Hot-Spot traffic
patterns. (1 point.)
2. Classify (in ascending order) the traffic patterns by the network through-
put achieved by each one. Explain why they yield these differences. (1.5
points.)
3. Classify (in ascending order) the traffic patterns by the average packet la-
tency yielded by each one. Explain why these differences appear. (1.5 points.)
4. All the configuration files use the Duato’s adaptive algorithm for meshes. If
we had used the deterministic xy algorithm, how this would have affected
to both throughput and latency? Explain your answer. (1.5 points.)
4. Assessment of the lab session
The evaluation of this lab session will consist in the individual written exam
(30 % of the mark), the presentation of the requested graphics yielded by Jsimured,
and the written answers to the exercises.