I have a scene, about 20 mio faces, 1000 objects, 90% are instances. All modifiers are applied to the objects, in fact, not a single modifier is on any object.
Using the cycles preview, the scene takes about 1GB of my 4GB VRAM. Blender says 2,5GB Mem in the title bar. The scene renders in seconds in the preview.
When I render using F12, Blender uses almost all of my 8GB physical RAM (value of Windows Proccess Explorer), saying in it's title it uses 5.5GB of RAM. I increased my virtual memory to 24GB on an SSD, making 32GB in total.
Blender uses all of that, taking forever to synchronize objects and build BVH.
I let it run, it continued, but very slow.
At the end I get the CUDA out of memory message.
Conclusion:
- 4GB VRAM
- 8GB Physical RAM
- 24GB Virtual RAM
- In preview rendering the scene uses 1GB VRAM and 2.5GB RAM.
- In final rendering 4GB VRAM and 32GB RAM ain't enough to render it
Any idea what I can do?
EDIT: I simplified the scene and made a screenshot.
Green marker: GPU Memory
Red: RAM, Taskmanager (top), Blender (bottom)
Still the scene doesn't render, memory rises in task manager up to 7.7GB, then starts to fill up the 24GB of virtual memory.
Nobody seems to know, how to solve the problem. Maybe someone can answer the question, why this is happening. Why takes it 2 seconds for the cycles preview render to load my scene, build BVH and render it without any trouble, peaking at 1GB VRAM, while F12 eats up all RAM, fails to render and claims I'm out of VRAM? It should be other way round, that the F12 render uses less VRAM, from my experience.
Also the question, why Blender displaying RAM usage completely wrong, remains. I've read an article of Blender Developer Sergey, he's talking about memory fragmentation, but I doubt that would cause more than double of RAM usage. Sure, I don't know.
EDIT2:
I scratched together my last bucks and bought 16GB RAM. Didn't help. Syncronizing and building the scene used again all 16GB of memory and then continued with the virtual memory.
All I can say is, this is definitly a bug. I cannot think of any logical reason, why a scene that uses 1GB VRAM in Cycles preview would use 10x as much in final rendering, given the facts that:
- There is no modifier on any object
- Textures are small, 90% of objects are instances
- Nothing is created at rendertime, there is no particle system
I have no clue where to look for, what could cause this, and apparently no one else has. So I will conclude this is a unknown bug.
A bit hard to see on the screenshot. Below you can see the GPU memory peak at 10GB. On the right you can see Blender claiming to use 2770MB of memory. Not on the image, in the taskmanager all 16GB of RAM where used.