Section 18.2.20

Figure 11: bottleneck masking and a ceiling effect

Definition

Bottleneck masking means that a cost added to one stage of a system, a step all work passes through, leaves the system’s measured rate unchanged because another stage, the bottleneck, already limits that rate. A ceiling effect is the resulting measurement problem: when every condition pushes a measure to a limit it cannot pass, the measure cannot tell those conditions apart. Behind a saturated link, one busy all the time, goodput §7.39 (useful data delivered per second) does not reflect the processor time per packet until the processor becomes the bottleneck.

Where it fits

Main entry: Computational versus communication bottleneck (§14.37).

The computational versus communication bottleneck entry explains the capacity model; this entry is about reading a measured rate that sits at the limit a bottleneck sets. Let every packet pass through two stages in turn: the CPU, which processes the packet, and the radio link, which sends it. The capacity of a stage is the largest number of packets per second it can handle, which is 1 divided by the time the stage is busy with one packet. When packets are always waiting to enter the first stage, the long-run delivered rate is the smaller of the two capacities. Let the CPU be busy for 1 ms per packet, a capacity of 1/0.001=10001 / 0.001 = 1000 packets per second, and let the link carry 100 packets per second. Writing min(a,b)\min(a, b) for the smaller of aa and bb, the delivered rate is min(1000,100)=100\min(1000, 100) = 100 packets per second. With packets of equal size, goodput is proportional to this rate.

Now add a policy check, which tests every packet against a set of rules and keeps the CPU busy for 1 ms more per packet. The CPU’s capacity falls to 1/0.002=5001 / 0.002 = 500 packets per second, and the delivered rate is min(500,100)=100\min(500, 100) = 100 packets per second, unchanged. The cost has not vanished. The CPU’s utilization, the fraction of time it is busy, equals the delivered rate times the busy time per packet: 100×0.001=0.10100 \times 0.001 = 0.10 without the check and 100×0.002=0.20100 \times 0.002 = 0.20 with it. The extra millisecond is spent while the link is still sending earlier packets, so once the flow is steady each packet still leaves at the moment the link becomes free. A plot of goodput per trial therefore shows both conditions at the same height, pressed against the ceiling that the link’s capacity sets.

Masking ends where the CPU’s capacity falls below the link’s, and that point can be found on purpose. Let a competing task occupy a fixed, known fraction of CPU time §18.1.5 and leave the remaining fraction ff to the packets. The delivered rate is min(1000f,100)\min(1000 f, 100) without the check and min(500f,100)\min(500 f, 100) with it. At f=0.16f = 0.16 the two rates are min(160,100)=100\min(160, 100) = 100 and min(80,100)=80\min(80, 100) = 80 packets per second, so the check now costs 20 packets per second. The rate starts to fall below 100 at f=100/1000=0.10f = 100 / 1000 = 0.10 without the check and at f=100/500=0.20f = 100 / 500 = 0.20 with it. The ratio of these two shares, 0.20/0.10=20.20 / 0.10 = 2, equals the ratio of the busy times per packet, 2/12 / 1.

These numbers come from a steady-state §11.27 model with three assumptions: every packet uses both stages, a stage’s busy time per packet does not depend on the load, and the CPU and the link are separate resources. When the same CPU also runs the radio protocol, the check competes with the link’s own processing, and the two capacities are no longer independent. All numbers in this example are invented.

Limits and common mistakes

A flat rate is not evidence of zero cost. It fits every added CPU cost that leaves the CPU faster than the link. The cost still shows in CPU busy time and in the CPU capacity left for other work; energy needs its own measurement.

A rate is also capped by the offered load, the rate at which new packets arrive. While every stage keeps up, the delivered rate equals the offered load whatever each packet costs. The cost then shows in response time §9.32, the time from a packet’s arrival to its delivery. Response time includes each stage’s busy time, and when arrivals are irregular, the waiting in front of a stage grows sharply as that stage’s utilization approaches 1. The tail latency §11.36, the slow end of the latency distribution, can grow while the rate does not move.

A workload in which few packets trigger the check measures little of the check’s cost, and it says nothing about a workload in which every packet triggers it.

The minimum rule describes a long, steady run. A finite-window rate §11.41, measured over a short stated interval, also contains start-up effects, such as the first packet’s full CPU time before the link has anything to send.

Questions answered

What follow-up distinguishes CPU overhead at a saturated link?

A follow-up distinguishes CPU overhead at a saturated link only if it observes the CPU directly or makes the CPU, rather than the link, the limit on the delivered rate; another goodput measurement at the same saturated link cannot. CPU overhead is the extra processor time per packet that a feature adds. A link is saturated when it is busy all the time, so the delivered rate equals the link’s capacity and does not respond to the CPU’s cost. Take a link that carries 100 packets per second and a CPU that is busy for 1 ms per packet without the feature and 2 ms with it: goodput is 100 packets per second in both cases.

Three follow-ups expose the difference, each with the feature’s work per packet kept exactly the same:

  1. Measure the CPU: its busy time per packet, for example with a cycle counter (a hardware register that counts processor clock cycles) read around the processing, or its utilization, here 100×0.001=0.10100 \times 0.001 = 0.10, or 10%, against 100×0.002=0.20100 \times 0.002 = 0.20, or 20%.

  2. Remove the ceiling: give the link more capacity, or feed packets to the processing code without the link, so that the rate becomes the CPU’s capacity, 1000 against 500 packets per second.

  3. Shrink the CPU’s share with a competing task that occupies a fixed fraction of CPU time, and vary that share: the rate starts to fall when the share left to the packets drops below 10% without the feature and below 20% with it.

Each follow-up separates the two explanations of a flat goodput: a CPU cost hidden by the link, and no CPU cost at all.

Related entries: Finite-window rate (§11.41), Response time versus execution time (§9.32), Latency distribution and tail (§11.36), Throughput versus goodput (§7.39), Figure 11: BLE airtime, event capacity, and a goodput ceiling (§18.2.19).