[PATCH] Preheat CPU in benchtests

Andi Kleen andi@firstfloor.org
Tue Apr 23 22:48:00 GMT 2013


Ondřej Bílka <neleai@seznam.cz> writes:

> Benchmarks now are affected by cpu scaling when initialy run at low
> frequency.
>
> Following benchmark runs nonsensial loop first to ensure that benchmark
> are measured at maximal frequency. This greatly cuts time needed to
> get accurate results.

FWIW it's generally safer to disable frequency scaling explicitely
through sysfs (but that needs root), as the reaction time of the
p-state governour can be unpredictable.

On Intel if you run like this too long Turbo may also stop turboing,
as the temperature increases. I typically disable Turbo for micro
benchmarks (set max pstate to be one less)

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only



More information about the Libc-alpha mailing list