How to Set the Affinity of Cores for MetaTrader in a Multicore VPS

  • 2 mins read
  • |
  • Last Updated:

Setting the affinity of cores for MetaTrader in a multicore VPS.

Hi there,

If you have reached this post, it means that you have a powerful VPS and at least somewhat complex setup needs for your MetaTrader.

In some cases, MetaTraders will not optimally virtualize on a multicore server. This generally happens when MetaTraders need a really high setup, such as a large Expert Advisor or several charts/symbols.

For these cases, we strongly suggest setting up the affinity of cores to allow each MetaTrader to work in a single core. If there is space left in the cores, it will be used to run Windows’ basic tasks.

Setting this up needs some tweaks, but we will get it done together. There is also a video explanation at the bottom of the article.


1. You will need to log into your VPS, where your MetaTraders need to have been previously installed, and search for the program RunWithAffinity.exe, which will be found on your VPS script folders at:

2. Run the program

3. Click on the three dots in the program search bar to locate the MT4 or MT5 file location. Then, open the file terminal.exe for MT4 or terminal64.exe for MT5.

The MT4 default installation folder is C:\Program Files (x86)
The MT5 default installation folder is C:\Program Files

4. Select 1 core to run the VPS at.

5. Name your shortcut a unique name and click on Create Shortcut.

6. Do the same for all MTs.

*Please do take note that the best way to do this is to fill in the cores in order. Start by placing 1~4 MetaTraders per core (will depend on the amount of charts and symbols). Then, you can start filling in the next core and repeat.

7. Right-click on the shortcuts and press on “cut.”

8. Paste the shortcuts in your VPS’ Startup Folder.

To access the startup folder you can copy the route below and past in on your file explorer search bar:
C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

You can see this video for more details: 

You’re all set!

In case you need further assistance, please contact our Customer Care department via livechat or at

Thank you!

Annoyed by slow trade execution, power cuts and downtime?

Forex VPS Plans starting from $32