RAM (RAM)
RAM is the computer’s short-term memory. Programs and files are stored long term on a disk, but when you open them they are loaded into RAM because RAM is far faster. More RAM lets you keep more apps, browser tabs, or virtual machines open at once. When you turn the computer off, everything in RAM disappears, which is why you save your work to disk.
Random Access Memory (RAM) is volatile memory addressed directly by the CPU. In current systems it is DRAM on modules (DIMMs for desktops and servers, SO-DIMMs for laptops and mini PCs) or soldered to the board.
Key specs:
- Capacity: GB per module and total.
- Generation: DDR4 and DDR5 are not interchangeable; the motherboard and CPU decide which you can use.
- Speed: transfer rate in MT/s (for example DDR5-5600), plus CAS latency.
- Channels: two matching modules in dual-channel mode roughly double bandwidth over one.
- ECC: error-correcting memory detects and fixes single-bit errors. Common in servers and recommended for ZFS storage hosts.
How Linux uses RAM:
- Each process gets virtual memory, mapped to physical pages by the kernel.
- Unused RAM becomes page cache for recently read files. This is why “free” looks low on a healthy system; the
availablecolumn is the number that matters. - When RAM runs out, the kernel moves idle pages to swap on disk. Heavy swapping is slow.
- If memory is fully exhausted, the OOM killer ends a process to keep the system alive and logs it.
Checking memory on Linux
# Human-readable totals. Watch "available", not "free"
$ free -h
total used free shared buff/cache available
Mem: 7.7Gi 2.1Gi 1.2Gi 150Mi 4.6Gi 5.3Gi
Swap: 4.0Gi 0B 4.0Gi
# Installed modules, speed, and type (physical hardware only)
$ sudo dmidecode --type memory | grep -E "Size|Speed|Type:"
# Top memory users
$ ps aux --sort=-%mem | head -5
# Did the OOM killer fire?
$ journalctl -k | grep -i "out of memory" RAM is usually the first limit you hit in a homelab, because every VM reserves its own slice. A 32 GB host fills quickly with a NAS VM, a Docker host, and a couple of test machines. When a Linux box slows to a crawl and the disk light stays on, it is often swapping; free -h and vmstat 1 confirm it. For a learner VM running Ubuntu Desktop, 4 GB is a workable minimum and 8 GB is comfortable. When buying RAM, match the generation and form factor the board supports and install modules in matched pairs.