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



Core Switcher

Windows version of Core Switcher works with both Grim Dawn AND Titan Quest Anniversary Edition

In order to use Core Switcher with TQ:AE properly you MUST be tabbed out of game before pressing the hotkeys for Core Switcher


Table of Contents
(click the links below to “jump to” - click the symbols to return here)




Note: You might have heard of restricting GD to certain cores prior to this. This isn’t that.

Note2: If you test this out and decide to comment below please be sure to mention your CPU info - model and core count and how it performed before/after. I don’t expect all CPU’s to behave identical to my own experience. Thank you.

Here’s a fun performance trick for everyone. Its long been known that GD doesn’t use all CPU cores equally - in fact, some people think that GD only uses one core, which isn’t true - mostly. To make GD stop using primarily only one core and start spreading itself better over all of your CPU cores:


Manual Configuration/Testing -


  1. Fire up Grim Dawn and let it run for about 5-10 seconds and then tab out and open up Task Manager and switch it to the Details tab. While you’re at it go ahead and open up Resource Monitor so that you can get a visual of the changes in core usage.

  2. In the Details tab right-click on “Grim Dawn.exe” and select “Set Affinity”. Disable your Core 0 and then tab back into game and let it run for about 5-10 seconds again.

  3. Tab back to Task manager and repeat the steps above except this time re-enable your Core 0 and tab back and start playing for about a minute.

  4. After a minute tab out to the Resource Monitor I had you open earlier above. Your CPU core usage across all cores should be MUCH more spread out now - here’s how mine look:

    BEFORE:

    (Note the 100% core overload on my Core 0 and the very low usage on the other 3 cores - when a core is overloaded like that it tends to cause performance dips because it’s constantly hitting that cores “ceiling” - generally, this is bad for performance)

    AFTER:

    (All my cores have achieved equal spread across all cores and game performance and responsiveness is now much smoother)



If you find that this works for you and you would like a more automatic method to achieve this without having to tab out to Task Manager every time you play GD, then let me know how many cores your CPU has if the ones below don’t match your core count.

Here are some common ones that should help most people:


Downloads -


Windows:


Linux:

I would like to thank @wasted for contributing to improving the linux script in his post below. I modified his slightly but it is more or less the “same”. Thank you again wasted!


All downloads can also be accessed on Mod DB if you have trouble downloading them from the links above.


Core Switcher


How-to Use (Windows) -


  • Just download the zip file and extract the executable file.

  • Execute it and then it lives in your system tray (right-click on its icon to exit it whenever you wish)

    image

  • To use it just start up GD and wait about 5-10 seconds then press Ctrl+Alt+o. The tool will then turn off Core 0, it will then wait about 8 seconds and then reenable Core 0 and then it’s done. It’s that simple.

  • You can press Ctrl+Alt+i to get a popup with your relevant CPU info.



How-to Use (Linux) -


  • Just download the zip file and extract the executable file.

  • To use it just start up GD and wait about 5-10 seconds then tab out and double-click the file and run it or open a terminal in the files location and type in: sh the_filename_here

  • If you wish for the script to fire with a hotkey automatically you will need to configure it in your system settings. For Manjaro (KDE) this is what I did:


Searched for Custom Shortcuts…

Then selected Edit>New>Global Shortcut>Command/URL

Named mine “4core” and then switched to the “Trigger” tab and assigned the shortcut to Ctrl+Alt+o

Then switched to the “Action” tab and gave it the command sh /your/path/to/the/switcher/file.sh

That’s it.

If you have a different Linux distro/DE (desktop environment) you might have to search around some for something more specific to your flavor.


What To Do If You Find This Method Doesn’t Work For You -


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. Just do a tweaked variation of the manual testing method I do above. It’s very easy to test different core configurations.

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. 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.



27 Likes

So what do you achieve in ‘after mode’ on your PC? Better fps, no stuttering, more smooth gameplay? All above?

All of the above. Your CPU now has room to breathe. This is, of course, assuming that your Core 0 is topping out as show in my Before screenshot. I’m not saying it’s going to do away with all stutters - now that your CPU has room to wiggle it is now more up to your GPU’s capabilities for everything else.

You can easily test it out for yourself either manually as I listed step-by-step, or by using one of the hotkey switchers I made.

@the8anarchist has already tried this out himself and as far as I know his experience was close to mine.

I’ll give it a try cause i am sure my i5 2500k is burning his core 0 on GD. But overall GD performance is much better than it was 2-3 years ago. Some changes in the code worked for me so I decided to abandon playing with the cpu cores.

1 Like

That’s fine. The easiest way to see what’s going on with your cores prior is to just open up Resource Monitor…

…Windows Search and type in resource to get to it quickly… once it’s open just play the game for a minute or 2 then tab out and have a look at how GD has been using your cores. If it’s topped out and the other cores are showing very low usage then you would almost certainly benefit from this.

So you have windows 10? :slight_smile: I am still sitting in Win7 :slight_smile:

2 Likes

Lol yes. :wink:

Just so you know my tool for this calls on Powershell to enact the core changes so I don’t know if 7 has it by default or if you would have to download it.

If worse comes to worse I could look into the possibility of making you one that goes thru the CMD instead, assuming you want to use the tool of course.

So your not sure if the script wilk work in win7. I’ll try to test it :wink: I Hope it wouldnt harm my PC :wink:

1 Like

That would be very kind of you. And I can think of no reason that it would harm anything so you should be safe. It would either work - or it wouldn’t - and nothing more would come of it.

I can confirm the 4core version working on Win 7, at least for the most part. Core 3 doesn’t seem to be used much apart from some minor spikes. Cores 0-2 share the big chunk of the load equally though so Core 0 is no longer clogging up. Thanks!

1 Like

Nice… what’s your processor btw? Guess I should mention mine is an i5-3350P. the8anarchist has an AMD FX-6300 6-core and his behaved kinda similar to mine, heavy on Core 0 and once he toggled the cores it evened out but not quite as “precise” as mine (I guess you could say).

So, I don’t expect all CPU’s to behave identically if that, and your account, are anything to go by.

Do you think this would work with the old TQ engine as well?

I just tested it with GrimInternals which for some reason clogs up Core 2 instead of 0, but the tool works nonetheless. Same as without GI, Cores 0-2 carry the heavy load while Core 3 is chilling around.

AMD A10-7850K Radeon R7

It’s possible medea. The easiest way to find out is to follow the manual steps above. I would also recommend first monitoring CPU activity before any changes to see if it behaves similar to GD (which I suspect there is a good chance it might, due to the relationship).

Are there plans for a linux version?

While the overwhelmingly vast majority uses windows, not all do.

1 Like

I could look into it. I don’t currently have a Linux distro installed (I prefer Manjaro) but I could see what I could do.

I would have to make a decision what to code it in. My tool here is just a very simple AutoHotkey script (only a handful of lines of code), which is Windows only. I don’t have alotta experience coding anything specifically for Linux yet but I could probably figure something out as soon as I setup a dual-boot.

1 Like

Hmm… I wonder if the oddity of your Core 3 doing nothing is because of some weirdness with it being an APU. /thinking out loud

No clue what an APU is but I read that this CPU is better for office applications than games. I got it for free so I won’t complain. I got an Intel i7 920 here too but atm the system is lacking peripherals and an installation of Grim Dawn. When I get the chance I will give the tool a try on that system but until then I hope Crate will add an ingame option for the core switching.

btw the performance increase for GrimInternals is great, I usually see microstuttering all the time when fighting huge mobs or passing thru areas quickly with movement skills. That seems to be gone now as far as I tested it (did a couple of Temple of Osyr runs and everything went super smooth).

1 Like

That’s pretty much the sum of it. I have a computer in my bedroom that’s an AMD APU and it’s fairly sluggish (and several years old by now as well). Basically an APU is AMD’s low cost answer to combine a CPU and GPU together for people that need a budget PC. Definitely not meant for heavy gaming :wink:

Glad to hear that it has helped over-all. I’ve tested it with GI a little and it ran well for me too.

For reference, i took this pic right after exiting the game, using Ubuntu on my ryzen 2600X:

As can be seen, “CPU1” is always near the max while the others mostly “sit there” with low utilization, except for one of them that is “all over the place”, having some spikes to near 100%.