Distributions
The rate sets how long things take on average. The distribution sets how much each one differs from that average.
How it works#
A Generator and a Server each have a Distribution setting. On a generator it decides how the times between arrivals are spread around their mean; on a server, how the service times are. A Delay has no such setting: its latency stays fixed.
The rate keeps its meaning under every distribution. The mean time is always 1 / rate — Arrival Rate for a generator, Service Rate for a server, both in entities per second — so a server with a rate of 4 takes a quarter of a second on average whichever distribution it uses. The distribution changes only how much individual times vary around that mean.
- Exponentialdefault — no shape setting
- Memoryless times, as varied as their mean.
- Deterministicno shape setting
- The same time, every time.
- Uniformshape: Spread
- Any time within a spread around the mean, each as likely.
- Erlangshape: Stages
- A sum of exponential stages. More stages, less variation.
- Lognormalshape: Variability
- Skewed times with a long tail.
In the editor, Distribution sits between the rate and Wait Timeout in the component's settings. Each distribution has at most one extra setting for its shape — Spread, Stages or Variability — and that field appears only when the distribution that uses it is selected.
The handy measure for comparing them is the coefficient of variation: the standard deviation of the times divided by their mean. It is 0 when every time is the same and 1 for the exponential distribution. Variation is what makes queues: with the same two rates, steadier arrivals or steadier service mean shorter waits, and more erratic ones mean longer waits and more drops.
Exponential#
The default, with no shape setting. Times are memoryless: however long an arrival or a job has already taken, the time still to go looks the same. Most times are shorter than the mean and a few are much longer, and the standard deviation equals the mean — a coefficient of variation of 1.
This is the “M” in M/M/1. On a generator it makes the arrivals a Poisson process, the standard assumption for independent, uncoordinated traffic.
Deterministic#
No shape setting. Every time is exactly 1 / rate, and nothing random is drawn. Use it for arrivals on a fixed schedule or a step that always takes the same time: a timer, a machine cycle, a polling interval.
Uniform#
A time is equally likely anywhere in a band centred on the mean. Use it when all you know about a time is the range it falls in.
- Spreadshare of the mean, 0 to 1 — default 0.5
- How far either side of the mean a time can fall, as a share of the mean, in steps of 0.1. A time is equally likely anywhere between mean × (1 − spread) and mean × (1 + spread).
With a rate of 4 the mean is 0.25 seconds, and a spread of 0.5 gives times anywhere between 0.125 and 0.375 seconds. A spread of 0 gives a constant time, the same as Deterministic; a spread of 1 gives anything from 0 to twice the mean.
The coefficient of variation is spread / √3, so it never exceeds about 0.58: a uniform time is always steadier than an exponential one. The band is set by its spread around the mean only, not by a minimum and a maximum.
Erlang#
A time is the sum of several exponential stages, one after another. Use it for work that is a sequence of steps, or simply as a dial between exponential and constant.
- Stagesexponential stages, 1 to 100 — default 2
- How many exponential stages are added together to make one time. A whole number; each stage has a mean of the overall mean divided by the number of stages.
One stage is the exponential distribution. More stages mean less variation: the coefficient of variation is 1 / √stages, so 2 stages give about 0.71, 4 give 0.5 and 100 give 0.1. The overall mean stays 1 / rate however many stages there are.
Lognormal#
Skewed times with a long right tail, and always positive: most times sit below the mean and an occasional one is far above it. Use it for response times and other work where a few jobs take much longer than the rest.
- Variabilitystandard deviation over the mean, 0.1 to 10 — default 1
- The coefficient of variation of the times: their standard deviation divided by their mean, in steps of 0.1. The mean stays 1 / rate whatever the variability.
It is the one distribution here that can be more variable than the exponential. A variability below 1 is steadier than exponential; above 1 it is more erratic, with a heavier tail. At 1 it matches the exponential's variation but not its shape.
Kendall notation#
Queueing theory names a system by its arrival process, its service process and its number of servers. Each letter maps onto a Distribution setting: the first onto the generator, the second onto the server.
- M/M/1
- Exponential generator, Exponential server. The default for both.
- M/D/1
- Exponential generator, Deterministic server.
- D/M/1
- Deterministic generator, Exponential server.
- M/Eₖ/1
- Exponential generator, Erlang server with Stages set to k.
- M/G/1
- Exponential generator, and a server with any of the five — Uniform and Lognormal are the general cases the other rows do not cover.
The M/M/1, M/M/1/K and M/M/c models in the model library are exponential throughout. Open one and change a Distribution to see what the variation was costing: at the same rates, an M/D/1 waits in its queue half as long on average as an M/M/1.
Runs, results and saved models#
- During a live run the distribution is shown next to the rate but cannot be changed. The rate and the shape — Spread, Stages or Variability — can be changed while the run is going.
- After a batch run the distribution and its shape are listed among each component's settings, read-only.
- The same seed gives the same run under every distribution, so a batch can be repeated whichever ones the model uses.
- A model saved before distributions existed has none set and runs as exponential, exactly as it did before.