Topics in Performance Evaluation – Exercise 4

Topics in Performance Evaluation

Exercise 4 – Simulating an M/M/k/b Queue

In this exercise we will simulate an M/M/k queue as a model of a packet router and how packets are dropped due to lack of buffer space.

Background

The number of clients waiting in the queue of an M/M/1 system is unbounded, and indeed when the load is high the queue can become very big. But in real systems there may be a limit on the number of clients waiting in the queue. The corresponding model where only b clients are allowed at a time is called M/M/1/b/.

Another variant on the M/M/1 queue is when we have more than one server. In this case, a waiting client may be served by any free server. This is like a post office, where the first person in line goes to the first window that becomes available. In queueing notation a queue with k servers is called M/M/k.

And of course we can combine the two: a queue with k servers and place for no more than b clients is M/M/k/b. We want to compare the behavior of all three variants with the original M/M/1 queue. Can you anticipate which will exhibit improved performance, and which will be worse?

Assignment

  1. Run M/M/1/b experiments

    Extend your simulator of an M/M/1 queue with support for a bounded queue. The bound b is on the total number of clients in the system; thus b=3 means that no more than 3 clients are allowed, where one is receiving service and another two are in the queue. If an arrival occurs when the system is full, the arriving client is lost. This is what happens sometimes in the phone system, when you try to place a long distance call and all lines are busy.

    Run your simulation with b=3, using an average service rate of one client per time unit, and different arrival rates to generate different load values as we did in previous exercises.

  2. Run M/M/k experiments

    Now extend your simulator to support multiple servers. Run simulations for M/M/k with k=2, and no bound on the queue size. This time use an average service rate of one client per two time units, so that the combined power of the two servers is the same as the single server we used before. Use the same load levels as before.

  3. Finally, run simulations that combine the two new features: both multiple servers and a bounded queue. Specifically, simulate an M/M/2/6 system. The average service time should again be 2 time units. Allowing 6 clients in total corresponds to 3 clients per server, so it seems like a fair comparison.

  4. Analyze the results

    Draw a graph and compare the response time results of these three simulations with each other and with the M/M/1 results you have from before. Specifically, include 4 lines on the same plot:

    1. simulation or analysis of M/M/1 queue
    2. simulation of M/M/2 queue
    3. simulation of M/M/1/3 queue
    4. simulation of M/M/2/6 queue
    As you do this, think about exactly what the X axis represents.

    Grade the four systems based on your results: which provides the best service level, and which the worst? Is this what you expected? Can you explain the differences?

    Consider whether there is anything else that is important (beyond the response times) in comparing these systems.

Submit

Use Moodle to submit a report on your work, in pdf format, with the following data.

  1. Your names, logins, and IDs
  2. The output plot of the simulation results, as explained above.
  3. Your conclusion: what is the ranking of the different systems, and why this is so.
  4. An appendix with the simulation code for all cases. Hint: think about using something similar to what we described in class.
Submission deadline is Monday, 24 March 2014, so I can give feedback in class on Tuesday.

To the course home page