Chapter 70. Event Interdependencies
The events represented on the separate lines of a receipt-style profile can be interdependent. When you buy fewer wieners, you need fewer buns. When you visit your database buffer cache less often, you need fewer cache coherency instructions. Usually, the interdependency effect will work in your favor—you’ll usually get more improvement than you expected when you eliminate event executions.
However, it’s possible for interdependencies to work against you, too. When I buy less CoQ10, I need more Anacin©.
In my story about testing a program to learn its optimal fetch size, I hit the point of diminishing returns at 2,048. At this fetch size, my program was asking for more rows than would fit in a single network packet, and I began seeing calls to a new type of network I/O event that hadn’t been part of the program’s profile before. As I kept halving the number of fetch calls, the call count for this new network I/O event kept increasing. It was part of the reason that response times stopped getting better past 2,048.
Understanding the interdependencies among events will improve the accuracy of your predictions. You’ll learn about your system’s event interdependencies pretty quickly if you will always take the time to appraise your predictions and learn from your mistakes.
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