Author Topic: Page file fills up while RAM is not full, why?  (Read 3952 times)

2022-06-20, 14:21:08

Tom

  • Active Users
  • **
  • Posts: 335
    • View Profile
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,

2022-06-20, 14:46:20
Reply #1

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 6126
    • View Profile
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.
Tom Grimes | chaos-corona.com
Product Manager | contact us

2022-06-21, 07:21:55
Reply #2

Tom

  • Active Users
  • **
  • Posts: 335
    • View Profile
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?

2023-07-05, 17:51:41
Reply #3

dj_buckley

  • Active Users
  • **
  • Posts: 1058
    • View Profile
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?

2023-07-06, 07:44:26
Reply #4

Tom

  • Active Users
  • **
  • Posts: 335
    • View Profile
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.

2023-07-06, 12:36:34
Reply #5

Juraj

  • Active Users
  • **
  • Posts: 4815
    • View Profile
    • studio website
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.
Please follow my new Instagram for latest projects, tips&tricks, short video tutorials and free models
Behance  Probably best updated portfolio of my work
lysfaere.com Please check the new stuff!

2025-03-25, 00:06:24
Reply #6

dj_buckley

  • Active Users
  • **
  • Posts: 1058
    • View Profile
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

2025-03-25, 11:32:53
Reply #7

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13691
  • Marcin
    • View Profile
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
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2025-03-25, 21:03:49
Reply #8

dj_buckley

  • Active Users
  • **
  • Posts: 1058
    • View Profile
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