Test Drive Unlimited 2

Test Drive Unlimited 2

No hay suficientes valoraciones
TDU 2 - How To Specify which CPU Core(s) are used
Por wellen1981
Thought I would make a guide to show how to specify which CPU core(s) TDU 2 uses, as a quad core with hyperthreading on doesn't get used correctly by the game engine due to lack of optimisation.

There may also be times where you only want TDU 2 using certain cores or a certain amount of cores eg multitasking with other programs running in the background.
Setting which cores TDU 2 uses in this case will lead to maximising your CPU usage and lead to a more stable TDU 2 game play experience.
   
Premiar
Favoritos
Favorito
Quitar
The manual method
If you just want to specify cores as a one-off, you can do this in task manager once TDU 2 game is running.

You just Alt+Tab out of the game, then press Ctrl+Shift+Esc to bring up Windows Task Manager.

Click on the Applications tab and right click on Test Drive Unlimited 2, left click on Go To Process.

This will bring up the Processes tab and it will have selected the TDU2 process.

Right click on it and left click on Set Affinity... this will allow you to select which cores the game uses.

Remember this is forgotten after the game is quit so you would have to do this everytime.

If you always want this to happen, read the next section of this guide.

The automatic method
The previous section is good for one time changes but if you always want a game/software to use certain cores everytime, this is how you set it automatically.

You need to find out what the process is first so do the following:

Once TDU 2 game is running.
Alt+Tab out of the game,
press Ctrl+Shift+Esc to bring up Windows Task Manager.
Click on the Applications tab and right click on Test Drive Unlimited 2, left click on Go To Process.
This will bring up the Processes tab and it will have selected the TDU2 process.
Right click TDU2 and left click Open File Location

This will take you to the game executable folder and it will have selected the game executable file.
Right click this file and hover over Send to
and left click
Desktop (create shortcut)

Now close the folder window and look at your desktop background

Find the TDU2 shortcut icon we just created on the desktop and right click it and left click Properties.

Left click the Shortcut tab and in the
Target:
area, change it to the following so the whole line reads like this:

C:\Windows\System32\cmd.exe /C START "Test Drive Unlimited 2" /affinity 1 "C:\Program Files (x86)\Steam\steamapps\common\Test Drive Unlimited 2\TestDrive2.exe"

Some notes on the above...
The important part is the
/affinity 1
and you can change the 1 to whatever cores you want to use
1 just uses the first core

To make it easier as I'm sure you dont want to learn hex or binary, below you will find the list of numbers for each core so you can just use what you need!


Affinity List - Hyperthread off
With Hyperthreading Off

To use just 1 core
/affinity 1 = CPU0 (your 1st core) 000001
/affinity 2 = CPU1 (your 2nd core) 000010
/affinity 4 = CPU2 (your 3rd core) 000100
/affinity 8 = CPU3 (your 4th core) 001000
/affinity 10 = CPU4 (your 5th core) 010000
/affinity 20 = CPU5 (your 6th core) 100000


To use 2 cores
/affinity 3 = CPU0 and CPU1 (your 1st and 2nd core) 000011
/affinity 6 = CPU1 and CPU2 (your 2nd and 3rd core) 000110
/affinity C = CPU2 and CPU3 (your 3rd and 4th core) 001100
/affinity 18 = CPU3 and CPU4 (your 4th and 5th core) 011000
/affinity 30 = CPU4 and CPU5 (your 5th and 6th core) 110000

/affinity 5 = CPU0 and CPU2 (your 1st and 3rd core) 000101
/affinity A = CPU1 and CPU3 (your 2nd and 4th core) 001010
/affinity 14 = CPU2 and CPU4 (your 3rd and 5th core) 010100
/affinity 28 = CPU3 and CPU5 (your 4th and 6th core) 101000

/affinity 9 = CPU0 and CPU3 (your 1st and 4th core) 001001
/affinity 12 = CPU1 and CPU4 (your 2nd and 5th core) 010010
/affinity 24 = CPU2 and CPU5 (your 3rd and 6th core) 100100

/affinity 11 = CPU0 and CPU4 (your 1st and 5th core) 010001
/affinity 22 = CPU1 and CPU5 (your 2nd and 6th core) 100010

/affinity 21 = CPU0 and CPU5 (your 1st and 6th core) 100001


To use 3 cores
/affinity 7 = CPU0, CPU1 and CPU2 (your 1st, 2nd and 3rd core) 000111
/affinity E = CPU1, CPU2 and CPU3 (your 2nd, 3rd and 4th core) 001110
/affinity 1C = CPU2, CPU3 and CPU4 (your 3rd, 4th and 5th core) 011100
/affinity 38 = CPU3, CPU4 and CPU5 (your 4th, 5th and 6th core) 111000

/affinity D = CPU0, CPU2 and CPU3 (your 1st, 3rd and 4th core) 001101
/affinity 1A = CPU1, CPU3 and CPU4 (your 2nd, 4th and 5th core) 011010
/affinity 34 = CPU2, CPU4 and CPU5 (your 3rd, 5th and 6th core) 110100

/affinity 19 = CPU0, CPU3 and CPU4 (your 1st, 4th and 5th core) 011001
/affinity 32 = CPU1, CPU4 and CPU5 (your 2nd, 5th and 6th core) 110010

/affinity 31 = CPU0, CPU4 and CPU5 (your 1st, 5th and 6th core) 110001

/affinity 23 = CPU0, CPU1 and CPU5 (your 1st, 2nd and 6th core) 100011
/affinity 26 = CPU1, CPU2 and CPU5 (your 2nd, 3rd and 6th core) 100110

/affinity B = CPU0, CPU1 and CPU3 (your 1st, 2nd, and 4th core) 001011


To use 4 cores
/affinity F = CPU0, CPU1, CPU2 and CPU3 (your 1st, 2nd, 3rd and 4th core) 001111
/affinity 1E = CPU1, CPU2, CPU3 and CPU4 (your 2nd, 3rd, 4th and 5th core) 011110
/affinity 3C = CPU2, CPU3, CPU4 and CPU5 (your 3rd, 4th, 5th and 6th core) 111100

/affinity 1D = CPU0, CPU2, CPU3 and CPU4 (your 1st, 3rd, 4th and 5th core) 011101
/affinity 3A = CPU1, CPU3, CPU4 and CPU5 (your 2nd, 4th, 5th and 6th core) 111010

/affinity 39 = CPU0, CPU3, CPU4 and CPU5 (your 1st, 4th, 5th and 6th core) 111001
/affinity 27 = CPU0, CPU1, CPU2 and CPU5 (your 1st, 2nd, 3rd and 6th core) 100111
/affinity 2B = CPU0, CPU1, CPU3 and CPU5 (your 1st, 2nd, 4th and 6th core) 101011

/affinity 33 = CPU0, CPU1, CPU4 and CPU5 (your 1st, 2nd, 5th and 6th core) 110011
/affinity 2D = CPU0, CPU2, CPU3 and CPU5 (your 1st, 3rd, 4th and 6th core) 101101
/affinity 35 = CPU0, CPU2, CPU4 and CPU5 (your 1st, 3rd, 5th and 6th core) 110101

/affinity 17 = CPU0, CPU1, CPU2 and CPU4 (your 1st, 2nd, 3rd and 5th core) 010111
/affinity 36 = CPU1, CPU2, CPU4 and CPU5 (your 2nd, 3rd, 5th and 6th core) 110110
/affinity 1B = CPU0, CPU1, CPU3 and CPU4 (your 1st, 2nd, 4th and 5th core) 011011


To use 5 cores
/affinity 1F = CPU0, CPU1, CPU2, CPU3 and CPU4 (your 1st, 2nd, 3rd, 4th and 5th core) 011111
/affinity 3D = CPU0, CPU2, CPU3, CPU4 and CPU5 (your 1st, 3rd, 4th, 5th and 6th core) 111101
/affinity 3B = CPU0, CPU1, CPU3, CPU4 and CPU5 (your 1st, 2nd, 4th, 5th and 6th core) 111011

/affinity 37 = CPU0, CPU1, CPU2, CPU4 and CPU5 (your 1st, 2nd, 3rd, 5th and 6th core) 110111
/affinity 2F = CPU0, CPU1, CPU2, CPU3 and CPU5 (your 1st, 2nd, 3rd, 4th and 6th core) 101111

/affinity 3E = CPU1, CPU2, CPU3, CPU4 and CPU5 (your 2nd, 3rd, 4th, 5th and 6th core) 111110


To use 6 cores
/affinity 3F = CPU0, CPU1, CPU2, CPU3, CPU4, CPU5 and CPU6 (your 1st, 2nd, 3rd, 4th, 5th and 6th core) 111111

Affinity List - Hyperthread on
// Not done yet - ignore this section

With Hyperthreading On

If you use this section because you have hyperthreading on, remember this:

A hyperthreaded core will only give you about 30% of an actual true/logical core due to a hyperthreaded core being a virtual core.

For this reason it is best to assign non-hyperthreading games to actual, logical cores - eg the even numbered cpus CPU0 CPU2 CPU4 CPU6 CPU8 CPU10

Hyperthreaded virtual cores are odd numbered eg CPU1 CPU3 CPU5 CPU7 CPU9 CPU11


To use just 1 core
/affinity 1 = CPU0 (your 1st core) 000001
/affinity 2 = CPU1 (your 2nd core) 000010
/affinity 4 = CPU2 (your 3rd core) 000100
/affinity 8 = CPU3 (your 4th core) 001000
/affinity 10 = CPU4 (your 5th core) 010000
/affinity 20 = CPU5 (your 6th core) 100000


To use 2 cores
/affinity 3 = CPU0 and CPU1 (your 1st and 2nd core) 000011
/affinity 6 = CPU1 and CPU2 (your 2nd and 3rd core) 000110
/affinity C = CPU2 and CPU3 (your 3rd and 4th core) 001100
/affinity 18 = CPU3 and CPU4 (your 4th and 5th core) 011000
/affinity 30 = CPU4 and CPU5 (your 5th and 6th core) 110000

/affinity 5 = CPU0 and CPU2 (your 1st and 3rd core) 000101
/affinity A = CPU1 and CPU3 (your 2nd and 4th core) 001010
/affinity 14 = CPU2 and CPU4 (your 3rd and 5th core) 010100
/affinity 28 = CPU3 and CPU5 (your 4th and 6th core) 101000

/affinity 9 = CPU0 and CPU3 (your 1st and 4th core) 001001
/affinity 12 = CPU1 and CPU4 (your 2nd and 5th core) 010010
/affinity 24 = CPU2 and CPU5 (your 3rd and 6th core) 100100

/affinity 11 = CPU0 and CPU4 (your 1st and 5th core) 010001
/affinity 22 = CPU1 and CPU5 (your 2nd and 6th core) 100010

/affinity 21 = CPU0 and CPU5 (your 1st and 6th core) 100001


To use 3 cores
/affinity 7 = CPU0, CPU1 and CPU2 (your 1st, 2nd and 3rd core) 000111
/affinity E = CPU1, CPU2 and CPU3 (your 2nd, 3rd and 4th core) 001110
/affinity 1C = CPU2, CPU3 and CPU4 (your 3rd, 4th and 5th core) 011100
/affinity 38 = CPU3, CPU4 and CPU5 (your 4th, 5th and 6th core) 111000

/affinity D = CPU0, CPU2 and CPU3 (your 1st, 3rd and 4th core) 001101
/affinity 1A = CPU1, CPU3 and CPU4 (your 2nd, 4th and 5th core) 011010
/affinity 34 = CPU2, CPU4 and CPU5 (your 3rd, 5th and 6th core) 110100

/affinity 19 = CPU0, CPU3 and CPU4 (your 1st, 4th and 5th core) 011001
/affinity 32 = CPU1, CPU4 and CPU5 (your 2nd, 5th and 6th core) 110010

/affinity 31 = CPU0, CPU4 and CPU5 (your 1st, 5th and 6th core) 110001

/affinity 23 = CPU0, CPU1 and CPU5 (your 1st, 2nd and 6th core) 100011
/affinity 26 = CPU1, CPU2 and CPU5 (your 2nd, 3rd and 6th core) 100110

/affinity B = CPU0, CPU1 and CPU3 (your 1st, 2nd, and 4th core) 001011


To use 4 cores

!!! FYI !!!
I've tested this on a quad core wirh hyperthreading enabled to see if it resolves the game engine issue where it puts work on core 4's hyperthread instead of putting work actually on core 4.
Sadly it still doesnt resolve it and this may be due to eden deveiopers stating the 'last core' should be used for lighting/weather/ai cars
The only way to resolve this is still to turn off hyperthreading in the bios when playing TDU 2.


C:\Windows\System32\cmd.exe /C START "Test Drive Unlimited 2" /affinity 1 "C:\Program Files (x86)\Steam\steamapps\common\Test Drive Unlimited 2\TestDrive2.exe"

/affinity 55 = CPU0, CPU2, CPU4 and CPU6 (your 1st, 2nd, 3rd and 4th core) 01010101

/affinity F = CPU0, CPU1, CPU2 and CPU3 (your 1st, 2nd, 3rd and 4th core) 001111
/affinity 1E = CPU1, CPU2, CPU3 and CPU4 (your 2nd, 3rd, 4th and 5th core) 011110
/affinity 3C = CPU2, CPU3, CPU4 and CPU5 (your 3rd, 4th, 5th and 6th core) 111100

/affinity 1D = CPU0, CPU2, CPU3 and CPU4 (your 1st, 3rd, 4th and 5th core) 011101
/affinity 3A = CPU1, CPU3, CPU4 and CPU5 (your 2nd, 4th, 5th and 6th core) 111010

/affinity 39 = CPU0, CPU3, CPU4 and CPU5 (your 1st, 4th, 5th and 6th core) 111001
/affinity 27 = CPU0, CPU1, CPU2 and CPU5 (your 1st, 2nd, 3rd and 6th core) 100111
/affinity 2B = CPU0, CPU1, CPU3 and CPU5 (your 1st, 2nd, 4th and 6th core) 101011

/affinity 33 = CPU0, CPU1, CPU4 and CPU5 (your 1st, 2nd, 5th and 6th core) 110011
/affinity 2D = CPU0, CPU2, CPU3 and CPU5 (your 1st, 3rd, 4th and 6th core) 101101
/affinity 35 = CPU0, CPU2, CPU4 and CPU5 (your 1st, 3rd, 5th and 6th core) 110101

/affinity 17 = CPU0, CPU1, CPU2 and CPU4 (your 1st, 2nd, 3rd and 5th core) 010111
/affinity 36 = CPU1, CPU2, CPU4 and CPU5 (your 2nd, 3rd, 5th and 6th core) 110110
/affinity 1B = CPU0, CPU1, CPU3 and CPU4 (your 1st, 2nd, 4th and 5th core) 011011


To use 5 cores
/affinity 1F = CPU0, CPU1, CPU2, CPU3 and CPU4 (your 1st, 2nd, 3rd, 4th and 5th core) 011111
/affinity 3D = CPU0, CPU2, CPU3, CPU4 and CPU5 (your 1st, 3rd, 4th, 5th and 6th core) 111101
/affinity 3B = CPU0, CPU1, CPU3, CPU4 and CPU5 (your 1st, 2nd, 4th, 5th and 6th core) 111011

/affinity 37 = CPU0, CPU1, CPU2, CPU4 and CPU5 (your 1st, 2nd, 3rd, 5th and 6th core) 110111
/affinity 2F = CPU0, CPU1, CPU2, CPU3 and CPU5 (your 1st, 2nd, 3rd, 4th and 6th core) 101111

/affinity 3E = CPU1, CPU2, CPU3, CPU4 and CPU5 (your 2nd, 3rd, 4th, 5th and 6th core) 111110


To use 6 cores
/affinity 3F = CPU0, CPU1, CPU2, CPU3, CPU4, CPU5 and CPU6 (your 1st, 2nd, 3rd, 4th, 5th and 6th core) 111111
2 comentarios
north 2 SEP 2024 a las 13:09 
also if i alt tab out of the game the controls dont work anymore...
north 2 SEP 2024 a las 13:08 
i have an i5 10300H laptop cpu what how many cores should i use?