SSH into the VPS and run free -h. Read the available value as your practical headroom, then check the Swap row. Use top and press Shift+M to find the biggest memory users, or run ps aux --sort=-%mem | head for a one-time list. If the snapshot is unclear, inspect /proc/meminfo and watch activity with vmstat 1.
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
What you are trying to measure
A Linux VPS exposes several different views of memory. Total RAM is the physical memory assigned to the virtual machine. A process list shows which programs have resident pages. The kernel also uses otherwise idle RAM for filesystem cache, and swap provides storage-backed overflow when RAM is under pressure. Those figures answer different questions, so no single column is a complete diagnosis.
As an Amazon Associate I earn from qualifying purchases.
Recommended Free Tools
For a game server or other always-on service, the useful questions are:
- How much memory can a new process use without forcing swapping?
- Which service is occupying resident physical RAM?
- Is swap merely configured, or is the kernel actively moving pages to and from it?
- Is memory usage stable, or is a process steadily growing toward an out-of-memory event?
Take more than one sample when investigating a problem. A single reading can reflect a cache warm-up, a scheduled backup, a game-server map load, or another short-lived event.
#1 Best Overall
Start with free -h
Run the summary command
- Connect to the VPS over SSH.
- Run
free -h. - Read the
Mem:row, especiallytotal,used,free,shared,buff/cache, andavailable. - Read the
Swap:row for total, used, and free swap.
The free(1) manual describes the command as displaying total, free, and used physical and swap memory, together with kernel buffers. Its values are parsed from /proc/meminfo.
Interpret the important columns
| Column | Meaning | How to use it |
|---|---|---|
total |
Memory visible to the system for that row. | Use it as the capacity baseline, not as a statement of how much is immediately free. |
used |
For the Mem: row, free calculates it as total minus available. |
A high value alone is not proof of a problem because reclaimable cache is included in the accounting. |
free |
Unused memory. | A small value is normal when Linux is using spare RAM for cache. |
available |
An estimate of physical memory that can be given to applications without swapping. | This is the best first indicator of practical headroom for starting a process. |
buff/cache |
Kernel buffers and cache; the top(1) manual defines physical cache here as Buffers + Cached + SReclaimable. |
Much of it can be reclaimed when applications need RAM. |
Swap used |
Configured swap capacity minus free swap. | It tells you that pages are parked in swap, not whether swapping is happening right now. |
Do not calculate a “safe” universal percentage from these fields. A VPS with a low free value can be healthy if available remains comfortable and swap activity is quiet. Conversely, a machine can be in trouble before every megabyte is consumed if available memory is falling and the kernel is repeatedly swapping.
Find the process using the most memory
Use top for a live view
- Run
top. - Press Shift+M (capital M) to sort the process table by memory.
- Watch the leading processes for several refreshes instead of judging one instant.
- Press q to quit.
top is useful when a game server, database, web service, or backup job is changing its footprint while you watch. Its summary also shows physical memory and swap information, while the process table lets you connect that pressure to a PID and command.
Use ps for a one-shot report
For a quick sorted list, run:
ps aux --sort=-%mem | head
This sorts by each process’s percentage of physical memory and prints the first entries. When the question is specifically “which processes have resident physical pages?”, sort by RSS instead of relying on virtual size:
ps aux --sort=-rss | head
The ps aux columns include %MEM, virtual memory size (VSZ), and resident set size (RSS). RSS is the non-swapped physical memory currently resident for that process. VSZ is the process’s virtual address-space size and can include mapped regions that are not resident, so VSZ is not a substitute for physical-RAM usage.
Understand RSS, VSZ, and shared memory
RSS is the most direct process-level clue when you are trying to explain pressure on the VPS, but it is not a perfect ownership ledger. Processes can share libraries and pages, and kernel accounting has details that do not appear as a simple one-process-one-byte allocation. Use RSS to rank candidates, then inspect the service and its own limits before deciding that one process is solely responsible.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →%MEM is a percentage of the machine’s physical memory. A process can have a large VSZ while using considerably less resident RAM. A growing RSS over repeated samples is more concerning than a large but stable virtual address space.
Inspect the kernel counters with /proc/meminfo
Run the detailed view
Use:
cat /proc/meminfo
The file reports one named counter per line, followed by a value and unit. The most useful fields for a first investigation are:
MemTotal: total physical memory reported to the kernel.MemFree: currently unused memory.MemAvailable: the kernel’s estimate of memory available to applications without swapping.BuffersandCached: major parts of filesystem-related memory accounting.SwapTotalandSwapFree: configured swap capacity and its unused portion.
These counters are not independent buckets. Kernel documentation warns that proc memory counters can overlap, so adding every line together will not produce a valid usage total. Use free for the summary and consult individual fields only for the question they describe.
Measure change over time with vmstat
Run:
vmstat 1
This prints a new sample every second. Keep it running while reproducing the load, then stop it with Ctrl+C. The memory columns help you see whether the system is merely caching files or is actively moving pages through swap. In particular, inspect the swap-in and swap-out activity columns (commonly shown as si and so on Linux): sustained non-zero activity while applications are busy is stronger evidence of pressure than swap being configured or containing old pages.
If you only need periodic summaries, repeat free -h at intervals and record the values. A trend of declining available memory, rising process RSS, or increasing swap activity is more informative than a single snapshot.
How to tell whether the VPS is actually under memory pressure
Signs that are usually benign
freeis small, butavailableremains stable.buff/cacheis substantial and falls when an application needs memory.- Swap is configured or has some used space, but
vmstatshows no sustained swapping activity. - Top processes have stable RSS and the VPS responds normally.
Linux intentionally uses spare RAM for filesystem cache. Reclaiming that cache is preferable to leaving RAM idle, so “almost all RAM used” is not, by itself, an incident.
Signs that deserve action
availablekeeps falling across samples.vmstat 1shows sustained swap-in or swap-out activity during normal workload.- A process’s RSS grows steadily rather than returning to a baseline after a task completes.
- Services become sluggish, time out, restart, or log out-of-memory-killer events.
There is no evidence-based universal percentage at which every VPS becomes unsafe. Workload, kernel version, swap configuration, and service limits all matter. Base the decision on these symptoms and on the trend.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesA repeatable investigation procedure
- Capture a baseline. Run
free -hand noteavailable, swap used, and the time. - Rank processes. Use
topwith Shift+M, then confirm withps aux --sort=-rss | headif resident memory is the question. - Check direction. Run
vmstat 1during the suspected workload, or take repeatedfree -hsamples. - Inspect details. Use
cat /proc/meminfowhen the summary and process list do not account for the change. - Correlate with service events. Compare the time of memory growth with game-server restarts, map changes, backups, deployments, or scheduled jobs.
- Verify limits. If totals do not match what the VPS plan promises, inspect container or service limits as well as host-level memory.
- Record the result. Save the command output and timestamp so the next sample can show whether the condition is improving or worsening.
When free and ps do not add up
It is normal for a process list not to explain every byte shown by the system summary. Kernel memory, filesystem cache, shared pages, and other subsystem allocations are not all assigned to one user-space PID. The overlapping nature of /proc/meminfo counters makes naive addition misleading as well.
When the gap is material or persistent, examine the detailed proc counters and the kernel or subsystem-specific interfaces relevant to the VPS. Also check whether the VPS is running inside a container or a service manager with a memory limit: the host’s total RAM and the process’s allowed cgroup can be different ceilings. A process can be killed by its limit even when the host-wide available value looks acceptable.
Rank #4
Common mistakes and their fixes
“The free column is low, so the VPS is out of RAM.”
Check available, buff/cache, and swap activity first. Cache can be reclaimed, while available memory estimates what applications can obtain without swapping.
“Swap used means the server is swapping right now.”
Swap used is a capacity calculation: SwapTotal minus SwapFree. Use vmstat 1 to see current swap-in and swap-out activity.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →“The process with the largest VSZ owns all that memory.”
VSZ measures virtual address space. Sort by RSS when resident physical memory is the question, and remember that shared pages complicate exact attribution.
“One top screen proves there is a leak.”
Take repeated samples. A leak is suggested by steadily growing RSS that does not fall after the workload ends, not by one large reading.
“Adding every /proc/meminfo line gives the total.”
Do not do this. The kernel documents overlapping counters; use the named fields for their intended meanings.
Best Value
- New
- Mint Condition
- Dispatch same day for order received before 12 noon
- Guaranteed packaging
- No quibbles returns
Choosing the right command
| Need | Best first tool | Why |
|---|---|---|
| One human-readable system summary | free -h |
Shows physical memory, practical available headroom, and swap in one screen. |
| Interactive process attribution | top |
Live view; Shift+M sorts by memory. |
| One-shot sorted process list | ps aux --sort=-%mem | head |
Convenient report with percentage, VSZ, and RSS. |
| Resident-memory ranking | ps aux --sort=-rss | head |
Sorts by resident physical memory rather than virtual size. |
| Kernel-level detail | cat /proc/meminfo |
Exposes named counters behind the summary. |
| Short-term trend and swapping | vmstat 1 |
Produces repeated samples so activity is visible over time. |
What to do after you identify pressure
First preserve evidence: capture free -h, the sorted process list, and a short vmstat 1 sample. Then determine whether the cause is a single growing service, a legitimate workload spike, kernel or cache usage, or a restrictive container limit. Restarting a process may temporarily reduce RSS, but it does not explain why it grew; use the trend and service logs to distinguish a leak from expected loading.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallIf swapping is sustained, reduce concurrent workload or move the service to a VPS with more physical memory after confirming that the workload, rather than an accounting misunderstanding, is the cause. If an OOM-killer event occurred, identify the killed PID and the applicable host or service limit before changing configuration. Keep monitoring after the change to verify that available memory and swap activity recover.
Practical checklist
- SSH to the VPS.
- Run
free -h; readavailable, not justfree. - Read the
Swaprow and distinguish configured usage from active swapping. - Run
topand press Shift+M. - Confirm resident memory with
ps aux --sort=-rss | head. - Use
cat /proc/meminfofor named kernel counters. - Use
vmstat 1or repeated summaries to establish a trend. - Check kernel, subsystem, container, and service limits when totals do not reconcile.
- Investigate falling available memory, sustained swapping, growing RSS, and OOM-killer events rather than reacting to a low free value alone.
Frequently Asked Questions
Why does Linux report almost all RAM as used?
Linux uses spare RAM for filesystem cache. A low free value is not automatically a failure; stable available memory and quiet swap activity are better signs that the VPS is healthy.
How can I see whether swapping is happening now?
Run vmstat 1 and watch the swap-in and swap-out columns, commonly labeled si and so. Swap capacity shown as used does not prove current swapping.
Should I sort processes by VSZ or RSS?
Use RSS when you want resident physical memory. VSZ is virtual address-space size and can include mapped regions that are not resident.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




