#!/bin/dash # Edit this file for your paths and your processor # # With the intel pstate driver and a i7-2600K processor and turbo on # the min percent is 42 # For a Haswell processor the min percent will be 20 echo "Intel new Pstate Energy loop. Doug Smythies 2014.06.27" COUNTER=42 while [ $COUNTER -lt 101 ]; do echo "$COUNTER" > /sys/devices/system/cpu/intel_pstate/max_perf_pct # force min also # echo "$COUNTER" > /sys/devices/system/cpu/intel_pstate/min_perf_pct # Don't force min also, but set it anyhow, in case I forgot. echo 42 > /sys/devices/system/cpu/intel_pstate/min_perf_pct # Sleep probably not needed. sleep 1 # If higher work / sleep frequencies are used then calibration (done at 5 hertz) # will be off and there will be overruns at min pstate. # It is not that important sudo ./turbostat -S -J ../c/consume1 99.5 5 10 # sudo ./turbostat -S -J ../c/consume1 99.5 200 10 COUNTER=$((COUNTER+2)) done