October 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 ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk8 min

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

A practical Linux workflow for finding memory pressure on a small VPS: measure available RAM, rank RSS, inspect /proc mappings, attribute cgroups, explain cache and kernel usage, and prove leaks with repeated samples.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Start with free -h (or free -w) to see whether the VPS is actually under memory pressure. Then rank processes by resident memory, inspect suspicious PIDs under /proc, check service-level cgroups with systemd-cgtop, and account for cache, kernel memory, tmpfs, shared pages and swap. A single command shows only a snapshot; repeated samples are needed to prove a leak or identify what preceded an OOM kill.

1. Establish whether the VPS is under memory pressure

Do not treat a small number in the free column as proof that a process has consumed all RAM. Linux deliberately uses otherwise idle memory for filesystem cache and reclaimable kernel objects. The useful first question is whether the kernel can provide memory to new work without excessive reclaim or swapping.

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.

Read the high-level view

free -h
free -w

The free utility reports physical and swap totals from /proc/meminfo. The human-readable form is easiest to scan; the wide form exposes separate cache-related columns on versions that support it.

  • MemAvailable is the best quick indicator of memory that can be allocated without swapping, including memory the kernel expects it can reclaim.
  • used is a calculated total and includes memory that may be reclaimable. It is not, by itself, evidence of a leak.
  • buffers/cache describes reclaimable filesystem and kernel cache. A high value can be normal on a busy server.
  • Swap shows whether a safety reservoir exists and how much is currently occupied. Swap use is a warning to investigate, not automatic proof that one process is leaking.

Capture the output before killing anything. If MemAvailable is healthy and swap is unused or stable, the VPS may simply be using RAM efficiently. If available memory is falling, swap is filling, or allocation failures coincide with load, continue with process and service attribution.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

2. Rank processes by resident memory

Use a reproducible process list

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

This prints the 20 processes with the largest resident set size (RSS). The columns identify the process ID, parent, owner, executable name, percentage of physical memory, RSS and virtual size.

  • RSS is the amount of a process’s pages currently resident in RAM. It is the useful first ranking for physical-memory pressure.
  • VSZ is the process’s virtual address-space size. It can include unmapped reservations, shared libraries and pages that are not resident, so it is not a RAM-usage figure.
  • %MEM is calculated from RSS and the system’s physical-memory total; it can look large on a very small VPS even when the absolute number of megabytes is modest.

You can also launch top, press Shift+M to sort by memory on standard procps builds, and watch whether the same process keeps growing. Record the timestamp and workload while observing it.

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

Do not add RSS values as if they were independent

RSS includes pages shared with other processes. A common library, shared mapping or copy-on-write page may appear in several RSS totals. Adding every row can therefore exceed the RAM that would actually be freed by stopping one process. Treat the list as a way to find candidates, not as an exact ownership ledger.

3. Inspect a suspicious PID

Fast per-process check

PID=1234
sed -n '1,120p' /proc/$PID/status

Replace 1234 with the PID you found. In the output, compare:

  • VmRSS: resident memory currently in RAM.
  • VmSize: total virtual address space, which is broader than resident use.
  • VmSwap: the process’s pages currently placed in swap, where the kernel reports that accounting.

The process may exit before you read the file; that is normal for a short-lived worker. Re-run the command against the new PID and note restarts rather than assuming the disappearance means the problem is fixed.

Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.

Get an aggregate mapping breakdown

cat /proc/$PID/smaps_rollup

smaps_rollup aggregates the process’s memory mappings and is a practical next step when status is not enough. It helps distinguish private versus shared pages and reports totals such as proportional set size (PSS), which apportions shared pages across their users. Reading these files costs more than reading status, so use them on selected PIDs rather than polling every process continuously.

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

Find the individual mappings

less /proc/$PID/smaps

smaps lists each mapping and its detailed counters. Look for unusually large anonymous regions, heap growth, file-backed mappings, shared memory and swap-backed pages. The kernel’s /proc documentation defines status, statm, smaps and smaps_rollup as process-memory interfaces. The Linux man-pages documentation cautions that accurate values require smaps or smaps_rollup; they are slower but more detailed than summary interfaces.

4. Attribute memory to a service, not just a PID

A process list can hide the owner of memory when a service launches several workers, rapidly replaces children, or runs inside a control group. On a systemd-based VPS, ask systemd to order cgroups by memory:

systemd-cgtop --order=memory

This view groups processes under service and slice units, making it easier to identify the service responsible for a collection of workers. Compare the largest unit with the PIDs listed by ps and inspect the unit’s recent restarts or job schedule before changing its configuration.

systemd-cgtop is only as complete as the accounting enabled for the relevant services. Its manual warns that full accounting requires memory accounting to be enabled. If a unit is missing or its value is incomplete, check the unit and host’s cgroup configuration rather than concluding that the service uses no memory.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by

5. Explain memory that no single process appears to own

When the RSS ranking is much smaller than total memory in use, the remainder is usually in categories that process rows cannot cleanly represent. Inspect the kernel’s counters:

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

Page cache and reclaimable kernel objects

Cached records filesystem page cache and SReclaimable covers reclaimable kernel structures. Both can make the used total look high while remaining available for reuse. A sudden cache increase after large reads or backups is different from an anonymous allocation that grows and never falls.

Tmpfs and shared memory

Shmem includes memory used by shared-memory filesystems and related shared allocations. Containers, databases, browsers and application runtimes may place data in shared memory or tmpfs. That memory can be charged differently depending on the process and cgroup, so it may not appear as one obvious RSS owner.

Kernel and cgroup accounting

Kernel data structures, networking buffers and other kernel-managed memory do not correspond to a user-space PID. Cgroup limits can also make a service hit its memory ceiling even while the host still has reclaimable memory elsewhere. Check both host-wide MemAvailable and the service’s cgroup accounting when a unit reports an out-of-memory event.

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

Shared mappings

Shared libraries and memory-mapped files are visible in multiple processes’ RSS. A large total of RSS rows can therefore describe the same physical pages more than once. Use smaps_rollup and PSS for a more defensible comparison, while remembering that even PSS is an accounting estimate rather than a promise of exactly how many pages a kill would free.

Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

6. Identify what caused an OOM kill

Check kernel messages promptly

dmesg -T | grep -i -E 'out of memory|oom|killed process'
journalctl -k -b | grep -i -E 'out of memory|oom|killed process'

Use whichever command is permitted on the VPS. The kernel message normally names the killed PID and includes memory statistics from the moment of the decision. Match that PID to the service, command and cgroup at the time; a later process list may show a replacement with a different PID.

Distinguish host OOM from cgroup OOM

A host-wide OOM occurs when the kernel cannot satisfy allocations for the machine as a whole. A cgroup OOM occurs when a service reaches its configured limit, even if other host memory could theoretically be available. This is why a service-level view and the unit’s memory limit matter alongside free. Preserve the kernel log, the unit name and the cgroup statistics before restarting the service, because a restart can erase the most useful evidence.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

7. Prove a leak or normal workload growth with repeated samples

One measurement tells you who is large now, not who is growing. Schedule or manually capture the same small set of commands at a fixed interval while recording traffic, imports, backups, cron jobs, deployments and restarts.

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

For a suspected process, add:

PID=1234
grep -E '^(Name|VmRSS|VmSize|VmSwap):' /proc/$PID/status
cat /proc/$PID/smaps_rollup

Compare samples by PID and by service. A steadily rising private or proportional footprint that tracks neither traffic nor a bounded job is stronger evidence of a leak than a single high reading. Growth that falls after a batch completes may be expected workload behavior; growth that resets only after a restart points to a process or library that is retaining memory, but the trend still needs to be correlated with the triggering activity.

8. Choose the right diagnostic view

View Scope Best use Cost and limitation
free -h or free -w Whole system Decide whether available RAM and swap indicate pressure Fast snapshot; does not identify an owner
ps or sorted top Process Rank likely user-space consumers by RSS Fast; shared pages make totals non-additive
/proc/PID/status One process Quick RSS, virtual-size and swap check Summary values, not a mapping-level explanation
/proc/PID/smaps_rollup One process’s mappings Aggregate private/shared and detailed memory attribution Slower to read; use selectively
/proc/PID/smaps Individual mappings Find the exact heap, file, anonymous or shared region Most detailed and most expensive snapshot
systemd-cgtop --order=memory Service or cgroup Find the unit consuming memory across workers Complete accounting depends on memory accounting being enabled
/proc/meminfo Kernel ownership categories Explain cache, shared memory, reclaimable objects and swap Requires interpretation; fields are not interchangeable with RSS

9. A safe incident runbook

  1. Preserve evidence: record the time, hostname, VPS memory size, current workload and any OOM messages.
  2. Measure pressure: run free -w and inspect MemAvailable, cache fields and swap.
  3. Rank candidates: run the exact ps command and note the top processes, their owners and parent processes.
  4. Inspect the leading PID: read /proc/PID/status, then smaps_rollup and smaps only if the summary does not explain the size.
  5. Check service ownership: run systemd-cgtop --order=memory and verify that memory accounting covers the unit.
  6. Account for the remainder: compare process findings with Cached, SReclaimable, Shmem, swap and other /proc/meminfo fields.
  7. Correlate over time: repeat the measurements around traffic spikes, scheduled jobs, deployments and restarts.
  8. Mitigate deliberately: only after identifying the owner, reduce concurrency or workload, fix the retaining process, adjust a justified service limit, or restart as a temporary recovery. Do not disable caches or kill the largest PID merely because its RSS is high.

10. Common misdiagnoses and corrections

“Free RAM is almost zero, so there must be a leak.”

Check MemAvailable and cache fields first. Linux may be using idle RAM for reclaimable cache, which is normal until applications need it.

“The biggest RSS process owns all the missing memory.”

RSS includes shared pages and excludes kernel, cache and some cgroup-level effects. Inspect mappings and service accounting before assigning blame.

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.

“VSZ proves the process is consuming that much RAM.”

VSZ is virtual address space, not resident memory. Use RSS for initial ranking and smaps_rollup or smaps when accurate attribution is required.

“The process that is large now is the one the OOM killer terminated.”

OOM decisions and process lists are time-specific. Read the kernel log and match the recorded PID or command; a supervisor may already have started a replacement.

“A single snapshot proves a memory leak.”

Only repeated, comparable samples can show a trend. Correlate growth with workload and restarts, and distinguish bounded batch usage from unbounded retention.

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.

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

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 from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
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.