High CPU or RAM usage can cause lag, slow command responses, failed updates, or game servers being killed by the operating system. Use Linux process tools to find what is using resources before restarting or killing anything.

Start with the built-in commands first. Install htop if you want a cleaner live view of processes, CPU cores, memory, and swap.

 

Check usage with top

  1. Connect to the VPS with SSH.
  2. Check the current CPU and memory view with top. This is available on most Linux installs without adding anything:
    top

    Ubuntu VPS terminal showing top CPU and memory output

 

Install htop

htop is not always installed by default. Install it first if the htop command is missing.

  1. On Ubuntu or Debian, run:
    sudo apt update
    sudo apt install htop

    On AlmaLinux, Rocky Linux, Oracle Linux, or CentOS-style systems, run:

    sudo dnf install htop
  2. Open htop for an easier live view:
    htop

    Ubuntu VPS terminal showing htop running with CPU memory and process usage

 

Check memory and swap

  1. Check memory and swap usage separately:
    free -h

    Ubuntu VPS terminal showing free -h memory and swap output

  2. List the highest memory processes if you need a quick non-interactive view:
    ps aux --sort=-%mem | head

    Ubuntu VPS terminal showing highest memory processes with ps aux sorted by memory

If a game server uses all memory during startup, reduce settings, remove unused services, add swap as a short-term safety net, or upgrade RAM. If CPU is high only during updates, map generation, world saving, or first launch, wait for that task to finish before changing anything.

 

How to read the output

MetricWhat it means
Load averageHow busy the VPS has been recently. Compare it with the number of CPU cores.
Used memoryMemory currently used by processes and cache.
Swap usedDisk-backed emergency memory. Constant swap usage usually means the VPS needs more RAM.
CPU%Processes using CPU time. Sort by CPU in top or htop to find the cause.

If a process is using high resources, identify what it is before killing it. Stopping a database, game server, or panel process without saving can cause data loss.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to connect to a Linux VPS with SSH

SSH is the normal way to manage a Linux VPS. It gives you a terminal on the server so you can...

How to update packages on a Linux VPS

Keeping packages updated helps patch security issues and keeps server tools compatible. Run...

How to create a sudo user on a Linux VPS

A sudo user lets you manage a Linux VPS without logging in as root for every task. This is safer...

How to secure SSH on a Linux VPS

SSH is the main way to manage a Linux VPS, so it should be secured before the server is used for...

How to check disk usage on a Linux VPS

Disk usage issues can stop updates, backups, logs, databases, and game saves from writing...