2

I'm running some latency sensitive applications on Windows and am seeing some slight spikes at times.

Looking at the Windows performance monitor, I see the processors spending a majority of their time in the C3 idle state.

Is there some way to limit the max idle state to C1 (mwait or equivalent)? On Linux I could use a kernel command line argument (intel_idle.max_cstate=1) or /dev/cpu_dma_latency, but I can't find an equivalent for Windows.

I figured out how to disable CPU idle entirely (keep it at C0) using the power profile APIs, but that's not ideal as it generates unneeded heat and breaks the CPU usage reporting in Task Manager.

I'm running 1809 LTSC on an Intel i7-3770. I was not able to find an option to control this in the BIOS.

Matt
  • 131
  • 1
  • 5

1 Answers1

1

Found it thanks to the list here:

powercfg /SETACVALUEINDEX 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c SUB_PROCESSOR IDLESTATEMAX 1
powercfg /setactive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c

Where the GUID is your current active power profile (High Performance in my case), found by running powercfg /list.

You can also run powercfg /Qh to get a list of all hidden power config setting for your current version. The IDLEDISABLE option is the one that disables idle entirely.

In my case limiting to C1 seems to actually make things worse, but at least I know.

Matt
  • 131
  • 1
  • 5
  • 1
    C1 isn't actually C1 by default, but C1E. And that still has some very [tangible](https://github.com/torvalds/linux/blob/v6.0/drivers/idle/intel_idle.c#L424) exit latency. Are you still getting worse results than the bloated ass C0 even if you disable it (MSR_POWER_CTL[1]=0, or just toggle the corresponding checkbox in ThrottleStop)? Also.. uh, did `IDLESTATEMAX` ever do anything like *at all* for you? I have read it may be broken at least in the latest W10 versions. – mirh Dec 10 '22 at 17:01