Author Topic: Windows Thread Scheduling AHIII  (Read 455 times)

Offline Pudgie

  • Silver Member
  • ****
  • Posts: 1280
Windows Thread Scheduling AHIII
« on: August 28, 2017, 03:19:24 PM »
Hi All,

I ran a test to show the difference in how Windows schedules game threads to be processed vs me using CPU priority\affinity to "assist" Windows to schedule game threads to be processed then snipped the corresponding MSI AB graphs of each scenario for comparison.

Backdrop:

Ran AHIII vers 3.02 Patch 7 under Dx11 in offline (this will remove the Internet\Intel NIC & all the quirks associated to give a more consistent result) from the same default airfield in my trusty Spit Mk IX shooting down drones until I ran out of ammo then landed & exited out the game. This keeps the game in system mem w\o paging out (I have 16Gb of fast CL14 3200 DDR4 mem in dual channel configuration) so the game can run at it's best AND keep all the revalent data at a level of consistentcy w\ all in-game & graphics driver settings the same for both runs. Both runs are using Win 10's Game Mode as well. The 1st run is w\ Windows 10 using Game Mode & scheduling AHIII game threads on it's own using the std AHIII created shortcut, the 2nd run is w\ Win 10 using Game Mode but w\ me instructing Win 10 to schedule AHIII game threads using CPU priority High setting (this tells Windows to assign AHIII game threads a higher percentage of CPU processing time over all other running processes except the OS itself) and CPU affinity (instructs Windows to assign all AHIII game threads to be processed on CPU cores 5, 6, 7, & 8) thru a Windows CMD-created shortcut for AHIII that sets all this up when AHIII is executed using this shortcut.

Results are provided below....................

Please note the GPU frametime graph lines between the 2 graphs in particular along w\ the overall graph line contours between the 2 snippets.

What you're seeing is the result of the thread scheduling abilities of Windows itself vs me scheduling the game threads to alleviate the scheduling inefficiencies of Windows when it is scheduling threads across a multi-core CPU that has >4 physical CPU cores on die, especially when you can move the game threads away from CPU core 1 to stop the CPU core contention thus latency derived from it as Windows will try to assign every running thread to this core if it can & will only assign threads to other CPU cores when this start happening which causes a LOT of CPU core contention & latency to occur which slows down CPU thruput to the GPU. This is the major issue w\ using multi-core CPU's running games & 1 of the MAIN reasons why CPU clock speed is so important for games.... Also this shows that CPU thruput is a lot more important for optimal GPU performance than is usually touched upon......

If Windows was more efficient in thread allocation assignment of running processes across these type of CPU's to effectively USE all of the available CPU cores & move all game threads away from the 1st CPU core then the gaming performance would be much better than what it is now.

The in-game performance results are very visible between these 2 runs.......1 shows mini-stutters, the other is smooth as glass....as the graphs also show.

 :salute

Win 10 Home 64, AMD Ryzen 9 3900X, MSI MPG X570 Gaming Plus, GSkill FlareX 32Gb DDR4 3200 4x8Gb, XFX Radeon RX 6900X 16Gb, Samsung 950 Pro 512Gb NVMe PCI-E SSD (boot), Samsung 850 Pro 128Gb SATA SSD (pagefile), Creative SoundBlaster X7 DAC-AMP, Intel LAN, SeaSonic PRIME Gold 850W, all CLWC'd