PPA stands for performance, power and area, the three things every chip design trades against each other. A faster core usually takes more silicon and burns more energy, so an architect's daily question is not "can this be faster?" but "is this gain worth what it costs?" Amdahl's law gives the first half of the answer: it says how much a change can possibly gain, given how much of the run time it touches. This article explains the three costs, works through Amdahl's law on real measurements, and shows how architects compare a feature's gain against its price.

13 min read | Beginner

What You'll Learn

  • Define performance, power and area and explain why they conflict
  • Apply Amdahl's law to find the most a change can gain
  • Compare a feature's speedup with its area and power cost
  • Decide when to optimize the common case and when not to

The Three Costs

Performance is how fast the chip does its job, measured as described in The Performance Equation.

Area is how much silicon the design takes, measured in square millimeters. It matters because it is cost. Chips are cut from a round wafer that costs the same whatever is on it, so a larger die means fewer chips per wafer. Worse, wafers have random defects, and a larger die is more likely to contain one, so a larger share of the chips must be thrown away. Cost therefore rises faster than area.

Power is the energy used per second, in watts. It has two parts. Dynamic power is spent when signals switch between 0 and 1, and it follows a well-known relation:

dynamic power = activity x capacitance x voltage^2 x frequency

Activity is how many signals switch per cycle, and capacitance grows with the amount of circuitry. Voltage is squared, which is why lowering it saves so much. Leakage power is the small current that flows through transistors even when they are not switching. It is spent as long as the block is powered, so large idle blocks, such as big caches, still cost energy.

Power matters for two reasons. A phone has a battery, so total energy limits how long it lasts. And every watt becomes heat: a chip can only run as fast as its cooling allows. A phone may hold a few watts for long periods, and a large server chip a few hundred. Modern high-end chips are usually limited by heat before anything else.

Why the Three Conflict

Performance costs the other two, in several ways. A larger branch predictor, a larger cache or an extra execution unit adds area directly, and all of them use power. A higher clock frequency usually needs a higher voltage, so dynamic power rises with roughly the cube of frequency when both change together. That cube is the reason a chip cannot simply be clocked twice as fast: it would use about eight times the power, far more than the cooling can remove.

The same rule works in reverse, and it is the reason multicore chips exist. Two cores at 80 percent of the frequency and voltage each use about half the power of one full-speed core (0.8 cubed is about 0.5), so together they use about the same power as one core, and give up to 1.6 times its throughput if the work can be shared between them.

The three goals also depend on the market. A server chip wants peak performance within a power limit. A phone wants the most work per joule. A sensor chip that costs a few cents wants the smallest possible area and leakage, and speed hardly matters. There is no best processor, only the best processor for a set of limits, and PPA is how those limits are written down.

Quick Check

Q: A chip runs at 1.0 V. Lowering its supply to 0.8 V, with the same frequency and activity, changes dynamic power by how much?

Show Answer

Power follows voltage squared: 0.8 x 0.8 = 0.64, so dynamic power falls by 36 percent. In practice, a lower voltage also makes gates slower, so the frequency may have to fall as well, which saves even more power and costs performance.

Amdahl's Law

Before spending effort on a change, an architect wants to know the most it can gain. Gene Amdahl stated the answer in 1967. If a change speeds up only a fraction of the run time, the rest stays as slow as before, and the rest sets a limit on the overall gain.

Let f be the fraction of the run time that benefits, and s the speedup of that part. The new time is the unaffected part plus the improved part:

new time = (1 - f) + f / s
speedup  = 1 / ((1 - f) + f / s)

Even if the improved part became infinitely fast, f / s would be zero and the speedup would stop at 1 / (1 - f). A change touching half of the run time can never give more than a factor of 2. Touching 90 percent gives at most a factor of 10.

A worked example: a program spends 40 percent of its time in a loop that a new instruction makes 5 times faster. These numbers are assumptions for this example. Speedup = 1 / (0.6 + 0.4 / 5) = 1 / 0.68 = 1.47. A 5 times faster loop gave less than a 1.5 times faster program, and even an infinitely fast loop would give only 1 / 0.6 = 1.67.

Amdahl on a Real Measurement

Here is the law on a measured program. A matrix multiplication on a simple five-stage processor lost about 31 percent of its cycles to branch flushes, the cycles wasted when a taken branch throws away the instructions fetched after it. What is the best that any branch improvement could do?

Two bars for a matrix program: today, with other cycles plus branch and jump flushes, and with perfect branches, with the flushes removed, showing a speedup limit of about 1.45

Perfect branch handling would remove all 31 percent, so the speedup cannot exceed 1 / 0.69 = 1.45. That is a useful ceiling. It costs nothing to compute, and it tells the team that no branch predictor, however clever, can make this program 2 times faster on this design. A predictor that removes three quarters of the flushes would give 1 / (0.69 + 0.31 x 0.25) = 1.3.

The ceiling also depends on the program. In a checksum, flushes took about a fifth of the cycles, so the limit is about 1.25. In a simple array loop, they took a third, and the limit is 1.5.

Memory Latency, Seen the Same Way

Amdahl's law works in the other direction too: it shows what a slowdown of one part costs. In one test, every data access of a memory copy program was made to wait longer:

A chart of a memory copy program's cycles as each data access waits 0, 1, 2 and 4 extra cycles, rising in a straight line

The cycles grow in a straight line, because each access adds its wait. One extra cycle on each access made the run about 15 percent longer, and four extra cycles about 59 percent longer. The same delay hardly touched a checksum, whose run grew by only about 9 percent with four extra cycles, because it rarely uses memory. The fraction of time in the affected part decides everything, in both directions.

Comparing Gain With Cost

Once the gain is known, it must be weighed against the price. A real example is forwarding, a pipeline feature that passes a result straight to the next instruction instead of waiting for it to be written to the registers (Data Hazards and Forwarding explains it). A small five-stage core was built with and without it, on the same programs and the same gate library:

Bar chart of the speedup from forwarding on six small programs, from about 1.17 for an array sum to about 1.70 for a memory copy, against an area increase of about 2.5 percent

Forwarding added about 2.5 percent to the area and gave a speedup between about 1.17 and 1.7. Almost any design would accept that: a gain many times larger than the cost. It is an easy case. Most decisions are much closer, and that is where a simple rule helps:

  • Divide the percent gain by the percent of added area and added power. A feature that gives 10 percent more speed for 5 percent more area looks good; one that gives 2 percent for 20 percent does not.
  • Compare it with what else the area could buy. The same silicon might be spent on more cache, or a second core, or just a cheaper chip.
  • Count the costs that do not show up in square millimeters: verification effort, schedule risk, and the extra complexity every later design inherits.

A measure often used for processors is performance per watt, which is the same as work per joule. A related one for low-power design is energy-delay product, energy multiplied by time, which stops a design from "winning" just by running very slowly at low energy.

Where Does This Matter?

Modern phone and laptop chips mix large "performance" cores with small "efficiency" cores. The small ones are slower but do far more work per joule, so background tasks run on them, and the large ones wake up only when something needs speed. This design exists because of exactly the trade-offs in this article: a large core gives perhaps a few times the speed of a small one at many times the power and area, a price worth paying only some of the time.

Optimize the Common Case

Amdahl's law leads to the oldest rule in computer design: make the common case fast. Effort spent on something that happens rarely cannot pay back, however clever it is. That is why designers measure before they design, using the CPI stacks and instruction mixes covered earlier in this chapter.

The rule has two limits. First, the common case must be measured on the right programs. A feature can be common in a benchmark and rare in the real product, which is why Workloads and Benchmarks matters. Second, the rare case still has to work correctly. An exception, a misaligned access or a page fault happens rarely, so it can be slow, but it must never be wrong, and it often takes a large share of the verification effort.

Amdahl's law also explains the limit of parallel computing. If 5 percent of a program must run on one core, the speedup from any number of cores cannot exceed 1 / 0.05 = 20. With 8 cores the speedup is 1 / (0.05 + 0.95 / 8) = 5.9, and with 64 cores it is only 15.4. Each extra core gives less, and the small serial part becomes the bottleneck. Multicore Processors and Shared Memory returns to this.

Quick Check

Q: A program spends 10 percent of its time on floating-point work. A new unit makes that part 100 times faster. Is it worth building for this program?

Show Answer

Speedup = 1 / (0.9 + 0.1 / 100) = 1 / 0.901 = 1.11, and the limit with an infinitely fast unit is 1.11 as well. A huge improvement to a small fraction gives about 11 percent. Unless other programs use it more, a smaller and cheaper unit would give nearly the same gain.

Reading a PPA Target

A product plan usually states targets such as "2,000 CoreMark at 200 MHz, under 15 mW, under 0.2 mm² in this process". (Those numbers are only an illustration.) Each target limits the others. As the design develops, the team tracks all three, because a late gain in one is often paid for in another: a timing fix adds buffers, and so area and power; a power fix adds clock gating, and so a little area and verification. Keeping margins in each of the three budgets, and reviewing them regularly, is a large part of an architect's work on a real project, as What Computer Architects Do describes.

Common Mistakes

Mistake #1: Quoting the speedup of the part as the speedup of the whole

"This unit is 10 times faster" says nothing about the program. Multiply through Amdahl's law with the measured fraction before stating any gain.

Mistake #2: Comparing area and ignoring power

A large idle cache adds little dynamic power but constant leakage, and a small busy block can draw more power than a large idle one. Check both, for the workload that matters.

Mistake #3: Optimizing before measuring

Engineers often have strong instincts about what is slow, and those instincts are often wrong. Measure the fractions first; the biggest fraction is usually not where anyone expected.

Practice Exercise

Challenge: Pick the Better Feature

A core runs its key program with the following shares of the run time: 30 percent in branch flushes, 20 percent waiting for memory, 50 percent everything else. These numbers are assumptions for this exercise. Option A, a branch predictor, removes two thirds of the flushes and adds 3 percent to the area. Option B, a larger cache, halves the memory waits and adds 10 percent to the area. (a) What speedup does each give? (b) Which gives more gain per percent of area? (c) What do both together give?

Hint

Call the old time 1 and subtract what each option removes. Speedup is 1 divided by the new time.

Solution

(a) A removes 0.30 x 2/3 = 0.20, so the time is 0.80 and the speedup is 1.25. B removes 0.20 / 2 = 0.10, so the time is 0.90 and the speedup is 1.11. (b) A gives 25 percent for 3 percent of area, about 8.3 percent gain per percent of area. B gives 11 percent for 10 percent, about 1.1. A is far better for this program. (c) The time falls to 1 - 0.20 - 0.10 = 0.70, a speedup of 1.43, for about 13 percent more area. Note that gains do not simply add: 25 percent and 11 percent combine to 43 percent because each is measured from a smaller remaining time.

Summary

  • Performance, power and area trade against each other; area is cost, and power is both battery life and heat.
  • Dynamic power follows voltage squared times frequency, so pushing the clock up costs far more power than it gains in speed.
  • Amdahl's law: speedup = 1 / ((1 - f) + f / s), and the limit is 1 / (1 - f).
  • Perfect branches could speed one measured matrix program by at most 1.45, whatever the predictor costs.
  • Compare each feature's gain with its area, power and complexity, and make the common case fast.
Did you find what you were looking for?

Quiz

No quiz questions available for this article.