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.
Content preview from How to Make Things Faster

Chapter 41. Queueing Delay

Why would “block read” performance be fantastic early in the month, and then horrible later in the month? It’s the same reason that riding Space Mountain® takes 10 minutes (yay!) when the park first opens, and then 90 minutes (ugh!) later that same morning. Even on healthy systems where everything is functioning properly, the more popular a resource gets, the longer you have to wait for it. It works that way for amusement parks, airport ticket counters, restaurants, highways, and—of course—computer components. It’s unavoidable.

Here’s how it happens. Let’s go back to Kevin’s story. Imagine that you are one of Kevin’s customers, trying to grab your online invoice in the latter half of a month when the system is starting to get busy. As that Create Invoice program runs, it reaches the point in the code where it makes a “block read” call. On a lightly loaded system, that call would take one service time to complete.1 But the SSD array can’t start servicing your request right away, because it’s already busy working on another request. In fact, there are four “block read” calls ahead of you in the queue: one call that’s halfway done, and three others awaiting their turn.

So, your call gets in line. And waits.

Half a service time later, the call that was halfway done is finished. Three more service times later, the other three calls that were ahead of you are finished, and now it’s your turn. One more service time later, for a total of 4.5 service times, your ...

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

Improve Your Problem-Solving Skills

Improve Your Problem-Solving Skills

Charles Humble

Publisher Resources

ISBN: 9781098147051Errata Page