How to use a Ram Disk in Windows - gHacks Tech News

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

ramdisk

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:

  1. Click on then plus icon to create a new RAM Disk.
  2. Assign RAM to the disk. You need to enter the amount in Megabytes, e.g. 4096 for 4 Gigabytes.
  3. Select a drive letter for the disk, e.g. drive z:
  4. Change the file system to NTFS.
  5. Add root folders, e.g. Temp and Firefox, in the Create Folders field.
  6. Switch to advanced, and add a drive label.
  7. 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

RAM Disk windows

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.

  1. 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.
  2. Select Advanced system settings from the sidebar when the System applet appears.
  3. Select Environment Variables in the System Properties window.
  4. Locate the variables TEMP and TMP in the user variables fields.
  5. 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

firefox cache directory

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:

  1. 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.
  2. 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.
  3. 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.

Closing Words

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.

Summary
How to use a Ram Disk in Windows
Article Name
How to use a Ram Disk in Windows
Description
You may install a Ram disk on your Windows PC to improve performance, maintenance, and privacy on the device.
Author
Publisher
Ghacks Technology News
Logo

We need your help

Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.

If you like our content, and would like to help, please consider making a contribution:

Comments

  1. Mr Stank said on June 7, 2018 at 7:37 am
    Reply

    Good concept but it does not work good all the time. Also bad timing since the RAM prices are sky high….

  2. Richard Allen said on June 7, 2018 at 8:24 am
    Reply

    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?

    1. Martin Brinkmann said on June 7, 2018 at 8:26 am
      Reply

      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.

      1. Richard Allen said on June 7, 2018 at 2:08 pm
        Reply

        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. :)

  3. RossN said on June 7, 2018 at 9:10 am
    Reply

    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.

  4. mark said on June 7, 2018 at 9:14 am
    Reply

    Check if the file system exFAT will not be more efficient.

  5. dark said on June 7, 2018 at 9:26 am
    Reply

    How to do it on Linux?

    1. Martin Brinkmann said on June 7, 2018 at 9:31 am
      Reply

      I will ask Mike to write something up ;)

    2. BalaC said on June 7, 2018 at 9:55 am
      Reply

      Linux doesn’t require any third party utility it has in-built tool. You can mount a tmpfs file system and use that.

      Example:

      mkdir /mnt/ramdisk
      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.

      1. dark said on June 7, 2018 at 6:03 pm
        Reply

        GUI way would be nice. :)

  6. Ivan said on June 7, 2018 at 9:28 am
    Reply

    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.

    1. Martin Brinkmann said on June 7, 2018 at 9:36 am
      Reply

      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.

      1. duri said on June 8, 2018 at 5:28 pm
        Reply

        As for performance boost – is it worth using RAM disk when I`m currently using SSD disk? What’s your opinion Martin?

      2. Martin Brinkmann said on June 8, 2018 at 5:39 pm
        Reply

        Apps with lots of read and write operations may still benefit from a RAM disk.

  7. Tom Hawack said on June 7, 2018 at 10:26 am
    Reply

    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…

  8. jupe said on June 7, 2018 at 11:23 am
    Reply

    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?

    1. Martin Brinkmann said on June 7, 2018 at 11:35 am
      Reply

      Yes it needs to run in memory but it uses barely any RAM.

  9. Franck said on June 7, 2018 at 12:04 pm
    Reply

    Very interesting, thanks a lot !

  10. Al CiD said on June 7, 2018 at 12:50 pm
    Reply

    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…

    1. Sophie said on June 7, 2018 at 4:55 pm
      Reply

      That’s a very good point!

    2. ha said on June 8, 2018 at 7:11 am
      Reply

      Same worry and so I don’t put the %temp% to RAM disk.

  11. Anonymous said on June 7, 2018 at 12:58 pm
    Reply
  12. Emil said on June 7, 2018 at 1:47 pm
    Reply

    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.

    1. Constance said on June 7, 2018 at 4:41 pm
      Reply

      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.

      1. Anonymous said on June 8, 2018 at 6:38 am
        Reply

        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.

        Solution:
        1. Upgrade to SSD
        2. Defrag your HDD

    2. Sophie said on June 7, 2018 at 4:59 pm
      Reply

      @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! :)

    3. BM said on June 7, 2018 at 6:08 pm
      Reply

      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).

  13. Dave said on June 7, 2018 at 3:27 pm
    Reply

    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.

    1. Tom Hawack said on June 7, 2018 at 3:44 pm
      Reply

      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!)

      1. Tom Hawack said on June 7, 2018 at 3:59 pm
        Reply

        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.

    2. Martin Brinkmann said on June 7, 2018 at 3:56 pm
      Reply

      Dave, you are right. I have edited the guide accordingly.

      1. Peter said on June 8, 2018 at 12:10 am
        Reply

        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.

  14. maxa said on June 7, 2018 at 6:57 pm
    Reply

    Its very very bad idea move TEMP to ram disk !!!! Many installers/uninstallers use it as post boot ( scripts , apps etc ) !!!!!!!!

  15. Juha P said on June 7, 2018 at 7:12 pm
    Reply

    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.

    1. Tom Hawack said on June 7, 2018 at 7:32 pm
      Reply

      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.

  16. Voluntary Exile said on June 7, 2018 at 8:17 pm
    Reply

    “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.

    https://www.ghacks.net/2017/04/03/the-best-free-ramdisk-programs-for-windows/

    https://www.raymond.cc/blog/12-ram-disk-software-benchmarked-for-fastest-read-and-write-speed/

    1. Martin Brinkmann said on June 7, 2018 at 8:29 pm
      Reply

      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.

  17. Rick said on June 7, 2018 at 11:18 pm
    Reply

    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!

  18. lehnerus2000 said on June 8, 2018 at 4:37 am
    Reply

    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.).

  19. Gilbert said on June 10, 2018 at 4:10 pm
    Reply

    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.

  20. Franck said on June 28, 2018 at 4:03 pm
    Reply

    Awesome article and comments, thanks a lot !

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

Please note that your comment may not appear immediately after you post it.