Mastodon

How to Monitor VPS Resource Usage: CPU, RAM, and Disk Space

  1. Home
  2. Blog
  3. How to Monitor VPS Resource Usage: CPU, RAM, and D...

Most people configure a VPS once and never look at its resource usage again until something breaks. That works right up until it does not: a VPS's resources are fixed, not elastic, so there is no automatic scale-up waiting in the background when traffic grows or a process starts leaking memory. Usage climbs quietly for weeks, and the first visible sign is usually a slow site, a failed cron job, or a database that suddenly refuses to write. A five-minute check every so often catches the trend long before it becomes an incident.

Why This Matters More on a VPS Than on Cloud Infrastructure

Cloud platforms with autoscaling absorb a resource spike by provisioning more capacity automatically, at a cost. A VPS does not do this: the RAM, CPU, and disk you provisioned are the ceiling, full stop. Running past that ceiling does not trigger anything helpful; it just means processes compete for what is left, response times climb, and eventually the kernel or the database starts refusing work outright. The fixed nature of a VPS is exactly why it costs less than equivalent cloud infrastructure, and the trade-off is that watching your own usage is now your job instead of the platform's.

CPU: Load Average, Not Just Percentage

A quick CPU check comes from uptime or top, both of which report load average as three numbers covering the last 1, 5, and 15 minute windows:

uptime

Output:

 14:32:01 up 12 days,  3:14,  1 user,  load average: 1.24, 0.98, 0.87

Load average only makes sense relative to how many CPU cores the VPS has. A load average of 1.24 on a single-core VPS means the CPU queue is slightly backed up; the same 1.24 on a 4-vCPU VPS means the machine is mostly idle, since it has capacity for up to roughly 4.0 before requests start queuing. Check core count with nproc, and treat a load average consistently approaching or exceeding that number, particularly the 15-minute figure, as the signal worth acting on rather than a brief spike in the 1-minute figure.

RAM: Why "Available" Is the Number That Matters

free -h is the standard check, but the free column is misleading on its own: Linux deliberately uses spare RAM for disk cache to speed up future reads, so a healthy server often shows very little in the free column while still having plenty of usable memory. The column that actually reflects what is usable is available, which accounts for cache that can be reclaimed instantly if an application needs it:

free -h

Output:

               total        used        free      shared  buff/cache   available
Mem:           3.8Gi       1.2Gi       210Mi       1.0Mi       2.4Gi       2.7Gi

Here, free looks alarmingly low at 210Mi, but available shows 2.7Gi genuinely usable, most of it currently doing useful work as disk cache. The number worth tracking over time is available trending steadily downward across weeks, not a single low reading of free. If you have swap configured, as covered in the swap setup guide, check the Swap line too; swap that stays consistently in use, rather than briefly during an isolated spike, is a sign RAM itself is genuinely undersized for the workload.

Disk Space: The One That Fails Loudest

Running out of disk space is uniquely disruptive compared to CPU or RAM pressure, because a full disk does not just slow things down, it can stop a database from writing entirely. MariaDB and MySQL both handle a full disk badly: transactions fail, and in some cases tables can be left in an inconsistent state if a write was interrupted partway through. Check disk usage with:

df -h

The usual causes of disk creeping toward full on a WordPress VPS are accumulating log files, an ever-growing systemd journal, and backups that are not actually being rotated the way you expect. If you followed the WordPress backup guide, periodically confirm the retention step is actually deleting files older than the window you set; a retention bug that silently stops working is one of the most common slow-motion disk failures on a self-managed server, because everything appears to work correctly until the disk is suddenly full.

Keeping an Eye on This Without Extra Tools

A dedicated monitoring dashboard is not required to catch problems early. A cron job that checks disk usage and notifies you past a threshold covers the single most disruptive failure mode with almost no setup: a one-line script checking df output against a percentage, run hourly, is enough to turn a silent disk-fill into an early warning. The same applies to periodically running free -h and uptime by hand during a normal SSH session; the goal is noticing a trend over weeks, not building real-time alerting for a single VPS running one site. The guide to monitoring server health and disk space walks through setting up exactly this kind of script with a working push notification.

Tools Worth Knowing If You Want More

htop and btop are both drop-in upgrades over top, showing per-core CPU usage, memory, and running processes in a more readable layout; neither requires configuration beyond installing the package. Netdata goes further, running as a background service that exposes a real-time web dashboard covering CPU, memory, disk I/O, and network throughput with almost no setup, which is worth it once you are managing more than one server and want a consistent view across all of them. These are about resource usage on the server itself; an external uptime checker like UptimeRobot answers a different question, whether the site is reachable from the outside world at all, and is worth running alongside rather than instead of resource monitoring.

When to Stop Monitoring and Start Upgrading

Tuning has a ceiling, and it is worth recognising rather than fighting past it. A load average that sits near your core count during normal traffic rather than during rare spikes, swap that is in constant use even after confirming RAM is not being wasted by an unoptimised process, or disk usage that keeps climbing after clearing out logs and confirming backup rotation is working, are all signs the VPS itself is undersized for what it is running, not that something is misconfigured. At that point, the VPS plan chooser guide covers what to look for when moving up a tier, and resizing an existing VPS is generally a quick operation rather than a full migration.

Frequently Asked Questions

What CPU and RAM usage is normal for an idle VPS?

A VPS running WordPress or a similar web application at idle typically shows a load average well under 1.0 regardless of core count, and RAM usage dominated by MariaDB's buffer pool and PHP-FPM's idle worker pool rather than active request handling. Exact numbers vary by stack, but the pattern to watch for is stability: idle usage should look roughly the same from one week to the next. A baseline that creeps upward over time without a corresponding increase in traffic points to a memory leak, a runaway process, or logs that are not being rotated, rather than normal growth.

Is high disk usage dangerous even if the server still seems to work?

Yes, and this is the case most people miss, because a disk at 85% full still works exactly like a disk at 40% full until it does not. There is no graceful degradation the way there often is with CPU or RAM pressure; a database write either finds space to complete or it fails, with essentially no warning between the two states. Treat 80% disk usage as the point to actively investigate rather than the point to start worrying, since the gap between fine and failing can be a single unusually large log file or backup.

Do I need a tool like Netdata, or is manual checking enough?

For a single VPS running one or two sites, checking manually every week or two, plus a basic cron-based disk space alert, covers the failure modes that actually matter without the overhead of running and maintaining a monitoring stack. A dedicated tool earns its place once you are managing several servers and want one dashboard instead of SSHing into each separately, or once you want alerting granular enough to catch a problem within minutes rather than whenever you next happen to check.

What load average actually counts as too high?

There is no fixed number; it only means anything relative to your core count. A load average approaching or exceeding your number of vCPUs, sustained across the 15-minute figure rather than a brief spike in the 1-minute one, means the CPU queue is genuinely backed up rather than momentarily busy. A 2-vCPU VPS holding a steady 1.9 fifteen-minute load average is close to saturated; the same reading on an 8-vCPU VPS is comfortably under a quarter of capacity.

Related Articles

VPS Hosting

What Is a VPS? The Complete Guide

VPS hosting sits between shared hosting and a dedicated server. This guide expla...

VPS Hosting

Managed vs Unmanaged VPS: What's the Difference?

Managed and unmanaged VPS plans look similar on paper but require completely dif...

VPS Hosting

VPS vs Managed WordPress Hosting: Which Is Right for You?

Managed WordPress hosting and VPS hosting both promise better performance than s...