16GB vs 32GB RAM for Programming: Measured RAM by Task
Whether a developer laptop needs 16GB or 32GB of RAM depends on what you run. This table collects only numbers measured on this site under hard memory caps. No estimates, no vendor minimums. Rows are added as new measurements come in.
Measured RAM by task
| Task | 4GB | 8GB | 16GB | Peak memory |
|---|---|---|---|---|
| Local LLM 3B (Ollama, Qwen2.5 q4) | ok | ok | ok | 3.1–3.8GiB |
| Local LLM 7B | OOM | ok | ok | 6.2–6.3GiB |
| Local LLM 14B | OOM | OOM | ok | 13.6GiB |
| ROS 2 Nav2 build, default | failed | ok | ok | 8.1GiB (at 16GB) |
| Nav2 build, sequential | ok | — | ok | 2.7GiB |
| MoveIt 2 build, default | failed | failed | ok | 8.7GiB (at 16GB) |
| MoveIt 2 build, sequential | ok | ok | — | 2.4GiB |
4GB, 8GB and 16GB are the caps used in the measurements, not laptop RAM. On a real laptop the OS, browser and IDE take another 2–4GB, so read one column down to be safe. Builds were measured on a 4-core Linux server; LLMs ran on CPU only.
Add Docker if you are on a Mac
In the Docker Desktop measurement (8GB Intel MacBook), Docker’s memory on the Mac reached 3,063MiB with the default 4GiB VM, and memory freed inside the VM did not come back to macOS for minutes. If you run any of the tasks above inside Docker on a Mac, add the VM on top.
Where 16GB and 32GB split
- 16GB is enough for: a 7B local LLM on CPU, building Nav2 from source, MoveIt 2 with a sequential build, one or two database containers. Every one of these peaked at or below 8.7GiB.
- 32GB pays off for: a 14B local LLM (13.6GiB) with a browser and IDE open, a default MoveIt 2 build (8.7GiB) while Docker or other work runs, and default builds on 8+ core machines (more parallel compilers, more memory).
- Getting by on 8GB: build sequentially (
MAKEFLAGS=-j1 colcon build --parallel-workers 1), stick to 3B models, and lower Docker Desktop’s memory limit.
How these were measured
Each value comes from a Docker container with a memory cap and swap disabled (ok = finished inside RAM), read from cgroup memory.peak. The Docker Desktop figures are process RSS on a real Mac. Scripts and raw results are linked from each post.