Chapter 28. A Riddle
Riddles are fun. Here’s a riddle for you:
There are only two ways to improve the response time of a computer program. What are they?
People usually guess answers like these:
-
CPU, disk, network? Oh, wait, that’s three…
-
User calls and system calls?
-
Service time and queueing delay?
-
Queueing delay and coherency delay?
Those are interesting answers, and I discuss them all in this book. But they’re not the answer I’m looking for. Like with many riddles, the answer is probably hiding in a different dimension than you’re thinking of.
Let’s go back to the receipt metaphor for a moment. Imagine you sent your fifteen-year-old son into the grocery store with your credit card for tomatoes while you waited in the car. He returns with a suspiciously full-looking bag.
“How much was it?” you ask, and he responds, “About fifty bucks.” You’re thinking, whoa, $50 is way too much for a few tomatoes. It’s a problem. “Hand me the receipt,” you say. You could have looked in the bag, but the receipt is actually more informative, because they don’t put price tags on groceries anymore.
Here’s what it says:
Aw, you should have known. Look at the biggest contributor to the total price: he snuck in a bunch of those chocolate bars he likes. Twenty of them. It’s a running joke now. It’s his “chocolate tax” that he charges for running into the store for you. But he already has ...
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