Queuing Theory with Excel pt1

Capacity Planning makes extensive use of Queuing theory to predict future response times of a system when the workload increases.  There are many tools available that will automatically calculate the queues and can do multi-variate planning. However, if you have a really simple system and no money to buy a dedicated toolset, what can you do?

The formulas are reproduced across the internet and in books, so anyone can use them, however using a calculator/pen&paper is quite a challenge for this piece of mathematics. Lets have a look at the formulas involved.

We're interested in the M/M/c queue which is described in wonderful detail in Wikipedia here: (Queuing theory)
(Multi-server queue model)

I will assume that you either understand those pages, or have read them and are happy NOT to understand them!

Just to bring out the essential equations from those pages:

M/M/c Queue
\lambda = arrival rate per unit of time
\mu = service rate per unit of time
c= number of servers

Note:
Most people are familiar with a "Service Time", e.g. how many seconds does it take to service a particular request. Service rate per unit of time is calculated from the “Service Time” as in the following example:
If the service time is 20 seconds, then the service rate per minute is 60/20 = 3
The service rate per hour is 3600/20 = 180
So. The “Service Rate” is effectively the “number of services that can be performed in the given unit of time”.

The Average Utilisation (U) is also known as the Traffic Intensity (\rho)given as:
U= \frac {\lambda}{(c\mu)} = \rho

The system is stable if the Utilisation is less than 1 (100%). Well, if the utilisation is above 100%, then that would be pretty "unstable"... unlike in sport - computer systems can't give 110% percent!!

The formulas continue:
Probability of there being ZERO jobs in the system

\wp_0 = \biggl [1 +\frac{(c\rho)^c}{c! (1-\rho)} + \sum\limits_{n=1}^{c-1} \frac{(c\rho)^n}{n!} \biggr]^{-1}

Probability of there being “n” jobs in the system

If n<c

\wp_n = \wp_0 \frac{(c\rho)^n}{n!}

If n>=c

\wp_n = \wp_0\frac{\rho^n c^c}{c!}

The probability of queuing is
\varrho = \wp_0 \frac{(c\rho)^n}{c!(1-\rho)}

Mean response time is
r = \frac{1}{\mu} (1+\frac{\varrho}{c(1-\rho)})

So \rho depends on \wp_0 and in fact, so does almost everything… so how can Excel work this out?

\wp_0 is a long summation that has a \sum in it. Excel doesn't seem to have that as a simple function.

We'll find out how, in the next post... probably best to make sure that the above formulas are either understood, or at least accepted!

This entry was posted in Blog Posts, Capacity Management and tagged , , , , , , . Bookmark the permalink.