BETA
This is a BETA experience. You may opt-out by clicking here

More From Forbes

Edit Story

Why 16 Gigabytes Of RAM Isn't Overkill At All

Following
This article is more than 7 years old.

Is 16 GB of RAM overkill? originally appeared on Quora: the knowledge sharing network where compelling questions are answered by people with unique insights.

Answer by Stan Hanks, CTO of Columbia Ventures Corp, on Quora:

16GB is the new 4GB.

In theory, operating systems manage memory space using virtual memory constructs. Every process gets its own clean address space, the OS lives in its own address space, and it all abstracts down to pages (typically 4096 bytes).

When you run a program, the OS allocates and “assembles” what looks like a contiguous memory space, based out of chunks of 4k blocks of memory scattered hell to breakfast around the available memory. If you run out of available blocks? You take the least recently used block that’s allocated, write it out to disk, and use that.

It’s called paging. Great stuff. Terribly innovative when it started showing up in OS's in the 80's. Beat the heck out of swapping entire programs in and out of memory.

But here’s the thing: while in theory that gives you unlimited memory for applications, it’s still slow relative to not having to do it. Processors have gotten really fast, so waiting a few milliseconds for the pages you need to page in feels like death to the user.

If you were only using one program at a time, dating back to Windows 3.1 or thereabouts, this wouldn’t matter much. But you’re not. I’m running four completely different browsers right now, Slack , Xcode, a couple of command terminals, Notes, Preview, iMessage, and of course Finder. In at least a couple of those browsers, I’m running a pile of open tabs, each of which is more or less a separate process, making my total task load somewhere up in the 40+ range.

When I click to move from one window to the next, my expectation is that it will happen instantly because “that’s what computers are supposed to do.” If I have enough memory that everything I’m running is resident, then it’s all good. There’s no paging, no memory shuffling, just some context registers in the memory management unit being reset so that the right pages are mapped (and that happens all the time, behind the scenes, anyway, to enable system processes to run, etc.)

So I want to make sure that I have enough memory free so that no matter what I’m doing, I don’t page.

These days, 16GB is about right. In practice, you’ll never fill it up. But that's the point. You don’t want to.

Wasteful? Not really. Not when you value time against the truly trifling cost of adding that extra 8GB of RAM.

This question originally appeared on Quora. Ask a question, get a great answer. Learn from experts and access insider knowledge. You can follow Quora on Twitter, Facebook, and Google+. More questions: