PDA

View Full Version : Why Is My Damned Computer So Slow - RAM


Merc
April 4th, 2007, 2:41:50 PM
RAM AND PC PERFORMANCE
by Merc

Continuing with Pete’s “Why Is My Damn Computer So Slow” topic I’d like to discuss Ram, or Random Access Memory and its effect on your PC’s performance. First I’ll try and explain what RAM is physically, than what its function is and finally how it works with some definitions.

Physically RAM and that flash stick everyone carries around are very similar. A stick of RAM, and a flash stick, are made up of a PCB (Printed Circuit Board) with memory chips mounted on it, a controlling chip at the end and pin outs that connect the stick to your motherboard, in the case of RAM, or a USB connector for a flash stick. In the case of RAM, each of these memory chips is usually a 64MB sized chip strung together to give you the total. A 512MB stick of RAM will have 8 chips and a 1GB, or 1024MB, stick will have 16 chips. Some manufacturers are now using 128MB chips. Flash sticks are much the same although the chip sizes differ.

The similarity between a flash stick and RAM ends at how it functions. A flash stick is non-volatile memory. You write to the memory and the 0s and 1s stay as set with no power applied. RAM is volatile memory and requires a constant charge to keep the data written to it stable. Pull the power and a RAM stick is completely erased. The advantage to this is that RAM is exponentially faster than a memory stick.

The best way to think of how RAM stores data is an excel spreadsheet. Each chip has rows and columns that address a cell. This cell, located by a row and column address, is where the memory controller stores some bit of data that will be used by the CPU in an upcoming process. When folks talk about low-CAS memory they are actually discussing the Column Address Strobe cycle or how many CPU cycles it takes to locate, erase and address a Column. When the CPU requests data via branch prediction it places an order for it through the memory controller where tat data is stored on the memory for processing.

So why is the above so important to your system’s performance? In that last paragraph I talked about storing of data for processing. Everything that your CPU does passes through RAM. Every process or program running on your PC right now has some bit of data stored in RAM. Your Operating system is storing data it needs to function in RAM. RAM is the real time “Gotta have it right now!!” storage tank for everything that your PC is doing.

Take look at your task manager (hit ctrl-alt-del) under the Processes tab. Listed there is almost everything that your PC is running right now. See that Memory Usage column, that shows you the amount of RAM that each of those processes has claimed for itself. Now click on the Performance tab and take a look at Physical Memory. This is the total memory your system has available in RAM and cache. The little MEM usage meter shows the amount of RAM your system is using right now. Down there under Commit Charge you see the Peak number? That is the max amount of system memory your system has used at any one time since it booted up.

All of these numbers are important because if you compare the numbers you saw above to the amount of RAM you have in your system you’ll have a good idea of how efficiently your PC is running. If there isn’t enough memory to run a program you just started, the memory controller will have to flush the memory one of those .exe (executables) in Processes is using to make room for the memory the new program needs. It will start swapping the data on the RAM down to your Hard Drive and use the ohhh-sooo-slooow Hard Drive as Virtual Memory. If your Hard Drive activity LED is flashing rapidly all the time this is probably what is happening.

Virtual memory, in and of itself, is not a bad thing. Not all program data is created equal and some programs believe that they are the most important bit of software that you could possibly be running on your PC and will therefore claim an inordinate amount of RAM. Flushing ¾’s of that program down to Virtual Memory is fine. The problem gets bad when you start having to flush vital software data down to virtual memory because of a lack of RAM. If you open MS Word, which requires about 25MB of RAM to run, and you only have 15MB of RAM available, you’ll start to have those fist pounding delays and, in some cases, system crashes while your CPU and memory controller write other vital data to Virtual Memory making room for MS Word’s data. By the way, this type of activity is very tough on your Hard Drive and will most definitely shorten its life.

Like I said, just take a look at your Hard Drive LED and see if it is blinking madly while this delay is occurring. After reading all of the above you’ll know why. The solution is easy and nowadays relatively cheap to do. Buy more RAM!!! The more memory you have the better off you will be. To run Windows XP the following rules of thumb apply:

-256MB of RAM = Lousy performance and barely enough Ram to run XP and your Virus software. Launching anything will begin the flush to Virtual Memory.

-512MB of RAM = The minimum I would consider putting in any XP machine. You can run simple programs if you open only one or two at a time. Encoding DVDs or something just as stressful will bring your system to its knees.

-1024MB (1GB) of RAM = The optimum level of RAM for most Windows XP machines. You can open several programs simultaneously and they will run quickly and efficiently. 1GB of RAM is the best balance between cost and performance.

-2048MB (2GB) of RAM = The optimum level of RAM for a heavy duty Windows XP gaming machine or DVD/Photoshop encoding platform.

-More than 2048MB (2GB) of RAM = Except for a very few programs than can expressly use extra RAM (you will know it f you have such a program) anything more than 2GB of RAM on an XP machine is a waste. In addition, Windows XP can’t even address more than about 3.5GB of RAM anyways due to system limits in the OS.

I you want to run Windows Vista you can take all of the above numbers and double them and have about the same results. Yep, for many reasons, Vista needs much more memory than XP.

Last but not least is how you go and buy this RAM. Let’s go over a few terms first:

-DDR = DDR stands for Double Data Rate. DDR is a little trick that system and memory manufacturers use to double the performance of your RAM. Your system works on a clock with a signal that resembles a sine wave with the bottom half cut of. What you are left with is a series of waves, from zero to one, with each peak being one clock cycle. DDR means that your RAM performs a read or write on the up side of that wave and performs another on the down side of that wave. In effect your RAM performs two actions for every clock cycle. So DDR 400 Ram actually runs at 200MHZ but since it does two actions per clock cycle you get RAM that appears to run at 400MHZ or DDR400.

-DDR2 = The next generation of RAM, DDR2 works at a much higher frequency than DDR RAM and whereas DDR RAM connects to your motherboard through 184 pins at the bottom of the PCB, DDR2 uses 240 pins. The chips are smaller and the stick uses les electricity to operate as well.

-DDR3 = DDR3 is the next generation of RAM and although it too will have 240 pins it will not run on a DDR2 board. DDR3 will not be used till the middle of 2007.

-Dual Channel = Dual channel is another little trick that manufacturers use to get more performance out of your RAM. Dual Channel requires you have two sticks of nearly identical RAM installed in specific slots on you motherboard. When your two sticks of RAM are installed in the proper slots, your memory controller will work with them as a team and can do things like write to one stick while reading from the other thereby doing two things at the same time.

SPD = Serial Presence Detect is a small chip on your RAM stick that “talks” to your motherboard and tells it how fast or slow to run your RAM stick. SPD is usually very conservative performance-wise.

When you go and buy RAM you need to be aware of the above numbers to ensure that you buy the right stuff. If you have a one year old Dell then you are probably running DDR2 RAM. If it has one 256MB stick of RAM in it you can get a huge boost in performance by buying a second stick of identical RAM (remember dual channel above) and installing it in the second slot. The increase in performance will be amazing. Same thing with a single stick of 512MB of RAM, buy a second stick, install it and you will get a very good boost in performance, albeit not as great as 256MB to 512MB.

What if you already have two 256MB sticks of RAM installed (512MB total) and want to go to 1GB of RAM? This is a little bit harder as you need two identical sticks to get fully functional dual channel performance. If you have 4 memory slots you can buy two more 256MB sticks and install them in the other channel and have 1GB. If you have only two memory slots then I recommend that you pull the old stuff and buy two 512MB sticks of RAM for 1GB of dual channel.

35Pete
April 4th, 2007, 6:09:54 PM
Fantastic stuff Merc. Just a little bit though. If you own a stock machine like a Dell or an HP, then go to their site and "pretend" to buy more RAM. All of them offer this. Then take note of the RAM Speed, the type (DDR, DDR2, DDR2 EPP, ect...).It will have a part number associated with it. If you are adding to the existing RAM then MAKE SURE IT IS THE SAME STICK FROM THE SAME VENDOR. Failure to do this will cause timing issues and possible instability (ie. Blue Screen of Death).

If you are planning on NEW memory, like in the case where Merc suggest bigger sticks, then still take down the part number (mine is PC-6400, these are industry standards) then take it to the tech wannabee salesguy and tell him you want "x" sticks of "y" MB RAM compatible with this part number.

That simple.

Merc
April 4th, 2007, 7:55:32 PM
Thanks Pete. I think I'll do something on Hard Drives next.