A RAM drive can add to your PC's performance in everyday operations. Ashton Mills explains how.
We've previously covered the benefits of using spare RAM for disk-caching, but there's more than one way to put extra RAM to use: it may at first seem counter-intuitive to use RAM drive software to boost system performance -- after all, the contents are lost when you shut down -- but it all comes down to how you use it.
The benefits of a RAM drive
Naturally a RAM drive gains the key performance metrics of system RAM: very low seek times and very fast transfer rates -- faster than any hard drive or SSD can hope to match. Creating a RAM drive allows you to take advantage of these features for any tasks that might benefit from improved performance. Popular examples include audio, image and video editing software that can use temporary 'scratch space' to accelerate its performance.
But a RAM drive has benefits for home users too -- used as a cache for your browser it can speed up web surfing, as a location for Windows temp directories it can speed up file operations like archiving and installing programs, and if you make it large enough you can even run games from it for insanely fast loading times. It has extra benefits depending on your setup -- laptops, often with slower 5,400rpm drives, can get a nice speed boost. SSDs, although already very fast, can benefit by using a RAM drive for temporary file operations (like the browser cache) and spare unnecessary writes, in turn increasing its longevity.
And the fact that data is lost when the power is turned off is often seen as a security benefit: all cached data will be irrevocably cleared, as opposed to deleting on a hard drive where software could still recover fragments of data. There are lots of RAM drive products available, both free and paid, but we'll focus on just one for this tutorial – RAMDisk. We've chosen this one because it comes with a number of nifty features that make it easy to use, plus it has a free version that limits you to a maximum 4GB drive, which is plenty for most home needs anyway.
Before we begin, head here and download and install Dataram's RAMDisk software.
The options are pretty straightforward, but some bear covering in greater detail:
Telling Windows to use the RAM disk for storing temporary data.
- Size. When setting the size of the disk, don't be overzealous. Remember that any RAM you allocate to the RAM disk won't be usable by Windows for programs, so don't make it so large that you cause Windows to use its swap file and thus slow your system down. If you have a 4GB system, you won't want to allocate more than 1GB. For 6GB systems and more, a 2-4GB RAM drive will give you more flexibility.
- Format. For format type, choose FAT32. You can also leave it unformatted and then format it in Windows as with any other drive, for example to NTFS, but FAT32 is faster than NTFS for smaller volumes and especially for the type of data you're likely to use.
- Image saving. Under the 'Load and Save' tab, you'll find one of the more useful features: you can optionally save the contents of the RAM disk to a hard drive at shutdown and have it loaded again at startup. This is useful if you want to use the RAM drive to launch and run programs (including games), and so need the data to persist. Note that depending on the size of the RAM disk, this may slow down both bootup and shutdown times for Windows as the image is loaded and saved respectively (though RAMDisk will compress it for you to reduce the impact at bootup).
- AutoSave: If you do want to use it as a persistent drive, the 'AutoSave' option will regularly save the image at the specified interval. Note this interval only triggers if the contents of the RAM drive are modified, which helps to reduce unnecessary hard drive writes.
The uses of a RAM drive are really limited only by, understandably, the size of the drive you create. Using a persistent drive and installing programs to it is easy enough, so we'll show you instead a little more complicated setup to speed up browsing and Windows temp directory usage using a non-persistent drive.
RAMDisk comes with some useful features that make it easy to use it to boost system performance.
RAMDisk as a browser and temp cache
- Start RAMDisk and set the format to FAT32 and size to 1GB or more, then click 'Start RAMDisk'.
- When Windows says it's found a new drive, open it in Explorer and create a 'Cache' and 'Temp' directory. Under the Cache directory create another one for each browser you'll be using ('IE', 'Firefox' and so on).
- In the RAMDisk settings, click the 'Load and Save' tab, and hit 'Save disk image now'.
- Then tick 'Load Disk Image at Startup'. Do not tick 'Save image at shutdown', unless you want the contents to be persistent. This way the image you've already saved, an 'empty' RAM disk, is loaded each bootup with your directories already created.
- Finally, we need to tell any browsers and Windows to use the RAM disk.
To redirect IE's cache go to 'Tools > Internet Options'. Then, under 'Browsing History', click 'Settings' followed by 'Move folder...' (your RAM drive letter and browser cache directory).
To redirect the Firefox cache, you need to dig a little deeper. Launch Firefox and, in the URL bar, enter 'about:config'. Next, in the search bar, type in 'cache'. If it's not already present, right-click and select 'New > String' and add the following
configuration key: 'browser.cache.disk.parent_directory'. For the value of the key, enter the path to the RAM drive and Firefox cache directory you made earlier.
To redirect Chrome the easiest method is to edit the Chrome shortcut. Just append the following to the end (after 'chome.exe'): '--disk-cache-dir=F:\Cache\Chrome --media-cache-dir=F:\Cache\Chrome' using the appropriate path to your RAM drive and cache directory.
1GB is plenty for browser caching, but not so much if you also want Windows to use it as a scratch drive for temporary files. If you create a drive one of at least 2GB or more, you can also do the following:
- Go to the Windows Control Panel and click 'System & Security > System > Advanced system settings' (in the left-hand pane). From here click the 'Advanced' tab and, at the bottom, click 'Environment Variables...'. At the top you'll see two variables defined for TEMP and TMP, click on each and click 'Edit...' and type in the path to your Temp folder on your RAM drive.
Note, however, the following caveat: while you can restrict cache size for the browsers, you can't do so for the Windows temp directory. If anything should require more space than is available in the temp directory, the action will likely fail and Windows will report it ran out of disk space. The most likely scenario for this to happen is decompressing large archives of a few GB or more, since Windows writes data temporarily to the Temp directory when it does so.
This aside, using a RAM disk can work well for TEMP because the contents aren't needed once Windows shuts down, and often you'll find the temp directory on your hard disk filled with gunk and taking up disk space that Windows fails to clean out. With a RAM disk, this isn't an issue.
Using a RAM disk allows you to take advantage of insane speeds and accelerates programs and tasks.