Checking memory usage with free

Checking memory usage with free

free utility shows the amount of free / used memory.

free
free

The biggest misinterpretations that I’ve seen on both Windows and Linux systems are with the swap and cached memory.

Cached memory is exactly what it sounds: memory dedicated for cache. Cache from this memory can be dropped at any time when needed, for example if some process needs a big chunk of memory, the kernel can simply give it some of the cached memory.

swap is a part of disk that is used when physical RAM memory is full. Unlike Cached memory, Swap will never use caching.

So, in plain English: available memory is both cached memory and used, while swap is only used.

free shows the following information:

totaltotal physical memory: RAM + SWAP
usedused memory excluding buffered/cached memory
freeunused memory
sharedsum of memory used by tmpfs file system
cache (buff)memory dedicated for caching that can be released if needed
availableactually available memory

Available memory includes both free memory and buffered/cached memory.

available RAM
available RAM

Total memory is obviously total: RAM and SWAP.

total - Checking memory usage with free

whoami
Stefan Pejcic
Join the discussion

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.