Page 3 of 4

Re: Exploring the link between C-states and latency

Posted: 21 Aug 2024, 11:29
by nomaddroid
MatrixQW wrote:
21 Aug 2024, 10:04
The purpose of LST is not about discovering latency issues in your system but your own limit of perceiving it.
When I did it, it was very clear to me what limit was easy for me to feel and what was hard but still consistently perceivable.
But let's take C-States as an example. If a PC runs this test at 1000 fps with C-States disabled and the user determines his threshold is 5ms consistent by running several tests and after enabling C-States he starts to notice issues and his results drop to 8ms you could clearly assume it causes latency.

This website used to have useful posts and information about monitors but it got flooded with EMI posts.
After Chief disallowed them, "Input lag Fix" topics started to appear with placebo solutions or wrong information that just give a poor image to BlurBusters in my opinion.
I don't doubt there are a few or some users with genuine latency issues but some people claim that one setting in Windows, monitor or whatever causes latency when in reality does nothing.
Without mentioning names, there is one user that sees/feels latency in almost every hardware/software setting. Don't go this path.
I'm pretty sure if these same people do this LST test on a PC without issues they can't even make it below 6ms, while they are claiming things that are below 1ms, in microseconds, or have no effect at all.
I do agree. I was skeptical before posting on whether or not people really find it useful or worthy. I used to lean more towards competitive games and during then, eventually, my attention has shifted towards frame rates and response times. This post wouldn't exist really if it wasn't for the attention shift (sarcasm). Then, I've started to wonder why is it that the mouse movements feel inconsistent, responsive one day and off the next, why couldn't they be steady and predictable. Surely, there must be a proper reason for this, right? So, I surfed online for answers and as you might have guessed, there were already dozens of posts related to such topic with dozens of random solutions, but none of them really answered thoroughly.

And then later comes this yet another random post, with my own research and tinkering mentioning that C-states is the answer for the long awaited question that I had. The skepticism of my own of what could be merely a placebo, faded away when I observed the behavior is replicable with C-states toggled on or off, at least for me. Only then, I decided to share it, expecting to answer those who noticed the similarity.

After all, the phenomenon mentioned in the post could healthily be ignored and mentally adapted rather than opting to disable a power saving feature. We already know C-states exists for a good reason and it is already in use by Smartphones, Macs, PCs, Steam Deck, probably even by Servers etc., in one form or the other.

Re: Exploring the link between C-states and latency

Posted: 21 Aug 2024, 20:41
by nomaddroid
nomaddroid wrote:
21 Aug 2024, 11:29
I do agree. I was skeptical before posting on whether or not people really find it useful or worthy. I used to lean more towards competitive games and during then, eventually, my attention has shifted towards frame rates and response times. This post wouldn't exist really if it wasn't for the attention shift (sarcasm). Then, I've started to wonder why is it that the mouse movements feel inconsistent, responsive one day and off the next, why couldn't they be steady and predictable. Surely, there must be a proper reason for this, right? So, I surfed online for answers and as you might have guessed, there were already dozens of posts related to such topic with dozens of random solutions, but none of them really answered thoroughly.

And then later comes this yet another random post, with my own research and tinkering mentioning that C-states is the answer for the long awaited question that I had. The skepticism of my own of what could be merely a placebo, faded away when I observed the behavior is replicable with C-states toggled on or off, at least for me. Only then, I decided to share it, expecting to answer those who noticed the similarity.

After all, the phenomenon mentioned in the post could healthily be ignored and mentally adapted rather than opting to disable a power saving feature. We already know C-states exists for a good reason and it is already in use by Smartphones, Macs, PCs, Steam Deck, probably even by Servers etc., in one form or the other.
I forgot to mention to include the jitter. Although subtle, it is an effect as well to the presentation as mentioned in the post.

Re: Exploring the link between C-states and latency

Posted: 21 Aug 2024, 22:03
by nomaddroid
In the end, it is simply a matter of savings from the power bill or make CPU utilize consistent power delivery state.

Re: Exploring the link between C-states and latency

Posted: 24 Aug 2024, 18:22
by unconnected
Slender wrote:
20 Aug 2024, 23:43
nomaddroid wrote:
20 Aug 2024, 22:42
Slender wrote:
20 Aug 2024, 20:19
for some reason i get worse kernel timer latency with c-state off (z790).
im use enable c-state + set c0, it feel better and fix my kernel timer latency.
You can limit to C1 (not C1E) only since C0 locks the CPU frequency to its maximum and disables dynamic frequency scaling. Windows provides settings for idle promotion and demotion thresholds, setting them to 100% limit C-states to C1.
c-state disable - cause higher kernel timer latency
c-state enable + c0 state - not.
Thank you for the solution, my mouse is flawless now!
asus strix z690-e + 13900k

Re: Exploring the link between C-states and latency

Posted: 25 Aug 2024, 01:55
by F1zus
Slender wrote:
20 Aug 2024, 20:19
for some reason i get worse kernel timer latency with c-state off (z790).
im use enable c-state + set c0, it feel better and fix my kernel timer latency.
How do you force c0 state to be enabled?
As far as I know there is only one way - to disable the processor idle state. Other methods are unknown to me.
Fixing the processor frequency through the BIOS also does not force c0 on; without load, the processor quietly goes into c1 state.

Re: Exploring the link between C-states and latency

Posted: 25 Aug 2024, 02:07
by F1zus
Slender wrote:
20 Aug 2024, 23:43
c-state disable - cause higher kernel timer latency
c-state enable + c0 state - not.
Do you mean that "Global C-state" needs to be enabled in the BIOS? (on AMD processors this function is called this) and in the Windows power settings you need to disable the processor idle state (force C0)?
Thus, Windows will not control your processor state, but it will be controlled by the BIOS, or rather the microcode itself inside the processor.

In any case, as far as I know, when you disable the processor idle state in Windows, temperatures increase by 10-20 degrees, as does power consumption.
My amd 5600x consumed 45 watts on the desktop without load, which is quite a lot.

Re: Exploring the link between C-states and latency

Posted: 25 Aug 2024, 02:11
by Slender
F1zus wrote:
25 Aug 2024, 02:07
Slender wrote:
20 Aug 2024, 23:43
c-state disable - cause higher kernel timer latency
c-state enable + c0 state - not.
Do you mean that "Global C-state" needs to be enabled in the BIOS? (on AMD processors this function is called this) and in the Windows power settings you need to disable the processor idle state (force C0)?
Thus, Windows will not control your processor state, but it will be controlled by the BIOS, or rather the microcode itself inside the processor.

In any case, as far as I know, when you disable the processor idle state in Windows, temperatures increase by 10-20 degrees, as does power consumption.
My amd 5600x consumed 45 watts on the desktop without load, which is quite a lot.
i dont know about amd c-state.
i know only z690/z790 disable c-state cause that little kernel timer issue (i measure this with dpclat.exe and latencymon.)
yes, i mean global c-state function.
my old bios is provide to set c0, but new bios with 0x129 can only disable/enable c-state without set c0..c1.etc
also, im use msi fixed clocks it ignore c-state enable function.

Re: Exploring the link between C-states and latency

Posted: 25 Aug 2024, 05:39
by unconnected
Slender wrote:
25 Aug 2024, 02:11

my old bios is provide to set c0, but new bios with 0x129 can only disable/enable c-state without set c0..c1.etc
also, im use msi fixed clocks it ignore c-state enable function.
I'm on 0x129 strix z690, try looking in:
Advanced->CPU configuration->CPU - power management control-> in the botton under acoustic noiose settings

Mines are:
Cpu-states = enabled
Enhance c-states = disabled
Package c state limit = C0/C1

Re: Exploring the link between C-states and latency

Posted: 25 Aug 2024, 05:41
by Slender
unconnected wrote:
25 Aug 2024, 05:39
Slender wrote:
25 Aug 2024, 02:11

my old bios is provide to set c0, but new bios with 0x129 can only disable/enable c-state without set c0..c1.etc
also, im use msi fixed clocks it ignore c-state enable function.
I'm on 0x129 strix z690, try looking in:
Advanced->CPU configuration->CPU - power management control-> in the botton under acoustic noiose settings

Mines are:
Cpu-states = enabled
Enhance c-states = disabled
Package c state limit = C0/C1
you use custom bios?
edit: nevermind, I thought you on msi, asus is free for grub/scewin.

Re: Exploring the link between C-states and latency

Posted: 27 Aug 2024, 12:37
by F1zus
nomaddroid wrote:
21 Aug 2024, 00:16
Slender wrote:
20 Aug 2024, 23:43
nomaddroid wrote:
20 Aug 2024, 22:42
Slender wrote:
20 Aug 2024, 20:19
for some reason i get worse kernel timer latency with c-state off (z790).
im use enable c-state + set c0, it feel better and fix my kernel timer latency.
You can limit to C1 (not C1E) only since C0 locks the CPU frequency to its maximum and disables dynamic frequency scaling. Windows provides settings for idle promotion and demotion thresholds, setting them to 100% limit C-states to C1.
c-state disable - cause higher kernel timer latency
c-state enable + c0 state - not.
Interesting, when disabling idle states from Windows power options, HWiNFO shows limiting to C0 state and locking frequency to the max. When enabling idle states, frequency is scaled normally with C1 state. Also made sure to prevent CPU from entering C6 state using idle threshold setting. Maybe disabling through software is different from disabling through BIOS. Refer to attachements.
Can I configure the Windows power scheme so that the processor goes to 100% in the C0 state during the game?
Currently, some nuclei are in C1 (60%) and some are in C0.
I would like to switch all cores to C0 during the game.