Benchmarks, Means and Power
To summarize many speed ratios fairly, use the geometric mean: it gives the same comparison no matter which machine you measure against. And a chip's power is , so lowering the voltage (and with it the clock) cuts power roughly with the cube of the voltage, and energy per task with the square.
What the symbols mean
- Speed ratio
Reference time over this machine's time on benchmark i (bigger is faster).
What the symbols mean
- Activity factor
The average fraction of the chip's capacitance switched each cycle.
- Capacitance
The total capacitance of the chip's wires and transistors.
- Supply voltage
The voltage each switching node swings through.
- Clock rate
Cycles per second.
- Energy
Joules used by a task: power times time.
Explanation
A benchmark is simply a standard set of programs everyone agrees to time, so that different computers can be compared fairly. Each program gives a ratio (how many times faster this machine is than a reference machine), and we need one number that sums them up. The fair way is the geometric mean, : multiply the ratios and take the th root. The second half of the lesson is about power, , which is four simple factors multiplied: how much of the chip switches (), how much charge it holds (), the voltage squared () and how often it switches (). Neither formula is as scary as it looks.
Why not the ordinary average? Take two programs and two machines:
| P1 | P2 | |
|---|---|---|
| Machine A | 2 s | 20 s |
| Machine B | 4 s | 10 s |
Against a reference that takes 4 s and 40 s, A's ratios are and (average ) and B's are and (average ): B wins. Against a reference that takes 8 s and 10 s, A's ratios are and (average ) and B's are and (average ): A wins. The ordinary average lets the choice of reference machine decide the winner, which is absurd.
Why the geometric mean works. Each ratio is . Divide A's geometric mean by B's:
The reference times cancel, so the comparison doesn't depend on the reference at all. In the table, : a tie under any reference, which is honest, since each machine wins one program by a factor of 2. The geometric mean is the right average for ratios because ratios multiply: being 2 times faster and then 0.5 times as fast nets out to even, and the geometric mean of 2 and 0.5 is exactly 1.
Where power comes from. Every clock tick, some of the chip's tiny capacitors charge to voltage and drain again. Charging a capacitance to and draining it uses energy on the order of . A fraction of the capacitance switches per cycle, and there are cycles per second, so the power (energy per second) is
(Some books write ; the just gets folded into .)
Why lowering the voltage saves so much. A transistor switches more slowly at lower voltage, so the clock has to slow down roughly in proportion: . Then
Run at of the voltage and clock: power falls to , about half. The task takes times as long, and energy is power times time, so energy falls to . That's dynamic voltage and frequency scaling, the reason your phone's chip runs slow and cool most of the day and only speeds up when you need it.
A common mistake. It's tempting to treat lower power as lower energy. They aren't the same. Energy is what drains a battery, and , so a setting that halves the power but triples the time uses more energy. Real chips also leak some power just by being on, so finishing fast and shutting off ("race to idle") sometimes beats running slowly.
There's a graph further down that shows power, energy and time as the voltage is turned down.
See it
Worked examples
A machine is , and times faster than a reference machine on three benchmarks. What is its geometric-mean speed ratio?
- 1
Multiply the three ratios: .
A processor has activity factor , switched capacitance nF, supply V and clock GHz. (a) What is its dynamic power? (b) The chip drops to V and GHz. What is the new power? (c) A task needs cycles. How much energy does it use at each setting?
- 1
(a) Write the numbers in base units: F and Hz.
Practice
Type your answer and check it. Solve them all to complete the lesson.
A laptop's speed ratios on three benchmarks are , and . What is the geometric mean?
Why do benchmark suites summarize speed ratios with the geometric mean?
A chip has , nF, V and GHz. What is its dynamic power, in watts?
A processor lowers its voltage by , and its clock rate drops by the same . Its dynamic power falls to what percent of the original?
A phone can run a photo filter in "fast" mode (4 W for 1.5 s) or "efficient" mode (1.5 W for 3.5 s). How many joules does the more energy-efficient mode use?
A program has instructions with CPI on a GHz chip that draws W while it runs. The chip scales voltage and clock rate both down to . How much energy does the program use now, in joules?
On three benchmarks a reference machine takes , and s. Machine A takes , and s; machine B takes , and s. Using geometric means of the speed ratios, how many times faster is A than B? Give 3 decimal places.
The hardest one here. Get it, and you've got this lesson.
A single core runs at full voltage and clock using the chip's whole power budget. The designers replace it with two identical cores sharing the same budget, so each core runs at a lower voltage and a clock that scales with voltage ( per core). A program is parallel. What is its speedup on the two-core design compared with the single fast core? Give 3 decimal places.
Where it's used
Industry benchmark suites report a geometric mean of ratios for exactly the reason derived here. And runs every device you own: phones and laptops change voltage and clock many times a second, data centers pick operating points that minimize energy per request, and the cube law is why chips went multicore around 2005, when raising the clock any further would have made them too hot to cool.