What to put on RAMDisk on Windows?

12,495

Solution 1

"What to put on RAMDisk on Windows?" A: Nothing.

A RAMdisk is a foolish use of RAM.*

Windows, esp in Vista and later, will do a perfectly good job of using "extra" RAM for file and page cache. It does this completely automatically. And if a process suddenly turns out to need that some of that RAM-that-once-was-"extra", the OS can take it back from these caches just about instantly (only marginally slower than when it uses "free" RAM) and let the process that needs it, use it. It will do so intelligently, first repurposing low-priority cache that hasn't been accessed in a long time.

Whereas... When you lock RAM away in a RAMdisk the OS then can't ever use it for actual "live" contents (i.e. to resolve page faults), not in any amount of time. That's bad.

Practically all claims that "the OS isn't managing my RAM well" are due to misinformation about how virtual memory works and what it does, and misinterpretations of various displays. (Granted, Microsoft has not helped much here.)

(* The only exception I'll agree to is if you're running e.g. 32-bit Windows clients, which just won't look at more than about 3 GB of RAM. A RAMdisk product that makes use of RAM the OS flatly can't or won't use doesn't take anything away from the OS. A better long-term answer is of course to go to an OS that will use of all of your RAM.)

Solution 2

Basically, anything that you need speed for, that you will use often. Its a way of increasing your apparent ram.

More info here: http://www.techrepublic.com/blog/window-on-windows/how-do-i-use-a-ram-disk-to-help-speed-up-disk-intensive-applications/3430

Share:
12,495

Related videos on Youtube

boomie
Author by

boomie

Updated on September 18, 2022

Comments

  • boomie
    boomie over 1 year

    I got a lot of RAM installed in my PC recently and I looked into this RAMDisk thing.

    There are two things I've found from my investigation:

    1. You should not mess with Windows native pagefile/memory settings. Memory handling system of Windows and its services are perfected by multiple years of testing in real scenarios. SuperFetch and Windows memory model apparently make moving specific files and folders to RAMDisk unreasonable since mapped files are not immediately flushed from memory and SuperFetch does a good job of predicting user's actions.
    2. However, developers of 3rd party programs like browsers and utilities spent considerably less time worrying about performance, thus in edge cases, like having an abundance of memory, these program work in a less than optimal ways.

    If I am correct, RAMDisk may be useful to store some programs' temporary cache: the files that can be automatically regenerated without much trouble. Browsers love to cache data to disk to avoid downloading it from internet, what else can be put on RAMDisk?

    • 5arx
      5arx over 11 years
      Just about anything. I'm a developer and use a 1-2GB RAM disk for holding the working copy of code bases I work on. The time taken to build a typical app is reduced by about a factor of 10 compared to conventional HD and even SSD. Highly recommended if you've got the spare RAM.
  • boomie
    boomie over 12 years
    I use a set of utilities often, but RAMDisk is volatile and will delete all files on it after reboot. Most utilities store their preferences in their folder in some sort of .ini file, so I would need: 1) a way to copy necessary files to RAMdisk automatically during system start, and 2) some mechanism to flush data from RAMDisk to HDD. This is the sort of troubles I don't like so I specifically want fuss-free speedup. Thus, the stuff that would be kept on disk should be regeneratable.
  • Psycogeek
    Psycogeek over 12 years
    Covers it all so far. Paging will not work in most of the ramdisks, they come to late in the system. Even if RD could be paging, it would serve a small and useless purpose. On a really stable system a person mightuse Ramdisk to "work with files", then transfer them out when done. Putting windows Own temps in them is very fast, But installs that break out into temps then reboot to install fail, making a mess. :-( Browser caches (clearable:-) work wonders in them. Some browsers now use large ram caches for speed, some still get an advantage. Apps still have to be put ON it, so it is a toss-up
  • Admin
    Admin almost 8 years
    This is not a very good answer. There are numerous scenarios where a Ramdisk is a great use of RAM.
  • Jamie Hanrahan
    Jamie Hanrahan almost 8 years
    On a primitive OS that truly leaves the "available" RAM unused, perhaps. On a modern OS? No, there aren't, for all the reasons I described... especially since SSDs have become large and cheap.
  • Admin
    Admin almost 8 years
    Okay here's a scenario for you: I'm running a virtualized, encrypted Windows 7 from a linux live usb. Both linux and win running USB 2.0, since that's all this computer has. It works but the drives are so slow it constantly locks up ... except if I put the programs on a RamDisk. I have plenty of RAM to do so, and like this it's perfectly usable. So you're saying a Ramdisk is useless, this setup would not work without one. Of course if I had the latest super computer, there would be other solutions, but we're talking real life here and RAMdisks are an excellent tool for certain things.
  • Jamie Hanrahan
    Jamie Hanrahan almost 8 years
    "Hey, swimming with a brick in each hand is tough! Oh wait, I know - I'll use an innertube to help me float!" Uh, ok... but dropping the bricks would be much more effective.
  • Admin
    Admin almost 8 years
    funny but sometimes you have no choice but to swim with a brick in each hand. There are also many other scenarios requiring the high performance of a RAMDisk. Last time I checked RAM was still thousands of times faster than the best SSD out there. If you had said "In most cases, A Ramdisk is not useful to increase performance on a modern machine with an SSD" instead of a categorical "RAMDisk is a foolish use of RAM" I would agree with you.
  • Alex
    Alex about 7 years
    Ignorant. Automating the use of RAM vs disk can never be fully done, because it's undecidable, just like all but the most trivial problems in computer science. There will always be scenarios that neccessitate the manual use of a RAM-disk.
  • Jamie Hanrahan
    Jamie Hanrahan about 7 years
    If it's undecidable by algorithms then it's also undecidable by humans.
  • Daniel B
    Daniel B almost 6 years
    But there is one perfectly valid use: Short-lived temporary files, for example when using tools that only work on files, not streams.