Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Why Linux Shows Little Free RAM: What It Means

· 5 min read · Home Tech

In this article
  1. Background: The Linux Memory Philosophy
  2. How Linux Memory Accounting Works
  3. Why “Free” Is Not the Same as “Available”
  4. How to Check Real Memory Usage
  5. Common Misconceptions and Mistakes
  6. When Low Available Memory Is a Real Problem
  7. Comparison with Other Operating Systems
  8. Frequently Asked Questions

Linux often shows very little free RAM, and this is by design, not a problem. The operating system uses available memory for caching and buffering to speed up disk access, so “free” memory is wasted memory. This article explains what the numbers really mean and how to interpret them correctly.

Background: The Linux Memory Philosophy

Unlike Windows or macOS, Linux aggressively uses spare RAM for disk caching. When you read a file, the kernel stores a copy in memory (page cache). If the same file is read again, it comes from RAM instead of the disk, which is thousands of times faster. This is why a freshly booted Linux system might show 1 GB free, but after a few hours of use, it shows 100 MB free — even if you haven't opened any new programs. The kernel is simply using that memory for something useful rather than leaving it idle.

How Linux Memory Accounting Works

To understand the numbers, you need to know the key terms from commands like free -h or htop:

  • total — physical RAM installed.
  • used — memory actually consumed by processes and kernel (excluding cache).
  • free — memory completely unused.
  • shared — memory used by tmpfs (RAM-based file systems) and shared between processes.
  • buff/cache — memory used for disk buffers and page cache.
  • available — an estimate of how much memory can be given to new apps without swapping. This is the number that matters.

The free command shows two rows: Mem and Swap. The available column is the best indicator of real memory pressure. It accounts for cache that can be dropped instantly when a program needs memory.

Why “Free” Is Not the Same as “Available”

When you see 50 MB free but 8 GB in buff/cache, the system is not running out of memory. The kernel can reclaim cache pages immediately — they are just copies of disk data. If a new application asks for 2 GB, the kernel discards 2 GB of cache and gives it to the app. This happens in milliseconds, so there is no performance penalty. The only time you should worry is when available is low (close to zero) and the system starts swapping heavily.

How to Check Real Memory Usage

Use these commands to get an accurate picture:

  1. free -h — shows total, used, free, shared, buff/cache, available in human-readable units.
  2. htop — interactive process viewer with a memory bar at the top. Press F6 to sort by memory.
  3. cat /proc/meminfo — raw kernel memory statistics.
  4. vmstat 1 — shows memory and swap activity every second. Watch the si and so columns; if they are non-zero, swapping is happening.

For a quick check, run free -h and look at the available column in the Mem row. If it's above 20% of total RAM, your system is fine.

Common Misconceptions and Mistakes

One common mistake is using a GUI system monitor that shows “used” as total minus free, which includes cache. That makes it look like 90% of RAM is used when actually 90% is cache. Another misconception is that you need to “free” RAM by closing apps or using memory-cleaning tools. This is counterproductive — the cache is there to speed up your system. Clearing it forces the kernel to re-read files from disk, slowing things down.

Another error is confusing buff/cache with memory leaks. A memory leak shows up as used growing steadily over time, not as cache. If used is stable and buff/cache grows, that's normal.

When Low Available Memory Is a Real Problem

If available is consistently below 10% of total RAM and you see high swap usage, you have a genuine memory shortage. Symptoms include sluggish response, constant disk thrashing, and the OOM (Out-Of-Memory) killer terminating processes. In that case, you should:

  • Close unused applications or browser tabs.
  • Check for memory leaks with top (sort by RES column).
  • Add more RAM if your hardware allows it.
  • Adjust swappiness (sysctl vm.swappiness=10) to reduce swapping, but this is a temporary fix.

Comparison with Other Operating Systems

Windows and macOS also use caching, but they display it differently. Windows Task Manager shows “Cached” as part of “In use” unless you click “Performance” and look at the breakdown. macOS Activity Monitor shows “Memory Used” and “Cached Files” separately. Linux is more transparent about it, but the default free output can be misleading if you don't know what to look at. The key difference is that Linux's cache is more aggressive and reclaimable, so a “low free” reading is even less of a concern than on other systems.

Frequently Asked Questions

Why does my Linux system show 0 bytes free?

That means all RAM is either in use or in cache. As long as the available column is not near zero, your system is fine. The kernel will free cache instantly when needed.

Should I use a RAM cleaner or “free RAM” script?

No. These tools force the kernel to drop caches, which slows down your system because subsequent reads will hit the disk. Linux already manages memory optimally; manual intervention is unnecessary and harmful.

Why does my system monitor show 90% memory usage when I only have a few apps open?

Because the monitor is counting cache as used. Check the available number instead. Most modern monitors (like GNOME System Monitor) have a “Memory” view that separates cache, but the default percentage often includes it.

How do I clear the cache if I really want to?

You can drop caches with sudo sync; echo 3 > /proc/sys/vm/drop_caches, but this is only for testing or benchmarking. It will not improve performance and may degrade it temporarily.

What is the OOM killer and how do I avoid it?

The OOM killer is a kernel mechanism that terminates processes when memory is completely exhausted. To avoid it, keep available above a few hundred MB. If you hit OOM frequently, add swap or more RAM.

Does using a lot of cache wear out my SSD?

No. Cache is just RAM; it doesn't involve writes to disk. The only wear concern is from swap usage, which is minimal if you have enough RAM.