Cloud & Virtualization

How VPS Resources Are Allocated: vCPU, RAM, Storage and Network Explained

By NileVPS Team · Published · 4 min read

اقرأ المقال بالعربي

When you buy a VPS with "4 vCPU, 8 GB RAM, 160 GB NVMe", those numbers describe a slice of a much larger physical server. A hypervisor, usually KVM on Linux hosts, divides the machine's processors, memory, disks and network card between many virtual servers and enforces limits so each one gets its share. Understanding how each resource is allocated helps you pick the right plan, read your monitoring correctly and tell the difference between a problem in your application and a limit of the platform.

The physical host and the hypervisor

A typical virtualization host has one or two multi-core CPUs, a large amount of RAM, fast local NVMe drives or access to network storage, and high-speed network interfaces. The hypervisor runs each VPS as a separate virtual machine with its own kernel, its own virtual hardware and strict isolation from its neighbours. If you want the background, our article on what virtualization is explains the layers in more detail.

CPU: what a vCPU really is

A vCPU is a virtual processor that the hypervisor schedules onto physical CPU threads. There are two common models:

ModelHow it worksGood for
Shared vCPUMany vCPUs share a pool of physical threads; you get burst performance but may wait when neighbours are busyWebsites, development, bots, most workloads with variable load
Dedicated vCPUEach vCPU is reserved for you and not shared with other customersSustained CPU work: builds, encoding, databases under constant load, game servers

On shared plans, the time your vCPU wanted to run but had to wait for the host is reported as steal time. You can see it in top as st, or with:

vmstat 1 5      # the "st" column
mpstat 1 5      # %steal (sysstat package)

Occasional small values are normal on shared hardware. Persistently high steal means the host is contended; see our guide on CPU steal time for how to interpret it.

Memory: reserved, not borrowed

RAM is generally the most strictly allocated resource. The amount in your plan is the memory your virtual machine sees, and well-run platforms avoid overcommitting it heavily because swapping on the host would hurt every customer. Inside your VPS, the kernel then manages that memory as usual:

free -h

Focus on the available column, not free. Linux uses spare memory for the page cache, so low "free" memory is normal and healthy. Problems start when "available" approaches zero and the system begins to swap or the OOM killer stops processes. Check for that with:

dmesg -T | grep -i -E "out of memory|killed process"

Storage: capacity, IOPS and throughput

Disk allocation has three dimensions:

  • Capacity: the gigabytes you can store.
  • IOPS: how many read and write operations per second the disk handles, critical for databases.
  • Throughput: how many megabytes per second it can move, important for backups and large files.

Local NVMe storage on the host usually offers low latency and high IOPS. Network block storage (volumes) can be attached and resized independently and survives server deletion, at the cost of somewhat higher latency. Providers often apply per-server limits so one customer cannot saturate the drives. Measure your own disk with fio rather than trusting numbers from elsewhere:

fio --name=randrw --rw=randrw --bs=4k --size=1G --iodepth=32 \
    --ioengine=libaio --direct=1 --runtime=60 --time_based --group_reporting

Run it on an idle server and delete the test file afterwards.

Network: port speed and traffic

Each VPS gets a virtual network interface connected to the host's physical uplink. Two numbers matter:

  • Port speed: the maximum bandwidth of your interface at any moment.
  • Included traffic: the monthly volume of data transfer in your plan; going beyond it may cost extra or be limited depending on the provider.

Check live usage with vnstat or iftop, and remember that the speed you measure to a distant country also depends on the routes in between, not only on your port.

How to verify what you got

A quick inventory after creating a server:

nproc                     # number of vCPUs
lscpu                     # CPU model and flags
free -h                   # memory
lsblk && df -h            # disks and partitions
ip -br addr               # network interfaces

On Windows, Task Manager's Performance tab and systeminfo give the same picture.

Choosing the right allocation

  • Small website or bot: shared vCPU, enough RAM to avoid swapping, modest storage.
  • Busy WordPress or store: more RAM for caching, NVMe storage, consider dedicated vCPU if CPU stays high.
  • Database server: RAM and disk IOPS come first; CPU second.
  • Windows Server: plan more RAM and disk than Linux, as the base system uses more.

Start with a size that fits today, monitor for a few weeks, then resize when the numbers tell you to.

FAQ

Is a vCPU the same as a physical CPU core?

Not exactly. A vCPU is usually mapped to a hardware thread, and on most modern processors each physical core runs two threads. On shared plans the thread is also time-shared with other virtual servers, so one vCPU delivers less sustained power than a dedicated physical core.

Why does my VPS show almost no free RAM?

Linux deliberately fills unused memory with disk cache to speed up file access, and it releases that cache instantly when applications need memory. Look at the "available" value in free -h. If it stays healthy and there is no swapping, your memory is fine.

Can I add resources to my VPS later?

Usually yes. Most providers let you resize to a larger plan, typically with a reboot. Take a snapshot first, and check whether the resize also enlarges the disk, because a larger disk may prevent moving back to a smaller plan later.

Related guides