There are a combination of timer settings you have to consider as some may conflict.
Old post: viewtopic.php?f=10&t=8535
Win32 Priority Separation (WPS)
In short WPS manages your processes with three varying attributes, I will explain how it works then show how you can change this.
1. Interval length (long or short)
2. Processor time (varied or fixed)
3. Priority ratio (foreground and background)
If you wish to read more see the PDF source at the bottom of the post.
Further on we will be talking about Hex numbers and binary, since not everyone can't remember Hex to binary conversions I will post this useful link: https://www.aqua-calc.com/convert/numbe ... -to-binary
A WPS setting is made of 6 binary numbers which have two numbers for each attribute.
Interval being the first two, Processor time the second two and Priority the last two. (AABBCC)
Binary numbers that are less than 6 will equal 0, so 1100 = 110000.
Interval length uses 01 for long intervals and 10, 11 and 00 for short intervals.
Processor time uses 10 for fixed intervals and 01, 11 and 00 for variable intervals.
Priority uses 00 for equal and fixed process priority -Overrides Processor time-, 01 for 2:1 ratio priority of foreground tasks to background tasks and 10 or 11 for a 3:1 ratio.
(Navigation context is Windows 11)
If you navigate to Settings > System > About > Advanced System Settings > Advanced > Performance > Advanced.
Under Processor scheduling is a very basic setting of WPS, if you ever wish to revert WPS changes to default you can just select either of the two settings and apply.
The two default options make the following binary codes:
Background services: Hex 18 = 11000
Short interval, Variable time with equal and fixed priority.
Since priority is 00 it overrides the variable time, so even a Hex Binary code of 1c/11100 and 38/111000 are equal to 18/11000.
Programs: Hex 26 = 100110
Short interval, Variable time with a 3:1 ratio to foreground tasks.
Equivelant Hex Binary codes are 13/10011 and 4c/1001100.
To keep this short I will list all the Hex codes, the old post has duplicate binary numbers and any other Hex code will be a variation that equals the same code for reasons as mentioned above.
Code: Select all
2A Hex = Short, Fixed , 3:1 ratio. (101010)
29 Hex = Short, Fixed , 2:1 ratio. (101001)
28 Hex = Short, Fixed , Equal & fixed. (101000)
26 Hex = Short, Variable , 3:1 ratio. (100110)
25 Hex = Short, Variable , 2:1 ratio. (100101)
34 Hex = Long, Fixed, 3:1 ratio. (110100)
32 Hex = Long, Fixed, 2:1 ratio. (110010)
38 Hex = Long, Fixed, Equal & fixed. (111000)
16 Hex = Long, Variable, 3:1 ratio. (010110)
15 Hex = Long, Variable, 2:1 ratio. (010101)
Open your Registry editor and navigate here:
Code: Select all
Computer\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\PriorityControl
Select the Hexadecimal and type in your chosen Hex code like so:
Once done restart your system to apply.
System clocks and system ticks
By default a PC will run on a system clock in order to synchronize processes, at times these clocks will delay/pause in order to maintain a consistent rate which causes stutters.
This is where system ticks can improve performance but these tweaks can be different on a per system basis.
For example HPET can be disabled via driver or in BIOS but not all motherboards have that option in BIOS.
Timers:
Time stamp counter (TSC):
Is a high resolution, low overhead tick timer with a few flaws which can be caused by powersaving, frequency.
However, recent intel CPUs include a constant rate TSC which counts the passage of time rather that the number of CPU clocks. (this removes the need for UsePlatformTick and wont be shown in the bootloader or terminal)
High Precision Event Timer (HPET)
Is a high resolution system timer that uses interrupts in order to maintain a rate of time.
Real Time Clock(RTC) and APCI PMT (PMT)
An outdated timer which can decrease performance.
Timer combinations:
For a modern Intel CPU using a TSC timer should be the best option.
In Device manager, look for the High Precision Event timer and disable the driver.
If you have the option to disable HPET in the BIOS then do so.
Open Terminal (Admin) then input the following commands:
Combination A
bcdedit /set useplatformclock no
bcdedit /set disabledynamictick Yes
bcdedit /set tscsyncpolicy enhanced
Restart your system.
For anything else it requires testing as I do not have an AMD or older Intel system.
Combination B
bcdedit /set useplatformclock false
bcdedit /set tscsyncpolicy legacy
bcdedit /set disabledynamictick no
Combination C
bcdedit /set useplatformclock true
bcdedit /set tscsyncpolicy enhanced
bcdedit /set disabledynamictick yes
Restart system.
If you have desyncing issues then disable useplatformtick with no instead of yes.
If you get increased latency issues/stutters disable the tscsyncpolicy with: bcdedit /deletevalue tscsyncpolicy.
Mix and match these commands to see if they are right for your setup.
Relationship between timers and WPS compatibility
When using both there are some factors to consider.
The command "bcdedit /set disabledynamictick" is a power saving function which when disabled prevents a variable tick and reduces input latency and improves consistency.
So this means you need to avoid using Variable process time in your WPS Hex Binary codes or it can cause BSOD and game crashes underload. (error code 0x22)
If you use long intervals in your Hex Binary codes while using a higher resolution timer you can potentially bottleneck performance/benefit of that tweak with WPS and vice versa.
If you have a good combination of settings for AMD systems post it in the comments to help others.
Sources:
1. https://www.techpowerup.com/forums/atta ... df.163992/ (Win32PrioritySeparation 09/09/2008 PDF)
2. https://sites.google.com/view/melodystw ... et-tsc-pmt (Timer related settings and their relationship with each other 2022)
3. https://en.wikipedia.org/wiki/Time_Stamp_Counter (Time stamp counter Wiki)
4. https://en.wikipedia.org/wiki/High_Prec ... vent_Timer (High Precision Event Timer Wiki)
5. https://en.wikipedia.org/wiki/Real-time_clock (Real Time Clock Wiki)