New(?) Iray texture memory info line
![lasersayspew](https://secure.gravatar.com/avatar/e750235ad5cccde3344cc13cefb72666?&r=pg&s=100&d=https%3A%2F%2Fvanillicon.com%2Fe750235ad5cccde3344cc13cefb72666_100.png)
I recently updated from 4.10 to 4.12 and here's my problem.
On 4.10, when I started rendering it would say how much vram raw textures require. Something like: "Iray [VERBOSE] - IRAY:RENDER :: 1.2 IRAY rend stat : Texture memory consumption: 4.8 GB (device 0)"
Now, after updating to 4.12, I see this:
Iray [VERBOSE] - IRAY:RENDER :: 1.2 IRAY rend stat : Texture memory consumption: 842.252 MiB for 58 bitmaps (device 0)
The scene clearly takes a lot more than 842mb, according to afterburner it takes somewhere around 5gb. So how do I process this info now? How do I get the previous total texture memory consumption?
Looking at the afterburner info is not very helpful since it showed 500mb used before render, ~5gb used during render, 2.5gb used AFTER render(with the render window closed). So I'm not sure what to substract from what to get the actual render memory usage.
Comments
500 Mb is probably the amount Windows reserves for its use. Therefore something like 4.5 Gb was what the render took. the 2.5Gb is a combination of the Windows reserve and some of the geometry and textures that will iRay to resume the render, this doesn't seem to get cleared from VRAM unless DS is shut down.
What about that 842 for 58 bitmaps part? How do I translate that to previous total texture memory usage?
What if I delete that character, load another subset? It shows 3670mb used during render. And then 2364mb after. Did it unload previous info? Is it 3670 - 500 or 3670 - 2.5gb from previous attempt?
It was so easy to just look at raw texture consumption and go from there in determining if I should optimize something. Now it's some gibberish with bitmaps that I have no idea how to translate(if it's possible even). And there seems to be no info on that on google either. Not to mention that 4.12 keeps freezing at the start of every render for some reason. Should've stayed on 4.10 really.
Thanks for your help.
@lasersayspew "Not to mention that 4.12 keeps freezing at the start of every render"
Have you updated your Nvidia driver to the minimum required for Studio 4.12?
Yeah, got the latest studio driver. It actually freezes weirdly. It goes into "not responding" state the moment I hit Render button and stays there for 15-20s. sometimes a minute or a bit more. During that time CPU usage is less than 20%, RAM usage is less than 70% or so, GPU is at 500mb, disk is at 1.5mb/s, something like 2% of load. So nothing is choking. I have no idea what's the cause. And everything else works perfectly fine during that freeze. I mean chrome, explorer, etc.
Add together the following values (marked in green) found in your log file:
2019-10-05 11:11:13.293 Iray [VERBOSE] - IRAY:RENDER :: 1.2 IRAY rend progr: CUDA device 0 (GeForce GTX 1050): Processing scene...
2019-10-05 11:11:13.312 Iray [INFO] - IRAY:RENDER :: 1.3 IRAY rend info : Using OptiX Prime version 5.0.1
2019-10-05 11:11:13.312 Iray [INFO] - IRAY:RENDER :: 1.3 IRAY rend info : Initializing OptiX Prime for CUDA device 0
2019-10-05 11:11:13.312 Iray [VERBOSE] - IRAY:RENDER :: 1.3 IRAY rend stat : Geometry memory consumption: 35.0846 MiB (device 0), 0 B (host)
2019-10-05 11:11:17.571 Iray [VERBOSE] - IRAY:RENDER :: 1.3 IRAY rend stat : Texture memory consumption: 313.772 MiB for 38 bitmaps (device 0)
2019-10-05 11:11:17.577 Iray [INFO] - IRAY:RENDER :: 1.3 IRAY rend info : Importing lights for motion time 0
2019-10-05 11:11:17.577 Iray [INFO] - IRAY:RENDER :: 1.3 IRAY rend info : Initializing light hierarchy.
2019-10-05 11:11:17.749 Iray [INFO] - IRAY:RENDER :: 1.3 IRAY rend info : Light hierarchy initialization took 0.172s
2019-10-05 11:11:17.751 Iray [VERBOSE] - IRAY:RENDER :: 1.3 IRAY rend stat : Lights memory consumption: 1.48299 MiB (device 0)
2019-10-05 11:11:17.755 Iray [VERBOSE] - IRAY:RENDER :: 1.3 IRAY rend stat : Material measurement memory consumption: 0 B (GPU)
2019-10-05 11:11:17.875 Iray [VERBOSE] - IRAY:RENDER :: 1.3 IRAY rend stat : Materials memory consumption: 174.953 KiB (GPU)
2019-10-05 11:11:17.875 Iray [VERBOSE] - IRAY:RENDER :: 1.3 IRAY rend stat : PTX code (90.1 KiB) for SM 6.1 generated in 0.12s
2019-10-05 11:11:17.981 Iray [INFO] - IRAY:RENDER :: 1.3 IRAY rend info : JIT-linking wavefront kernel in 0.046s
2019-10-05 11:11:18.004 Iray [INFO] - IRAY:RENDER :: 1.3 IRAY rend info : JIT-linking mega kernel in 0.022s
2019-10-05 11:11:18.004 Iray [INFO] - IRAY:RENDER :: 1.2 IRAY rend info : CUDA device 0 (GeForce GTX 1050): Scene processed in 4.711s
2019-10-05 11:11:18.012 Iray [INFO] - IRAY:RENDER :: 1.2 IRAY rend info : CUDA device 0 (GeForce GTX 1050): Allocated 15.4498 MiB for frame buffer
2019-10-05 11:11:18.045 Iray [INFO] - IRAY:RENDER :: 1.2 IRAY rend info : CUDA device 0 (GeForce GTX 1050): Allocated 651.375 MiB of work space (772k active samples in 0.000s)
2019-10-05 11:11:19.470 Iray [INFO] - IRAY:RENDER :: 1.2 IRAY rend info : Allocating 1-layer frame buffer
2019-10-05 11:11:19.524 Iray [INFO] - IRAY:RENDER :: 1.0 IRAY rend info : Received update to 00001 iterations after 6.231s.
So 35 + 314 + 2 + 15 + 651 = 1,017 megabytes of video memory consumed in rendering the scene.
Keep in mind that the last of these values ("work space") is dynamically managed during the rendering process. Meaning that the renderer may (attempt to) increase or decrease its size based on whatever the optimal amount of working memory is for processing its current set of iterations.
@RayDAnt
Doesn't seem right.
DS 4.10 showed me exactly same values for the scene except for textures. Unless the new version of texture info shows exact memory consumption AFTER compression instead of raw texture size. Hm, just had a thought: is there actually any reason to optimize textures yourself if they are being compressed by iray anyway?
Yeah, that's been the general consus since people first started noticing the reported differences (first noticed it myself in the 4.11 Betas iirc.) Imo Iray/DS's memory usage is still a bit murky (in my experience the numbers NEVER seem to add up quite the right way - no matter where you look. And I've looked pretty much everywhere there is to look - including the Nvidia-SMI tool with TCC driver mode enabled.)
Due to Iray being an unbiased (theoretically unlimited photographic quality) renderer, it needs to maintain all textures sent to it in their original level of quality. Meaning that its internal compression has to be lossless in quality. So no - unfortunately if big scenes with complex textures are your style, diy texture optimization is still very much a thing to consider.