DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
VGSources
Blog

How to Find What Is Using All the Memory on a Small VPS

A practical, command-by-command method to find what consumes RAM on a small VPS, interpret MemAvailable and swap, inspect process mappings, attribute service usage, and prove whether growth is a leak.
Length11 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Start with free -h (or free -w) to determine whether the VPS is actually under memory pressure, then rank processes by resident memory, inspect suspicious PIDs under /proc, and check systemd cgroups for service-level usage. A process list is only a snapshot: page cache, tmpfs, shared pages, kernel structures, and cgroup accounting can explain memory that does not appear to belong to one process. Repeat the measurements over time before calling anything a leak.

1. Establish whether the VPS is under pressure

Log in to the VPS and take a whole-system reading before stopping anything:

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
free -h
free -w

The free utility reports physical and swap totals from /proc/meminfo. Human-readable output is convenient for a quick check; the wide format from free -w separates cache-related columns more clearly. The key question is not whether the column labelled used looks large. Linux deliberately uses otherwise idle RAM for filesystem cache and reclaimable kernel memory, so a high used value can be normal.

Field or view What it tells you How to use it
MemAvailable An estimate of RAM that can be given to applications without swapping. Use it as the first pressure indicator. A falling value, especially alongside swap activity, is more significant than low free RAM by itself.
buffers/cache RAM occupied by data that the kernel can often reclaim. Do not automatically treat this as a leak. Cache can grow during normal disk activity and shrink when applications need memory.
Swap Swap capacity and the amount currently occupied. Used swap confirms that pages have been moved out of RAM at some point; increasing use or active swapping indicates contention.
free Pages currently unused. Useful context, but not a complete measure of available memory.

Read the MemAvailable and swap lines together. A machine can show very little completely free RAM while remaining healthy if available memory is ample and swap is unused. Conversely, a VPS with apparently moderate “used” memory can be in trouble when available memory is collapsing and swap is filling. Record the timestamp and the complete output so later samples are comparable.

#1 Best Overall
Sale
Gaoye Blue Light Blocking Glasses
  • BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
  • EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
  • COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
  • LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
  • WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.

Check the underlying counters when the summary is confusing

For a more detailed system view, inspect the fields that make up the summary:

grep -E '^(MemTotal|MemFree|MemAvailable|Buffers|Cached|SReclaimable|Shmem|SwapTotal|SwapFree):' /proc/meminfo

Cached covers reclaimable file cache, SReclaimable covers reclaimable kernel slab objects, and Shmem reports shared-memory and tmpfs pages. These categories help explain why adding application RSS values may not equal the total shown by free.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

2. Rank processes by resident memory

Once you know the system is under pressure, find the largest resident consumers:

ps -eo pid,ppid,user,comm,%mem,rss,vsz --sort=-rss | head -n 20

This prints the process ID, parent process ID, owner, command name, percentage of physical memory, resident set size (RSS), and virtual size (VSZ), sorted from largest RSS to smallest. RSS is the portion of a process’s address space currently resident in RAM. VSZ is the virtual address space reserved or mapped; it can include untouched allocations, shared libraries, mappings, and address ranges that do not consume equivalent physical memory. For this triage, RSS is generally the more useful ordering column.

You can perform the same ranking interactively with top. Start it, press M to sort by memory, and watch whether the same process remains near the top across several refreshes. A single high entry identifies a candidate, not a proven leak.

Rank #2
Windex Gaming Cleaning Wipes, Pre-Moistened Wipes to Instantly Clean all Gaming Gear and Electronics, Resealable Packaging for a Freshness Lock, 25 count (Pack of 1)
  • WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
  • AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
  • PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
  • ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
  • COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed

Why RSS values must not simply be added

Processes can map the same physical pages, including shared libraries and shared memory. Each process may count those pages in its RSS, so summing RSS can overstate the amount that would be returned by terminating one process. The kernel’s per-process mapping reports provide better attribution when this distinction matters. Treat the RSS list as a way to choose which PIDs deserve inspection, not as an exact accounting ledger.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep the process identity straight

Capture the PID, PPID, user, and command together. A worker may be restarted under a new PID, and a generic command name can represent several instances. Check the parent process and the service that launched it before taking action. Do not kill a process merely because it is large: determine whether it is a database, web worker, job, or a critical system component, and make sure you have a recovery plan.

3. Inspect an individual PID through /proc

Replace PID below with the number from the process ranking. Begin with the quick status interface:

grep -E '^(Name|Pid|PPid|VmSize|VmRSS|VmSwap|RssAnon|RssFile|RssShmem):' /proc/PID/status

VmRSS is the resident amount reported for the process, while VmSize is its virtual size and VmSwap is the amount of its memory currently swapped out. The RssAnon, RssFile, and RssShmem lines help distinguish anonymous allocations, file-backed mappings, and shared memory when the kernel exposes them. The status file is fast enough for routine checks, but it is still an aggregate view.

Use smaps_rollup for a detailed aggregate

For a more accurate breakdown without reading every mapping separately, run:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
LISEN Cell Phone Stand Phone Holder for Desk, Office Decor Gadgets for Men
  • Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
  • Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
  • Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
  • ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
  • Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
cat /proc/PID/smaps_rollup

The rollup aggregates the process’s memory mappings and includes values such as proportional set size (PSS), private clean and dirty pages, shared pages, and swap. PSS divides shared pages among the processes that use them, making it more suitable than raw RSS for estimating a process’s proportional footprint. Reading these files is slower than reading status, so reserve it for the PIDs that matter.

Use smaps when one mapping is the suspect

For mapping-by-mapping detail:

less /proc/PID/smaps

Each mapping is followed by its size, RSS, PSS, private pages, shared pages, and swap figures. This can reveal a large anonymous region, a file-backed mapping, or a shared-memory segment that an aggregate process list cannot distinguish. The Linux kernel documents status, statm, smaps, and smaps_rollup as process-memory interfaces. The Linux man-pages documentation specifically advises using /proc/PID/smaps or smaps_rollup when accurate values are required because they are slower but more detailed.

Interpret the three views together

Interface Scope Speed and precision Best use
/proc/PID/status One process, summarized Fast; broad counters Initial confirmation of RSS, virtual size, and swap.
/proc/PID/smaps_rollup One process, all mappings aggregated Slower; detailed aggregate Separating private, shared, file-backed, and swapped memory.
/proc/PID/smaps One process, each mapping Slowest; most granular Finding the specific mapping or allocation category driving growth.

4. Attribute memory to a service with systemd cgroups

A process list can obscure service ownership when a daemon has many workers, forks children, or shares memory with helper processes. On a systemd-based VPS, ask the control-group view to order services by memory:

systemd-cgtop --order=memory

Control groups (cgroups) collect the processes belonging to a service or slice, so this view can show that one service as a whole is consuming memory even when no single worker looks dominant. It is especially useful for web stacks, queue workers, and other services that spread work across multiple PIDs.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

systemd-cgtop‘s manual warns that complete accounting requires memory accounting to be enabled for the relevant services. If a service is missing, incomplete, or reports no useful memory figure, check its unit configuration and whether memory accounting is enabled before concluding that cgroups disprove the process-level result. Accounting settings can vary by distribution and systemd version; make changes deliberately and reload the unit configuration according to your distribution’s administration procedure.

Rank #4
Ledagic IC+RGBW USB Powered Led Light Bar with App & Remote Control, 2 Pack
  • Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
  • Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
  • 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
  • Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
  • USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC

Map a cgroup entry back to processes

After identifying a busy service, inspect its status and then return to the process tools:

systemctl status SERVICE
ps -eo pid,ppid,user,comm,%mem,rss,vsz --sort=-rss | head -n 20

Use the service status to confirm the unit name, main PID, restart history, and recent log context. Then inspect the service’s main PID and its workers with /proc. This two-level approach answers both “which service owns the memory?” and “which process or mapping inside that service is responsible?”

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

5. Explain memory that no process appears to own

If the top RSS values do not add up to the system total, that is expected in many cases. Compare the process observations with these /proc/meminfo fields:

  • Page cache: file-backed pages retained to accelerate disk access. The kernel can reclaim much of this cache under pressure, so it is not equivalent to an unreclaimable application allocation.
  • Kernel structures: network buffers, slab objects, and other kernel bookkeeping consume RAM without appearing as ordinary user processes. SReclaimable is a useful indicator of reclaimable slab memory.
  • Tmpfs and shared memory: filesystems mounted in RAM and inter-process shared segments are represented by Shmem. Their pages may be visible through several processes or through the filesystem rather than as one obvious owner.
  • Shared mappings: shared libraries and shared regions can be counted in multiple RSS values. PSS in smaps_rollup gives a fairer proportional view.
  • Swap: swapped-out pages still belong to processes, but they are no longer resident. VmSwap and the swap totals in free show this separately from current RSS.
  • Cgroup boundaries: a service limit or container boundary can account for memory differently from the host-wide process list. A process may be inside a cgroup whose total includes children and shared charges.

These categories are why “the processes only use X” is not a sufficient explanation of a host-wide memory reading. The correct diagnosis identifies whether the remainder is reclaimable cache, shared or tmpfs memory, kernel usage, swapped pages, or accounting outside the view you are using.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

6. Identify an actual OOM kill

When the kernel runs out of reclaimable memory and swap, it can invoke the out-of-memory (OOM) killer. The event is recorded in kernel messages, which let you distinguish an OOM kill from an application crash or a service restart. On systems using the journal, search the kernel log:

Best Value
Sale
HUANUO FlowLift™ Dual Monitor Stand, Fully Adjustable Gaming Monitor Desk Mount for 13–32″ Computer Screens, Full Motion VESA 75x75/100x100 with C-Clamp & Grommet Base, Each Arm Holds 4.4 to 19.8 lbs
  • Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
  • Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
  • Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
  • Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
  • Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.
journalctl -k --no-pager | grep -i -E 'out of memory|oom|killed process'

Look for the timestamp, killed PID, command name, and any cgroup or memory-limit information. Match the PID and time to the service status and your process snapshots. If the VPS provider exposes only a restricted guest log, the message may be incomplete; record what is available and check whether the service manager restarted the process afterward.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

An OOM message proves that the kernel selected a process under pressure; it does not, by itself, prove that the selected process caused the entire event. Reconstruct the situation using the preceding free, process, and cgroup samples. A large process may have been the easiest victim while another workload, cache surge, or cgroup limit created the pressure.

7. Prove whether memory is leaking or workload-driven

A single command captures a snapshot. To establish a trend, run the same measurements periodically and preserve timestamps. The following shell loop records the system summary, top RSS processes, and selected meminfo fields every five minutes:

while true; do
  printf 'n=== %s ===n' "$(date -Is)"
  free -w
  ps -eo pid,ppid,user,comm,%mem,rss,vsz --sort=-rss | head -n 20
  grep -E '^(MemAvailable|Cached|SReclaimable|Shmem|SwapFree):' /proc/meminfo
  sleep 300
done | tee -a "$HOME/memory-trend.log"

Stop the loop with Ctrl-C. Adjust the interval to the workload; a short-lived batch job may require more frequent samples than a quiet game server. Keep the log long enough to include normal busy and idle periods, planned deployments, backups, cron jobs, and restarts.

Correlate growth with events

For each apparent rise, note whether the same PID or service remains alive and grows, whether a new worker appears, and whether MemAvailable falls at the same time. Compare the timestamps with traffic, scheduled jobs, uploads, database maintenance, deployments, and service restarts. A leak pattern is persistent growth by the same allocation or service across comparable workload conditions, followed by pressure when no work is ending. Normal workload growth rises and falls with demand, while cache often expands during activity and recedes later.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Capture smaps_rollup for the suspect PID at several points in the trend. If anonymous private memory grows while the workload is stable, investigate that process or its library. If file-backed cache or shared memory grows instead, examine the files, tmpfs mounts, or cooperating processes represented by those mappings. Do not label a leak until repeated samples support a trend.

8. Choose the right diagnostic view

Question Use What it can and cannot prove
Is the VPS under pressure right now? free -h or free -w Shows available RAM, cache context, and swap; it does not identify an owner.
Which PIDs are largest? ps ... --sort=-rss or top sorted by memory Fast RSS ranking; shared pages make totals non-additive.
What is inside one process? /proc/PID/status, then smaps_rollup or smaps Moves from quick counters to detailed mapping and proportional accounting, at increasing cost.
Which service owns a group of workers? systemd-cgtop --order=memory Service-level view; complete results require memory accounting for the relevant units.
Where did the remaining host memory go? /proc/meminfo Separates cache, reclaimable slab, shared memory, swap, and other system categories rather than naming one process.
Is usage growing? Repeated timestamped snapshots Provides a time dimension; one sample cannot establish a leak.

9. Common mistakes and safer corrections

  • Mistake: treating low “free” RAM as failure. Check MemAvailable, cache, and swap before taking action.
  • Mistake: adding every RSS value. Shared pages can be counted repeatedly. Use PSS from smaps_rollup when proportional attribution matters.
  • Mistake: using VSZ as physical usage. Sort by RSS for resident memory and inspect detailed mappings before judging virtual allocations.
  • Mistake: stopping the largest process immediately. Confirm its service role, parent, logs, and restart behavior. Killing a critical daemon can cause an outage without fixing the underlying pressure.
  • Mistake: ignoring swap. Swap occupancy and change over time distinguish a comfortably cached system from one struggling to keep active pages resident.
  • Mistake: trusting an incomplete cgroup view. Check whether memory accounting is enabled; otherwise, fall back to process and /proc measurements.
  • Mistake: diagnosing from one timestamp. Save repeated samples and correlate them with workload and kernel OOM messages.
  • Mistake: assuming the OOM victim is the culprit. Reconstruct the pressure leading up to the event and include cache, shared memory, kernel usage, and cgroup limits.

10. A compact incident runbook

  1. Run free -w and record MemAvailable, cache fields, and swap.
  2. Run ps -eo pid,ppid,user,comm,%mem,rss,vsz --sort=-rss | head -n 20 and note the leading PIDs.
  3. For each candidate, read /proc/PID/status; use smaps_rollup when shared, private, or swapped memory needs separation.
  4. Run systemd-cgtop --order=memory if systemd is present, and verify that service memory accounting is enabled.
  5. Compare the process and service findings with /proc/meminfo, especially Cached, SReclaimable, Shmem, and swap.
  6. Search kernel messages for OOM events and match their PIDs and timestamps to the service logs.
  7. Start a timestamped sampling loop and correlate changes with traffic, jobs, deployments, and restarts before changing limits or killing processes.

This sequence separates immediate pressure from ordinary cache use, identifies likely process and service owners, explains accounting gaps, and supplies the time series needed to decide whether the VPS has a leak or simply experienced a heavier workload.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.