# Lower power, more energy?

For the same completed work, lower average power can still use more energy
when execution lasts longer. This independent worked example accompanies
[PARAID](https://hesela.dev/terms/paraid/); it is not a PARAID simulator or
a reproduction of the FAST 2007 measurements.

## Method

All inputs below are synthetic. Each alternative completes the same assumed
sequence of 100 requests. Phases are sequential and nonoverlapping; phase
power is a time average. Energy is the sum of watts multiplied by seconds.
The comparison ends at completion in each run, so durations may differ.
It does not add an idle tail to make a shared fixed horizon.

| Scenario            | Sequential phases                  | Duration |  Energy | Energy per request |
| ------------------- | ---------------------------------- | -------: | ------: | -----------------: |
| Baseline            | 50 W for 100 s                     |    100 s | 5,000 J |               50 J |
| Equal duration      | 40 W for 100 s                     |    100 s | 4,000 J |               40 J |
| Longer completion   | 40 W for 150 s                     |    150 s | 6,000 J |               60 J |
| Transition included | 75 W for 20 s, then 40 W for 100 s |    120 s | 5,500 J |               55 J |

The longer-completion case lowers average power by 20% but increases energy
by 20%. The transition case averages about 45.8 W, also below the baseline,
yet consumes 10% more energy. Omitting its transition would falsely report
a 20% energy saving.

The denominator for the saving is baseline energy: 1 - candidate J / baseline J.
The mean-power comparison uses each run's own elapsed duration. The program
requires equal completed request counts, but cannot establish equivalent
request sizes, contents, durability or success semantics from a count alone.
Those equivalences are assumptions of this example, not measurements.

## Reproduce

Use Node.js with its built-in test runner. No external packages or randomness.

```sh
node model.mjs --check
node --test model.test.mjs
```

[Model](./model.mjs), [tests](./model.test.mjs), [machine-readable results](./results.json).
The JSON is generated by `node model.mjs --write` and checked against the model.
Tests cover time/power units, phase partitioning, transitions, invalid inputs,
zero-power cases, unequal work and arithmetic overflow.

## Interpretation

A measured comparison must declare the electrical boundary, completion rule,
full interval and baseline. Include controller, host or cooling energy only
when that is the chosen boundary for both alternatives. A disk-only ledger
does not establish a whole-system saving. Average power does not determine
per-request latency, recovery time or field reliability.

For a fixed common horizon including post-completion idle time, use an
explicit idle phase in both alternatives. Do not substitute that question
silently for energy to completion. See also
[power-state break-even accounting](https://hesela.dev/terms/power-state-break-even-time/).

## Sources and scope

- [Weddle et al., FAST 2007](https://www.usenix.org/legacy/event/fast07/tech/full_papers/weddle/weddle_html/index.html), especially sections 5-8 and 10.
- [Lee, Lee and Noh, HotPower 2008](https://static.usenix.org/events/hotpower08/tech/full_papers/lee/lee_html/), especially section 4.2.

These sources motivate the comparison discipline; no number in this table
is copied from their hardware experiments. This exact finite calculation has
no sampling confidence interval and predicts no energy saving for a device.
Created 2026-11-29.
