Topics in Performance Evaluation
Exercise 8 – Simulation Warmup
In this exercise we learn a bit about simulation methodology.
Background
We are typically more interested in the performance of a system in the steady
state than in the transient interval when it is just started up.
Therefore simulations that start with an empty system need to ignore a
``warmup'' period until they reach the steady state, and only then start measurements.
We will study the effect of the warmup period on the simulation of a very
simple system, namely a server that serves jobs FCFS.
To make it a bit more interesting, we will also consider the effect of the
system load and the runtime distribution.
Assignment
- Write the basic simulation we will use for this study.
It is a server that serves a sequence of jobs FCFS.
This means that jobs arrive randomly, and are either served immediately (if the
server is currently idle), or wait in queue and are then served one after the
other in the order that they arrived.
- The simulation should be 10,000 jobs long.
- The interarrival times should be exponentially distributed with mean
l.
- The service times (that is, the runtimes of the different jobs) should be
exponentially distributed with mean m = 2.
- The only input parameter is r, the load, which is r = m/l.
r is in the range [0,1).
Given r, you can easily calculate l.
- The output of the simulation is an array of size 10,000, containing the wait
times of the 10,000 jobs (for each job, how long did it wait in the queue).
Does this sound familiar?
You can probably reuse some code from the other simulation exercises you wrote...
- Use the above simulation in a procedure that runs 100 such simulations,
all with the same load (but different random number streams!), and averages the results.
The average is across simulations, not across jobs in the same simulation.
Thus the result will be an array of size 10,000 in which the first cell contains the
average wait time of the first jobs in the 100 simulations, the second cell is
the average wait time of the second jobs, etc.
Note that this is not a running average.
- Now run this for loads of 0.5, 0.8, 0.9, and 0.99.
- Repeat the whole thing using a Pareto distribution with mean 2
for the service times, instead of an exponential distribution.
Pareto random variates are generated by evaluating
1 / u1/a, in our case 1 / u0.5
Submit
Use
the Moodle system to submit
a report on your work, in pdf format, with the following data.
- Your names, logins, and IDs.
- Graphs with the results of the wait times under the different conditions.
Create graphs that show the dependence on job rank for different system loads and
distributions of service times.
Think about how to best organize this data.
- A short description of what you found:
When does the system seem to stabilize in the steady state?
Does this depend on the load?
If so, why?
Does it depend on the service time distribution? why?
Submission deadline is Monday, 26 May 2014, so I can
give feedback in class on Tuesday.
Please do the exercise in pairs.
To the course home page