Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running an apache server and minecraft server out of one dell desktop computer with Ubuntu server installed and a quick look at free -m tells me that I'm using 1172 MB RAM and have 828 free (with apache running and minecraft not). I'd like to let minecraft run with at least 1024 MB RAM so if I get a 4 GB memory stick and install it, would that free up 4096 MB RAM? Just wondering because for just $20 on amazon and it seems like a pretty good deal to even quadruple my free RAM.

share|improve this question
up vote 3 down vote accepted

It should. Operating Systems will use up physical memory and then begin swapping (using a section of your harddrive as extra memory to avoid having to deny requests for memory allocations). Swap is extremely slow compared to RAM, so it's best to have enough physical RAM to avoid having to swap.

If your system is using 1172 MB of RAM, then it will continue to use approximately that same amount, given it's running the same applications, regardless of how much memory it actually has. For example, if you only had 1024 MB total then the extra ~150MB would end up being swapped. By upgrading to 4,096 MB total you can expect to have approximately 3GB of free memory, which will prevent swap from becomming a bottleneck and slowing down your server.

To answer your 2nd question in the comments; most motherboards today support "dual-channel" memory, where memory modules installed in pairs can be accessed simultaneously for better performance. Motherboards will often have RAM slots in pairs of colors, and the intent is that if you're adding two sticks to a motherboard with four slots then you should use two of the same colored slots.

To make sure you get the right RAM it's best to look up your motherboard's model and check it's compatible memory. It will list a type (like DDR3), a set of supported speeds (something like PC1333), and possibly some other details. Some servers require ECC RAM, which is slower but has fault-tolerance--most lower-end servers and home PCs use non-ECC. Some manufacturors even list exact make and models of tested and supported RAM (this is more common for servers), which means if you buy a tested/supported model you should be very safe.

share|improve this answer
Ok, cool, another note, does doing something like installing 2 2gb cards go faster than 1 4gb one or does that all depend on the processor? – Mark Lalor Jul 12 '12 at 22:30
I updated the answer. If this is your first RAM upgrade you can probably find some good tutorials online. The hardest part is just making sure you buy compatible memory; the actual installation is dead simple. – STW Jul 12 '12 at 22:39
Thanks for all the info! – Mark Lalor Jul 12 '12 at 22:46
In addition to avoiding swapping: The OS will use "free" RAM as disk cache, which helps to improve performance. More free RAM means more disk cache. – Wyzard Jul 13 '12 at 1:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .