Signs Your VPS Is Not Enough Anymore

Upgrade from a VPS to a dedicated server when steal time stays high through your busy hours, or when you already run the largest VPS and the load average still sits above your core count. If steal is near zero, the host machine is not the problem: tune the software or buy a bigger VPS first.

A slow VPS feels the same whether the cause is a missing index, a starved disk or a neighbor on the host machine, which is why the decision has to come from measurements rather than from how the site feels on a bad afternoon. This is the question of knowing when a site has outgrown shared hosting, one tier up. It is also harder. On a VPS you can see almost everything, and most of what you see points back at your own configuration.

Which Numbers Actually Mean Something?

Four measurements carry nearly all the signal: load average, memory pressure, disk wait and steal time. Everything below runs over SSH on any Linux VPS, and none of it depends on which control panel sits on top.

Measure across a week. A single reading on a quiet Tuesday morning tells you nothing about the hour after your newsletter goes out. Install the sysstat package and enable its collector (systemctl enable --now sysstat on most current distributions), and sar will let you read back the figures for an hour you were not watching. Do that first.

Load average against core count

Run nproc for your core count, then uptime for the load average. The three figures are 1, 5 and 15-minute averages of how many processes were running or waiting to run. On Linux the count also includes processes stuck in uninterruptible sleep, which usually means waiting on disk, so a high load average is not automatically a CPU problem.

The rule is simple. A 15-minute figure that stays above your core count through the busy hours means work is queueing, and every request is waiting behind others before it gets a core. A brief spike during a nightly backup is normal. Sustained is the word that matters.

Memory pressure and swap activity

free -m shows the figure people misread most often. Ignore the "free" column, because Linux fills spare memory with disk cache on purpose and a healthy server shows very little of it. Read "available" instead.

Then run vmstat 5 and watch si and so, the memory swapped in from disk and out to it in each interval. Occasional nonzero values are harmless. A steady stream of swap-out during traffic means the working set no longer fits in memory, and every page the server has to read back from disk costs orders of magnitude more than reading it from RAM. On a recent kernel, cat /proc/pressure/memory answers more directly: avg10 on the some line is the share of the last ten seconds in which at least one task stalled waiting for memory.

Check the kernel log as well. journalctl -k | grep -i "out of memory" lists every process the kernel killed to free memory, and a database server that keeps vanishing overnight usually turns up there. On a container VPS such as OpenVZ, swap is emulated, so this log is a better witness than si and so.

Disk wait

iostat -x 5, from the same sysstat package, prints a line per disk. The columns to read are r_await and w_await, the average milliseconds a read or a write spent queued and serviced, set against r/s and w/s, which tell you how many requests you were actually making. top shows the CPU side of the same story as wa, time the processors sat idle with disk I/O outstanding.

Skip %util on a VPS. It was designed for a single disk that handles one request at a time, and on a virtual disk backed by an array it can read 100 percent while the storage still has room to spare. Rising await times during traffic are the honest signal, especially when the same queries run quickly at night.

Steal Time Is the Host Telling On Itself

Steal time is the share of time your virtual CPU was ready to run while the hypervisor was busy serving another guest on the same physical machine. You will find it as st at the end of the %Cpu(s) line in top, and as %steal in sar -u.

It is the one number in this post that points away from you. A high load average can come from a bad query, and swap can come from too many PHP workers. Steal cannot come from anything on your VPS. It measures time your VPS asked for and did not get.

Read it like this:

  • Zero or close to it, all week. The host is not your problem, so look inward.
  • Short spikes that line up with nothing on your side and then disappear mean a neighbor ran a heavy job. Annoying, and rarely worth a migration.
  • Several percent or more, sustained through your own busy hours while your workload is ordinary: the physical machine is oversubscribed at exactly the times you need it, and no amount of tuning recovers cycles the hypervisor hands to somebody else.

There is one caveat. Steal is a virtual machine measurement, and a container VPS such as OpenVZ shares the host's kernel instead of running its own, so it typically reports zero steal whatever the host is doing. The number only means something on KVM and other full virtualization, which is one more reason the OpenVZ or KVM choice deserves some thought.

Before buying hardware over steal, open a ticket with a week of sar -u output attached. Some hosts will move a VPS to a quieter node when shown those numbers, and asking costs nothing.

If Steal Is Near Zero, Try These First

Zero steal and bad numbers elsewhere means the VPS is doing what it was sold to do, and something on it is asking for more than it should. Three fixes cost an afternoon each and regularly make the upgrade unnecessary.

Add the missing index. Turn on the slow query log in MySQL or MariaDB with slow_query_log = 1 and long_query_time = 1, leave it for a day, then run EXPLAIN on the worst offenders. A query that scans a whole table on every page load will eventually saturate any hardware you put under it. One CREATE INDEX can take it from seconds to milliseconds, and you will see load average and disk wait fall together.

Put a cache in front of the database. A request answered by a page cache never reaches PHP or MySQL. For logged-in or personalized pages that cannot be cached whole, an object cache such as Redis or Memcached keeps repeated query results in memory. Confirm OPcache is on while you are there; it ships with PHP.

Move static files off the box. Images and downloads served from the VPS spend its bandwidth and its web server workers on work that needs no server logic at all. Sort a day of your access log by bytes sent, with awk '{print $10, $7}' access.log | sort -rn | head -20 for the standard combined log format, and the heaviest lines are usually a handful of files a CDN or object storage could serve instead.

When memory is the complaint, check PHP-FPM's pm.max_children before anything else. Set it higher than memory allows and the server will swap under precisely the load it was configured for. Do the arithmetic instead. Divide the memory you can spare by the resident size of one worker (the RSS column in ps) and use that number, not the one a tutorial suggested.

When to Upgrade From a VPS to a Dedicated Server

Most of the time, the answer to an overloaded VPS is a larger VPS. Load average above your core count with steal near zero means you need more cores. Memory pressure on its own means you need more RAM. Either way, staying on a VPS keeps your current setup instead of sending you through a full server migration, and the KVM VPS plans list what each size step adds.

Dedicated hardware is the honest answer in a narrower set of cases:

  1. Steal stays high after the host has moved you, or the host cannot move you. The contention is structural, and the only machine with no neighbors is one you rent whole.
  2. You already run the largest VPS on offer, the fixes above are done, and the load average still sits above the core count. There is no next size.
  3. Disk wait is high while your own I/O is modest, meaning long await times next to low r/s and w/s. A VPS shares its storage with every other guest on the host, and on a dedicated server the disks answer to you alone.
  4. A software license is priced per physical machine, or a compliance requirement rules out shared hypervisors. Neither has anything to do with performance, and both settle the question.

Price is the last check. At the top of a VPS range the monthly cost can come close to an entry-level dedicated server, and BestPaidHosting's dedicated servers start at $79.95 per month. Hold that against the next VPS size up. My view is that when the two are close, take the whole machine, because you get every core with no hypervisor taking a share and no neighbor to produce steal in the first place. The dedicated server plans list the hardware behind each option.

The cost worth naming is flexibility. A VPS grows by changing plans; a dedicated server grows by swapping hardware or adding a second machine, so size it for the load you expect over the life of the contract. And if your load is spiky rather than steadily high, neither may fit: the comparison of cloud hosting and VPS covers paying for capacity only in the hours you use it.

From Symptom to Next Step

Find the row that matches your numbers. If two rows match, fix the one that points at your own configuration first, because it is the cheaper fix and it often takes the other symptom away with it.

What you see What it usually means Next step
Load above core count, steal near zero The work outgrew the cores, or the work is wasteful Slow query log and caching, then a larger VPS
Swap-out during traffic, out-of-memory kills in the log The working set exceeds RAM Size PHP-FPM workers to memory, then add RAM
High await from your own queries Missing indexes or full table scans EXPLAIN the slow queries and add indexes
High await while your own I/O is light Contended storage on the host Ticket with iostat output, dedicated if it persists
Sustained steal in your busy hours An oversubscribed host machine Ask to move nodes, dedicated if it returns
Largest VPS, still saturated after tuning The tier itself is outgrown Dedicated server

Start With a Week of sar

Install sysstat today and let it run through a week that includes your busiest day. Then pull that busiest hour back out with sar -u, which carries both steal and I/O wait, and add sar -W and sar -d when you need swapping and disk detail. Look at steal first.

If steal is flat at zero, your next step is the slow query log, not an order form. If it is not, you now hold the numbers a support ticket needs, and the same numbers will justify a dedicated server if the ticket does not fix it.

Leave a Comment

Your email address will not be published. Required fields are marked *