Jump to content

Test: Setting CPU Affinity


Recommended Posts

For AMD CPUs (More specifically, FX CPUs), (Intel too!).

Setting Process Affinity to use Only 2 Cores/1 Module seems to help with some FPS/Stutter issues,

 

I've personally Set DCS.exe to use Cores 6 and 7 (0-7 Range). and I've noticed a Difference.

 

Main DCS Thread will get an Integer Core, X-Audio Thread will Get It's own integer core. They'll Share FPU Resources of the Module.

 

This will also prevent windows from Bouncing the Process from core to core, which will also fix some stuttering because:

-Most Common/Non Enthusiast Overclocking users still run with CoolNQuiet and C6/C1e States on, so unused cores will throttle down to 1.4~Ghz, if not Park; then when windows moves the Process to that core it takes a instance to spool back up to full speed, causing momentary stuttering.

 

-Keeps Windows from Bouncing the Process to Cores that are already being used for other tasks by Windows.

 

Keeping the Process Confined to 2 Cores Forces those cores to stay at 100% usage and they stay at max speed. Windows will also see they are At Max Usage and not move other processes to those cores to interfere with the DCS.exe Process.

 

This should work with Intel CPU's too, and resolve issues with DCS and Hyperthreading,

(Move DCS.exe To use 2 Physical Cores, so 0/2, 1/3 are HyperThreads).

 

Now, You're not gonna get a Huge increase in FPS, if Any, but you will however notice more responsiveness from the Sim and Your PC when you get into those CPU Intensive moments that normally cause FPS to crash to lower digits, or the Application to crash completely.

 

The Main focus of this is to keep DCS.exe Process from bouncing around Cores,

Which keeps those cores running full speed, and other Processes off those cores, and also keeps the Memory Management Addresses the Same for the Process. (Possibly Less Memory/Access Denied Errors?)

 

 

UPDATE, Apparently We Can set this in the DCS LUAs!:

Set CPU affinity automaticly while game starts .

Add this line to "C:\Users\[YOURNAME]\Saved Games\DCS\Config\autoexec.cfg":

affinity_mask = xxx

 

xxx = cpu bitmask (decimal )

ATTENTION: affinity_mask=0 means all cores, default

 

affinity_mask setting sample:

you have 8 cores(CPU0 - CPU7), you want CPU6 and CPU7 for DCS, bitmask:

CPU 7 6 5 4 3 2 1 0

Flag 1 1 0 0 0 0 0 0 (binary) = 0xC0 (hexadecimal) = 192 (decimal )

 

so

affinity_mask=192

 

Chart:

Using Hex (Decimal in () ):
1=Enable, 0=Disable.

For 8 Cores, AMD Modules
( 7,6,5,4,3,2,1,0 ), 1=Enable, 0=Disable.
C0 = 11000000 (192)
30 = 00110000 (48)
C  = 00001100 (12)
3  = 00000011 (3)

For 6 Core (No HT)
(5,4,3,2,1,0)
30 = 110000 (48)
c  = 001100 (12)
3  = 000011 ( 3)
21 = 100001 (33) *Do Not use on AMD FX*
12 = 010010 (18) *Do Not use on AMD FX*

For 6 Core (w/ HT) (1 set uses HT Cores 1 Uses Main Core)
(5,4,3,2,1,0) (0,2,4 are Primary Threads, 1,3,5 are Secondary)
28 = 101000 (40) *Do Not use on AMD FX*
14 = 010100 (20) *Do Not use on AMD FX*
5  = 000101 ( 5) *Do Not use on AMD FX* 
A  = 001010 (10) *Do Not use on AMD FX*


For 4 Core (no HT)
(3,2,1,0)
C = 1100 (12)
3 = 0011 ( 3)
9 = 1001 ( 9) *Do Not use on AMD FX*
6 = 0110 ( 6) *Do Not use on AMD FX*

For 4 Core w/ HT (1 set uses HT Cores 1 Uses Main Core)
(3,2,1,0) (0,2 Are Primary, 1,3 are Secondary)
A = 1010 (10) *Do Not use on AMD FX*
5 = 0101 ( 5) *Do Not use on AMD FX*

autoexec.cfg


Edited by SkateZilla

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2),

ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9)

3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs

Link to comment
Share on other sites

Hey Skatezilla, check out Process Lasso, http://bitsum.com/processlasso/

(I'm not associated with it in anyway besides being a user. )

I started using it a few months ago and really have noticed a difference. Neat thing is that you can adjust all affinity, priority, etc, settings and it remembers them every time you run that program. Also has a dedicated gaming mode per application to give it maximum utilization.

I keep my face tracking and other things separated from the sim, you could even make it so that only the sim is running on 2 cores but I've never tried going that far with it yet.



Win 10 64 Pro, MSI Z390 I7-9700K @5ghz Kraken Z63, 32Gb Corsair Dominator, MSI RTX-2070, 1TB NVME 2TB SSD's, TM Warthog, Pro Rudders, OpenTrack w/ IR Clip

Link to comment
Share on other sites

Hey Skatezilla, check out Process Lasso, http://bitsum.com/processlasso/

(I'm not associated with it in anyway besides being a user. )

I started using it a few months ago and really have noticed a difference. Neat thing is that you can adjust all affinity, priority, etc, settings and it remembers them every time you run that program. Also has a dedicated gaming mode per application to give it maximum utilization.

I keep my face tracking and other things separated from the sim, you could even make it so that only the sim is running on 2 cores but I've never tried going that far with it yet.

 

 

I'll Give it a Looksie, Right now I have Command Lines Set on my DCS Shortcut to limit to Specific Cores, the the Hex Code changes with CPU Core Amounts, So what works for my will only work on other 8 Core AMD CPUs, I'll have to research and post the Hex Codes for 6 and 4 Core Processors.

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2),

ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9)

3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs

Link to comment
Share on other sites

This also affects older Intel Core2Quads. My Q9450 does stuff faster on a pair of cores on the same dye, otherwise data has to traverse the FSB. The performance increase for using 4 cores was not proportional to 2 cores on the same dye. Old school tech :megalol:


Edited by camsr
Link to comment
Share on other sites

Hey Skatezilla, check out Process Lasso, http://bitsum.com/processlasso/

(I'm not associated with it in anyway besides being a user. )

I started using it a few months ago and really have noticed a difference. Neat thing is that you can adjust all affinity, priority, etc, settings and it remembers them every time you run that program. Also has a dedicated gaming mode per application to give it maximum utilization.

I keep my face tracking and other things separated from the sim, you could even make it so that only the sim is running on 2 cores but I've never tried going that far with it yet.

If you use the dedicated gaming mode is it necessary to manually tweak the other settings as well or will that be enough to maximize hardware usage?

Link to comment
Share on other sites

If you use the dedicated gaming mode is it necessary to manually tweak the other settings as well or will that be enough to maximize hardware usage?

 

If you allow gaming mode it should allow the chosen app to maximize CPU usage. No throttling basically, even if the program wants 100% utilization. But, the program can still bounce around cores as Skatezilla pointed out unless you lock it to certain cores.

 

The way I have mine set up, I5 4670k, is DCS on cores 3 & 4 with high priority and gaming mode on, facetracking on 1-2, logitech gaming on 1-2, and so on. Most of the OS stuff seems to run on 1-2.

I'm still playing with it to see if any further improvement can be had but there's a lot of stuff that runs no matter what you do it seems.


Edited by txmtb



Win 10 64 Pro, MSI Z390 I7-9700K @5ghz Kraken Z63, 32Gb Corsair Dominator, MSI RTX-2070, 1TB NVME 2TB SSD's, TM Warthog, Pro Rudders, OpenTrack w/ IR Clip

Link to comment
Share on other sites

This is normally what it looks like while running a mission, in this case the TNN from Hoggit while flying over the easy range.

Gh75h0u.jpg



Win 10 64 Pro, MSI Z390 I7-9700K @5ghz Kraken Z63, 32Gb Corsair Dominator, MSI RTX-2070, 1TB NVME 2TB SSD's, TM Warthog, Pro Rudders, OpenTrack w/ IR Clip

Link to comment
Share on other sites

I just use Task manager, i think the command addition to the shortcut only applies to the launcher.exe,

 

setting dcs.exe in the taskmanager works fine though.

 

I had some issues with ProcessLasso and some of my software/equipment, had to uninstall it.

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2),

ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9)

3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs

Link to comment
Share on other sites

I just use Task manager, i think the command addition to the shortcut only applies to the launcher.exe,

 

 

Indeed it does then. This is a bugger about Windows not having any kind of preset functionality. Although ProcAff.exe did sucessfully change the affinitys while launched, I had some problems with input devices after that. I am going to look into it more. I don't know if Windows will assign the same ProcID for every app launch, so there again is another shortcoming.

Link to comment
Share on other sites

Just a side note:

 

setting cpu/core-affinity has negative impact on thermal loading (normally OS takes care of it by moving process from one core to the other). So if you do this, at least assing DCS to the core which is cooled the most effectively. As you can see on

, on fully-loaded cpu differences can be quite signifficant, from 63 up to 96 degree celsius...
  • Like 1
Link to comment
Share on other sites

Just a side note:

 

setting cpu/core-affinity has negative impact on thermal loading (normally OS takes care of it by moving process from one core to the other). So if you do this, at least assing DCS to the core which is cooled the most effectively. As you can see on

, on fully-loaded cpu differences can be quite signifficant, from 63 up to 96 degree celsius...

 

I have read before about CPU dyes exhibiting unequal temperatures under equal load, thanks for the heads-up.

 

Windows doesn't manage core temps by moving apps into other cores AFAIK, it just happens by shuffling over all of them. I don't think it has the necessary software to poll temps.

Link to comment
Share on other sites

This is normally what it looks like while running a mission, in this case the TNN from Hoggit while flying over the easy range.

Gh75h0u.jpg

 

 

Try not to run DCS through the VirtuMVP... DCS doesn't like it, it causes all sorts of slowdowns/ stutters and general sluggishness

 

 

The idea of Core Parking is when Core 0 reaches 60% of use Core 1 kicks in. When Core 1 reaches 60% of use, Core 2 would kick in, etc, etc so, if the last Core for instance, isn't being used, it is "parked" and idling... just turn Core Parking off (registry key value) and all Cores run as one. (some BIOS on newer machines have the last 2 (on a 4 Core) for indicidual speed control for each core or the ability to run all cores as one. Sometimes the last two cores are set at a slightly lower speed if running in turbo boost/ speedstep)


Edited by Wolf Rider

City Hall is easier to fight, than a boys' club - an observation :P

"Resort is had to ridicule only when reason is against us." - Jefferson

"Give a group of potheads a bunch of weed and nothing to smoke out of, and they'll quickly turn into engineers... its simply amazing."

EVGA X99 FTW, EVGA GTX980Ti FTW, i7 5930K, 16Gb Corsair Dominator 2666Hz, Windows 7 Ultimate 64Bit, Intel 520 SSD x 2, Samsung PX2370 monitor and all the other toys

-

"I am a leaf on the wind, watch how I soar"

Link to comment
Share on other sites

I play on an aging workstation (dual xeon E5420's @ 2.5 GHz), after playing around with the affinity and priority settings, I seem to get the best results when I use task manager to set the DCS.exe's affinity to all 4 cores on the 2nd CPU (cpu's 4-7 in task manager) and then set priority to realtime. I only gained a few FPS, but most beneficial was an overall increase in smoothness. It looks like some of the textures flash black on their first load (including LOD changes), but they aren't causing any stutter, so I don't mind too much.

 

For some reason, setting affinity to 2 cores caused a fair bit of stutter whenever a sound or texture was loading, on any combination of cores or priority settings.

 

I'll have to check out some of the apps mentioned in this thread so I can do all this tuning automagically. :)

i5-4670K@4.5GHz / 16 GB RAM / SSD / GTX1080

Rift CV1 / G-seat / modded FFB HOTAS

Link to comment
Share on other sites

I am baffled - here are my results obtained by allowing the Su-25T to fly by itself in the same simple mission. FPS measured by FRAPS

 

Default settings:

Avg: 65.500 - Min: 60 - Max: 71

 

Affinity set to one CPU module (two cores):

Avg: 60.283 - Min: 56 - Max: 68

 

Default settings, Realtime priority for dcs.exe:

Avg: 58.000 - Min: 53 - Max: 62

 

Affinity set to one CPU module (two cores), Realtime priority for dcs.exe::shocking:

Avg: 64.150 - Min: 58 - Max: 69


Edited by Gloom Demon

AMD Ryzen 3600, Biostar Racing B850GT3, AMD Rx 580 8Gb, 16384 DDR4 2900, Hitachi 7K3000 2Tb, Samsung SM961 256Gb SSD, Thrustmaster T.Flight HOTAS X, Samsung S24F350 24'

Link to comment
Share on other sites

I dont see a gain in FPS, Avg or Max.

I do however notice the Sim runs a lot smoother, specifically in High CPU Load situations.

 

 

As for Thermals... That's what the IHS is for, if 1 or 2 cores get warm, the heatspreader will spread the heat to the surface of the Heatsink.

 

My CPU doesnt break 30^C, Even in the summer :). tjMAX for my chip is 64^C. Which is 34 Degree's Headroom.

 

Individual Core temps idle 3 or 4 ^C lower than the CPU Temp, and about 10 degrees lower than the socket temp.

 

DCS When limited to 2 cores wont cause any type of thermal meltdown. Even in missions, DCS uses less than 1/3 of the power I use when Running Prime/OCCT on a single core.

 

As for "Other"/Synthetic tests, Locking Cinebench to a Single Core,

my FX8350 Scores Consistently better than when I let windows bounce it around in the single core test .

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2),

ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9)

3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs

Link to comment
Share on other sites

Just wanna address the temp monitoring thing, it has been PROVEN that using temp monitoring and/or motherboard power saving features causes what is known as "DPC latency" spikes, which wreaks havoc on audio software. IT could possibly do the same to DCS. If you want to try to correlate DPC latency events to stutters in DCS, there is a program called DPC Latency Monitor that graphs it.

Link to comment
Share on other sites

I tried to set the cpu affinity of DCS to two cores (1 and 3). I didn't look at FPS, but the sound actually stuttered quite a few times. Also, when I tried to set the priority to real-time, it says that it can't b done. Instead, it was set to high.

 

Any idea? Thanks.

 

Using taskmanager or process lasso?

 

I set cores next to each other, Intel should be spaced so they dont end up on Hyperthread cores.

 

ProcessLasso interfered with some of my stuff and kept forcing DCS to a lower priority which caused audio stutters and stuff on my system, removed it and went back to using task manager and everything was fine again.,

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2),

ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9)

3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs

Link to comment
Share on other sites

Keeping the Process Confined to 2 Cores Forces those cores to stay at 100% usage and they stay at max speed.

 

You can force your CPU clock to max speed anytime by accessing advanced options of your power management profile in Windows and setting minimal CPU state to 100% (the default is 5%). This way Windows will keep your CPU clock at maximum. I think it's a good idea to make new MAX profile and use it while flying. Then when you're done with DCS you can switch back to your normal profile and again allow Windows to throttle down when CPU power is not needed.

  • Like 1

[sIGPIC][/sIGPIC]

 

Gigabyte Aorus Z390 Elite, Intel i9 9900K, Fractal Design Kelvin S36, Zotac GTX 1070 8GB AMP Extreme, 32GB DDR4 HyperX CL15 Predator Series @ 3000 MHz, Kingston SSD 240GB (OS), Samsung 970 EVO 1TB M.2 NVMe (sim), Fractal Design Define R5 Black Window, EVGA SuperNOVA 750 G2, Win 10 Home x64, Thrustmaster Warthog HOTAS, Saitek Pro Flight Rudder Pedals, Thrustmaster MFD Cougar Pack, TrackIR (DelanClip), 3x 27" BenQ EW2740L, Oculus Rift S

 

Link to comment
Share on other sites

http://support.microsoft.com/kb/2645594

 

AMD FX

AMD Opteron 4200/4300

AMD Opteron 6200/6300

AMD Opteron Bulldozer

City Hall is easier to fight, than a boys' club - an observation :P

"Resort is had to ridicule only when reason is against us." - Jefferson

"Give a group of potheads a bunch of weed and nothing to smoke out of, and they'll quickly turn into engineers... its simply amazing."

EVGA X99 FTW, EVGA GTX980Ti FTW, i7 5930K, 16Gb Corsair Dominator 2666Hz, Windows 7 Ultimate 64Bit, Intel 520 SSD x 2, Samsung PX2370 monitor and all the other toys

-

"I am a leaf on the wind, watch how I soar"

Link to comment
Share on other sites

Thanks for the quick reply @SkateZilla. I was doing it in task manager... I set it to cores 1 and 3 since I read in this thread that 1,3 or 0,2 are on the same die. Isn't that the case?

 

Thanks.

 

What processor do you have? That was only an issue with older Core2Quads, and I actually edited that part out because I did some further testing and I think my first conclusions were wrong... Core2Quad is like a dual-dual-core CPU. It's a very hard subject to get info on. Maybe some overclocker people know it though. If large memory transfer is going between dyes, then there will be a slowdown. I retested yesterday using an audio program (FL studio) with a special load scenario of transfering an audio stream through threads (in this case different tracks on the mixer via sidechaining) and 0,1 and 2,3 were faster. I think this is the way it works, hopefully, to avoid further confusion.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...