How to use a Ram Disk in Windows
You may install a Ram disk on your Windows PC to improve performance, maintenance, and privacy on the device.
Ram disks can best be described as memory-based drives that act just like any other hard drive on the system for the most part. You can install programs on RAM disks or use it to store temporary files.
These disks offer advantages over regular hard drives: memory is faster which means that operations will benefit from that. Memory is cleared automatically on shutdown so that any files that reside on the disk are removed automatically.
Tip: check out our overview of free RAM disk programs for Windows to find out which are available. I'll be using SoftPerfekt RAM Disk which you may download from third-party sites such as Majorgeeks.
You need a bit of memory to use a RAM disk as part of the RAM that is installed on the device is used exclusively by the RAM disk.
Installing the RAM Disk
The very first thing you need to do is install the RAM disk on your PC. Download and install SoftPerfekt Ram Disk and start the program afterward.
Setup is real simple:
- Click on then plus icon to create a new RAM Disk.
- Assign RAM to the disk. You need to enter the amount in Megabytes, e.g. 4096 for 4 Gigabytes.
- Select a drive letter for the disk, e.g. drive z:
- Change the file system to NTFS.
- Add root folders, e.g. Temp and Firefox, in the Create Folders field.
- Switch to advanced, and add a drive label.
- Select OK to complete the creation.
The RAM disk should be listed in Explorer just like any drive. You can interact with it normally; move files to it, create files and folders, or install applications to it.
Configuring Windows for use with the RAM Disk
Now that the RAM disk is created, you may want to configure Windows to make use of the disk. One thing you may want to consider doing is moving the temporary folders to the RAM Disk so that they are cleared automatically on restart.
- Use Windows-Pause to open the System Control Panel applet. If you don't have a Pause-key on your keyboard, tap on the Windows-key, type Control Panel, and select the result. Go to System and Security > System.
- Select Advanced system settings from the sidebar when the System applet appears.
- Select Environment Variables in the System Properties window.
- Locate the variables TEMP and TMP in the user variables fields.
- Double-click on each entry, and replace the default value (the temporary files path) with a path pointing to the RAM Disk, e.g. z:\temp
Configuring third-party programs for use with a RAM Disk
You may configure third-party programs to use the RAM disk as well if third-party programs let you move the cache directory.
You can check out our guide on moving the Firefox cache to a RAM disk, and may do the same for other applications that support setting custom directories.
While moving caching directories to the RAM disk is probably the number one purpose for using memory-based disks, it is useful in other ways as well. Here are three:
- You may move directories that process data to the RAM disk. If you convert video files, audio files or render something, you may want to consider moving the processing to the RAM disk to speed up the process.
- Want to test a program? Install it or put it on the RAM disk to do so. Installing leaves some traces of the file on the system, e.g. in installed programs, but the program itself is gone on the next reboot.
- Put games and other applications that benefit from faster loading times on the disk. Some RAM disks support the storing of permanent files on the disk which you need when you want to play games from the disk. Note that many games are quite large and that you need lots of RAM to move them in their entirety to the disk.
Creating and using a RAM disk is a simple process. While you need to install and configure the disk once, it runs automatically after the initial setup.
Good concept but it does not work good all the time. Also bad timing since the RAM prices are sky high….
Thanks. I’ve been wanting to experiment with a ram disk forever and I’ll get to it this weekend. I’ve been curious to see how much improvement there would be with browser performance for someone already using a SSD. And luckily I have 16GB of RAM so I’ll start with a 4GB ram disk.
Or maybe I should make it bigger, I sometimes have 2-3 browsers open using multiple tabs. The RAM disk is only used to replace the browser disk cache but the memory cache is still separate, right?
Yes, the RAM Disk replaces the disk cache, or whatever cache you assign to it, only. If you use it just for cache for the browser, you may not need such a large amount of RAM for it. May need to do some experimentation to find the best value.
I actually got off my lazy behind and setup a RAM disk using SoftPerfekt RAM Disk. It was a very quick and easy setup. I even pointed my user and system temp files to the new disk.
After configuring Firefox, Waterfox and Chrome to use the RAM disk for cache I saw a very minor improvement in page load times. At best a 100ms improvement with Waterfox. With FF and Chrome any improvement seen would be on a graphics heavy webpage, after the page was cached, and even then it was very minor, less than 100ms. With my bandwidth (125Mbps down), and my SSD, putting the browser cache on a RAM disk didn’t accomplish much of anything, for me.
I can see browser cache on a ram disk working well for someone normally using cache on a 5400rpm HDD or maybe if they have a slower connection. I ended up reducing my RAM disk size to 2GB and it was more than enough for the browsers. Anymore, I rarely do any graphics editing or converting audio and/or video files so other than browser cache I don’t have much use for it, even then.
The auto clearing benefit for the temp files and browser cache wouldn’t mean much for me unless I exit out of the program, which I don’t think would work well if the temp files are cached in the RAM disk, and… I clear the cache and temp files manually much more often than I reboot this computer.
I even tried using FAT32 instead of NTSF and it seemed to me NTSF was working better but then I only used the RAM disk for browser cache and temp files. Using a RAM disk is definitely an interesting concept, I’m glad I tried it, I just wish I had something with a platter drive to experiment on. :)
Using the last free version of the Softperfect RAM Disk on several Windows 10 computers. You are correct that there are times when it can’t be used. e.g. If I’m creating very large archives, I have to change %temp% and %tmp% variables back to a HDD.
Check if the file system exFAT will not be more efficient.
How to do it on Linux?
I will ask Mike to write something up ;)
Linux doesn’t require any third party utility it has in-built tool. You can mount a tmpfs file system and use that.
mount -t tmpfs -o size=512m tmpfs /mnt/ramdisk
After the above command you can use the point the application to /mnt/ramdisk to use.
GUI way would be nice. :)
The question is, how much is the speedup? Is it worth the hassle?
I’m already filling up my 24GB of RAM regularly, so taking a chunk away for a RAMDisk needs to be justified.
The answer depends on what you use it for. If you move the Windows cache, you will benefit more from the automatic clearing of the cache on exit. If you use it to process files, e.g. create archives or the recording of video, you may benefit from performance increases due to faster load and write speeds.
There is no RAM Disk equals X% performance boost kind of formula. I suggest you give it a try; setup takes just two minutes or so and is easily undone if you notice no change.
As for performance boost – is it worth using RAM disk when I`m currently using SSD disk? What’s your opinion Martin?
Apps with lots of read and write operations may still benefit from a RAM disk.
I run Dataram RAMDisk 4.4.0 RC36 flawlessly but unfortunately cannot use it as I did since Firefox 57 Quantum. I cannot use it in the following scheme :
Moving my Firefox profile to this RAMdisk, not Firefox’s disk cache which I disable but the profile itself (I had tried enabling disk cache and moving it to RAMdisk as described in the article but had noticed less improvement then disabling disk cache and increasing memory cache without RAMdisk).
So, once the profile in RAMdisk, all is for the best : we have therefor no disk cache, increased memory cache and, concerning the RAMdisk, the Firefox profile moved to it. No problem until the arrival of Firefox 57 and one major issue since and only with one extension : uBlock Origin.
uBlock Origin simply doesn’t update Filter lists and considers those, non uBO native, as inexistant when the profile is on a RAMdisk, or at least on the Dataram RAMdisk.
I had mentioned this on uBO’s GitHub issues’ pages but never got an explanation on the ground that this was a Firefox issue and not a uBO issue, which is likely true.
A pity because Firefox does run better when the user’s profile is on a RAMDisk; better but not that much better. My main concern is why uBO encounters above mentioned issue. I just cannot understand that. Is it because uBO is a webextension? I’d have to reinstall a profile on RAMdisk and see how other webextensions perform. I did that at the time and as I recall it only uBO appeared to face issues. Odd, odd, odd…
Does this program have to run in memory as a resident program while you use the RAM Disk?
Has anyone had any good experiences with ImDisk Toolkit? I like the idea of the dynamic sizing it offers, and am very tempted to use it on on Win10 x64, anyone have anything good to say about it?
Yes it needs to run in memory but it uses barely any RAM.
Very interesting, thanks a lot !
I run IMDISK for years now, very nice.
The problem moving %temp% to RAM-Disk is some programs put install files in %temp% and then nedd to reboot to complete installation, but the files arenÂ´t there no more…
That’s a very good point!
Same worry and so I don’t put the %temp% to RAM disk.
RAM disks nowadays are useless.. snakeoil. It was fine in the Amiga days (reset-proof ramdisk yay) but nowadays there is no speedup with a RAM disk because:
… If you have enough RAM, windoze (and every other modern OS) already caches enough disk contents, reads and writes before they are requested from the slow (?) disk.
… if you don’t have enough RAM, having some of iot blocked up will just slow you down even more.
Better buy enough RAM and an SSD before any such snakeoil BS.
Well my main PC has 16 GB of RAM and I’ve noticed months ago that the game “Path of Exile” took an extremely long time to allocate space before updating on the hard disk drive (and no, my HDD wasn’t faulty or overly fragmented, it’s also a 7200 rpm and works fine).
So after encountering the issue a few times (I don’t launch the game that often, so every time I did it needed to allocate space for updating), I decided to try copying the whole folder to a ramdisk, change the references to its drive letter and path in the registry, and start the launcher: this way the time spent allocating space was way shorter.
Thus I can tell that yeah, there may be I/O intensive tasks that benefit from running on a RAMdisk instead of actual mass storage.
As others have said, RAM Disk is just snake oil nowadays. Game nowadays took gigs of space so most likely the files’ bytes are scattered across the HDD, it’s what made the game took long time to launch. By copying the game into one place, the files’ bytes got more organized, that’s why it’s faster to launch.
1. Upgrade to SSD
2. Defrag your HDD
@Emil – I am inclined to agree with just what you’ve written. That’s why I’ve always stopped short of installing a RAM disk. I read with interest, but then I think “what’s the point”? You’ve given up some of your ram, and I think the whole thing of ramdisks sort of belongs in the 1990s to be honest.
Even with the browser cache, for example, with an SSD – you’re probably talking minuscule time savings that you would not be able to perceive with human perception alone.
I think that once again….I’ll not even try it! :)
I wouldn’t go that far in describing it.
However, I was wondering if there would be a meaningful difference if someone is running with an SSD.
The point of RAMDisk is to move some of the operational data components (e.g. page file) from a slower physical HDD directly into much faster dynamic processing memory.
Not sure the potential bottlenecks (e.g. SATA interface) with SSD are noticeable in a practical sense.
Perhaps, only if one is running process intensive programs.
But if total RAM is seriously low to begin with (e.g. generating more paging on HDD) then not sure RAMDisk can help much, as it displaces some of that memory needed for the other processing (e.g. increasing the need for more paging).
Setting the “system” variables temp and temp to ram will cause problems with windows updates that require a reboot.
Setting the “user” variables works fine.
Yeah, I wouldn’t set a temp folder (whatever one) on a RAMDiisk, unless that RAMDisk have the save image (regularly or at least on exit) checked, which is a valuable option not mentioned here, yet (now it is!)
Forgot to mention that a saved RAMdisk image won’t help of course if the temp is required on reboot given the image is rebuilt from save only after Windows start.
Dave, you are right. I have edited the guide accordingly.
Setting the “system” temp folder to ramdisk did work with most Windows updates (even some of them requiring a reboot), but failed when updating to Windows April 2018 Update giving a BSOD halfway through the process. Fortunately, after changing system temp folder, the update process restarted where it stopped.
I am using ImDisk Toolkit as ramdisk software. The only (other) problem I have experienced so far is when unzipping very large files with 7-Zip. But I think you can change temp file settings in 7-zip, setting other locations than the temp folder as temporary storage for unzipping.
Its very very bad idea move TEMP to ram disk !!!! Many installers/uninstallers use it as post boot ( scripts , apps etc ) !!!!!!!!
I have been using a ramdisk for 3 years now. I have all my browsers installed in them plus sandboxie. I notice a big difference when loading them. I used to have the temp folders too but they sometimes need more than the 6Gb I have assigned to them so I put them back to the hard drive I have never had any problems with it.
I’ve never seen the logic nor the effectiveness of installing a browser on a RAMdisk (I mean the browser’s install folder), because the system still has to load it when opened. But I do see an improvement by adding a browser’s user profile in RAM because that’s where all the work performs during a browsing session. The advantage of a RAMdisk is not only (and perhaps less) the loading time of an application then the processing time of this application once it’s running.
“There is no RAM Disk equals X% performance boost kind of formula.”
From previous article on site, a link to Raymond says there are some measurable performance benchmarks with the programs. I do wonder why SoftPerfect was a choice.
I should have been clearer: Ram Disks can boost performance, but you cannot say how much of a performance boost individual systems will have when a RAM disk is installed as it depends on a lot of factors.
Presumably a coincidence, but while I browse ghacks most days, I actually got here last night via a Google search for ram disk software and found that previous RAM disk article.
All because of the Totally Accurate Battlegrounds frenzy yesterday…
There’s suggestions all over Reddit/Steam/etc that a lot of the poor performance and low FPS from lack of optimization can be evened out by creating a 5G RAM disk, making a SteamLibrary dir on it, and copying the entire game directory onto it, same as Constance’s comment above with Path of Exile.
Downloaded SoftPerfect to try, but ended up using OSFMount because I already had it installed anyway for mounting disk images… thanks for bringing to my attention that it already had a RAM disk feature!
If you dual boot a 32 bit OS and a 64 bit OS, you can use the any “surplus” RAM as a RAMDisk in the 32 bit OS.
One of my PCs triple boots (XP, W7 and LM18.3) and it has 8 GB of RAM.
I created a 4 GB RAMDisk in XP and it seems to run smoother (I moved the Temp folders, browser profiles, etc.).
1. Privacy – From session to session the system will start without trace of the last session.
Since nothing get written to the HD there no trace or shadow copy of anything,
not even filename.
(I found that there was a copy on my credit card number on my HD after using-it)
2. SSD – Running session in RAM reduce the wear and tear to any HD especially SSD
and as a bonus…
3. Reactivity – System react a lot quicker.
For full privacy – I have a machine that load and run a full Linux system in ram (it use 8 out of 32G), I can disconnect the HD if I want to, on that machine I do my banking and software testing, when done, I reboot and restart fresh, ex: If I test a buggy software, no harm is done, I restart and forget about-it.
For me it was worth the effort to setup, I have peace of mind now.
All of this depend on your need and by how much your are concern with your system performance and privacy.
Awesome article and comments, thanks a lot !
If I use this ramdisk with my browser CACHE, will I be able to see the pages I visited (history) if I restart the computer? And if I added a new bookmark, will it be there after the restart?
The same 2 questions, but applied to the case of moving my browser PROFILE to the ramdisk.
I would be interested in the “speeding-up” part of the ramdisk, but I would like to keep my history and everything I modify available even if I restart the computer.
Thank you in advance for the answers
Carl any data saved to the RAMdisk is gone on the next start of the system provided that the RAMdisk is not set up to be persistent.
If you move the profile, you’d have to do so each time unless you make it persistent. While you lose the privacy-benefits then, you get the speed-benefits.
If you just move the cache, you will keep any bookmarks and most other changes that you make to your profile (as it is still on the hard drive and not the RAM disk).
Thanks for the quick reply! So I guess if I opt for the profile being in ramdisk, the ramdisk software has to be able to do a copy to my hard drive from time to time, and always when I close my browser. I guess most of the ramdisk programs has that option… but I am not sure if we are talking about the same thing… you refer to making the profile persistent. So, in the case of SoftPerfect RAM it would be the option where you can set up an image file name and then check the box “Save contents to image”, right?
Also, will it be saved to the image automatically whenever I put the computer to sleep?
Does the ram disk show up when scanning a machine for administrative shares in an Active Directory Domain? Looking for an easy way to keep data safe from people with browsing rights.
How can I tell if my RAM DISK is actually benefiting me? i.e., are there any stats or reports I can review while my Windows 10 Pro is running?
RAM disk is good for running torrents because the downloading files get accessed very frequently as they are being shared/uploaded to many others. In fact, hard disks can fail prematurely because of excessive use of torrents. Moving torrents to RAM disk is more efficient and protects your hard disk.