Do not increase system timer resolution on Windows
GitLab runner increases system timer resolution to 1ms which has negative impact on system performance and power consumption (battery life) according to Microsoft.
Steps to reproduce
Run the runner on Windows.
Runner sets timer resolution to 1ms.
Runner should keep the default value to ensure maximum compatibility, system performance and reduced (optimal) power consumption.
Relevant logs and/or screenshots
Following log snippet was generated by
Platform Timer Resolution:Platform Timer Resolution
The default platform timer resolution is 15.6ms (15625000ns) and should be used whenever the system is idle. If the timer resolution is increased, processor power management technologies may not be effective. The timer resolution may be increased due to multimedia playback or graphical animations.
Current Timer Resolution (100ns units): 10007
Maximum Timer Period (100ns units): 156250
Platform Timer Resolution:Outstanding Timer Request A program or service has requested a timer resolution smaller than the platform maximum timer resolution. Requested Period 10000
Requesting Process ID 6436
Requesting Process Path \Device\HarddiskVolume6\GitLab-Runner\gitlab-runner.exe
I tested on Windows 7 and 10 but any Windows version should be affected.
Used GitLab Runner version
Version: 10.0.1 Git revision: e991d1b4 Git branch: 10-0-stable GO version: go1.8.3 Built: Wed, 27 Sep 2017 21:46:09 +0000 OS/Arch: windows/amd64