In this tutorial, we’ll guide you on how to assign specific CPU cores for MT4 to use on a Windows VPS with 2 or more cores. This is commonly known as setting CPU affinity. By dedicating certain cores to MT4, you can potentially improve its performance.
A Windows VPS with 2 or more cores
MetaTrader 4 installed
Please note: Changes to CPU affinity settings should be done with care, as improper configurations can lead to system instability.
Step 1: Open Task Manager #
Right-click on your taskbar at the bottom of the screen and click on ‘Task Manager’. Alternatively, you can press ‘Ctrl + Shift + Esc’ to open it.
Step 2: Go to the ‘Details’ Tab #
In the Task Manager window, click on the ‘Details’ tab. Here you’ll see a list of all the processes currently running on your VPS.
Step 3: Find MetaTrader 4 Process #
Scroll through the list of processes until you find the MetaTrader 4 process. It’s typically named ‘terminal.exe’ or ‘MetaTrader 4’. If you’re running multiple instances of MT4, there may be several processes with this name.
Step 4: Set Affinity #
Right-click on the ‘MetaTrader 4’ process, and select ‘Set affinity’ from the drop-down menu. This will open a new window that displays the CPU cores available on your VPS.
Step 5: Select CPU Cores #
In the ‘Processor affinity’ window, you’ll see a list of CPU cores that can be assigned to the MT4 process. By default, all cores are selected. Uncheck the box ‘All Processors’ to manually select only a single core that you want to assign to MT4. For example, if you have a 4-core VPS and you want to dedicate one cores to MT4, you could select ‘CPU 0’.
For the second MT4 select ‘CPU 1’,
For the third MT4 select ‘CPU 2’,
For the forth MT4 select ‘CPU 3’,
For the fifth MT4 select ‘CPU 0’,
and so on…
Step 6: Apply the Changes #
Click on ‘OK’ to apply the changes. MT4 will now utilize only the selected CPU cores for its operations.
Please note: The changes you’ve made will only last until the next system restart or until you manually close the MT4 process. After a restart or re-launch of the MT4 terminal, you will need to repeat this process to set the affinity again.