How to improve your computer performance and SSD life span with a RAM disk
While modern computers are very fast and equipped with a lot of RAM, modern operating systems and applications are much more resource-demanding. This means that every computer can benefit from optimising its performance even further by using some of the RAM for temporary files that Windows and other applications create. Furthermore, using a RAM disk can prolong the life of solid-state drives by sparing them from unnecessary writing, as SSD have a limited number of write cycles and degrade every time data is written to them.
First of all, what’s a RAM disk? A RAM disk is a block of memory that computer software treats as a disk drive. In other words, a RAM disk application turns some of your computer’s RAM into a very fast disk drive with theoretically unlimited write cycles. Since RAM is the fastest memory in your computer, the speed of a RAM drive exceeds that of any SSD, let alone a regular HDD with magnetic plates. At the same time, anything written to a RAM disk disappears upon reboot or shut down because the RAM is cleared, which can be an advantage for privacy reasons.
In this article, we will be using our SoftPerfect RAM Disk to illustrate usage scenarios for different types of users. This software runs on Windows and supports any OS between Windows XP and Windows 10, including their server editions. Your computer needs to have a sufficient amount of RAM, and we recommend at least 8 GB.
Creating a RAM diskBefore you proceed with configuration, you will need to install a RAM Disk application. For example, you can download SoftPerfect RAM Disk and install it like any other software.
Once the software is up and running, you will see the main screen:
The next step is to create an actual RAM disk by clicking the [+] button or choosing Disk – Add Boot Disk from the main menu:
Here you will need to choose a size, drive letter, file system and any predefined folders. We recommend to choose a size that is no more than a half of the available RAM, that is 4096 MB or less for a system with 8 GB RAM. Choose a drive letter that the disk will be accessible through. For the file system, we recommend exFAT as it offers better performance over NTFS. Finally configure the folders that you want to be created when the disk initialises. In this example we intend to use temp folder for any temporary files, cache for web-browser caches and download for receiving downloaded files that we don’t want to keep.
Click OK and the newly created RAM disk will be shown on the main screen, and a new drive letter will appear in Windows Explorer. Now you can configure your system and third-party software to take advantage of the disk.
How a regular computer user can utilise a RAM disk
For a regular computer user it makes sense to move temporary files created by Windows and web-browsers to the RAM disk.
Moving the temporary files
Windows keeps its temporary files in a folder defined by the so-called environment variables %TMP% and %TEMP%. The easiest way to change these is to choose Tools – Set Windows TEMP folder from the RAM Disk application’s menu. If you created the RAM disk as per the above example, you can set the variables to R:\temp:
Some applications may require you to logoff and logon before they can start using the new location.
Moving the temporary Internet files
Internet Explorer and Windows create a number of temporary files in a folder for temporary Internet files. To move them to the RAM disk, press Win + R and type inetcpl.cpl to access the Internet settings. On the General tab, click Settings, then Move Folder. If you created the RAM disk as per the above example, you can move the folder to R:\
Moving third-party browsers cache
Most likely you are using Google Chrome or Mozilla Firefox as your Internet browser. The browsers intensively use a folder on your hard disk drive for temporary data, known as the browser cache. It is a good idea to move the cache to the RAM disk to speed up browsing and reduce SSD’s wear and tear.
The easiest way to move your browser cache to the RAM disk is to use our simple utility (download size 1.7M). It works by creating a symbolic link to redirect the cache to another location, such as the RAM disk:
RAM disk for software developers
For a software developer, it makes sense to redirect intermediate compiler output to a temporary folder located on a RAM disk. Nearly all IDE and compilers create a number of temporary files before the final application is generated, so having these files along with debug versions of the application on a RAM disk can save you a lot of time. You should not keep your source code on a RAM disk due to its volatile nature, only files generated by your compiler or IDE.
RAM disk for power users
If you happen to work with any sort of temporary data, like file processing or data analysis, to which you need fast access, it may be a good idea to handle these tasks on a RAM disk.
RAM disk for servers
In a server environment, a RAM disk can provide better performance wherever temporary data is involved. For instance:
- A database server can be configured to store its temporary tables and indexes on a RAM disk.
- An application server can be configured to place any intermediate data on a RAM disk.
- Any application that uses a cache in a disk folder can benefit from moving that folder to a RAM disk.
The above can be achieved either by explicitly configuring a server application to use a folder on a RAM disk, or creating a symbolic link to redirect the I/O.
Caveats and troubleshooting
It is important to remember to undo all the configuration if you want to remove the RAM disk, as otherwise the system and applications will encounter errors when accessing a path that is no longer available. This must be done before removing the RAM disk software.
Some applications do not work correctly with standalone volumes, which can be seen as I/O errors or simply the inability to access a RAM disk. If you encounter these issues, we recommend enabling the HDD emulation option in the RAM disk’s settings. This option emulates a complete Hard Disk Drive with partitions indistinguishable from a real device. The downside is that there is an extra layer of emulation that can reduce the RAM disk’s performance by 5-10%.
Do not attempt to place the Windows page file on a RAM disk. This is not supported and should not really be used, as doing so is essentially trying to extend RAM using the RAM itself. If your system has a large amount of RAM, it is better to disable the page file altogether.