CPU affinity FPS boost

I’ve got Ryzen 1700 @3.9GHz with SMT disabled, 16GB of 3200MHz DDR4 and R9 480x and I was not happy with the performance of the game even on low settings but recently I tried setting maxResourceThreads in settings file from 1 to 4 and set Steam affinity to use cores 4-7 (hex value F0). This means that all games launched from steam also are set to this affinity.
The result is that the game is a lot smoother than before and I could crank the settings back up.
I made a tiny script to launch steam with the affinity and put it into startup folder. I can share it later if anyone is interested. Maybe this info will be useful to someone.

Yes please share this one i wouldnt mind to try. Do i have to run it every time i launch the game?

I’ve got Ryzen5 1600x at stock frequency, 16GB 3200GHz RAM and find the performance acceptable without any avfefe. I’m running max settings as well.

Mystery :undecided:

And a friend of mine had tried such a script and said it seems like a placebo.

@Darkstalix
I’ll post the details when I get back from work later tonight. You can set it for the game from task manager - this you’d have to do every time you run it but I use the autorun script to avoid doing that.

@Stupid Dragon
Yeah, no idea why it’s the case for me but it really helped. I haven’t really tested yet if it’s the affinity or maxResourceThreads but one or both of them made a huge difference.

Alright, as promised here is how I did it:

  1. Create a text file that contains (replace location as needed)
    C:\Windows\System32\cmd.exe /C start “” /affinity F0 “C:\Program Files (x86)\Steam\Steam.exe”

  2. Rename its extension to .cmd or .bat.
    You can double click the file to start steam or

  3. Open Run (Windows key + R) and enter “shell:startup” (opens the startup folder in win10).

  4. Move the file there to automatically run it on startup.

About the affinity value:
I have 8 logical cores (would be 16 with SMT enabled) which can be represented with 8 bits. If I wanted to enable, let’s say only the 2nd core it would correspond to “00000010” and after converting it from binary to hex it becomes “2”.
I’m using “11110000” -> “F0”.

I’ll try to test later which change actually helped me.

Thanks a lot for the script. Will try.

I did some testing. Left an HD YT video running on 2nd screen and without setting the affinity I got around 70 FPS average running around in Devil’s Crossing.
When I set the affinity I got around 110 average which obviously felt a lot better (got 144Hz main monitor). So for me at least it is not a placebo.

I built my pc five or six years ago, and I have no issues running this game, and cranking the settings up.

This was discussed in several other threads.
Changing the ini file doesn’t seem to do much for most people.
Changing cpu affinity can make a big difference if one of your cores is being maxed out. Personally I just disable core 0, then the tasks seem to be better divided amongst the remaining cores.
If you are using hyperthreading maybe you need to disable 0 and 1, and every other core as well. I am not sure, i’m not a specialist on this topic.

You can use an easy tool for this. For instance Prio. Or any of your choice.

No need to make complicated scripts or Macro’s, or change your steam.

Oh, nice. I’ll try out Prio since GD seems to be the only game affected. Didn’t do any research about such programs :stuck_out_tongue:
Yeah, it does max out core 0 otherwise and I guess that can be the problem.

EDIT: Prio only saves process priority. I’m sure some other programs can save affinity but I’ll stick to my script for now :slight_smile:
Also, I turned SMT back on and set it to logical cores 8-15 (hex FF00), performs just as well.