Tuesday, November 23, 2010

Memory Upgrade: Is It Time To Add More RAM?

The price of memory upgrades is at an all-time low. And more memory is always better, right? We decided to analyze whether or not now could be the time for a fat memory upgrade. As it turns out, there are arguments for and against backing up the truck.
We want to do things a bit differently in this article. We're going to start with 32-bit programs in a 32-bit environment, move to 32-bit programs in a 64-bit environment, and finally look at 64-bit programs in a 64-bit environment.
By doing this, we want to prove that those of you still stuck on 32-bit systems can, in fact, benefit from 8 GB or more RAM before inevitably making the switch over to a 64-bit operating system in the near future.
Also, we want to show how 32-bit programs in 64-bit environments can benefit from a decent RAM expansion, how graphics cards don’t just fill their video memory with textures, and why you'd better have more than 4 GB of RAM when it comes time to move into the 64-bit world.

We obviously can't cover all possible application scenarios with different amounts of RAM, but we'll offer an interesting excursion off the beaten path...and perhaps a surprise or two along the way.
If you find a logical argument here to justify dipping into your household budget for a RAM upgrade, then we will have achieved something. We believe it’s important to have a smooth computing experience at work and the ability to play games without suffering from stuttering caused by annoying hard drive access. Expect one conclusion right up front: more RAM certainly never hurts anyone.

In order to generate comparable results, we used the same test system for both kinds of operating systems. We installed the OSes by transferring both 32- and 64-bit Windows 7 versions (with updates and drivers installed) to the system's SSD. The Phenom II X6 CPU was overclocked to 4.0 GHz for maximum CPU horsepower, and it was still stable enough to survive a 24-hour test run with all the RAM slots populated. All tests with 12 GB of memory were performed using a 2 x 4 GB and 2 x 2 GB combination of RAM modules.
ComponentsDetails
CPUAMD Phenom II X6 1090T (Thuban) @ 4.0 GHz
CoolingProlimatech Megahalems + Noiseblocker Multiframe M12-PS
RAM4 x 4 GB Kingston HyperX 1600 CL9, 2 x 2 GB Kingston HyperX 1600 CL9
MotherboardMSI 890FXA-GD70
Hard driveSuper Talent Ultradrive GX2 (System), 1 TB Western Digital Caviar Blue (Programs)
PSUAerocool V12XT 800 W
CaseSilverStone Raven RV02
VentilationZalman fan control for 1 x Noiseblocker Multiframe S3 120mm and 3 x SilverStone 180 mm
OSWindows 7 Ultimate x86, Windows 7 Ultimate x64

Zoom
Zoom

Mistakes, tales, and things that definitely don’t work
Once and for all, the 32-bit (x86) versions of Windows XP, Vista, and 7 cannot handle more than 4 GB of RAM. PAE modes, registry hacks, and different boot options will definitely not produce the desired result. In fact, these have the potential to cause system instability and crashes.
We know that a 32-bit application only can address a maximum of 2 GB of RAM and that 32-bit Windows systems can actually handle just 3.25 GB (or even less if more than 4 GB of memory is installed). Windows Vista and 7 will show the full 4 GB in the System Info, but the "missing" RAM is reserved by the system for hardware that might be incompatible with 64-bit systems. Also, a portion of the system memory is needed by the graphics card, although the size of this portion is not the same as the size of the graphics card's video RAM. This is another misconception we'd like to dispel.
All graphics cards have a simple memory management unit called the GMP (graphics memory page table) on PCIe cards or GART (graphics address remapping table) on AGP cards. These are used to map different pages of the system memory into the address space of the GPU. This results in subsets of system RAM memory pages being accessible for the GPU at any time. Conversely, the video RAM must be addressable by the system.
The amount of system RAM utilized by this mapping process depends on the total capacity of the memory on your graphics card, which must be almost identical to what's available in system RAM. However, the memory capacity required for this mapping function is still a bit smaller than the actual capacity of the graphics memory. Finally, the amount of memory reserved for graphics also depends on the capacity of the system memory buffer that can be used by the video card as an external frame buffer for graphics purposes.
A common misconception found occasionally on forums is that the entire graphics card memory is always mirrored in the system RAM. This is not true.

The swap file trick: when RAM alone is not enough
The term "swap file" (or page file) refers to a file on a storage medium, such as a hard drive, used by the system in case it needs a larger address space than the available memory in physical RAM. Swap files prevent overflows and memory deficiencies. The operating system manages the memory such that data needed by active processes are typically stored in the faster RAM.
In memory-critical situations, there is a risk that all of this data won't be physically accommodated in system memory. Of course, this depends on the amount of physical memory installed. The system uses the following work-around: the addressable system memory is expanded and any data overflow is redirected to the swap file. Think of it as hard drive space that complements system memory. The RAM and swap file together are referred to as virtual memory, indicating the total amount of memory actually available when needed.
Windows is smart enough to store data from minimized applications or idle applications in the swap file so that active processes can access more RAM. The disadvantage of this solution is obvious. The performance of a mechanical hard drive is only a fraction of the throughput realized with memory modules. Solid state drives (SSDs) are an improvement, but the general problem remains. Frequent swap operations are poison to an SSD, possibly decreasing its speed.
However, by using a swap file, we can extend the virtual memory size to 8 GB or more, even in 32-bit versions of Windows. Doing so simply sacrifices speed, since "mechanical" RAM is seriously slow.

A simple solution
What if it were possible to use physical RAM like a hard drive and thus cross over the magical 4 GB limitation? You can do this by creating a so-called RAM disk from your system memory and then storing the swap file on it. The system will interpret the RAM disk as a normal hard drive, not noticing the physical difference. This way, if you have 16 GB of physical RAM installed, you can add an additional 12 GB to the 4 GB recognized as system memory.
Although this virtual memory is based on memory modules, it will be slower than directly-accessible RAM in a 64-bit system because data will have to be copied from the swap file to the RAM before it can be used. This is sometimes a good compromise, as the approach is much faster than any swap file on a hard drive. To take advantage of this tweak, you'll need some suitable RAM disk software. Check out the next couple of pages to see how we outsmart the system and boost our 32-bit Windows installation using this approach.

Step 1: Integration of the RAM above the 4 GB limit
Let's turn to implementation. There are a couple of different programs we can use. One of them is the paid version of RAM Disk Plus 10.1. It's very easy to use and reliable. A decent freeware alternative is Gavotte RAM Disk 1.04.
Step 2: Use the "unmanaged" memory as RAM disk
ZoomZoomZoom

With one of these programs, you can use the memory that otherwise wouldn’t be addressable by a 32-bit operating system. Remember to enable the memory remapping function in your BIOS or nothing will happen.


ZoomZoom

Now we need to format the new drive. When creating the RAM disk, you can even use your "missing" RAM (the memory between the 3.25 GB used by Windows and the 4 GB actually installed), but only if the hardware is compatible. If this causes stability problems, you can try to leave 100 MB or so unused. With current hardware, though, you should be able to use the entire memory area. Don't forget to reboot Windows when you're done.
Step 3: Setting up the swap file
Now fill up the total available space on the RAM disk with the swap file, or at least 4 GB. For this test, we installed 12 GB RAM, so we use a 8 GB swap file. We select the RAM disk as a swap file directory and reboot Windows one more time. From now on, Windows will use all RAM above 4 GB as swap file and the hard drive gets to take a vacation.
Note: Be careful with sleep mode. It could pose a problem with this approach, so you might have to decide between performance and convenience.
Step 4: Transfer the temporary files to the RAM disk
Since we have 12 GB of RAM installed, we choose to use just 4 GB for the swap file and to use the remaining 4 GB for temporary files. This way, the temp files are written to the fast RAM disk instead of to the slow hard drive, and you also delete the unnecessary files automatically by turning off the PC. Web surfing can be accelerated in this way, simply by relocating the browser cache directories to the RAM disk.
However, we feel that most users can handle the 4 GB restriction. In normal daily life, this amount is sufficient for most tasks, short of bleeding-edge digital video editing, handling giant file archives, or the like. Enthusiasts will probably want to play around and see what amount is enough for their needs.

Part 1 – Gaming
When playing games, the benefits of adding memory space depend on the title. We looked at a few games and averaged the startup times and load times of various levels.
These charts show how much the games make use of the outsourced swap file or the temporary directory. As you can see, the difference between 12 GB and 16 GB of RAM is rather marginal. Half-Life 2 Cinematic Mod is the only game in which 16 GB pulls slightly ahead. The differences observed with large amounts of RAM are pretty much within the margins of error. As you can see, demanding games in a 32-bit environment actually benefit quite a bit from our extended RAM disk swap file.

Unfortunately, we can't measure subjective impressions of in-game frame rates. Especially when the game loads new level areas (GTA IV, Mafia II) during play, or if you pan in the panoramic view (Anno 1404, Sims 3), the impression is much smoother with the larger memory space, and you don't get as much stuttering. Overall frame rates hardly change, but the experience you get while playing, even if entirely subjective, is much smoother.
Part 2: Applications
With applications, we see that benchmark results are dependent on system memory requirements, while the application's subjective user experience also depends on the outsourced temporary dictionaries. As examples, we used a file compression tool and Photoshop.



Once again, a RAM disk-based temporary directory pays off. Overall, looking over our results from the games and applications, we'd say the outcome from using a RAM disk is beneficial.
Conclusion
Even the 32-bit versions of Windows XP, Vista, and Windows 7 can benefit from 8 GB or more of RAM. Depending on the application, the focus should be on relocating either the swap file or the temporary directories. Given that memory prices are falling again, we recommend an 8, 12, or even 16 gigabyte kit. It's worthwhile to upgrade, even when using a 32-bit version of Windows--especially if you're having to hold off on jumping to a 64-bit OS for some reason.

Graphics cards and memory
This part of the article treats all programs equally, including the 32-bit programs that run in a 64-bit environment. We'll start with a look into the graphics card’s use of dedicated and allocateable system memory. For example, 1 GB of dedicated video RAM can look plentiful at first glance, but in practice it's rarely enough. We've mentioned GMP, GART, and the fact that graphics cards can require or request additional memory. From now on, we'll use a 64-bit version of Windows 7 for testing and begin with only 4 GB of RAM installed.

The graphics card manages to assign itself an additional 1407 MB of system memory to outsource, for example, the storage of currently unused textures. A total of just 4 GB of installed RAM hardly makes sense if the game is already using 2 GB or more. The consequences of reduced assignment are late details that pop up out of the blue, lower texture resolutions, and even artifacts.
Zoom
These artifacts vanish when you install another 4 GB of RAM, since this allows the graphics card to grab a fat piece of the system memory pie.


An additional 3059 MB of memory is now at the card's disposal.

Zoom
Interestingly, when installing more memory, this value does not change above 4 GB. The amount of extra available memory can be very hard to measure and quantify in numbers of frames per second, mainly because it leads to improved level loading speeds, higher detail levels, and better-quality textures. Often, the game you're playing will allow for higher graphical options, and there will be fewer artifacts when the system is heavily loaded.
Summary and Conclusion
In a 64-bit system with a powerful graphics card, 8 GB of RAM really is a must if you're going to play demanding games. This is the case regardless of whether you're using 32-bit or 64-bit applications. However, even more than 8 GB of RAM can be subjectively noticed while playing. There is no real need for 16 GB of RAM, though. Going with 8 GB is quite enough unless you're running some taxing application in the background. We’ll comment more on this subject later, because the problem is often overestimated, as shown in our 64-bit gaming benchmarks.

The swap file: relic or necessary evil?
We first had to go through some application parcours to resolve this fundamental question. We used 8, 12, and 16 gigabytes of RAM in our test system. We also installed and ran a variety of applications, many of them in parallel.

We know that virtual and system memories are two different things. When calculating the memory requirements of different applications, you might assume that 8 GB of RAM or more would be enough to deactivate the swap file. But there's a catch: unfortunately, some programs specifically want to allocate the virtual memory. In these cases, a missing swap file causes an error or the system memory completely fills with garbage data.
You have to carefully test whether the installed application can operate without a swap file. If it can, disabling the swap file is a practical way to avoid slow hard drive access. If not, then you'll just have to live with it. The speed increase is noticeable, but not exactly a killer feature.
To produce a reasonably fair comparison, we started six parallel rendering tasks, each with 2 GB of maximum RAM usage. We ran this test with and without a swap file under the different RAM configurations.


With the swap file deactivated, we ran into problems using 8 GB of RAM (as expected) when Windows ran out of memory. The red values document the state at the time of the crash. If you have 8 GB of RAM installed, you should carefully consider whether it's worth the risk of a possible crash before deactivating the swap file. The performance increase from disabling the swap file is measurable, but still rather modest. At least 12 GB of RAM is needed before you can consider disabling the swap file in a consumer-type environment without worrying--unless you use software that requires a swap file, of course.
Conclusion
We would advise against disabling the swap file if you have less than 12 GB of RAM, at least without thoroughly testing all of your programs first. There is a performance increase when you disable it, but you have to factor in the risk of possible data loss.

Part 1: Gaming
Older, single-threaded, 32-bit applications benefit very little from large expansions of system memory when only one application is running. We know from previous benchmarks and articles that 32-bit games running in 64-bit environments don't benefit much (sometimes at all) from system memory sizes above 4 GB, at least not in terms of frames per second.
Another rule is that an increase in performance can only be seen when a) less data is transferred between the RAM and the swap file or the data is transferred faster and b) when the writing and reading of temporary files is extremely fast. This brings us back to our earlier 32-bit discussion. Using a RAM disk can shorten load times significantly, but it doesn't really impact the actual frames per second. Also, giving the graphics card more allocable memory is likely to impact your subjective perceptions. Unfortunately, this acceleration cannot easily be quantified.
We tested the games one more time. Using the 4 GB of RAM test results as a reference point for the 100% mark, we calculated the individual relative percentage values using higher memory capacities to get a better overall comparison.

So far, so annoying. Other than the 64-bit client of Half-Life 2 with the Bombast mod installed, hardly any game sees an increase in frames per second using more RAM. The increased amount of system memory allocable by the graphics card noticeably decreases the number of visual artifacts in GTA IV. Load times could be shortened if the temporary directories were relocated to a RAM disk.
Here, however, you have to weigh what is more meaningful: running the entire system equally fast from an SSD or creating a RAM disk that requires at least 12 GB of RAM in order to be useful.
Part 2: Applications
We only expect to see performance increases when programs are able to allocate and, more importantly, need more memory space. Only then can you avoid the swap effect and the performance impact we described earlier. This can also be somewhat alleviated with an SSD. We therefore only expect a jump in performance when the amount of RAM needed is nearing the amount that is installed. In the following charts, we see two examples with measurable, though small, improvements.


The synthetic benchmarks don't show any significant performance advantage, so we decided not to create a lot of pointless charts with identical bars. The fact is that a good-sized RAM disk provides a better performance increase than having more memory once you cross a minimum threshold.
At this point, we want to refer to our 32-bit benchmark results, as they're also valid for the 64-bit equivalents. However, in terms of usability on multitasking systems, we'd say that 8 GB of RAM is the minimum, even when not factoring in system memory used by the graphics card. If necessary, 6 GB will do as an interim minimum for enthusiasts in triple-channel systems.

Concluding Remarks
It's rarely this hard to give a clear assessment. The facets of various memory issues are too extensive and vary widely depending on each user and his or her relevant applications. Interestingly, certain 32-bit programs in 32-bit environments with 4 GB of RAM installed will benefit more from going to 8 GB (or higher) than some 64-bit applications in 64-bit environments. As a side benefit, this approach closes the annoying gap between the 4 GB of installed RAM and the 3.25 GB usable by 32-bit Windows.
We tried to illustrate years ago why not all performance improvements can be shown simply in terms of frames per second. This is why our conclusion departs slightly from what you might expect only from looking at graphs. We based this conclusion on our objective measurements with subjective impressions included, just as we highlighted the benefits of a RAM disk for temporary files.

Conclusion and Recommendation
Based on our measurements and impressions (and taking falling prices into account), we thoroughly recommend a minimum RAM size of 8 GB. Using 12 or 16 GB only makes sense if you're planning on using 4 GB of more of this higher amount as a RAM disk, helping accelerate the reading and writing of temporary files. This applies equally to file compression, video encoding, and heavy image editing.
Other than this, you might want more RAM so the graphics card can allocate more system memory for its own use. We saw this pay dividends in GTA IV, for example. You won't see an overwhelming performance increase unless you're using very memory-hungry programs, but you will get a system with enough RAM for the foreseeable future.
Given our observations and low prices on memory upgrades, this is the time to hunt down a high-capacity memory kit for your system. In the end, it’s never wrong to make a step knowing that it will improve performance and provide some reserves.






No comments:

Post a Comment

If you have any Doubt..kindly let me know