ThomasKaiser / sbc-bench

Simple benchmark for single board computers
BSD 3-Clause "New" or "Revised" License
675 stars 78 forks source link

`intel_pstate` driver and MaxKHz parameter #95

Open mlincett opened 5 months ago

mlincett commented 5 months ago

It seems that trying to control the maximum clockspeed through the MaxKHz parameter is somewhat ineffective on a platform that uses the intel_pstate scaling driver. An example.

Besides, the /sys/devices/system/cpu/cpufreq/policy?/scaling_available_frequencies property is not exposed by intel_pstate.

Is there a workaround to run the benchmark at a fixed max clockspeed on Intel?

ThomasKaiser commented 5 months ago

Is there a workaround to run the benchmark at a fixed max clockspeed on Intel?

Unfortunately not that I know of.

mlincett commented 5 months ago

I fiddled a bit more.

Running cpupower frequency-set -u $freqKHz before sbc-bench seems effective in limiting the max clockspeed (see attachment) when sbc-bench is run with an appropriate $MaxKHz parameter.

In my case what I tried was cpupower frequency-set -u 1000000 and $MaxKHz=800000 for sbc-bench, I am not sure which of the two values ended up determining the effective clockspeed (measured at ~990 MHz). If sbc-bench is run unconstrained, then the limit set by cpupower is overridden in the CheckCPUCluster() loop.

ThomasKaiser commented 5 months ago

Can you please provide output of the following with that specific setup (800 MHz max cpufreq OPP while running with 1000 MHz in reality)?

grep -r . /sys/devices/system/cpu/*/cpufreq/* ; grep -r . /sys/devices/system/cpu/cpufreq/*
mlincett commented 5 months ago

Can you please provide output of the following with that specific setup (800 MHz max cpufreq OPP while running with 1000 MHz in reality)?

grep -r . /sys/devices/system/cpu/*/cpufreq/* ; grep -r . /sys/devices/system/cpu/cpufreq/*

See attached dump.