24 Gigabytes of Memory Ought to be Enough for Anybody

Are you familiar with this quote?

It's amusing, but Bill Gates never actually said that:


This is a companion discussion topic for the original blog entry at: http://www.codinghorror.com/blog/2011/01/24-gigabytes-of-memory-ought-to-be-enough-for-anybody.html

“Buying RAM is for people who don’t know how to write Algorithms.” – Me, just now.

One notable fact to remember is a typical server motherboard would utilise ECC RAM, which is priced much higher than consumer desktop RAM modules.

Incidentally, i just upgraded my home server from 12 to 24GB of ECC RAM. My wallet cried from the bleeding.

+1 “Buying RAM is for people who don’t know how to write Algorithms.”

It kind of Depends how you Define “Memory” doesn’t it?
We dream of one day a type of Memory that would unify all, speed of RAM, Capacity of SSD.
And With Muti Core, We are hitting the “wall” for Memory Bandwidth, not Memory Capacity.

“What’s the harm in having obscene amounts of memory, making my system effectively future proof?”

Unless you need that much memory right now

No! It doesn’t work that way. Your processor (and hence your motherboard, knowing how processor sockets change every or every other generation) would be long outdated by the time 24GB is not enough for your needs, by which time, DDR3 and 4GB RAM modules would be ancient technology.

"Algorithms are for people who don’t know how to buy RAM."
And lots of RAM is for people who don’t know how to write algorithms. :slight_smile:

I tend to use RAM as a compilation area for performance (compiling Android firmwares is significantly faster from a RAM disk than even a Flash SSD), that can eat up 10GB without too much trouble. Add into that I have a couple of virtual machines due to my machine being a Mac Pro (it’s an 8 core so running some VMs doesn’t end up with the system being CPU bound), the company accounts package being Windows only, and Froyo being most suited to building on Ubuntu, and the 20GB I have soon gets eaten away. If you also add in running a database instance loaded up with a few GB of data for performance testing you can hopefully see that 24GB or more can be useful.

For consumers I agree, 24GB is a lot, but for people like me, where buying more RAM is makes economical sense in terms of being able to run VMs instead of buying machines which can run a OS, and the time saved in compilation due to using RAM instead of a physical disk, I can see the need for some people to go beyond 24 GB.

I build my Core i7 desktop about 2 years ago now and put 12GB of RAM in it. It sure cost a lot more than $299 for the RAM then.

CPU wise the speed of the machine seems fine. And I have hit 12GB of usage now and then… Perhaps its time for 24… Oh, and SSDs…

“What’s the harm in having obscene amounts of memory, making my system effectively future proof?”

Well, Aphrodite3D (2 posts back) beat me to it. But it’s even worse. Say that you don’t really need 12 of those 24 Gb ram. That’s $149.5. Now, if you wouldn’t have bought those 12 Gb and notice in 5 years that you really do need more than the RAM you already have, you probably could have bought more with those $149.5 than you have now.

And, as Aphrodite3D said, technology marches on so it’s possible that your RAM is outdated at that point in time. So, you need to buy all your 24 Gb again in the new memory technology, what makes those $149.5 completely wasted.

Seriously?

I like your blog but please never write something like algorithms are for people who can’t afford more ram. Memory management and efficiency should always be a goal, or else you end up with browsers using 2gb of ram with 5 tabs open, and more crap like that.

Yes, memory is cheap. That shouldn’t promote terrible code.

i7 920, clock for clock, made a huge difference over my Core 2 Q6600 on the desktop. I estimate it was between 2 and 3 times faster, both overclocked to 3.4GHz, depending on whether I was doing a build of the source tree, or transcoding a video.

Definitely not “blah”.

"making my system effectively future proof? "

Except it isn’t. The ram is almost obscenely unbalanced. The video card, hard drive, motherboard and cpu will probably go out of date first, yes. I just think the extra money should have gone into a second video card/cpu, more hard drive space, etc. and you still could have had 8 GB of ram.

Algorithms are for people who don’t know how to buy RAM.
… or “who have all the time in the world”.

One of the most stupid things I’ve ever heard.

Stefano R.

Some of you guys are pretty serious about the Church of the Holy Algorithm. Which is better for you and your clients: writing software that costs $1000 but requires a $500 hardware upgrade, or writing software that requires no upgrade but costs $4000 because you spent four times as long to wring that last 10% of optimization out of it? Remember, you could have spent that extra 75% overhead on improving the product in more tangible ways or creating new software. Pride is good, but pragmatism is better.

Now, that doesn’t explain those companies that charge $10,000 more than the old version for something that requires $4,000 in hardware upgrades, despite having outsourced their entire development staff and fired their testers. Some companies are just too dumb to live, and yet somehow keep making money.

I wouldn’t buy a Nehalem processor now. Sandybridge is right around the corner and is a more significant change. http://en.wikipedia.org/wiki/Sandybridge

"Algorithms are for people who don’t know how to buy RAM."
That’s probably the most horrible computer science related statement I’ve ever read.

relying upon great piles of memory instead of smart usage of it makes me think of foolish man and one that grows rich. The fool uses every penny that comes in, but the rich man thinks long term and avoids unnecessary expenditures. The rich man understands that the future is uncertain and its better to have extra resources available to handle unexpected opportunities and problems.

For a minute there I thought you were making an excuse that if you buy 24 gigs of RAM you are allowed to write sloppy ‘who-gives-a-crap-about-memory’ code.

If you are… ‘STOP IT, Or I’ll bury you alive in a box!’ :slight_smile: - http://bit.ly/hZqPF5

“Which is better for you and your clients: writing software that costs $1000 but requires a $500 hardware upgrade, or writing software that requires no upgrade but costs $4000 because you spent four times as long to wring that last 10% of optimization out of it?”

You are right about the business argument, especially when you use an extreme example like that. However, I do oppose to this “let’s just add more hardware to the equasion” as an excuse for actual craftsmanship.

Call me a hippy, but it is incredibly wasteful to just keep piling servers (which need a location, power, maintenance, etc) when you could have optimized it or do it right within reasonable effort. I mostly have a problem with the mentality that we live in a world with limitless resources and energy, and money is the only constraint that matters. It is the other way around: money is limitless as it can be created out of nothing, actual resources cannot.

I know this is merely a philosophical argument that wont help anyone in actual business, but I do home some of us start to realize the real value of money vs real things.

It’s just not a solution.
Sure managers and the like can try whatever they want to keep costs low, but the thing is that writing ‘optimal’ code is not more time consuming than writing non-optimal code. Sure, making optimalisations requires times, but optimalisations are only neccessary if you’re building on a base that consists of bad code. The beauty of computing science is that ‘the best’ is usually also the most concise and the most maintainable.
A software engineer can’t rely on hardware to solve his problems. They’re separate fields involving seperate people. You can’t replace the incompetence of one person with the competence of another if that person is active in a different field. It’s like telling someone to ‘build’ a fireproof vault and then that person decides to give the vault its fireproof quality by keeping firemen present at all time.