Pathtracer render slows down after several frames

Hello everyone, I’m trying to render animation in MRQ using PT, but I noticed that after several frames the render slows down drastically. For example I try to render 144 frames, the first say 15-20 frames go smoothly, 2-3 minutes per frame, but then all of a sudden it bogs down and you can tell the whole PC is struggling a lot, and the render time shoots up to 15,20,30 mins per frame and more.

Also, it happens randomly, sometimes it gives me 15-20 frames, sometimes it starts after only few frames, once I managed to do almost 70 frames when it started happening - rendering the same sequence.

The complexity of the scene doesn’t seem to matter that much, I noticed it happening on pretty light scenes as well as heavy ones.

My PC is:

AMD 5950X
RTX 3090
128 GB RAM

Hi YosiSK,

it could be that you are running out of VRAM and the renderer has to fall back on system RAM. This usually drastically increases render times. Next time when you render, please observe your VRAM and RAM usage. If the VRAM is almost full and RAM usage is increasing, this is the culprit.

Another issue could be thermal limits but since you are using a desktop this should not be a problem.

What render-resolution are you using and how many AA samples (this also affects VRAM)? Do you have other applications open which might take up VRAM (e.g. video editing)?

Hi SinnPhilipp,

as I mentioned, it seems to happen randomly, It happens both rendering heavy masterplans or just a couple of trees. Thermal limits shouldn’t be a problem, I didn’t notice any thermal spikes. :-/

Usually I use about 256/512 samples - 4x128 or 2x128 with denoiser on 4K resolution.

If you are on 5.5 I believe it had a memory leak if you were mixing sample types. Meaning you have like 64 temporal and 4 spatial. If you want motion blur put them all in Temporal and just 1 spatial. The opposite if you do not want motion blur. If you are in 5.6 then I am not sure. What does your memory consumption look like over time?

Hi Shaun Comly, thank you for the reply,

I’m using 5.6 and the memory consumption stays basically the same most of the time - 13 GB VRAM when working on the scene, around 22/23 GB when rendering. I do not see any sudden memory spike when the slowdown occurs - BTW is there a way to do some kind of batch rendering without the whole scene loaded up and consuming my VRAM?

I also did a full HD resolution render which has similar behaviour, extremely fast at the beginning and then sudden slowdown. I will try putting all my samples into temporal.