Create a RAM Disk in Windows
Category : How-to
I’ve been using RAM disks within Linux for quite some time now and I’ve blogged about it with the ramfs and tmpfs file systems. I’m not going to go over the details of a RAM disk again as the principle is the same on whichever operating system you choose; you set aside a portion of RAM to use as a file system.
Currently I’m using Windows 7 at work instead of my usual Linux based OS’s and so my usual out of the box mounting of a RAM Disk simply won’t work. After a spot of Googling I came across ImDisk which promises to be an Open Source Windows Virtual Disk driver (as well as a few other things). I’m not plugging ImDisk specifically, but they do seem to do what I’m after – create a virtual Disk that I can use as a file system.
Installation was quick and easy – simply download the binary from the website and give the .exe two little clicks.
I disabled a couple of things on the installer because I only want to use it as a RAM Disk driver.
Once the installation completes you’ll have two shortcuts on your desktop – that’s assuming you didn’t un-tick them during the installation!
Double click on RamDisk Configuration to create your first Windows RAM Disk and mount it at your chosen drive letter mount point. The options are pretty straight forward, such as size of RAM to use for the RAM Disk, the drive letter top use as the mount point and the format to use for the file system. There were two others that I found to be a little more interesting:
- Allocate Memory Dynamically – will instruct the RAM Disk driver to allocate all the memory specified under Size straight away, or to only allocate the memory as it’s needed by adding files to the RAM Disk file system. By ticking this option you can keep your RAM free for your computer to use for things like file cache or other applications and it will only be used for the RAM Disk when it’s needed to store the files you save to it. Alternatively you can un-tick it and allocate the full Size amount and reserve the memory straight from the off.
- Use AWE physical memory – This is found on the Advanced tab and will force the OS to never page the RAM Disk content, even in the case where the OS decides it’s low on physical memory. Be careful with this setting because it will force your RAM Disk to only use physical RAM. If you set your Ram Disk Size too high you could soon run out of physical memory and cause your computer to become unstable.
Click OK when you’re happy with your settings to create your new RAM Disk.
And that’s all there is to it! You now have a fully functioning Windows RAM Disk that you can use for fast file storage. Don’t forget, anything on the Ram Disk will be lost when you restart your computer.