- λ (fixed)
- 1.000
- ρ = λ/μ
- —
- 𝔼(S) = 1/μ
- —
Expected time in queue
Time in system adds one mean service time: 𝔼(T) = 𝔼(Wq) + 1/μ.
Expected time in system
Both come from 𝔼(T) = (1/μ)(1 + ρ(1 + C2S)/2(1 − ρ)), with C2S = 1 for M/M/1 and C2S = 0 for M/D/1.
Theory at this μ
| M/M/1 | — |
| M/D/1 | — |
| Ratio M/D/1 ÷ M/M/1 | — |
- Simulated
- —
- Theory
- —
- Served
- 0
- In system
- 0
- Simulated
- —
- Theory
- —
- Served
- 0
- In system
- 0
What to notice
At every service rate, the M/D/1 queueing delay is exactly half the M/M/1 delay: removing the variability of service times halves the mean wait, although the server is just as busy. Both curves blow up as μ approaches λ. Near ρ = 1 the simulated means converge slowly and fluctuate a lot, so run 10,000 more arrivals a few times before trusting them.
- ρ = λ/μ
- —
- 𝔼(S) = 1/μ
- —
- 𝔼(S²)
- —
Expected time in queue
Expected time in system
where 𝔼(S) = 1/μ and C2S = 𝔼(S2)/(𝔼(S))2 − 1. Only the mean and the variance of the service time matter.
This is the Pollaczek–Khinchine formula. With λ = 1 here, 𝔼(N) has the same numerical value as 𝔼(T).
Recovering the special cases
Correspondingly, 𝔼(N) reduces to ρ/(1 − ρ) for M/M/1.
Theory at these settings
| M/M/1 | — |
| M/G/1 | — |
| Ratio M/G/1 ÷ M/M/1 | — |
- Simulated
- —
- Theory
- —
- Served
- 0
- In system
- 0
- Simulated
- —
- Theory
- —
- Served
- 0
- In system
- 0
- Simulated
- —
- Theory
- —
- Served
- 0
- In system
- 0
What to notice
The mean is a straight line in C2S, passing through the M/D/1 value at 0 and the M/M/1 value at 1. Use the two buttons to snap to those cases. The G in M/G/1 stands for a general service-time distribution, and the formula depends on it only through its mean and C2S. To show this, two M/G/1 queues run with the same arrivals, the same mean service time and the same C2S, but different distributions.
The first draws service times from a gamma distribution with shape 1/C2S, so C2S = 1 gives exactly exponential service and C2S = 0 gives constant service. The second is a two-point distribution of packet lengths, as on the Internet: 1500-byte data packets and 40-byte acknowledgements, sent over a constant-rate link. The fraction of data packets is chosen to give the requested C2S, and the link rate is scaled so that the mean service time is 1/μ. At C2S = 0 every packet is a 1500-byte data packet. Both simulations converge to the same mean, although their sample paths look quite different. With large C2S, rare very long services dominate, and the simulated means take much longer to settle.