Cloud Computing

What is a VPS, and the three signs you’ve outgrown one

What is a VPS, and the three signs you’ve outgrown one

What is a VPS server? It’s a virtual machine you rent on a physical server that other customers share, with your own operating system, root access and a fixed slice of CPU, RAM and disk. A hypervisor keeps the slices apart, so your neighbors can’t see your files, but they can still compete with you for the hardware underneath.

That competition is what this post is about. Most VPS slowdowns aren’t mysterious. They show up in three numbers you can read with tools already on your server, and each one tells you whether to buy a bigger VPS or move off VPS hosting.

VPS vs shared hosting vs dedicated

Shared hosting puts many customers’ sites on one operating system, all sharing the same web server and PHP install. You get a control-panel account, not root. A VPS gives you your own kernel, so you pick the OS, install what you like and break it yourself if you want to. A dedicated server is the whole physical machine.

The VPS sits in the middle on price and on isolation. Your files and processes are private. The host’s CPU caches, disks and network card aren’t; every VM on that box uses them.

What “dedicated vCPU, guaranteed RAM” means

A vCPU is a virtual processor, and on many platforms it maps to one hyper-thread on the host. The question that matters is whether that thread is yours.

DigitalOcean’s plan docs put it plainly. On a shared-CPU plan, “the hyper-thread allocated to the Droplet may be shared between multiple other Droplets,” and what you actually get depends on what those neighbors are doing. A dedicated plan gets “guaranteed access to the full hyper-thread at all times.” AWS’s burstable T instances are a third flavor: “a baseline CPU performance with the ability to burst above the baseline.”

Under the hood it’s ordinary hypervisor configuration. In libvirt, vcpupin pins a guest’s vCPU to specific physical CPUs, while shares and quota divide time between guests that share them (libvirt domain XML). Pinned means predictable. Weighted means cheaper, and you get what’s left.

Our VPS plans come with dedicated vCPU, guaranteed RAM and SSD storage, from $8 a month in Chicago, Ashburn and Los Angeles. Dedicated vCPU is a promise about CPU time. It doesn’t make the host’s disks or network card yours alone, and no VPS can promise that.

Sign 1: CPU steal time

Steal is time your virtual CPU wanted to run while the hypervisor was busy running someone else. The top man page calls it “time stolen from this vm by the hypervisor.” The kernel’s KVM docs add a useful detail: time when your vCPU is idle isn’t reported as steal, so it only appears when you actually needed the CPU.

Check it live, then over time:

top               # "st" on the %Cpu(s) line
mpstat -P ALL 5   # %steal per vCPU every 5 seconds (sysstat)
sar -u            # today's history, if sysstat collection is on

On a dedicated-vCPU plan, steal should stay low; if it climbs, open a ticket. My rule for a shared-CPU plan: steal above about 5% through your busy hours means you’re paying for CPU you aren’t getting, and a bigger plan on the same kind of host won’t change that.

If steal is near zero but us plus sy sit near 100% on every vCPU for hours, that’s a different problem. You’re out of CPU. Buy more cores; that’s what a bigger VPS is for.

Sign 2: IO wait and disk latency

wa in top is “time waiting for I/O completion.” It’s a hint, not a verdict. Iowait is technically idle time, the CPU sitting with nothing to do while a disk request is outstanding, so a quiet server can show high iowait and a busy one can show none.

Latency settles it:

iostat -x 5       # watch r_await, w_await, aqu-sz and %util on your main disk

The iostat man page defines await as the average time in milliseconds for requests “to be served,” queue time included. On SSD storage it normally stays in the low single digits. Here’s the tell: await climbs into the tens of milliseconds while your own reads and writes per second stay flat. Your workload didn’t change. Somebody else’s did.

Rule yourself out first. A backup, a reindex or a log storm on your own VM looks exactly the same, so check what your processes were doing at that minute. If it isn’t you, more RAM can hide the problem for a while by caching more reads, but the disk underneath is still shared.

Sign 3: the same job, different times

Contention from neighbors is uneven. It shows up as variance: the same request is quick at 10 a.m. and slow at 3 a.m. for no reason you can find in your own logs. Averages hide it, so measure the spread.

The cheapest test is to time one fixed, uncached request against your own app every five minutes for a week:

while true; do
  printf '%s %s\n' "$(date +%F_%H:%M)" \
    "$(curl -s -o /dev/null -w '%{time_starttransfer}' http://127.0.0.1/uncached-page)"
  sleep 300
done >> ttfb.log

Run it under tmux or nohup, then sort the log by the second column. If your slowest runs take more than twice your median and they don’t line up with your traffic peaks or your own cron jobs, you’re looking at the neighbors. That’s the sign a bigger VPS is least likely to fix, because the bigger VPS lives on the same kind of shared host.

The cost math: VPS vs dedicated

Here’s the jump on our own price list. VPS figures come from our VPS page; dedicated figures come from our order forms, where setup is $0 and terms are month to month.

Plan$/monthCPURAMStorageTransfer
VPS Starter$82 vCPU1 GB20 GB SSD5 TB
VPS Balanced$154 vCPU4 GB50 (GB) SSD5 TB
VPS Performance$258 vCPU8 GB80 (GB) SSD5 TB
VPS Business$3510 vCPU10 GB100 GB SSD5 TB
Dedicated Xeon E3-1230 v1$1264 cores, 8 threads16 GB (up to 32)1 TB HDD30 TB
Dedicated Xeon D-1541 (special)$1598 cores, 16 threads64 GB1 TB SSD1 Gbps unmetered

Read that table honestly. The $35 VPS lists more vCPUs than the $126 server has threads, and the E3-1230 v1 is a 2011 chip. At the entry level you don’t move to dedicated for raw CPU count. You move because nobody else is on the hardware, because you get far more disk and transfer, and because you need RAM past what the VPS plans offer.

So the decision rule is short. If more of the same resource fixes it, buy the bigger VPS; our plans upgrade CPU, RAM or storage without downtime. If sign 1, 2 or 3 is the problem, or you’ve outgrown the Business plan’s 10 GB of RAM and 100 GB of disk, price a dedicated server. Going from $35 to $126 is $91 a month more for a machine that’s entirely yours, and the $159 Xeon D special adds 64 GB of RAM and an unmetered port. For a longer side-by-side, read dedicated servers vs virtual servers.

FAQ

Is a VPS the same as a cloud server?

They’re close. Both are virtual machines on shared hardware with root access. “Cloud server” usually means VMs you create and destroy on demand through an API, often billed by the hour, while a VPS is usually a plan you keep running for months. The isolation questions above apply to both.

Does a VPS come with DDoS protection?

It depends on the host, so ask before you buy. Ours includes baseline DDoS protection on every VPS plan at no extra charge. Whoever you use, ask what happens when an attack is bigger than what’s included.

Can I move from a VPS to a dedicated server without starting over?

Yes. Provision the new server, copy your data and config across, lower your DNS TTL a day ahead, then cut over and keep the VPS running until traffic has drained. We help with the move: on larger deployments it’s often included, and smaller jobs are quoted up front.

How do I know if I need more RAM rather than a dedicated server?

Run free -m and watch the “available” column through a busy day. If it keeps dropping toward zero and swap fills up, you need more memory, and a bigger VPS plan fixes that. Only when you need more than the largest standard plan offers does RAM by itself become a reason to go dedicated.

Not sure which side of the line you’re on? Send us a day of mpstat and iostat -x output through the custom quote form and we’ll come back with a configuration and a price.