Optimize MT4 For Multi-Core VPS Plans
In this guide we will show you how to fix the lag / "not responding" issue you might have seen with your MT4/MT5 if you are using a multi-core VPS system.
Short / non technical explanation - Due to the nature of the MetaTrader software it sometimes has performance issues on multi-core VPS systems. This is related to the software itself, and not our service. This same issue can happen with any VPS service.
Technical explanation - The MetaTrader software is a 32bit application and therefore does not always operate smoothly with virtual multi-core VPS systems. To work around this issue we will be using the Windows CPU affinity settings to bind the MetaTrader service to a single CPU core.
Step 1: Open all MT4/MT5s that you will be using on the VPS
Step 2: Open the task manager program on the VPS. To do this simply right click on the blue bar at the bottom and select task manager.
Step 3: Click on the details tab, and then find the "terminal.exe" files on the list
Step 4: Right click on the first terminal.exe file and select "set affinity"
Step 5: Next, uncheck all CPUs, except for CPU0. When you are completed only CPU0 should have a check mark next to it. When this is done click the ok button.
Step 6: Repeat steps 4 & 5 for each terminal.exe that you have running. When completed all terminal.exe files should have CPU0 set under processor affinity.
Please note: The CPU affinity settings reset each time that you restart the MT4/MT5. So if you ever close & re-open the MT4/MT5 you will need to reset the CPU affinity again using the steps above. This is caused by Windows, so there nothing that we can do to make the change permanent after software restart.
If you have any questions or would like us to set the CPU affinity for you please contact us by opening a support ticket or emailing support@newyorkcityservers.com
Short / non technical explanation - Due to the nature of the MetaTrader software it sometimes has performance issues on multi-core VPS systems. This is related to the software itself, and not our service. This same issue can happen with any VPS service.
Technical explanation - The MetaTrader software is a 32bit application and therefore does not always operate smoothly with virtual multi-core VPS systems. To work around this issue we will be using the Windows CPU affinity settings to bind the MetaTrader service to a single CPU core.
Step 1: Open all MT4/MT5s that you will be using on the VPS
Step 2: Open the task manager program on the VPS. To do this simply right click on the blue bar at the bottom and select task manager.
Step 3: Click on the details tab, and then find the "terminal.exe" files on the list
Step 4: Right click on the first terminal.exe file and select "set affinity"
Step 5: Next, uncheck all CPUs, except for CPU0. When you are completed only CPU0 should have a check mark next to it. When this is done click the ok button.
Step 6: Repeat steps 4 & 5 for each terminal.exe that you have running. When completed all terminal.exe files should have CPU0 set under processor affinity.
Please note: The CPU affinity settings reset each time that you restart the MT4/MT5. So if you ever close & re-open the MT4/MT5 you will need to reset the CPU affinity again using the steps above. This is caused by Windows, so there nothing that we can do to make the change permanent after software restart.
If you have any questions or would like us to set the CPU affinity for you please contact us by opening a support ticket or emailing support@newyorkcityservers.com
Updated on: 12/12/2023
Thank you!