Why Your Trading VPS Hits 100% CPU (and How to Fix It)

person
FXVPS
Share
Why Your Trading VPS Hits 100% CPU (and How to Fix It)

You log in over RDP to check on things and the mouse moves like it is wading through treacle. Task Manager takes eight seconds to open. When it finally does, CPU is sitting at 100% and has apparently been there for hours. Your first instinct is that the VPS is undersized and you need a bigger plan.

Usually it is not. In the overwhelming majority of cases, a pegged trading VPS is one specific thing behaving badly, and adding cores just gives that thing more room to misbehave. This guide walks through diagnosing what is actually eating the CPU, fixing the common causes, and working out the genuinely rare case where you do need more hardware.

๐Ÿ“Š Key Stat: A typical MT4 terminal with a handful of charts and a well-written EA idles at low single-digit CPU percentages between ticks. If yours is sitting at 90%+ continuously, that is not normal load. That is a symptom.

First, Separate โ€œBusyโ€ From โ€œStuckโ€

Before you diagnose anything, work out which of two very different problems you have.

Busy means the CPU is doing real work that you asked for. A strategy tester optimisation run, a fresh terminal downloading years of history, or a Windows Update installing in the background will all legitimately consume everything available. This resolves on its own.

Stuck means something has entered a state it will not leave. A runaway indicator recalculating on every tick, a terminal that lost its connection and is spinning on reconnect logic, or an EA caught in a loop. This does not resolve on its own, and it will still be there tomorrow.

The test is simple: note the time, walk away for thirty minutes, and look again. Busy goes down. Stuck does not.

โš ๏ธ Warning: Do not reboot before you diagnose. A reboot clears the symptom and destroys the evidence, and you will be back in the same place within a day or two with no more information than you started with.

Finding the Actual Culprit

Task Managerโ€™s default view is close to useless here, because if you run four MT4 terminals you will see four processes called terminal.exe and no indication of which is which.

Identify Which Terminal

Open Task Manager, go to the Details tab, right-click the column headers, choose Select columns, and add Command line. Each terminal.exe now shows its full install path, which maps directly to a specific broker and account. The one sitting at 25% on a 4-core box (one core fully saturated) is your offender.

Narrow It to a Chart

Inside the guilty terminal, the fastest technique is bisection. Close half your charts. If CPU drops, the problem is in the half you closed; reopen them one at a time. If it does not drop, the problem is in the half that stayed. Four or five rounds of this isolates a single chart even in a heavily loaded terminal.

Narrow It to an Indicator or EA

Once you have the chart, remove the EA and watch the CPU. Then remove indicators one by one. The classic offenders are:

  • Indicators that recalculate the full history on every tick instead of only the most recent bars. A badly written custom indicator on an M1 chart with 100,000 bars of history will do exactly this, and it will do it several times a second during an active session.
  • Indicators calling iCustom in a loop, each call spawning its own recalculation.
  • EAs with a tight while loop and no sleep, which will consume an entire core doing nothing useful.
  • Multiple copies of the same heavy indicator across several charts, each one independently expensive.

๐Ÿ’ก Tip: MetaTrader writes indicator and EA errors to the Experts and Journal tabs. Before you start bisecting, scroll back through both. An indicator throwing thousands of array-out-of-range errors per minute will announce itself there and save you twenty minutes of guessing.

The Fixes, In Order of How Often They Work

Cut Your History Depth

This is the highest-yield change and almost nobody does it. In MT4, Tools โ†’ Options โ†’ Charts has a Max bars in chart setting that frequently defaults to something enormous. Set it to a realistic figure โ€” 50,000 is generous for almost any strategy, and many EAs need far less. Every indicator on every chart recalculates against that buffer, so halving it roughly halves the work.

Restart the terminal after changing it, and delete the accumulated history files if the terminal has been running for months.

Reduce Chart Count, Not Terminal Count

Traders often assume the cost is per terminal. It is mostly per chart, and specifically per indicator per chart. Twelve charts in one terminal is more expensive than three charts in each of two terminals. Close the charts you are not actually trading. If you want to keep an eye on a symbol, you do not need it open with six indicators attached.

Turn Off the Things You Are Not Looking At

A VPS is a headless machine that you visit occasionally. It does not need to render beautifully.

  • Disable chart animation and switch off unused chart objects
  • Turn off the Market Watch symbols you never trade โ€” each one is a live tick stream being processed
  • Close the News tab, which polls continuously
  • Disable the terminalโ€™s own โ€œMailboxโ€ and signal polling if you do not use them

Fix or Replace the Offending Indicator

If you have isolated a specific custom indicator and you have the source, the fix is usually to change the calculation loop so it only processes new bars rather than the entire history. If you do not have the source and the vendor will not fix it, the honest answer is that you are paying a permanent CPU tax for that indicator and should decide whether it earns it.

Check for the Non-Trading Culprits

Not everything on the box is MetaTrader.

  • Windows Update can and will consume a core for an extended period. Schedule it rather than letting it ambush you mid-session โ€” see how and when to do Windows updates.
  • Antivirus real-time scanning that is watching your MetaTrader directories will thrash constantly, because those directories are written to continuously. Exclusions fix it. Our guide on antivirus on a trading VPS covers what to exclude and why.
  • Search indexing has no business running on a trading VPS at all. Disable it.
  • A strategy tester optimisation you forgot about will happily use every core you have. Check for a second terminal instance running in tester mode.

โœ… Best Practice: Add MetaTraderโ€™s data directory and install directory to your antivirus exclusion list the day you provision the VPS, not the day you notice the CPU problem. It is the single most common avoidable cause of sustained high CPU on a trading box.

When It Genuinely Is the Hardware

Sometimes the diagnosis comes back clean: the load is real, the indicators are efficient, and you simply need more machine. The honest signals are:

  • You are running many terminals. Each MT4 instance carries a baseline cost even when idle, and MT5 is heavier than MT4. Past roughly four to six active terminals, a 1 vCPU plan is genuinely insufficient regardless of tuning.
  • Your strategy computes on every tick across many symbols. A basket EA watching twenty-eight pairs is doing twenty-eight times the work of a single-pair EA, and there is no tuning trick that changes that.
  • You run the strategy tester on the same box you trade on. Optimisation is embarrassingly parallel and will use everything you give it. This is the clearest case for more cores.
  • CPU is high but each individual process looks reasonable. If no single process stands out and the total is still saturated, you have simply outgrown the plan.

On FXVPS, the upgrade path is Core ($29/mo, 2GB RAM, 1 vCPU) โ†’ Pro ($39/mo, 4GB RAM, 2 vCPUs) โ†’ Scaling ($79/mo, 8GB RAM, 4 vCPUs). The jump from Core to Pro is ten dollars a month and doubles both dimensions, which is a cheap answer if you have confirmed the load is real.

One thing worth understanding before you upgrade: MetaTrader is largely single-threaded per terminal, so a single EA cannot use more than one core no matter how many you buy. Extra cores help you run more terminals concurrently; they do not make one slow EA faster. For that you want clock speed. We covered the distinction in clock speed vs core count.

๐Ÿš€ Try FXVPS for $2.99 โ€” if you have concluded you need more headroom, test the larger plan on a 7-day trial before committing. Run your actual EA stack on it and watch the numbers.

Why It Matters Beyond the Lag

A pegged CPU is not just an annoyance when you log in. It has direct trading consequences.

When the CPU is saturated, tick processing queues. Your EAโ€™s OnTick handler runs late, which means the price it evaluates is stale by the time it evaluates it. The order it sends is based on a market that has already moved. This shows up in your results as slippage, and you will blame the broker for it, because there is nothing in the terminal that tells you the delay happened inside your own machine.

It also breaks time-sensitive logic. EAs that open at a specific second, close before a news release, or manage trailing stops on a tight schedule will all miss their windows when the machine cannot keep up. And a saturated box is slow to reconnect after any connection interruption, turning a two-second broker blip into a two-minute outage.

This is the real reason to care. The lag over RDP is cosmetic. The stale fills are not.

A Standing Monitoring Habit

Once you have fixed it, keep it fixed with about two minutes of work per week.

  • Glance at Task Manager whenever you log in and note whether the baseline has crept up
  • Watch CPU during your first high-volatility session after adding any new EA or indicator, because that is when a marginal setup tips over
  • Keep a note of what โ€œnormalโ€ looks like for your setup, so you have something to compare against
  • Re-check after every MetaTrader build update, since a new build occasionally changes indicator behaviour

Our guide to forex VPS performance metrics worth tracking covers what else belongs on that list, and how to stress test your VPS before going live is the right thing to do before you trust a new configuration with real money.

Frequently Asked Questions

Is 100% CPU going to get my VPS suspended?

On FXVPS, no. You are paying for dedicated cores and you are entitled to use them. The reason to fix it is that saturated CPU degrades your own execution, not that anyone will complain.

Will more RAM fix high CPU?

No, these are separate resources. If you are also seeing heavy disk activity and RAM near its limit, Windows may be paging to disk, which looks like general slowness and can inflate CPU. But high CPU with plenty of free RAM is a CPU problem. See how much RAM a forex VPS needs.

Why does CPU spike at exactly the same time every day?

Almost always a scheduled task: Windows Update, an antivirus scan, a backup job, or your own EA restart schedule. Open Task Scheduler and look at what is set to run at that time.

My CPU is fine but the terminal still feels slow over RDP. What now?

That is a different problem โ€” likely RDP configuration or network rather than compute. Why your VPS feels slow over RDP covers it.

How many MT4 terminals can I actually run before CPU becomes the limit?

It depends entirely on what each terminal is doing, which is why there is no single number. A terminal with one chart and a simple EA costs a fraction of one with fifteen charts and custom indicators. How many MT4 terminals can I run on my VPS works through the realistic figures.

Should I just restart the terminal on a schedule to keep CPU down?

Scheduled restarts are a reasonable hygiene measure and worth having regardless โ€” see automating EA restarts with Task Scheduler. But if a restart is the only thing keeping CPU under control, you have a leak or a runaway you have not diagnosed yet. Restarts are maintenance, not a fix.