How Many MT4 and MT5 Terminals Can One VPS Run? RAM, CPU, and History Bar Traps

"How many MetaTraders can I run on 2 GB of RAM?" gets confident answers on forums that disagree with each other, and they can all be right. The answer depends on the operating system underneath and on what the terminals are doing. Here is how to reason about it, with real figures from our own servers.
Two answers to the same question
On Windows Server, the system takes a large part of a small server's memory before MetaTrader opens, commonly over 1 GB once the desktop is up, though this varies by version and configuration. Open Task Manager on an idle server to see your own figure.
On a lean Linux server there is much less in the way. We measured these on our live 2 GB MetaTrader servers:
| Live 2 GB server | RAM still available |
|---|---|
| 1 MT4 terminal with an EA on a real account | About 1.4 GB |
| 2 MT4 terminals with EAs on demo accounts | About 1.25 GB |
Each of those MT4 terminals used about 155 MB of its own. That is what ours used, with light settings, and yours will differ with the settings below.
MT4 and MT5 are not the same load
- MT4 is a 32-bit program, so one terminal cannot use more than a 32-bit process can address, and one terminal has a single trade context (more on that below).
- MT5 is 64-bit, and can work with far more history and tick data in memory. Expect it to use more than MT4 for a similar setup, especially in a strategy test or on a chart with lots of history. Measure yours rather than relying on a rule of thumb.
Three settings that quietly fill a server
Max bars in history and in chart
These are in Tools, Options, Charts. Every open chart holds its bars in memory and every indicator on it adds buffers the same length, so the number multiplies by charts and by indicators. If your EA looks back a few hundred bars, a chart setting in the hundreds of thousands costs memory for nothing. Lower it to what the EA needs (5,000 is often plenty), restart the terminal and compare. Check first: an EA that needs long history can behave differently with fewer bars.
Symbols in Market Watch
The terminal receives and processes ticks for every symbol shown. Right-click Market Watch and choose Hide All, which keeps only symbols in use. This is cheap to do and helps most on brokers with long symbol lists. The MetaTrader help gives the same advice before migrating to its own hosting.
Heavy indicators and iCustom
A badly written indicator recalculates its whole history on every tick instead of only new bars. An EA that calls iCustom makes the terminal load and run that indicator too, and several charts multiply it. If CPU is high with few charts, remove indicators one at a time and watch. If one EA is the culprit, ask its author whether it recalculates everything on each tick.
When it is not memory at all
Plenty of slowdowns are not caused by a lack of RAM. Two signs point elsewhere:
- One CPU core is flat out with memory to spare. Indicators on the same symbol share a thread, so more RAM will not help. On our one-core plan, a busy EA on gold kept the core at around 85 to 95 percent, so a heavier setup belongs on a bigger plan.
- Error 146, "Trade context is busy". In MT4, only one EA in a terminal can talk to the trade server at a time. Several EAs firing together on the same candle collide, and some retry badly. Splitting those EAs into separate terminals gives each group its own trade context. Each terminal costs memory, so this is the point where terminal count starts to matter.
If an EA has stopped and you are not sure why, see why expert advisors stop trading on a VPS.
Choosing a plan
This is a starting point rather than a guarantee. Run your real EAs on a demo account and watch memory and CPU in the panel.
| Plan | Terminals | CPU / RAM | Good starting point for |
|---|---|---|---|
| MT-1 ($7) | 1 | 1 core, 2 GB | One account with one EA and few charts |
| MT-2 ($10) | 2 | 2 vCPU (1.5 core limit), 2 GB | Two accounts, or one EA busy on the CPU |
| MT-4 ($15) | 4 | 2 cores, 4 GB | Several accounts, or EAs split to avoid error 146 |
| MT-6 ($25) | 6 | 4 cores, 6 GB | Many accounts, or several CPU-hungry EAs |
You can upgrade later from the client area, and the terminal limit follows your plan. If you are weighing this against the built-in service, read MQL5 Virtual Hosting vs a dedicated MetaTrader VPS.
Sources
- MQL4 documentation: trade server return codes (146, trade context busy)
- MQL4 documentation: iCustom
- MetaTrader 5 Help: advice on charts and Market Watch symbols
Frequently asked questions
How much RAM does one MT4 terminal use?
On our live servers, about 155 MB each with light settings. More charts, more bars and heavy indicators raise it.
How many terminals can run on 2 GB of RAM?
On our Linux servers, about 1.25 GB was still available with two MT4 terminals running EAs, so memory is rarely the first limit there. CPU often is. On Windows Server, the system itself takes much more of the 2 GB.
What does error 146 mean?
Trade context is busy: another EA in the same MT4 terminal is talking to the trade server. Better retry logic in the EA or splitting EAs across terminals helps.
Does lowering Max bars change my EA results?
It can if the EA or its indicators need long history. Check how far back your EA looks, and test on a demo account.
Is more RAM or more CPU better for MetaTrader?
Look at which one is full. If memory has room and a core is at its limit, more RAM will not help.
Trading carries a high risk of loss. This article is about running software and is not trading or investment advice.



