Memory on Linux - what is enough?

MyWorld

Executive Member
Joined
Mar 24, 2004
Messages
5,001
I'm in the process of getting my stuff together for a new upgrade and was wondering about memory.

What is enough for a Linux desktop computer?
I have been running dual channel 4GB for about 4 years now and was just now contemplating going over to 8GB dual channel, but is this a wise move?

In the past if you had too much ram your system would suffer performance wise (Windows days and early kernel 2.4 days), but I have been out of the loop for so long (hardware wise) that I have no idea of what would be considered enough/overkill for a serious desktop machine.

It will probably be favourable for video editing and VM's, dunno, have no idea.

What is your thoughts?
 

stricken

Expert Member
Joined
Sep 5, 2010
Messages
2,265
Well better quality RAM, graphics card and mother board is going to give you more performance than more RAM.

Unless you're running 3 VM's using a gig or two of RAM each in addition to native apps. I would go with the 8Gb upgrade. Most modern 64bit Linux Kernels can handle 16Gb or more. (that is if your actually going to be running multiple VM's and some large native apps of course)
 

MyWorld

Executive Member
Joined
Mar 24, 2004
Messages
5,001
Well better quality RAM, graphics card and mother board is going to give you more performance than more RAM.

Well the upgrade is going to see me having to get a new mobo, RAM and CPU since I'm still on on DDR2 Core 2 Duo tech.
Graphics, I'm not so worried about since I only play games every now and then, so my 8800 GT will have to wait a year or so longer to be upgraded (unless I get a second hand card for a steal).
 

Other Pineapple Smurf

Honorary Master
Joined
Jun 21, 2008
Messages
14,593
Well the upgrade is going to see me having to get a new mobo, RAM and CPU since I'm still on on DDR2 Core 2 Duo tech.
Graphics, I'm not so worried about since I only play games every now and then, so my 8800 GT will have to wait a year or so longer to be upgraded (unless I get a second hand card for a steal).

Well going over to DDR3 is a big improvement. Both my wife and I got Celeron laptops this month, hers is a dual core celeron 2.2Ghz with DDR3, mine is a single core 2.3Ghz with DDR2. Both 2GB for now.

Without a doubt the DDR3 makes the bigger difference than than the dual core processor. She got the better laptop because she does Scrapbooking on it (mine if just for PHP development).
 

Other Pineapple Smurf

Honorary Master
Joined
Jun 21, 2008
Messages
14,593
Unless you're running 3 VM's using a gig or two of RAM each in addition to native apps. I would go with the 8Gb upgrade. Most modern 64bit Linux Kernels can handle 16Gb or more. (that is if your actually going to be running multiple VM's and some large native apps of course)

I would agree with 8Gb as it seems to be the next standard. Our office will also require 8GB spec for all our new dev machines which run 1-2 VMs and need to fire up VI to edit some Python / PHP / erlang code.
I always mention graphics cards to buyers as KDE does not play pretty with a lot of onboard graphics and the experience is ruined. But then again I'm a traditionalist Gnome user, so I don't care.
 

bin3

Senior Member
Joined
Jun 22, 2005
Messages
976
"... must ... have ... more ... memory ...... "

"if you have to ask, it's not enough"

or something in that line.

get as much as you can: it's cheap -- and one of the cheapest things to give you the most enjoyment our of some expensive kit.

though I wouldn't go much higher than 8GB if you don't have a specific need for it
 

biometrics

Honorary Master
Joined
Aug 7, 2003
Messages
71,858
I assume the rule for Windows applies to Linux: you need a 64 bit OS if you go over 4 GB addressable RAM, so there may be some compatibility issues.
 

Other Pineapple Smurf

Honorary Master
Joined
Jun 21, 2008
Messages
14,593
I assume the rule for Windows applies to Linux: you need a 64 bit OS if you go over 4 GB addressable RAM, so there may be some compatibility issues.

Your just not going to use the > 4GB part of the RAM, thats all. Even under Linux some 32bit kernals will limit you to 3GB of RAM regardless of the physical amount.
 

MyWorld

Executive Member
Joined
Mar 24, 2004
Messages
5,001
I assume the rule for Windows applies to Linux: you need a 64 bit OS if you go over 4 GB addressable RAM, so there may be some compatibility issues.

Not quite:
The Linux kernel includes full PAE mode support starting with version 2.3.23,[6] enabling access of up to 64 GB of memory on 32-bit machines. A PAE-enabled Linux-kernel requires that the CPU also support PAE. As of 2009,[7] some common Linux distributions have started to use a PAE-enabled kernel as the distribution-specific default[7] because it adds the NX bit. [8]
http://en.wikipedia.org/wiki/Physical_Address_Extension#Linux

http://www.linux.com/archive/feed/119287
 

CR34M3

Senior Member
Joined
May 13, 2010
Messages
873
+1 for more RAM -- it's the quick, cheap high of computers. :)

Not quite:
The Linux kernel includes full PAE mode support starting with version 2.3.23,[6] enabling access of up to 64 GB of memory on 32-bit machines. A PAE-enabled Linux-kernel requires that the CPU also support PAE. As of 2009,[7] some common Linux distributions have started to use a PAE-enabled kernel as the distribution-specific default[7] because it adds the NX bit. [8]
Haha, your post really made me think of this xkcd strip:
http://xkcd.com/619/
 

ponder

Honorary Master
Joined
Jan 22, 2005
Messages
92,823
I find 4GB plenty even with 2 VM's running. 8GB wont hurt though.
 

MyWorld

Executive Member
Joined
Mar 24, 2004
Messages
5,001
I always mention graphics cards to buyers as KDE does not play pretty with a lot of onboard graphics and the experience is ruined. But then again I'm a traditionalist Gnome user, so I don't care.

http://www.cpu-world.com/Compare/502/Intel_Core_2_Duo_E7500_vs_Intel_Core_i5_i5-2500.html
To strengthen your argument, onboard GFX sucks and even performs worse than my E7500, so on the first two tests my E7500 outperforms a i5 2500 with onboard GFX.

I'm looking at a 2500 upgrade, the reason for the comparison.
 

Tinuva

The Magician
Joined
Feb 10, 2005
Messages
12,475
I personally found 4gbyte ram to hit the sweet spot for both gaming, using VMs, ect.

However, when I did a upgrade last month, looking at memory certified for running on the new motherboard I chose (Asus P8P67) it turned out I had to go with 2x 4gbyte sticks in general, as they don't certify the smaller ones. They would probably still work, however I wasn't feeling like going back and forth between the supplier to get a working system, I wanted it work 1st without problems.

So here I now have 8gbyte ram, my system rarely ever use more than 4, but hey all my stuffs working.

Most importantly, if you do go with 8gbyte ram, make sure you run a 64bit OS, no point using a 32bit OS when you have that much memory.
 

Synaesthesia

Executive Member
Joined
Feb 1, 2007
Messages
5,685
Does your PC feel slow? Wanna make your PC feel faster? Get an SSD. Check your RAM usage. If you're routinely running out of memory or paging out a lot upgrade your RAM.
 

MyWorld

Executive Member
Joined
Mar 24, 2004
Messages
5,001
Does your PC feel slow? Wanna make your PC feel faster? Get an SSD. Check your RAM usage. If you're routinely running out of memory or paging out a lot upgrade your RAM.
Linux does not work like that, Linux memory management is a complicated topic, and I might have forgotten a few things (cobwebs and old age does not go together), but here is a basic rundown.
If you run "free -m" you will see that almost all your memory gets used and you should have very little to spare.

The reason for this is that Linux used as much RAM as possible because it is there, otherwise it is a waste of resources. If it is not for applications then it is used for disk caching. This makes it a bit difficult to know "when you run out of RAM" and a swap file/partition was the answer to this in the past (if you used a lot of swap, get more RAM).

However, with any memory amount of near 4GB you are highly unlikely to ever use much of your swap file/partition. You still do for processes that gets swapped out, but lets leave it at that.

Code:
free -m
                total       used       free     shared    buffers      cached
Mem:          3966       3788        178          0         90       1016
-/+ buffers/cache:      2682       1284
Swap:         3812        272         3540
See that "cached" on the end? Around 1GB? That is memory used for disk caching.
Also notice how little swap space gets used, only around 270MB.

I'm going to stop here since it now gets to the complicated bit, but if you want to know more:
Layman explanation:
http://www.linux-tutorial.info/modules.php?name=MContent&pageid=89

High Tech explanation:
http://tldp.org/LDP/tlk/mm/memory.html
 

avert

Senior Member
Joined
Jul 13, 2009
Messages
742
you'll see a bigger performance increase when getting a SSD compared to getting more ram or a slightly better cpu
 

MyWorld

Executive Member
Joined
Mar 24, 2004
Messages
5,001
SSD is a bit outside the budget atm. I also had a long hard ponder on whether to upgrade or not, but it seems that the i5 2500 is almost twice the CPU the E7500 is?
 

Synaesthesia

Executive Member
Joined
Feb 1, 2007
Messages
5,685
@my world, I know that. In fact win NT and OS X work the same way.

An SSD is like getting a new pc. Something to definitely save up for.
 

milomak

Honorary Master
Joined
May 23, 2007
Messages
12,571
i have an i7 with 6GB RAM.

Even when running Handbrake and browsing and listening to music at the same time, I don't think I've ever seen the swap memory being used. Granted I don't sit watching ti all the time. But I do watch temps, cpu usage and ram usage given i have overclocked this system close to its limits when i run such operations.
 
Top