I spent the last few days trying to figure out why a Windows Server 2008 R2 running idle results in a 50% cpu usage (8vcpus) on the proxmox server. I found the proxmox wiki page with the performance tweaks and disabled the usbtablet (which helped a little bit) and also the -T8038 Flag for the SQL server running on the VM, which didn't improve anything.
Then I found out that the MDaemon E-Mail server running on the VM set the windows timer resolution down to 1ms and when I stop that service the cpu usage drops to a few % on the host.
I guess there is nothing I can do on the host/KVM side to reduce the performance hit of those 1ms timer interrupts, right?
But I wanted to post how to find out what program set that timer resolution to that low level so others don't have to spend so many hours on it like I did ;-)
Use the "clockres" tool from sysinternals to get the current timer resolution settings:
C:\>Clockres64.exe
Clockres v2.1 - Clock resolution display utility
Copyright (C) 2016 Mark Russinovich
Sysinternals
Maximum timer interval: 15.625 ms
Minimum timer interval: 0.500 ms
Current timer interval: 0.977 ms
Here we can see the timer interval is set to ~1ms.
Then run:
C:\>powercfg -energy duration 5
This will monitor for 5s and then generate a report in html format in the current directory.
In it you can see which programs requested that higher resolution timer (in my case: MDaemon).
(I wanted to add those 2 commands to the performance tweak wiki page, but could not find out how to get an account for the wiki).
Then I found out that the MDaemon E-Mail server running on the VM set the windows timer resolution down to 1ms and when I stop that service the cpu usage drops to a few % on the host.
I guess there is nothing I can do on the host/KVM side to reduce the performance hit of those 1ms timer interrupts, right?
But I wanted to post how to find out what program set that timer resolution to that low level so others don't have to spend so many hours on it like I did ;-)
Use the "clockres" tool from sysinternals to get the current timer resolution settings:
C:\>Clockres64.exe
Clockres v2.1 - Clock resolution display utility
Copyright (C) 2016 Mark Russinovich
Sysinternals
Maximum timer interval: 15.625 ms
Minimum timer interval: 0.500 ms
Current timer interval: 0.977 ms
Here we can see the timer interval is set to ~1ms.
Then run:
C:\>powercfg -energy duration 5
This will monitor for 5s and then generate a report in html format in the current directory.
In it you can see which programs requested that higher resolution timer (in my case: MDaemon).
(I wanted to add those 2 commands to the performance tweak wiki page, but could not find out how to get an account for the wiki).