Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk11 min

How to Check Memory Usage on a Linux VPS

Use free -h for available RAM and swap, top or ps to find the largest processes, and /proc/meminfo or vmstat to explain and track memory pressure over time.

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.

The fastest reliable check is to SSH into the VPS and run free -h. Read the available value as your practical RAM headroom, then inspect swap usage. Use top with Shift+M or a sorted ps command to find the processes consuming memory. If one snapshot is inconclusive, examine /proc/meminfo and watch vmstat 1 over time.

Do not treat a small free number alone as an outage. Linux intentionally fills spare RAM with reclaimable filesystem cache. Falling available memory, sustained swap activity, steadily increasing resident process memory, or an out-of-memory-killer event are much stronger evidence that the VPS is under pressure.

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.

Start with a five-minute memory check

Connect to the server over SSH with an account that can run ordinary monitoring commands. The following sequence moves from a system-wide snapshot to process attribution and then to trend data.

  1. Show the overall RAM and swap summary: run free -h. The -h option chooses human-readable units.
  2. Read the practical headroom: in the Mem: row, note available, not only free. In the Swap: row, note total, used, and free swap.
  3. Find large processes interactively: run top, then press Shift+M to sort the live process list by memory.
  4. Produce a one-shot report: run ps aux --sort=-%mem | head. This puts processes with the highest percentage of memory near the top.
  5. Check resident physical memory specifically: use ps aux --sort=-rss | head. RSS is the process memory currently resident in physical RAM; it answers a different question from virtual size.
  6. Inspect named kernel counters: run cat /proc/meminfo when the summary needs explanation.
  7. Look for a trend: run vmstat 1, which prints samples at one-second intervals, or repeat free -h at a consistent interval.

Take a timestamp and note what the VPS was doing when you collect the data. A quiet server, a backup, a deployment, and a traffic spike can have very different memory profiles, so a single reading should be treated as a snapshot rather than a diagnosis.

#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.

How to read free -h

The free utility reports total and used physical and swap memory, plus memory used for kernel buffers and cache. Its values are parsed from /proc/meminfo. The display is compact, but each column answers a different operational question.

Field What it represents How to use it
total The amount of physical RAM visible to the Linux system, or the total swap capacity on the Swap: row. Use it as the ceiling for that resource, while remembering that a VPS may also have service or container limits.
used For the memory row, total - available in modern free output; for swap, allocated swap according to the system counters. It is a calculated summary, not a list of processes that cannot be reclaimed.
free RAM that is completely unused, or swap that is not allocated. A low RAM value is normal when Linux is using spare pages for cache.
available An estimate of physical RAM that can be given to applications without swapping. This is the best first indicator of whether another application can start safely.
buff/cache Kernel buffers and reclaimable or cached data, including the components defined by the top manual as Buffers + Cached + SReclaimable for physical memory. Much of this space can be reclaimed when applications need it.
Swap totals SwapTotal, SwapFree, and the resulting allocated swap. Allocated swap is a reason to investigate activity and latency, but it is not by itself proof of a current emergency.

The practical distinction is between memory that is occupied and memory that is unavailable. Linux keeps recently used filesystem data in RAM because serving a cache hit is faster than reading storage again. When an application requests pages, the kernel can discard clean cache pages and reuse that space. Therefore, the number to watch for launch capacity is available, not the smallest possible free number.

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

The used column is calculated as total minus available. It consequently includes memory that is not immediately free but can usually be reclaimed. Comparing used with a process list without accounting for cache can make a healthy VPS look full.

Find which process is consuming memory

Use top for a live view

Run top and press Shift+M. The process table is reordered by memory so the largest entries rise to the top while the display refreshes. This is useful during a deployment, request surge, batch job, or suspected leak because you can see whether one process keeps growing or whether many services share the load.

Keep the system summary at the top of the screen in view. A large process percentage is meaningful only in relation to total RAM and to the current available and swap values. A process can remain large without causing pressure if ample memory is available; conversely, several moderate processes can exhaust a small VPS together.

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.

Use ps for a reproducible snapshot

For a one-time report, run ps aux --sort=-%mem | head. The %MEM column expresses each process’s share of physical memory as calculated by ps. This is convenient for copying into an incident record or comparing two snapshots.

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

When the question is “which processes currently occupy the most physical RAM?”, sort by RSS instead: ps aux --sort=-rss | head. RSS is the non-swapped physical memory resident for that process. It is generally more useful than VSZ for estimating immediate RAM pressure, although shared pages and accounting details mean RSS values should not simply be added to reproduce the system total.

ps aux field Meaning Best use
%MEM Process share of physical memory. Rank processes proportionally on a one-shot report.
VSZ Virtual memory size: the process’s virtual address-space allocation. Spot unusually large address spaces, but do not interpret it as RAM actually resident.
RSS Resident set size: physical memory currently resident and not swapped for the process. Prioritize processes occupying RAM now.

Do not add every RSS value and expect an exact match with free. Shared libraries and shared mappings can be counted in more than one process’s RSS, while kernel memory and caches are outside an individual process’s row.

Inspect the underlying counters with /proc/meminfo

Run cat /proc/meminfo for a detailed, line-oriented view. Each line contains a named counter, a value, and a unit. The most useful entries for a first investigation are:

  • MemTotal: physical memory recognized by the kernel.
  • MemFree: pages currently unused.
  • MemAvailable: the kernel’s estimate of memory that can be allocated to applications without swapping.
  • Buffers: memory used for kernel buffer data.
  • Cached: cached filesystem data.
  • SwapTotal: configured swap capacity.
  • SwapFree: swap space not currently allocated.

These counters are more granular than free -h and can explain why its totals change. They are also easy to capture in scripts because each item has a stable name and unit. Read them as kernel accounting fields, not as independent buckets. Kernel documentation warns that proc memory counters can overlap; adding every line together as if each represented unique bytes will produce a misleading total.

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

Use the detailed view when the process list does not explain the system summary. The unexplained portion may be kernel memory, reclaimable structures, filesystem cache, or another subsystem. At that point, inspect the counters relevant to the service or workload rather than assuming a hidden user process is responsible.

Measure memory pressure over time

Use vmstat 1 for a live trend

Run vmstat 1 and let it print several samples while the workload is active. The repeated rows show whether a condition persists or was only a transient allocation. In particular, watch the swap-in and swap-out activity columns. Sustained movement between RAM and swap indicates the system is actively juggling pages and may experience latency, even when a single free -h snapshot looks acceptable.

Stop the command with Ctrl+C after collecting enough samples to cover the event. Record the workload phase alongside the output; a deployment compile, database maintenance task, or scheduled backup can create a short-lived pattern that should not be mistaken for a leak.

Repeat free -h when you need a simpler record

If vmstat is more detail than you need, run free -h repeatedly at consistent intervals and compare available, swap used, and the process RSS rankings. A steadily declining available value combined with a steadily growing process RSS is stronger evidence of an application retaining memory than either number alone.

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

How to tell normal cache use from real pressure

Linux is designed to use idle RAM for useful work. A VPS can show very little free memory while still having substantial available memory because the kernel can reclaim cache. This behavior improves filesystem performance and is not an incident by itself.

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.

Use the following distinctions when deciding whether to escalate:

Observation Likely interpretation What to check next
Low free, healthy available, no sustained swap activity Often normal cache use. Continue monitoring under the real workload rather than clearing caches.
available falls during load but recovers after the load ends Transient demand. Identify the workload and decide whether its peak is expected.
available remains low while swap-in and swap-out continue Ongoing memory pressure. Use top or RSS-sorted ps to find the largest consumers and review service limits.
A process’s RSS grows across repeated samples Possible leak, unbounded cache, queue growth, or workload increase. Correlate growth with requests, jobs, configuration changes, and the process’s own metrics.
The kernel records an out-of-memory-killer event Available memory and reclaimable resources were insufficient for an allocation. Preserve the event time, identify the selected process, and compare it with memory and swap samples.

There is no universal “safe at X percent” threshold in these measurements. A percentage that is comfortable on a large VPS may leave no headroom on a small one, and workload burstiness changes the required reserve. Base an operational threshold on the service’s allocation pattern, observed available memory, and whether swap activity or failures occur.

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

Understand swap before deciding it is a problem

Swap is storage used as an extension of memory for pages that are not currently resident. The Swap: row in free -h shows total, used, and free swap. The top manual describes swap used as SwapTotal - SwapFree.

Some allocated swap can remain from an earlier period of pressure after RAM becomes available again. That historical allocation is different from active swapping. The time-series evidence from vmstat 1 is more informative: repeated swap-in and swap-out activity means pages are moving now. Active swapping can increase latency because storage is much slower than RAM.

When swap is filling and available memory is falling, first identify the workload and largest resident processes. Do not “fix” a cache-heavy but healthy server by deleting caches; cache is reclaimable and will refill. If the workload genuinely needs more concurrent memory than the VPS provides, reduce the workload’s peak, impose an appropriate service limit, move a job, or choose a larger memory allocation. The measurements tell you which class of decision is justified.

What to do when the numbers do not add up

A common mistake is to compare the total of visible process rows with used and assume the difference is an error. The system total also includes kernel memory, buffers, filesystem cache, reclaimable structures, and shared pages. Process RSS can count shared pages in multiple rows, while some kernel allocations have no ordinary user-process owner.

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

Start with /proc/meminfo to separate the major categories. If those counters still do not explain the behavior, inspect kernel and subsystem-specific counters for the service involved. The kernel documentation notes that additional interfaces may be required for particular subsystems; a database, filesystem, virtual machine, or container can expose accounting that is not represented by a single process RSS value.

Also verify the boundary at which the VPS is measured. A service or container may have a memory limit below the host or guest’s visible physical total. In that case, the machine-wide free -h output can show headroom while the constrained service is already at its limit. Check the limits and metrics applied to the relevant service, container, or control group before concluding that the kernel’s total is wrong.

Choose the right command for the question

Question Command Why it fits Limitation
How much RAM and swap are available right now? free -h Fast human-readable system summary. It does not identify the process responsible.
Which process is largest while I watch an incident? top, then Shift+M Interactive, continuously refreshed attribution. A screen snapshot can miss a short-lived process.
Which processes rank highest in a captured report? ps aux --sort=-%mem | head Simple, script-friendly one-shot output. %MEM is a proportion; it is not the same as virtual size or unique memory.
Which processes have the most resident physical memory? ps aux --sort=-rss | head Ranks by RSS, the resident set. Shared pages and kernel memory prevent exact summation.
Which kernel counters explain the summary? cat /proc/meminfo Detailed named fields and units. Counters can overlap and require careful interpretation.
Is pressure continuing or was it a spike? vmstat 1 or repeated free -h Shows change over time, including swap movement with vmstat. It needs a sample period that covers the workload event.

A practical incident workflow

  1. Capture the baseline. Save free -h output with the time and workload state.
  2. Check available headroom and swap. Decide whether the issue is low reclaimable headroom, allocated swap, or both.
  3. Attribute resident memory. Use top with Shift+M, then capture ps aux --sort=-rss | head for a record.
  4. Observe several intervals. Run vmstat 1 through the suspected peak and note sustained swap movement.
  5. Investigate growth. Compare RSS rankings and service behavior across samples. A single large process and many steadily growing processes lead to different remediation.
  6. Check the detailed accounting. Read /proc/meminfo and relevant service, container, or subsystem limits when process rows do not explain the total.
  7. Look for failure evidence. Correlate the time with application allocation errors, restarts, and kernel out-of-memory-killer events.
  8. Choose the smallest justified change. Reduce a workload peak, correct an unbounded process, adjust a service limit, or increase the VPS memory allocation only after the measurements establish which resource is constrained.

Common mistakes to avoid

  • Reacting to free alone: low unused RAM is expected when reclaimable cache is doing useful work.
  • Calling VSZ “RAM use”: virtual address space can be much larger than resident physical memory. Use RSS when physical occupancy is the question.
  • Adding all /proc/meminfo lines: counters overlap and are not independent accounting buckets.
  • Assuming any swap allocation means an emergency: determine whether pages are actively moving with a time series.
  • Relying on one instant: short jobs and bursts disappear between samples. Capture the event while it is happening.
  • Ignoring limits below the VPS total: a container or service can be constrained even when machine-wide memory appears available.
  • Clearing caches as a first response: reclaimable cache is normal; removing it treats a symptom and can reduce performance without fixing the consuming workload.

When manual checks are no longer enough

The built-in commands answer immediate operational questions without installing an agent. For a recurring problem, keep timestamped samples and correlate them with request volume, job schedules, deployments, and process restarts. Historical dashboards and alerts become useful when incidents occur between logins, but the same definitions still matter: alert on sustained loss of available memory, active swap movement, process RSS growth, or confirmed allocation failures rather than on a low free value by itself.

A useful alert should identify the scope as well as the number. Distinguish host or VPS memory from a service or container limit, specify whether the measurement is a one-time allowance or a recurring capacity, and retain enough history to show whether the condition is rising, stable, or recovering. That context prevents an automatic response to normal cache behavior while still surfacing genuine pressure early.

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

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 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
Outdated Drivers Are Slowing You DownFree scan - exact matches

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.