Skip to Content
How to Make Things Faster
book

How to Make Things Faster

by Cary Millsap
June 2023
Intermediate to advanced
356 pages
5h 32m
English
O'Reilly Media, Inc.
Audiobook available
Content preview from How to Make Things Faster

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.

Image

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

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Perfecting Your Thinking Skills

Perfecting Your Thinking Skills

MIT Sloan Management Review

Publisher Resources

ISBN: 9781098147051Errata Page