2

On laptops, Intel's "Turbo-Boost" technology can result in undesirably high CPU temperatures and accompanying fan noise and, depending on the model, even in audible non-constant coil whine while using maximum clock rates. Webbrowsing in particular tends to result in frequent clock-rate spikes, with ad-blockers alleviating but not removing the symptoms. Webbrowsing in particular results in undesirable CPU temperature spikes, even though it doesn't really require all that performance.

Setting the maximum CPU speed to 99% in Windows' advanced power plan settings allows effectively disabling Turboboost to avoid this problem.

Sadly it is a sledgegammer-to-crack-a-nut solution. The lowered emissions are relevant for continously running programs (Webbrowser, Office, ...), but the significant impact on processing speed is undesirable for certain short-lived tasks (Compilation, data analysis, ...), where I as a user control when and for how long they are running – and often incur a waiting-time while they do.

Is it somehow possible to find a middle-ground, where programs are barred from using TurboBoost by default, but executables can selectively be allowed access to the full CPU performance?

1
  • 1
    It seems like something that would be a "nice to have" but would actually involve a lot of extra work on implementing and would require a lot of user interaction to set up and use effectively. The only real market is for people where the laptops they've bought are marginal for the tasks and have poor thermal design, few other people are likely to notice or care enough to spend time configuring this "feature"...
    – Mokubai
    Commented Feb 23, 2018 at 11:17

1 Answer 1

0

It is probably impossible to enable Turboboost selectively, as I have asked in the question. However, as a "next best thing", it can be sufficient to use a wrapper that changes powerplans before and after execution of a short-lived command. I have posted it as https://github.com/kbauer/with-high-performance

As of writing the script has this form:

:: -- with-high-performance.cmd
@echo off
if "%~1"=="" (
   echo.
   echo    Usage: %0 COMMAND ...
   echo.
   echo    Execute COMMAND with HighPerformance powerplan.
   echo    Once COMMAND is finished, switch back to Balanced.
   echo.
   echo    For the time being, doesn't support detecting if another
   echo    process is being executed in this panner.
   echo.
   echo    If you need other power plans than the "balanced"
   echo    and "high performance" plans, change the UIDs in the 
   echo    script to a value as obtained by running
   echo.
   echo    ^ ^ ^ ^ POWERCFG /LIST
   echo.
   exit /b 1
)

setlocal
set high=8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
set balanced=381b4222-f694-41f0-9685-ff5bb260df2e
echo %0^> %* >&2
call powercfg.exe -setactive %high%
call %*
set command_errorlevel=%errorlevel%
call powercfg.exe -setactive %balanced%
endlocal
exit /b %command_errorlevel%

Note though that, while the script does correctly switch powerplans, so far I haven't seen any speedup when using pdflatex/latexmk.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .