Jump to content

Test: Setting CPU Affinity


Recommended Posts

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.

 

I have i5-3570K. Thanks for clarifying that. Will try again.

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.

 

No,

0,1

2,3

4,5

6,7

 

Are AMD Modules

 

0, 1

2, 3

 

Are Intel Core w/ HyperThreading (1 and 3 being the HyperThreads)

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

No,

0,1

2,3

4,5

6,7

 

Are AMD Modules

 

0, 1

2, 3

 

Are Intel Core w/ HyperThreading (1 and 3 being the HyperThreads)

 

It's becoming more confusing to me... I have i5-3570K, which does not support hyper-threading, and which has 4 cores: 0, 1, 2, 3. I take it that since there is no hyper-threading, all cores are physical, each core occupies a single die, and it doesn't matter to which cores I set the affinity of DCS?

 

Sorry for my ignorance, and thanks again.

Link to comment
Share on other sites

Set CPU affinity automaticly while game starts .

Add following 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:

(Flag define: 1=Enable, 0=Disable)

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


Edited by L0op8ack
Link to comment
Share on other sites

1100000= 96

 

I think you might mean

 

8 7 6 5 4 3 2 1 physical cores (non HT)

1 1 0 0 0 0 0 0 =192


Edited by Wolf Rider
forgot to carry the y

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

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.

 

Windows already has a profile called "High performance" that sets the CPU to 100%, so I've been using a batch file to switch to this before launching DCS and back to "Balanced" afterwards.

 

I'm not sure if the GUID for the profiles varies on each system but you can find them by going to a command line and typing powercfg -list

 

For myself, I use the following to switch to High Performance:

 

powercfg -s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c

 

I haven't tried messing with Affinity yet though to see if that adds any benefit.

 

EDIT: Another tip is that Radeon Pro can set Affinity for particular games when launching (for DCS World using DCS.exe rather than Launcher.exe), so that's a possible free alternative to Process Lasso for AMD GPU users.


Edited by doveman

Main rig: i5-4670k @4.4Ghz, Asus Z97-A, Scythe Kotetsu HSF, 32GB Kingston Savage 2400Mhz DDR3, 1070ti, Win 10 x64, Samsung Evo 256GB SSD (OS & Data), OCZ 480GB SSD (Games), WD 2TB and WD 3TB HDDs, 1920x1200 Dell U2412M, 1920x1080 Dell P2314T touchscreen

Link to comment
Share on other sites

OK, I tried putting

 

affinity_mask = 24

 

in autoexec.cfg, which if I've calculated correctly should set it to cores 3 & 4 on my Phenom II X4 955. I also only ticked cores 3 & 4 in Radeon Pro for DCS.exe.

 

Neither seemed to work, as Task Manager still showed 99% on Core 1 and very little on the other three. It also made DCS much more stuttery.

 

Something's not right anyway as I'm only getting about 30fps and this drops to 22fps when taking off and flying along (on the KA-50 Georgian Oil War campaign, Mission title is ATO A.02.1), so I'll have to ask for some assistance tweaking in another thread but certainly those affinity tweaks caused stuttering which I don't see without them (running from SSD).

Main rig: i5-4670k @4.4Ghz, Asus Z97-A, Scythe Kotetsu HSF, 32GB Kingston Savage 2400Mhz DDR3, 1070ti, Win 10 x64, Samsung Evo 256GB SSD (OS & Data), OCZ 480GB SSD (Games), WD 2TB and WD 3TB HDDs, 1920x1200 Dell U2412M, 1920x1080 Dell P2314T touchscreen

Link to comment
Share on other sites

OK, I tried putting

 

affinity_mask = 24

 

in autoexec.cfg, which if I've calculated correctly should set it to cores 3 & 4 on my Phenom II X4 955. I also only ticked cores 3 & 4 in Radeon Pro for DCS.exe.

 

Neither seemed to work, as Task Manager still showed 99% on Core 1 and very little on the other three. It also made DCS much more stuttery.

 

Something's not right anyway as I'm only getting about 30fps and this drops to 22fps when taking off and flying along (on the KA-50 Georgian Oil War campaign, Mission title is ATO A.02.1), so I'll have to ask for some assistance tweaking in another thread but certainly those affinity tweaks caused stuttering which I don't see without them (running from SSD).

 

24 = Cores 4 and 5

 

 

 

Honestly, the"ProcessAffinityMask=n" used to work back in the days when 4 Core Processors, complete with non-shared cache and Vista first came out and did work for a certain sim, a sim which was designed from the start as multicore aware. In that case the mask being set to 14 ( Cores 4, 3 and 2 leaving the Op Sys to hog Core 1, was the most effective). Things have changed since... and to be even more honest, people trying the same now with is only people chasing a placebo


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

Command Line Extension on the shortcut wont work as you're applying affinity to the launcher.exe and not DCS.exe

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

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.

 

My Power Profile is Maxed.

 

If you have CoolNQuiet, C1E and C56 States Enabled in your BIOS, your Processor cores will Downclock to 1.4GHz Regardless of Windows Power Settings.

 

And I have all the Windows 7 FX "Fixes" too.

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

  • ED Team

 

And I have all the Windows 7 FX "Fixes" too.

 

Other than the one in this thread are there any other fx fixes ?

 

edit

just did a search and found two patches for fx are there any more ?


Edited by BIGNEWY

smallCATPILOT.PNG.04bbece1b27ff1b2c193b174ec410fc0.PNG

Forum rules - DCS Crashing? Try this first - Cleanup and Repair - Discord BIGNEWY#8703 - Youtube - Patch Status

Windows 11, NVIDIA MSI RTX 3090, Intel® i9-10900K 3.70GHz, 5.30GHz Turbo, Corsair Hydro Series H150i Pro, 64GB DDR @3200, ASUS ROG Strix Z490-F Gaming, HP Reverb G2

Link to comment
Share on other sites

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

 

Using the Autoexec.cfg?

was this sitting under my nose the whole time?

 

 

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)
12 = 010010 (18)

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)
14 = 010100 (20) *Do Not use on AMD FX*
5  = 000101 ( 5) *Do Not use on AMD FX*
A  = 001010 (10)


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)
5 = 0101 ( 5) *Do Not use on AMD FX*


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

Other than the one in this thread are there any other fx fixes ?

 

edit

just did a search and found two patches for fx are there any more ?

 

 

TBH I think they are part of SP1 and stuff, they've been out for a while, I had them installed 2 weeks after I built my System with Bulldozer (8150) at launch.

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

  • ED Team

thanks for the reply, just installed them, and it said they were already installed

smallCATPILOT.PNG.04bbece1b27ff1b2c193b174ec410fc0.PNG

Forum rules - DCS Crashing? Try this first - Cleanup and Repair - Discord BIGNEWY#8703 - Youtube - Patch Status

Windows 11, NVIDIA MSI RTX 3090, Intel® i9-10900K 3.70GHz, 5.30GHz Turbo, Corsair Hydro Series H150i Pro, 64GB DDR @3200, ASUS ROG Strix Z490-F Gaming, HP Reverb G2

Link to comment
Share on other sites

Using the Autoexec.cfg?

was this sitting under my nose the whole time?

 

 

Yes, you are right.

This trick comes with FC2, check FC2 install_dir/config/autoexec.cfg.

 

FC2 and DCSW use 2 cores only so far, one for calculation and the other for audio, they are different tasks for CPU.

You'd better bind these jobs to different main cores, NOT HT cores, or suffering cache miss, which means performance degrade.

 

I setup a 4-core server for FC2 AND DCSW, 2 cores for FC2 and 2 cores for DCSW.

It have run months without problems, except that 'Reconnect to Master' broke DCSW.


Edited by L0op8ack
Link to comment
Share on other sites

Edited my First post with Decimal and other info.

 

Also, other than Keeping Process from bouncing cores, it keeps the Process Addresses the same too :)


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

Yes, you are right. This trick comes with FC2, check FC2 install_dir/config/autoexec.cfg.

 

I setup a 4-core server for FC2 AND DCSW, 2 cores for FC2 and 2 cores for DCSW.

It have run months without problems, except that 'Reconnect to Master' broke DCSW.

 

I remember seeing it at one point, but dont remember where.. lol.

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

thanks for the reply, just installed them, and it said they were already installed

 

they are more Windows Scheduler adjustments than "Power Profile" adjustments anyway.

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

24 = Cores 4 and 5

 

 

 

Honestly, the"ProcessAffinityMask=n" used to work back in the days when 4 Core Processors, complete with non-shared cache and Vista first came out and did work for a certain sim, a sim which was designed from the start as multicore aware. In that case the mask being set to 14 ( Cores 4, 3 and 2 leaving the Op Sys to hog Core 1, was the most effective). Things have changed since... and to be even more honest, people trying the same now with is only people chasing a placebo

 

OK thanks, I'll forget about that trying that then.

Main rig: i5-4670k @4.4Ghz, Asus Z97-A, Scythe Kotetsu HSF, 32GB Kingston Savage 2400Mhz DDR3, 1070ti, Win 10 x64, Samsung Evo 256GB SSD (OS & Data), OCZ 480GB SSD (Games), WD 2TB and WD 3TB HDDs, 1920x1200 Dell U2412M, 1920x1080 Dell P2314T touchscreen

Link to comment
Share on other sites

My Power Profile is Maxed.

 

If you have CoolNQuiet, C1E and C56 States Enabled in your BIOS, your Processor cores will Downclock to 1.4GHz Regardless of Windows Power Settings.

 

And I have all the Windows 7 FX "Fixes" too.

 

You're probably right. I use PhenomMSRTweaker and have Cool'n'Quiet disabled I think, so it stays at 3.5Ghz when I switch to the High Performance profile.

Main rig: i5-4670k @4.4Ghz, Asus Z97-A, Scythe Kotetsu HSF, 32GB Kingston Savage 2400Mhz DDR3, 1070ti, Win 10 x64, Samsung Evo 256GB SSD (OS & Data), OCZ 480GB SSD (Games), WD 2TB and WD 3TB HDDs, 1920x1200 Dell U2412M, 1920x1080 Dell P2314T touchscreen

Link to comment
Share on other sites

*just a bit of clarification...

 

in the real world, we don't recognise "0" as a number, we see 0 as meaning nothing, zip, zilch, zero. Whereas in the computer world "0" is a number.

 

So what we see as 1, 2, 3, 4 etc, the computer sees as 0, 1, 2, 3 etc

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

You're probably right. I use PhenomMSRTweaker and have Cool'n'Quiet disabled I think, so it stays at 3.5Ghz when I switch to the High Performance profile.

 

Most people dont bother with disabling the features,

 

I leave them on to save my Chip's lifetime,

 

I run 5.15 GHz Stable when in use, but when not in use it downclocks to 1.4Ghz and drops the mV back down to sub 1000mV.

 

Saving Heat and Power, and Lifetime of the CPU.

 

*just a bit of clarification...

 

in the real world, we don't recognise "0" as a number, we see 0 as meaning nothing, zip, zilch, zero. Whereas in the computer world "0" is a number.

 

So what we see as 1, 2, 3, 4 etc, the computer sees as 0, 1, 2, 3 etc

 

Correct, Starts with 0.


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

Most people dont bother with disabling the features,

 

I leave them on to save my Chip's lifetime,

 

I run 5.15 GHz Stable when in use, but when not in use it downclocks to 1.4Ghz and drops the mV back down to sub 1000mV.

 

Saving Heat and Power, and Lifetime of the CPU.

 

Yeah, when I'm not gaming the PC is in "Balanced" power mode and PhenomMSRTweaker is set so that idles at 800Mhz @0.9v :)

Main rig: i5-4670k @4.4Ghz, Asus Z97-A, Scythe Kotetsu HSF, 32GB Kingston Savage 2400Mhz DDR3, 1070ti, Win 10 x64, Samsung Evo 256GB SSD (OS & Data), OCZ 480GB SSD (Games), WD 2TB and WD 3TB HDDs, 1920x1200 Dell U2412M, 1920x1080 Dell P2314T touchscreen

Link to comment
Share on other sites

  • Recently Browsing   0 members

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