I'm shopping for a low-power laptop that will mostly be a thin client: terminal, a browser, and an editor. The heavy work would live on a VM elsewhere. The RAM option is the part I can't settle, and on a lot of these machines it's soldered, so I can't fix it later.
The argument for 16 GB is simple. A terminal and VS Code with Remote-SSH don't use much locally, because the language servers and builds run on the remote side. The extra 16 GB costs real money and, depending on the model, a bit of battery.
The argument for 32 GB is that the browser is the actual hog. I regularly have a pile of tabs open, plus Grafana dashboards, a few docs sites, and a video call. And a laptop that's kept for five or six years tends to get asked for more than I planned.
What I haven't done is measure. I'm going to log memory on my current machine for a couple of weeks before buying anything. The rough plan:
- Sample used memory and swap every minute with a small script
- Look at the peak during a normal workday, not the average
- Check whether swap is actually being touched, and how often
- Note what was open when it peaked
Something like this for the sampling:
while true; do
echo "$(date -Is) $(free -m | awk '/Mem:/ {print $3, $7} /Swap:/ {print $3}' | tr '\n' ' ')" >> ~/memlog.txt
sleep 60
done
I'm leaning toward 16 GB if the peak stays comfortably under it with some headroom, and 32 GB only if swap shows up regularly. But I'm unsure whether "used" is the right number, since the kernel caches aggressively and browsers release memory when pressed.
How did you decide? If you went with 16 and regretted it, what was the thing that pushed you over? And is there a better metric than used memory plus swap activity?