[Tool] Core Switcher - Force GD to use all cores equally!

What’s your GPU (mines a GTX 960)? For me I was able to increase my graphical settings a bit higher and have the game run smoother overall. I still have to consider the limits of my GPU tho in reaction to intensive areas/situations in the game. I get far less hitches when rotating the camera.

And who knows… :smile: …maybe it’s placebo/or some crazy visual bug and the Resource Monitor is lying to us about what’s really happening. The thought has crossed my mind!

If so then I wonder how the whole “Core 0” thing became a thing. Seems like it’s been going on for awhile… and in other games.
https://www.google.com/search?q=toggling+core+0+for+performance

I am using Radeon Rx570 OC 4GB. The specs is mediocre but still GD looks great and is working quite smooth, much better than in the vanilla days. I am not experiencing micro stuttering these days anymore. I am also playing at almost max settings and in UHD resolution thanks to virtual resolution from GPU application.

Didn’t work either.

Right now, it’s an inconvenience but i can make it work without the bash script file.

Yeah GD has never ran “bad” for me and I’m pretty good at tweaking my system which helps.

Ah sorry :sleepy: I might go ahead and install Manjaro later on tonight here so I can actually do some direct fiddling. So perhaps later tonight or tomorrow sometime I might be able to get you one that actually works.

1 Like

@H_T_C K got Manjaro up and running now and getting GD downloaded. We’ll see what I can make happen here shortly.

1 Like

@H_T_C

lol man. Figured it out. Took a minute and you won’t believe it but the primary issue with why it wasn’t recognizing the commands in the script was because it was wrote in Windows and then migrated to Linux. I think there is some flags/commands I can put in the script to account for that but the easiest way was to simply create a blank file in Linux and copy/pasta what I had already wrote in the Windows version into it.



Before:


After:



Script that should NOW work for you!:
linux_6core.zip (230 Bytes)

1 Like

I’ve been setting the core affinity for quite some time. How would using your Core Switcher interact with that if both were used at once? This sounds like the exact opposite, making me wonder why I was even doing the other in the first place.

It most certainly does: thank you very much.

1 Like

I assume you mean the one guys tool that does it? I honestly don’t know how it would interact. I can only imagine one of two scenarios would happen. Either mine would override it and they’d go on their merry ways or his would attempt to keep it on the 2 cores.

Would probably be best tho to run one or the other.

Good. That’s what I hoped to hear. I’ll add it up in the OP.

Updated the OP up top with extra information for configuring Linux to use custom global keyboard shortcuts to launch the script files.

I also just gotta say - I honestly think that the Proton Linux version has perhaps surpassed GD on Windows in performance quality overall. Them Proton guys have been doing a pretty damned good job compared to when it initially went live. I’ll have to play it in Linux a good bit more tho to get a real feel for it but right now it feels pretty nice and one thing I always liked about Linux… screen and sound quality overall has always just felt superior to Windows defaults.

Just somethings I’ve noticed.

Wow this made a significant boost to my smoothness (I have a i5-7600k overclocked to 5 GHz paired to a GTX 970). I had previously used Lasso’s CPU affinity program and this spread the CPU workload over 2 cores instead of 1. However, your method consistently spreads it over all 4 cores and my average CPU usage is less than 30% now. More importantly, none of my cores appears to hit over 90% usage at any time and I’m no longer CPU bottlenecked.

The usual areas of stuttering like Fort Ikon and Devil’s Crossing are perfectly fluid now. I’ll play for a bit more and report in my longer test observations.

BTW, I am using RivaTuner to get real-time CPU usage on every core.

1 Like

seems not to work on my CPU (i5-8400)

using the 6 core switcher you provided, it seems to stick to core 3

Ah stinky… I would like to note here for any that find that this method isn’t working with their CPU - don’t be afraid to test (manually) different core combinations. You might get lucky and discover something that does improve the situation for you. I wish I knew what was different about CPU’s that display different behavior - hopefully I find some information eventually that sheds some light on it and if there is a way to make it behave the “other way”.

If you do discover an alternate combination that you like go ahead and let me know if you would like me to make you a custom hotkey tool to do it for you. Now that I think of it I should probably put a mention of this up in the OP.

It is actually very easy and quick for me to whip up new ones and I don’t mind doing it at all - my mission has always been to help people get GD running the best that it can on their systems.

Hey powbam - this is probably sacrilege to ask here but would this program work for POE or other games - or is it specific to GD ? The post has only just popped up now so I’ve not read it all but it seems this utility would be very useful period - not just in GD :+1::thinking:

The functionality itself of changing “core affinity” would surely work if you did it manually - my little programs tho would not work for anything other than Grim Dawn as it is looking for this specific process to enact changes upon.

It’s pretty simple to do tho as what my programs are doing is merely passing calls into PowerShell to change the core affinity.



This is how you do it:

Basically you need to know the commands and you further need to know the “mask affinity” of your CPU. To determine the “mask affinity” quickly I use this tool so I can determine how to set things for CPU’s other than my own…

http://store.fsxtimes.com/cal-cam.php



So, to determine the current affinity process for any running process on your system is easy:

Example for the “steam” process:
GET-PROCESS steam | Select-Object ProcessorAffinity

Which gives me:

image

My CPU is a quad-core and the “mask-affinity” for a quad core (all cores) is 15. To disable Core 0 you need to change the core affinity for the process to 14. To do that we use powershell to put the above command into a variable, which we can then use to change the affinity of a running process. This is how you do it in PowerShell:

$RESULTS=GET-PROCESS steam

This loads the GET-PROCESS command (applied to “steam”) into the $RESULTS variable. Next we now need to change the 15 to a 14, thus disabling Core 0… like so:

$RESULTS.ProcessorAffinity=14

And just like that we have forced steam onto 3 cores instead of 4…

image

To toggle it back you would then simply repeat the command, changing it back to 15…

$RESULTS.ProcessorAffinity=15



Now you can test it out on any running process on your own system if you like.

Awesome. Any excuse to play with powershell is good. Now the really fun part - I’m running Windows boot camp on a iMAC with an i7-6700 cpu @4Ghz. One CPU - 4 cores (8 logical processors)
When I run Get-Process “Grim Dawn” | Select-Object ProcessorAffinity it returns a value of 255.

That doesn’t make much sense to me, though it correlates with the output from http://store.fsxtimes.com/cal-cam.php for a 1 CPU 4 core system. It’s not clear what my affinity should then be. Recommendations ?

That’s because it appears that Windows believes you are running an 8 core processor (which is usually 4 “real” cores and 4 “virtual” cores).

So, in my above example 15 would, in your case, be the 255 mask and to disable Core 0 all you need to do is change it to 254. That easy.

Got it - thanks

1 Like

And just to expand on this…

As you note “8 logical processors” - even tho your CPU is a quad they achieve more cores (virtual cores) thru the use of HyperThreading (2 threads per each “real” core - thus equaling 8). Most BIOS would have an option to disable HyperThreading - which would then “truly” restrict you to 4 cores - and as a result you would then probably start seeing an affinity of 15.

This is an optional thing you can test out if you ever get bored and want to fiddle. I’ve seen people way in the past make the claims that GD runs better with HyperThreading (also known as “SMT” on AMD CPU’s) disabled.

So if you ever get bored and want to test it out to see if there is any truth to those claims I’d be more than happy to hear about it. I should actually do some digging to see if you can disable HyperThreading on a process thru PowerShell commands. That would be a nice trick to do and would help avoid the need to fully disable it in BIOS.

With fiddling I’ve done with the Process Lasso program here: https://bitsum.com/ - I think it has some kind of option in it that does it so it just might be possible to somehow do that trick.

Lasso claims it can do so in it’s software but not sure how it does it. There is no powershell command I can find, though I did see a cmd option for Dell servers, so I’d say yes it’s possible. TBH my system does not have any performance issues, at least related to GD :grinning: but this is interesting stuff !