Chapter 42. Queueing Theory
How great would this be: I tell you how busy I expect my system to get, and then you tell me how long my users will have to wait. Pretty nice, right? Because then you could help me decide how powerful a system I’d have to buy, and how much total work I could do. Well, there’s a whole branch of mathematics called queueing theory that is devoted to helping you do just that.
Here is a plot of a queueing theory model called M/M/2,1 which is a good model for predicting the behavior of Kevin’s mirrored SSD array. It would also be a good model for, say, a two-lane highway, a public restroom with two stalls, or a bank with two tellers. The number “2” in “M/M/2” is the service channel count. A service channel is a resource that services requests; for example, an SSD, a lane, a stall, or a teller.
This plot shows expected response time (R) as a function of traffic intensity (ρ), which is a measure from 0 to 1 of how busy the system is.2 I’ve drawn the data from Kevin’s SSD story in the plot: R = Q + S = 4.5 S, where Q = 3.5 S is the expected queueing delay, and S is the expected service time. You could substitute the actual service time (0.000 464 seconds) for the symbol S, but it’s easier to understand what’s going on if you use S as the unit. That’s why I’ve laid out the vertical axis in units of S.
Generally, the model reveals:
-
Increasing the load on a system ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access