Skip to content
In-house anti-DDoS, included on VPS, game servers and web hosting · hosted in France · cancel anytime See our plans
CloudFive
Log in

01

See live activity with htop

First connect to the VPS over SSH (see connecting to a VPS over SSH). The htop tool shows the machine's activity in real time. It is often already installed on Ubuntu; if not, install it and start it:

sudo apt update
sudo apt install htop
htop

The top of the screen sums up the state of the VPS:

  • The numbered bars: one per processor core, with its usage. A single core at 100% while the others are idle points to a program that can only work on one core.
  • Mem: the RAM in use out of the total.
  • Swp: swap space, an area of the disk where the system puts memory that no longer fits in RAM. It is much slower than RAM.
  • Load average: three numbers, the average load over 1, 5 and 15 minutes. It is the average number of processes using the processor or waiting for their turn (on Linux, those waiting for the disk count too). Compare it with the number of cores, given by the nproc command: a load that stays above that number means tasks are queuing.

Below is the process list. The useful columns: CPU%, MEM%, RES (the physical memory the process actually occupies) and Command. The keys to know:

  • P sorts by processor, M by memory, F6 opens the sort menu;
  • F3 or / searches for a process by name, F4 filters the list;
  • F9 or k sends a signal to the selected process, for example to stop it;
  • F10 or q quits.
02

Memory and disk: free, df and du

Memory. The free -h command shows memory in readable units (MB, GB):

free -h

Do not rely on the free column: Linux uses free memory as a cache for files (buff/cache column) and hands it back as soon as a program needs it. The number that matters is available, the estimate of memory still available for new programs without using swap. The Swap line shows swap space: if it fills up and the VPS slows down, RAM is short.

Disk. df -h shows how full each file system is; look at the Use% column of the line mounted on /. A full disk stops databases and logs from writing, and can block whole services.

df -h

To find what takes the space, du measures folder sizes. -s gives one total per folder, -h readable units:

sudo du -sh /var/log /var/lib /home
sudo du -xh --max-depth=1 / 2>/dev/null | sort -h

The second line lists the top-level folders of the disk, smallest to largest (-x stays on the same file system). Then go down into the largest folder with the same command. The usual suspects: logs, old backups, Docker images and the package cache. The system journal is measured and trimmed with its own commands:

journalctl --disk-usage
sudo journalctl --vacuum-size=200M
sudo apt clean

Reads and writes. If the disk is not full but everything is slow, the iotop tool (sudo apt install iotop, then sudo iotop -o to see only processes that are reading or writing) shows what is hitting the disk. It depends on kernel options: it may show empty columns, or not work at all in a container VPS (LXC).

03

Find errors with journalctl

On Ubuntu, services managed by systemd write to a shared journal, which journalctl lets you filter:

systemctl --failed
sudo journalctl -p err -b
sudo journalctl -u nginx --since "1 hour ago"
sudo journalctl -f
  • systemctl --failed lists failed services;
  • -p err keeps only messages of error level or worse, -b limits output to the current boot;
  • -u filters one service (here nginx, replace it with yours) and --since sets the start of the period;
  • -f shows new messages as they arrive; Ctrl+C to exit.

To be warned when a service goes down without having to log in, an external probe such as Uptime Kuma complements these commands well. And to run a check at a set time, see scheduling tasks with cron.

04

When memory is full: the OOM killer

When RAM and swap are exhausted, the Linux kernel triggers the OOM killer (out of memory): it kills a process, usually the one using the most memory, so that the system survives. The typical symptom: a service (database, game server, Java or Node.js application) stops for no visible reason.

Check that this is what happened. Look for the kernel message, then the state of the service:

sudo journalctl -k | grep -i "out of memory"
systemctl status service-name

The kernel line gives the name and number of the killed process. In a container VPS (LXC), the kernel log may not be readable: systemctl status then shows a stop by the KILL signal or an oom-kill result.

Find what is using memory. Sort by memory in htop (M key), or list the largest processes:

ps aux --sort=-%mem | head -n 10

What to do next.

  1. Limit the program at fault if it allows it: a database's cache size, the maximum memory of a Java application (-Xmx), the number of processes of a web server.
  2. Stop what is no longer used: old Docker containers, services installed for a test.
  3. On a KVM VPS, a swap file gives some headroom to absorb a peak. It is slow and does not replace RAM:
    sudo fallocate -l 2G /swapfile
    sudo chmod 600 /swapfile
    sudo mkswap /swapfile
    sudo swapon /swapfile
    echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
    In a container VPS (LXC), swap is set by the host: you cannot add any yourself.
  4. If memory stays full under normal use, the VPS is too small for what it runs: move to a bigger plan.
05

Moving to a bigger plan, or not

Before paying more, check that the shortage is lasting and not a one-off peak: look at the same indicators at several times of the day and week. A few signs:

  • Memory: available close to zero and swap filling up under normal use, or repeated stops by the OOM killer.
  • Processor: 15-minute load average staying above the number of cores, and slowness noticed by users.
  • Disk: usage above 85 to 90% even after cleaning up.

If the problem comes from a single badly tuned program or a memory leak, a bigger plan will only delay the next incident. If the load is simply heavier than at the start, the bigger plan is the right answer. The guide choosing a VPS helps with sizing, and VPS or dedicated server shows when a whole machine becomes the better option.

06

On CloudFive

Our Ryzen VPS, from €5.99 per month, run on AMD Ryzen 9 9950X with DDR5 memory and NVMe storage; an Intel Xeon range exists too. The commands in this guide work the same way on both.

  • Root access, a dedicated IPv4 address and basic anti-DDoS protection included.
  • A console in the customer area, useful if the VPS no longer answers over SSH because memory is saturated.
  • Snapshots from the customer area, to take before a major configuration change.
  • VPS in KVM (full virtualisation, with your own kernel and swap, see KVM VPS) or as an LXC container. The guide KVM or container explains the difference.

The servers are in France, monthly with no commitment, and support answers in French 7 days a week by ticket, on Discord and by phone. If your VPS runs short of resources, move to the next tier from the VPS page, with Change plan: the difference is charged pro rata.

07

Frequently asked questions

How do I check RAM usage on a Linux VPS?

Run free -h and look at the available column: it is the memory still available for new programs. The free column is misleading, because Linux uses free memory as a cache and gives it back as soon as it is needed. To see which processes use memory, sort by memory in htop with the M key.

What does load average mean?

It is three numbers: the average system load over 1, 5 and 15 minutes, that is the average number of processes using the processor or waiting for their turn. Compare it with the number of cores given by nproc. A load that stays above that number means tasks are waiting.

How do I find out what is filling my VPS disk?

Start with df -h to see overall usage, then sudo du -xh --max-depth=1 / | sort -h to rank folders by size. Then go down into the largest one. Logs, old backups, Docker images and the package cache are the most common causes.

Why does a service stop on its own on my VPS?

Often because memory is full and the kernel's OOM killer killed it to free RAM. Search for out of memory in sudo journalctl -k, and check systemctl status for the service. Then reduce the memory it uses or move to a bigger plan.

When should I move to a more powerful VPS?

When the shortage lasts under normal use: available memory close to zero with swap filling up, load above the number of cores for long periods, or a disk that is almost full despite cleaning up. If a single badly tuned program is to blame, fix it first.

Support CloudFive AI

An answer right away, a real team behind it.

CloudFive AI answers you at any hour, in seconds. When it doesn’t know, or as soon as you ask, the team that runs the machines takes over. No offshore call centre.

  • TicketThe team replies in under 2 hours, 7 days a week.
  • CloudFive AIAt any hour, on ia.cloudfive.fr, Discord and in your customer area.
  • DiscordThe team, the AI and other customers, in the help channel.
  • Your data stays with usAI runs on our servers in France; e-mails, IPs and passwords are masked.
A ticket in the customer area: a customer’s question about a Minecraft plugin, and the CloudFive team’s reply
A real ticket in the customer area, answered by the team (demo account; shown in French).
CUSTOMER AREA · APP

Your servers.
At your fingertips.

Restart a server, watch its resources live, pay an invoice or open a ticket — and get an alert when something goes wrong.

  • The status of all your services at a glance
  • Blocked attacks, filtered traffic, monthly peak
  • A notification when a server goes down or an invoice is due

App coming soon · in the meantime, everything works in your browser at manager.cloudfive.fr

The CloudFive app: the list of your services, with their status
The CloudFive app: the home screen, your services’ status, blocked attacks and an invoice to pay