I created a simple animation with a human asset from BlenderKit. I rendered the animation and it was very slow. In the Task Manager, I could see the VRAM usage going up and down like a sine wave. It was reaching almost my maximum VRAM 6GB. I cancelled the rendering and turned on the persistence option and the rendering speed became like 10 times faster.
As far as I guess, maybe this is not good for rendering a complicated animation in which the the assets being rendered changes in the middle for some reason? Otherwise, what is the point of keeping loading/unloading the memory data for each frame? I had heard of this persistence thing in a random YouTube video a while ago, and if I had not known, it would have taken a LOT of time to render the animation.
Maybe it is better to enable the persistence option by default, and automatically turn the option off if VRAM runs out or projected to run out?
This is a guess on my part, but Persistent Data might be turned off by default for two reasons:
It uses more memory and therefore might be the difference between a scene being rendered and not being rendered on a lower-end machine.
Not everyone wants to make animations. And even if someone was in the process of making an animation, they’d fire out a few test-renders first to see how things look or to start setting up post-processing effects in the compositor (which doesn’t necessarily require re-rendering immediately.)
To add to your first point, this confirmation by Brecht about persistent data:
[quote=“KarimJoseph, post:5, topic:18427”]
Does this mean for example, that if the persistent data cache takes up 2gb of the VRAM after a render, we then have 2gb less VRAM available when working in the 3D scene?
[/quote]
Yes, that’s correct too.
In other words, if you have a scene that takes 2 GB of VRAM with persistent data on, and a GPU with 4 GB of VRAM, the rest of your system (including the 3D viewport) only has 2 GB VRAM. Working in the viewport with those limitations is probably going to be a lot slower and laggier, even though rendering will be a lot faster