Is putting the swapfile & temp folder to ramdisk a good idea in Windows 7 64 bit with lots of RAM?

Solution 1:

I agree that putting the swap file on a ramdisk doesn't make sense for a 64-bit OS. However, if one has 32-bit WinXP, then Windows can only "see" the first 3.5GB of RAM. If one has more RAM, say, 9GB, the RAM above 3.5GB is completely wasted by WinXP. However, using a program such as SuperSpeed RamDisk Plus, one can use the memory above 3.5GB as a ramdisk - and putting the swap file up there makes a tremendous amount of sense (again, on 32-bit XP, not 64-bit Win7).

Separately, putting temp files in a ramdisk almost always makes sense, performance-wise, unless the anticipated size puts too big a dent in the RAM available to the OS.

Solution 2:

Putting the pagefile on a ramdisk is a ridiculous idea. You have to understand that only a fraction of total paging will involve the pagefile. Most paging will be with executable and other mapped files, and a pagefile in RAM will do nothing to improve this performance. And thanks to the reduced system ram available there will be more of this paging. The result is that pagefile access will be faster but overall paging levels will be higher with a reduction in performance.

Solution 3:

Yes, paging files are used even if one has lots of RAM; but the simple existence of a paging file is not by itself a factor affecting system performance. Putting a paging file on a RAM disc is daft, moreover. The point to a paging file, after all, is to be a place for holding (transient) page data when those data are not currently in RAM. RAM discs are in RAM …

Placing temporary files on a RAM disc is a wholly different kettle of fish, of course.

Solution 4:

I would not say ridiculous; for neither 32 or 64 bits systems.

To start with the obvious, 32 bits windows (the majority of running systems) simply ignore anything above 4GB. Ramdisks being able to use PAE and 36 bits memory addressing, they are to my knowledge the only way of making high memory areas useful in 32 bits systems.

Question is : how do we make use of a lightning fast / more secure virtual hard disk ? Temp files come to mind and are pretty trivial to setup, as long as you know how to assign a fixed drive letter in Windows. Same with browsers cache. The interest for these is quadruple :

  • Fastest access/retrieve
  • True deletion
  • Suppresses most of useless wear on expensive SSD memory.
  • Less disk fragmentation..

As for the swap file, it seems obvious that 32 bits systems have a lot to gain with putting them in unclaimed RAM. One could think of a memory hungry program, using up to 3 GB on itself (with the 3GB switch in boot.ini) that will most likely cause a lot of swapping. Two of the same bonuses still apply: true deletion and wear on SSD. Fragmentation is less of an issue with swap files.

There is more : it is quite common for poorly written programs to use virtual memory, no matter how much physical memory available, causing useless disk access. This holds true for both 32 AND 64 bits programs. I even came across programs that will just fail to launch in the absence of a swap file.

Bottom line, while it makes sense no matter what to have a ramdisk below 4GB and save useless disk access for temp folder and programs caching, it seems much preferable to install more than 4 GB, memory price being what it is, in both 32 (with PAE enabled hardware) AND 64 bits systems and move the swap file there.

One should note that A LOT of professional computer users still can't go 64 bits for hardware support reasons.

What would be ridiculous, to use the same strong language as above, would be to just dismiss the idea and rely not only on Microsoft's virtual memory handling (which is praised and rightly so) but also on application programmers who range from the assembly coding guru to the high level language idiot that will bring the nicest-most-stable-PC to its knees just through bad memory handling. I've seen such code in mainstream programs, productivity applications, I kid you not !

My main system has a 8GB ramdisk on XP/32 and this has proved useful. It's quite trivial to setup and I must say the only program that gave me a hard time is google chrome whose installation/update strategy is hard on the tweaker.

You can think of a lot of useful use for ramdisks apart from these ; in my case, audio samples to retrieve from disk on live applications : put them there at bootup time (painfully slow) and get lightning fast access to multiGB libraries. But this is way off topic :)

This is my own experience. I wish people would not destroy the value of useful information by the use of unnecessary strong language. Ridiculous was a bad choice of word in this context, to say the least.

Solution 5:

I doubt you would see much difference moving your pagefile to ramdisk. If you wanted to force windows to use ram you could turn off the paging file.

However I noticed a large difference moving my IE temp files to a ramdisk and setting my TEMP and TMP enviromental variables to point to the ramdisk.

I also run Google chrome with the flag "-user-data-dir="R:\ChromeTEMP" so it stores temp files on the ramdisk. This will cause it to forget your settings. But since I use the sync feature it didn't effect me much. After the initial sync everything was back to normal. And skyrim loading screens are shorter after linking to copies of some files on my ramdisk.