Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] General Discussion => Topic started by: Tom on 2022-06-20, 14:21:08

Title: Page file fills up while RAM is not full, why?
Post by: Tom on 2022-06-20, 14:21:08
Hi,

I work on a scene that takes around 40Go of RAM while loaded in 3ds Max.
I have 128GB of RAM. After I've done few interactive renders, and worked a bit on the scene, by adding/modifying objects etc ... I can see that pagefile.sys on the system drive fills up to 10GB. When windows starts this file is only 0.8GB.

Why does pagefile.sys fills up whereas there is still a lot of RAM available? It does not seem very efficient. I would expect pagefile.sys increase only when there's no more RAM available.

Thank you for the help,
Title: Re: Page file fills up while RAM is not full, why?
Post by: TomG on 2022-06-20, 14:46:20
RAM used when loaded is not the same as RAM required while rendering. You can add a pretty detailed set of memory breakdowns in the Render Stamp, head to the system tab of the render settings, click the ? to see the list for things like %mc Memory used by Corona, %mcp Peak Memory used by Corona, %mpp Peak Virtual Memory Used by Max + Corona etc.
Title: Re: Page file fills up while RAM is not full, why?
Post by: Tom on 2022-06-21, 07:21:55
Hi TomG,

Thank you for your support.
The options you mention are very useful indeed.
But I still don't understand why pagefile.sys fills up while the peak virtual memory used by 3ds Max + Corona is 69GB, and the virtual memory used by Windows is 102GB. All these values are less than my total amount of RAM which is 128GB, so why does windows fills up the pagefile.sys?
Title: Re: Page file fills up while RAM is not full, why?
Post by: dj_buckley on 2023-07-05, 17:51:41
Sorry to resurrect an old thread but I have a similar question.

I've dramatically reduced the size of my page file recently due to the fact I have 128GB RAM.  It was taking up 60GB of space on my C:Drive so I assumed I didn't need it to be that big as I now have the RAM capacity to deal with most scenes.  But now every time I render I get a Bad Allocation message.

So my question is.  How big should the page file be with regards to rendering in Corona?
Title: Re: Page file fills up while RAM is not full, why?
Post by: Tom on 2023-07-06, 07:44:26
Hey,

It is still a bit mysterious to me as well, but what I can tell you is I'm fine on most scenes with a 800MB pagefile.sys.
Title: Re: Page file fills up while RAM is not full, why?
Post by: Juraj on 2023-07-06, 12:36:34
It's not advisable to fully disable page file, almost regardless of physical memory amount. Windows is pretty much designed to put some (usually system) files there.
How Windows allocates resources can get rather mysterious, but fully disabling it on Win10/11 can get crash-prone.
Title: Re: Page file fills up while RAM is not full, why?
Post by: dj_buckley on 2025-03-25, 00:06:24
Sorry to resurrect an old thread but I have a similar question.

I've dramatically reduced the size of my page file recently due to the fact I have 128GB RAM.  It was taking up 60GB of space on my C:Drive so I assumed I didn't need it to be that big as I now have the RAM capacity to deal with most scenes.  But now every time I render I get a Bad Allocation message.

So my question is.  How big should the page file be with regards to rendering in Corona?

Resurrecting this because ... see attachment.  This is with PageFile set to be automatically managed by windows?  I can only assume it's Corona filling it?  This machine has 192GB and the scenes I've been working on for the past year don't go anywhere near that when rendering
Title: Re: Page file fills up while RAM is not full, why?
Post by: maru on 2025-03-25, 11:32:53
Looks like this is expected:

Quote
The pagefile is used even when free RAM is available by design.

Processes with less activity are paged away to make room for other memory claims. Consider Windows always first using all RAM. In the case RAM is full and a new application is started, Windows should identify which processes can be paged away, read them from ram, write them to disk, read the new program from disk and load it in the freed RAM. This consumes a lot of time as disk read/write is a very slow operation, and all while the user is waiting for his program to start.

So to work around this performance hit, Windows will monitor memory usage and page away all that is not often used to keep RAM free for new processes that might start.
Source: https://learn.microsoft.com/en-us/archive/msdn-technet-forums/994e9f48-f319-444b-a45e-226030ec3b6e
Title: Re: Page file fills up while RAM is not full, why?
Post by: dj_buckley on 2025-03-25, 21:03:49
Thanks maru, yep I read that.  The bit I quoted wasn't worded very well initially.  What I was getting at was are there any specific settings we can safely use for the page file i.e. specific min max values.  Or is it best practice to just let windows manage it