@brecht I name you because I think you could understand better what is happening here.
I have a scene that takes around 15Gb according to cycles, around 45Gb in the system (I know this is because one thing is Blender and a different thing is the cycles usage) no matter if I use command line render or UI render, memory usage is the same.
Now what puzzles me is that I used the – --cycles-print-stats and I get that the geometry takes 1.4Gbs of memory, and the textures use 4.5Gb of memory, where are the rest of the 15Gb used?
I attached the output from the console as a txt here, the extension is XML because the system does not allow me to upload a txt file, but it’s just plain text.
There are numerous other allocations that are not counted in the geometry or texture files, such as the BVH, light importance array or object transformations (there can be many of the latter when you use particle systems that create thousands of instances). You can use the --debug_cycles when launching Blender to get detailed information about each device allocation that Cycles makes.
Yes, I tried the --debug-cycles but that info is chinese for me, I assume that there are more things that just geo and textures, but I’m not sure how to debug or optimize a scene using that info, and the difference is pretty big, from 5.9Gb to 15Gb… we are talking about a lot of extra information here
Yes, the output is overwhelming. Especially the logs for every tile buffer being allocated/freed add a lot of noise. Pipe it to a file and then use a text editor to browse through it - basically, you want to look for the names that you see in kernel_textures.h, such as bvh_nodes, object_node, tri_vnormal, etc. attributes_float3 may also be a big contributor.
@MaciejJutrzenka thanks for the advice! I did it just before you suggested it and I was amazed how the memory was contained, and it even gained render speed?
reason is any sort of accelerations structures requiere to build some kind of let’s call it a map… that map have to be uniqe… that means… instances are no longer used in some way. because u need to build a map of whole sceen let’s call it that way… it is sort of like u would like to bake whole thing… in such way each instance have diffrent light… so it will requiere diffrent texture etc…
So if u are useing huge amount of instanceing don’t use acceleration structures as they basically mostly kill instance feature.
That is for example also reason why engine like Clarisse that is designed to be rendering trilions of plygons… dosn’t even have BVH
@JuanGea… how to do this? my acceleration structure tab has 2 options only:
use spatial splits (default off)
use Hair BVH (default on)
and BVH Time Steps (default 0)
The default? Of course not, disabling those accelerations means that the scene will render slower, but the pre-process will be faster and less memory will be required, the default config tries to give you a good result in general trying to deliver an equilibrium, it’s not a good idea to deactivate accelerations always