CPU, GPU AND RAM

Aligning energy-meter readings with a GPU test window

In this article
THE QUICK TAKE

Compare GPU-test energy only after aligning the workload window with meter boundaries.

Compare GPU-test energy only after aligning the workload window with meter boundaries. Client request start, GPU execution start, and counter timestamps can refer to different events and clocks. Preserve their relationship before calculating joules per task. Otherwise warmup or idle can enter one series and disappear from another, creating apparent savings without any real change in the evaluated computation or its complete execution cost.

Define the workload window

Choose whether loading, warmup, queueing, inference, or completion of every response belongs in the experiment. Different questions permit different boundaries, but compared series need matching ones. Preserve explicit workload markers and request-set identity. Do not label both results identically when one includes startup and another begins afterward. Define whether useful work means submitted requests or successfully completed tasks meeting requirements. That choice changes both the denominator and the meaning of the final energy metric, independently of meter precision.

Separate clock domains

The Linux clock_gettime manual describes realtime and monotonic properties. Measure local durations with an appropriate clock while preserving a wall-time relationship for external meters. Matching date formats do not synchronize devices. Record clock source, possible offset, and alignment precision. With slowly updated sources, reading time need not equal the end of an internal measurement window. Retain that uncertainty rather than concealing it through additional decimal places. Timestamp precision and actual timing accuracy are different properties of the observation.

Record interval boundaries

Create workload-start, first-energy-read, workload-complete, and final-energy-read rows. Include clock source, event meaning, and timing uncertainty. This is a recording design without fabricated timestamps. Add interval coverage and alignment method for an external AC meter. If reads surround the task more broadly, identify included idle time. Do not remove it using an unexplained average baseline: subtraction introduces an estimation model rather than directly measuring the task’s isolated energy. Preserve raw data so that another method can be evaluated later.

Validate cumulative counters

The powercap documentation describes energy counters and maximum ranges for applicable zones. Establish units, scope, wrap behavior, and lifecycle before subtraction. Restarts and source changes are not negative consumption. Handle wrapping according to the selected interface and retain sufficient observation coverage. CPU-zone rules do not automatically apply to GPUs or external meters. Even a correctly calculated delta remains energy for one domain over its interval, not necessarily the whole server or an individually identified request.

Accept comparable measurements

Keep raw readings, workload markers, clock map, units, and integration or delta calculation. State missing samples and coverage boundaries. Repeat the series to check alignment stability. If precision is inadequate for a short workload, use a longer matched series or a suitable meter instead of inventing observations. The result should show which energy covers the accepted interval and where uncertainty remains. This permits operating-point comparisons without silently changing boundaries or claiming savings when two reports actually include different loading, waiting, generation, or post-completion idle phases.

Energy per LLM request: measuring without false precision; Reconcile a Hosting Invoice with GPU Telemetry.

← All articles