What a VPS Actually Is, Technically: Hypervisor Tenancy, vCPU Shares and Noisy Neighbours

Most VPS marketing pages describe a virtual server as “your own slice of a server.” That sentence hides the only three things that determine how a VPS behaves under load: which hypervisor is doing the slicing, how the vCPU time is scheduled, and how much of the physical host you share. This article covers all three from the inside — what the guest kernel can observe, what it cannot, and which measurements tell you which.

The useful model: you are not buying a machine but a time-shared allocation on a host you will never see. Everything below is a consequence of that.

Type-1 vs Type-2: What Actually Runs Below Your Kernel

On KVM — the majority of Linux VPS hosts — every vCPU is a thread in the host’s QEMU process. The host Linux kernel uses its normal CFS or EEVDF scheduler to decide when that thread runs. Your guest’s scheduler runs a second layer on top: it places processes on vCPUs, and the vCPUs compete for physical cores. Two scheduling levels mean a guest process can be runnable, scheduled by the guest kernel, and still not executing.

OpenVZ and LXC are a different shape: containers share one kernel, so there is no guest scheduler layer — just cgroup CPU shares and quotas. Lower overhead, lower isolation. Xen uses a domain model with its own scheduler and is rarer on budget tiers now. Identify the family with systemd-detect-virt, which prints kvm, xen, openvz, lxc or none. On KVM expect KVMKVMKVM in /sys/class/dmi/id/product_name and virtio devices in lspci.

vCPU Shares: Oversubscription Ratio in Practice

A provider selling “4 vCPU” has already decided how many physical threads those four map to, and that ratio is rarely published. Typical budget clouds run 2:1 to 4:1 on shared tiers; dedicated-vCPU tiers run 1:1. You cannot infer the ratio from idle observations — only from steal time under controlled load.

Pin a busy loop to each vCPU and read /proc/stat deltas. vmstat 1 gives a coarser view: the st column is the percentage of wall time vCPUs were runnable while the host ran someone else. On a 1:1 tier under your own load expect st under 0.2%; on a 4:1 tier with busy neighbours expect 3–15% stretches that vanish at night. Providers also mask AVX-512 and sometimes hide the host model, so compare benchmark numbers only within one provider.

Noisy Neighbours: Which Resource Leaks First

Tenancy affects CPU, memory bandwidth, disk and network differently. CPU is the most fairly policed because cgroup quotas are per-vCPU and well understood. Memory bandwidth is shared at the socket level and effectively unpoliced — a neighbour running STREAM can cut your effective bandwidth 20–40% with no steal time showing. Disk is policed by IOPS/throughput caps on the virtual block device, so a bursty neighbour shows up as latency spikes rather than sustained throughput loss.

Network is shaped at the vNIC. Neighbours rarely steal your bandwidth directly, but on small providers they can saturate a shared uplink, which shows as retransmits. Three commands separate the cases: vmstat 1 for steal, iostat -x 1 for await against r/s on the virtio disk, and nstat -az TcpRetransSegs for retransmit rate. If await rises while queue depth stays flat, the delay is below your guest.

Reading Steal Time Without Being Fooled

Steal is cumulative in /proc/stat, so always subtract two samples. mpstat -P ALL 5 12 does that and breaks it down per vCPU, which matters because a host may pin only one of your vCPUs onto a contended core. Watch for asymmetry: if CPU1 steals 8% while CPU0 steals 0.1%, the issue is placement rather than total oversubscription, and a resize may not help.

Steal is also masked under nested virtualisation and on some container platforms. If mpstat reports exactly zero for days on a shared tier, treat it as missing data. Cross-check in user space: cyclictest -t 1 -p 80 -i 1000 -l 6000 shows tens of microseconds of wake-up latency on a quiet 1:1 core and several milliseconds when neighbours are active.

The 5% Rule: When Steal Becomes a Sizing Decision

For steady web workloads, sustained steal above roughly 5% is where p99 latency shifts in ways application code cannot fix. Between 1% and 5%, tuning — larger keepalive pools, more workers, shorter timeouts — absorbs it. Above 10% you are paying for capacity you cannot obtain and should move tier rather than tune harder. Batch jobs and build runners tolerate 10–15% because their deadline is minutes; databases and trading systems feel 1–2%. Set your threshold before looking at graphs.

Inside a KVM guest you cannot see the host’s load average, cgroup tree, or other guests — only the consequences. That asymmetry is why tenancy questions need measurement over time. A fio run at 10:00 and 22:00 that differs by 3x describes the host, not your disk.

A Ten-Minute Tenancy Check You Can Repeat Monthly

Script it, log it, diff month over month. Identity first — systemd-detect-virt, lscpu | grep -E 'Model name|MHz', cat /sys/class/dmi/id/product_name. Then mpstat -P ALL 1 60 for a minute of per-vCPU steal. Then fio --name=r --rw=randread --bs=4k --iodepth=32 --size=1G --numjobs=1 for 4K read latency. Then iperf3 -c <second-host> -t 5 -P 4 if you have a second box to test against.

Keep the output timestamped. A 30% drop in 4K IOPS with unchanged configuration is the earliest reliable signal of tenancy drift, and it is far more actionable than “the server feels slow.” If you are choosing a plan and want the specification-level view, how hypervisors allocate and isolate resources per guest covers the allocation side; the shared, cloud and bare-metal architecture comparison gives the context for interpreting the numbers.

Translating the Numbers Into a Purchasing Decision

After a month of readings the decision simplifies. If steal stays under 2% and 4K read p99 is stable within 15%, tenancy is comfortable and the remaining risk is pricing, not performance. If steal crosses 5% in business hours and latency follows, ask the provider which tier is overcommitted and what a 1:1 dedicated-vCPU option costs. If they cannot answer, the measurement is your answer.

The same check doubles as a migration baseline: run it on the old host before moving, on the new one a week later, and compare like for like. That comparison — not the marketing page — tells you whether the move improved anything.

Leave a Reply