For those used to Windows looking to make the jump to Linux, one point of confusion I see crop up again and again comes down to RAM. I frequently see people expressing concern over how little RAM they have free compared to Windows, but the truth is that there's no reason to be concerned at all. "Unused RAM is wasted RAM" is an old adage that still holds true today when it comes to Linux, and in all kinds of ways.

From servers to desktop computers, "free" RAM is not the same as "available" RAM in a Linux context, and your "free" RAM isn't actually all too important. I'll explain the difference, what's actually happening, and when you really need to care about your RAM usage.

Chances are, you're not actually low on memory

Breaking down the difference

Linux and Windows manage memory differently from each other, with the latter seemingly dictating the typical understanding that most would have of memory management. In both instances, your processes are allocated a region of memory for storing data, and this region of memory contributes to your "used" RAM. But on Linux, what counts as "used" at first glance also includes a large chunk of memory that is instantly reclaimable whenever an application actually needs it. Windows has a similar mechanism, which is referred to as "Standby," an admittedly easier concept to understand on the surface than a distinction between "used", "free", and "available."

Whenever the kernel reads data from disk, whether that’s a video you double-clicked or a tiny shared library every app needs, those blocks are copied into RAM. The next time you (or any program) request the same blocks, Linux can serve them straight out of memory rather than reading them from storage. The cache grows until something else needs the space, at which point the oldest or least-used pages are simply evicted.

What all of this means is that your RAM, which looks busy, is really doing two things: it's speeding up your entire system while remaining disposable. If an application suddenly asks for another gigabyte, the kernel can prune a gigabyte of cache instantly and hand that memory over to whatever requires it.

What actually matters is the "free" versus "available" metric. Cache is reclaimable, and you can use "free -m" or "free -h" in the terminal to see what's actually happening. The used and free columns here are raw values, in the sense that they count every byte occupied by anything, including cache. The available column, however, is the kernel's best estimate of how much memory could be given to new workloads without swapping. Notice in the example at the start of this section that although only 1630MB is "free", more than 2700MB is actually available.

👁 A Windows desktop next to a Linux desktop
5 reasons you should swap from Windows to Linux

Cant upgrade to Windows 11? Here's 5 reasons why it might be time to swap to Linux

When are you running out of memory?

There are a few easy ways to check

So, if the Linux "free" memory isn't the full story, what is? The best metric to watch is the "available" counter, and if it's consistently below 10% of your total RAM, it would be worth looking to see if you can either upgrade your RAM or cut back on services. Otherwise, you'll experience latency spikes as the kernel attempts to reclaim pages.

As well, keeping an eye on swap usage can be a key indicator of high memory usage, too. A few hundred megabytes of swap in use is normal, as the kernel will move idle pages to swap opportunistically, but if there are constant swap events taking place, that signals a true memory pressure that you'll need to deal with. You can use "vmstat 1" and look at the si/so columns, or use "sar -W 1" to see consistent swap usage. Those commands will refresh every second, so you can use them to keep an eye on your system for a couple of minutes if you'd like.

Finally, you can look for Out Of Memory killer (OOM) logs in dmesg. If you see messages like "Out of memory: kill process..." then you're actually running out of RAM. Unless you're running into any of these issues, or you feel that your system is slower because it's using swap memory, then you don't need to worry.

As for swap, Linux relies on it as more or less a safety valve. When RAM fills up, the kernel first evicts cache, then compresses anonymous pages if zswap or zram is active, before finally writing to disk-based swap. If your system has limited storage, you can consider a compressed, in-memory zram device. While it uses CPU resources to compress, it significantly extends available memory. Rest assured, though: if your "available" memory is fine, then you don't need to worry at all.