TransWikia.com

Is there a way to set out many CPU Cores a game uses without needed to reboot the PC?

Arqade Asked on April 26, 2021

I recently got The Technomancer from GOG but when i went to play it, it just sat at the loading screen for ever. looking up the issue it seems to be one shared with the Steam version and some users have reported that if they used 1 or 8 CPU Cores it started to work.

I have no idea how many cores are actually being used when i run the game but i figured if i start with 1 core and work up until i’m using all of them i might get the game working. however looking up how to set the number of cores it looks like i need to reset the PC and i’d rather avoid that because i don’t want to have to reset my PC every time i want to play one game and reset it again after to reset the setting for every other game where it isn’t an issue (reason why i use Locale Emulator for my Japanese Games)

So is there a way to set out many CPU Cores a game uses without needed to reboot the PC?

One Answer

Newer versions of Windows let you set a program's Processor Affinity in two ways:

  1. When the program is running, you can adjust its Processor Affinity by opening the Task Manager (right-click the Task Bar and choose Task Manager), going to the Details tab, right-click the process you want to modify, and click Set affinity. From there, you can choose which core the program runs on.
  2. You can use the start command to launch a program with a particular process affinity, like so: start /affinity 2 c:pathtogame.exe
    • You'll likely want to create a .bat or .ps1 file that you can double click to do this for you. A .bat file would look something like this:

%WINDIR%system32cmd.exe /C start /affinity 2 c:pathtogame.exe

The number after /affinity is actually a hexadecimal bitmask; that is each core has a value that's a power of two:

  • 1 is core 1
  • 2 is core 2
  • 4 is core 3
  • 8 is core 4
  • 16 (hex 10) is core 5
  • 32 (hex 20) is core 6
  • 64 (hex 40) is core 7
  • 128 (hex 80) is core 8

You can add these numbers together if you want it to be able to run on multiple cores, but don't forget to convert it to hexadecimal or it won't work as you expect.

Correct answer by Powerlord on April 26, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP