64GB is the right call for a 20GB database.

Yes, you can keep the full database in memory with 64GB, and queries will be faster because you avoid disk I/O entirely.

With 32GB, you’re cutting it close. A 20GB database on disk often expands in memory — indexes, connection buffers, query caches, and the OS itself eat up several gigs. You might still fit 20GB in 32GB if you’re lucky, but you’d be running right up against the wall. Once the OS starts swapping to disk, your query latency goes from microseconds to milliseconds — defeating the whole point.

64GB gives you comfortable headroom. The database lives entirely in RAM, the OS breathes, and you can run other processes without causing page faults. This is one of those cases where more memory isn’t overkill; it’s the difference between “works” and “works well.”

Don’t try to save $100 here. You’ll regret every swap.

Explore

Explore

Explore