Page 1 of 1

Windows Paging - 2 file solution?

Posted: Mon Jun 26, 2023 1:33 pm
by rcamarda390
I am considering Ramdisk for windows page file.
I did find some posts talking about this, and had errors trying to have complete pagefile only on ramdisk.
I believe we can have more than one paging file in windows.

Would a solution be to have a minimum size page file on the C: drive, but add a secondary (and balance of size needed) on the ramdisk?
This way, windows would see the physical small page file on local storage, and create the secondary on the ramdisk?
Thanks in advance!

Re: Windows Paging - 2 file solution?

Posted: Tue Jun 27, 2023 7:29 am
by Support
Windows support multiple paging files, so your solution will wokr. However, I think the main problem with setting a paging file on a ramdisk is that the paging file may not be large enough when needed due to the ramdisk capacity. Otherwise there should be no problem using paging file on a ramdisk. A better solution is to set an additional page file on the C drive with Custom size (setting Initial size and Maximum size) to ensure the paging files are sufficient.

Re: Windows Paging - 2 file solution?

Posted: Wed Jun 28, 2023 12:22 pm
by tverweij
Technical: yes, it will work what you want to do.
Logical: The swapfile is used when there is a shortage of RAM, so using RAM for a swapfile only makes Windows swap more ...

Re: Windows Paging - 2 file solution?

Posted: Wed Jun 28, 2023 1:12 pm
by rcamarda390
@tverweij :) good point. windows is low on memory, page to file, but the file is in a ram disk...
:bang-head:

Re: Windows Paging - 2 file solution?

Posted: Thu Jun 29, 2023 5:15 am
by Support
Setting pagefile on a ramdisk is usually used on 32-bit Windows with more than 4GB RAM installed, and the ramdisk uses Invisible Memory.

Re: Windows Paging - 2 file solution?

Posted: Thu Jun 29, 2023 7:37 am
by Jorax
Hello,
this is my experience:
I have created a 20 GB Ramdisk (Direct-IO - NTFS) with Dynamic Memory Management enabled and leaving Compact mode unchecked. I use RamDisk for temporary files (browser cache, app temporary folder) and I also put the Windows 11 pagefile on it with these settings: 16 MB minimum size, 16000 MB maximum size, no pagefile on other disks.

These settings at first may seem rather RAM consuming but even playing videogames which need a high RAM usage I never run out of memory.

ATM I have RAM usage 75% so I have plenty of RAM free but I must add that I have 64 GB RAM installed on my system.

Re: Windows Paging - 2 file solution?

Posted: Thu Jun 29, 2023 7:50 am
by Jorax
I have put the pagefile on Primo Ramdisk because even with a large amount of RAM Windows sometimes access to pagefile so I have decided to put it on Ramdisk which is faster than hard disks and SSD's too https://www.tbsnews.net/tech/whats-fast ... ssd-446906

Re: Windows Paging - 2 file solution?

Posted: Thu Jun 29, 2023 8:12 am
by Jorax
Just a little correction: Windows pagefile settings are 16 MB minimum size, 20000 MB maximum size, no pagefile on other disks.

Re: Windows Paging - 2 file solution?

Posted: Thu Jun 29, 2023 12:16 pm
by tverweij
rcamarda390 wrote: Wed Jun 28, 2023 1:12 pm @tverweij :) good point. windows is low on memory, page to file, but the file is in a ram disk...
:bang-head:
For VM's, I use this technique; not Ram disk, but Primo cache.

The VM's get limited RAM (dynamic) and a swapfile on a separate VHDX. Those VHDX files are stored on a separate storage - alle swap VHDX files on the same storage. And that storage is backed by Primo chache with 10 sec deferred write. Almost all swaps in the VM's are now at memory speed.