RAM disk with enabled virtual memory (pagefile.sys)

Started by GameOveR

RAM disk with enabled virtual memory (pagefile.sys)   22 December 2021, 06:38

I just realized if I am using pagefile.sys (Virtual Memory), the system is writing first into pagefile.sys and after writing that data into RAMdisk.
This is my 3 months usage. I was using RAMdisk last month with Virtual Memory ON (16 GB pagefile - Windows 11 - 16 GB RAM 3600 Mhz) (see attached image)

What I was using on Windows 11:
- Watching twitch daily
- Watching youtube daily
- Daily internet usage (surfing)

How do I know it doesn't work with Virtual Memory?
Simple, I just open 4K video on youtube for 1 min. My chrome using RAMdisk at "Z:\ChromeCache" and I just look at my CrystalDiskInfo. I see so much data writing on pagefile.sys and after writing on RAMdisk. "Total Host Writes" going crazy!

So, I just disable Virtual Memory and after that my "Total Host Writes" literally going fine. Everything going directly on RAMdisk (testing with 4K video).

I don't know what can I do. I really need Virtual Memory ON, because without it I can't open some programs (two video on Youtube + Photoshop = crashing Chrome). I have 16 GB RAM already but I still have issues if I do that.

What will I do? I think I will buy HDD for Virtual Memory, so SSD lifetime will be good. I can still use Virtual Memory + RAMdisk for extending SSD lifetime.

I will appreciate any suggestions. Thanks.
Attachments:
open | download – 1.png (69.4 KB)
SoftPerfect Support forum - Andrew avatar image

Re: RAM disk with enabled virtual memory (pagefile.sys)   22 December 2021, 11:21

A RAM disk is allocated directly within physical RAM, i.e. it is never written to a page file. The observed behaviour is likely how Chrome caching works.

For example, when the page file is enabled, the total available memory is RAM size + Page File size. Chrome probably sees that it has sufficient available memory and stores its data there. Yet since not all of that is RAM, Windows starts moving memory pages to the page file. This results in excessive writing to that file and the SSD.

When the page file is disabled, the total available memory its limited by the RAM size. Chrome probably sees that there is insufficient memory and, instead of using it, writes its data to the disk cache. If the disk cache is also on a RAM disk, that data will end up in RAM and there will be nothing written to the SSD.

My advice would be to install more RAM and (if possible) disable the page file. Using a HDD for the page file will be slow and the system may become sluggish. We have two test machines here running for a long time, with 32 GB and 96 GB RAM. Both have page files disabled and the RAM Disk is used for all temporary stuff and browser caches. This setup works very well.

Re: RAM disk with enabled virtual memory (pagefile.sys)   22 December 2021, 20:36

Thanks for info. I still have some doubts. When I try two video on Youtube + Photoshop, I have 5 GB free RAM and I see some out of RAM errors from Photoshop, after Chrome crashing in 2 mins with out of RAM issue. Something forcing to use Virtual memory I think but I don't know if there is any settings for disabling this.
I don't have any issues really until using some Adobe apps with Chrome. And why they give me error when I have 5 GB free RAM. I hope +16 GB will solve this problem.
SoftPerfect Support forum - Ann avatar image
Ann

Re: RAM disk with enabled virtual memory (pagefile.sys)   23 December 2021, 12:09

Adobe software products, including Photoshop, are unfortunately notorious for their peculiar memory usage and management. Therefore you may like to check your Photoshop settings. The exact procedure may vary, depending on your version of Photoshop, but generally go to Edit - Preferences - Performance and adjust the memory usage limits to something that would work better with your hardware. Also, you may like to relocate Photoshop scratch disk to a RAM disk (if that particular version of Photoshop works well with it) or another hard drive. Depending on your setup, you may need to run Photoshop as Administrator to make these changes.

Other things to check would be the file resolution settings and the unit settings for the tools like crop, resize or select. Make sure that you haven't inadvertently set anything to inches or centimetres when you meant to choose pixels. Otherwise, for example, attempting to use the crop tool set to 3000x2000 inches instead of 3000x2000 pixels would produce an enormous file.

Re: RAM disk with enabled virtual memory (pagefile.sys)   23 December 2021, 20:51

Thanks, limiting RAM usage helped me a lot. Now I can use Chrome, Affinity Designer and Photoshop at same time. I want to add 16 GB RAM more, but until I get the extra RAM I will use these settings for now.

I reduced RAM usage in Photoshop and Affinity Designers:
8 GB -> 4 GB

Photoshop and Illustrator scratch disk:
Z:\
(my 4 GB RAM disk, I will allocate more if I need it)

Reply to this topic

Sometimes you can find a solution faster if you try the forum search, have a look at the knowledge base, or check the software user manual to see if your question has already been answered.

Our forum rules are simple:

  • Be polite.
  • Do not spam.
  • Write in English. If possible, check your spelling and grammar.

Author:

Email:

Subject

A brief and informative title for your message, approximately 4–8 words:

     

Spam prevention: please enter the following code in the input field below.

 **    **  **        ********   **    **        ** 
  **  **   **        **     **  ***   **        ** 
   ****    **        **     **  ****  **        ** 
    **     **        ********   ** ** **        ** 
    **     **        **         **  ****  **    ** 
    **     **        **         **   ***  **    ** 
    **     ********  **         **    **   ******  

Message: