Question about VRAM usage
Dokro
Posts: 0
Quick question that kept me wondering about VRAM usage when working in Daz. It seems that there's some extra VRAM being used in Daz, than the render history window or msi afterburner shows during the process.
Because looking at the numbers something doesn't add up. If you look at how much of memory is being allocated by the software itself and how much is being used by textures, goemetry etc. in the scene.
But there's decent amount of VRAM going hell knows where when looking at the memory usage during rendering. So I was wondering is it supposed to be this way or is there something weird going on here?
I attached a picture to explain it a bit better.
largerscene.png
1920 x 1080 - 126K
Comments
The 5.6GB's is just what is used by the rendering process.
Surpriced to see the VRAM usage at 600MB's before, as previously W10 has taken almost 1GB of VRAM just because it could, DS takes some and the scene takes some.
Maybe MS did something with W10 (or is it W11?), as you have about the same amount of VRAM available for Iray rendering as I do on W7.
Attached is a test I made some time ago to see how much RAM and VRAM was used while rendering in IRAY
Case a) just one lightweight G8 figure with lightweight clothing and hair
Case b) four similar G8 characters with architecture
Case c and d) started increasing SubD on the characters to see at which point the rendering would drop to CPU
"RAM/GB" and "VRAM/MB" taken from GPU-Z, "DS Log/GiB" taken from DS Log, no other programs were running but DS and GPU-Z
The "DS Log/GiB" is the sum of Geometry usage, Texture usage and Working Space - After Geometry and Textures, there should still be at least a Gigabyte of VRAM available for the Working space => In my case, Geometry + Textures should not exceed 4.7GiB
Note; Case c) was already using 38GB's of RAM, even though the rendering was done on the GPU, Case d) when rendering on CPU the RAM usage went almost over my 64GB's
Using RTX 2070 Super (8GB), i7-5820K and 64GB's of RAM on W7 Ultimate
Yeah looking at your examples of vram usage between what is shown in Daz and what is actually being used, it's the same thing in my case when there's over 1GB of vram going somewhere else.
That's the part that kept me wondering on where those extra vram are going during the process. Since it's kind of weird to lose a chunk of memory like that.
Interesting thing about your example is why there's so much load on your actual ram, where it jumps to 30+, while mine stays at ~8+ when pushing vram limits.
VRAM also holds Optix related data structures and the scene BVH, beyond geometry and textures.
Also the daz/iray log is approximated and not to be trusted too much, it just gives you an idea.
???
It is telling how much is used in rendering, the misconception is that all of the VRAM on the card would be available for the rendering process.
For example try with texture compression on/off and you will get the same texture memory anyway. Again, the log is not to be trusted, it is just an approximation.
Which texture compression are you talking about?
No, it is not. It only tells you what was sent to Iray of geometry and texture data. But what Iray then does with it internally (texture compression and how much data this saves, tesselation of SubD / displacement data and how much additional data this causes) and what VRAM really is required for geometry and textures because of those Iray internal processes is NOT shown in the log file. Especially the value for geometry memory is only estimate, highly depends on the SubD level of the geometry and may be much higher than the value shown in the log.
I did a test with Esra 8.1 HD, I can render him (nude) in an empty environment at SubD 5 on my RTX 2060 S (8 GiB VRAM). At SubD 6, GPU rendering already fails with loading the geometry data. Well, the log mentions about 894 MiB geometry and 945 MiB textures at SubD 5 - at SubD 6 then 3.5 GiB geometry:
Did a test on a G8.1F, starting at SubD3
SubD 3;
Geometry memory consumption: 58.820 MiB
Texture memory consumption: 509.456 MiB for 30 bitmaps
SubD 4;
Geometry memory consumption: 227.151 MiB
Texture memory consumption: 509.456 MiB for 30 bitmaps
SubD 5;
Geometry memory consumption: 899.485 MiB
Texture memory consumption: 509.456 MiB for 30 bitmaps
SubD 6 (have to disable limits for this)
Geometry memory consumption: 3.503 GiB
Unable to allocate 7.060 GiB from 3.627 GiB of available device memory
Texture Compression (SubD 3 Figure)
Default range;
Texture memory consumption: 509.456 MiB for 30 bitmaps
Range 1024 / 2048
Texture memory consumption: 512.351 MiB for 30 bitmaps
Range 2048 / 4096
Texture memory consumption: 590.406 MiB for 30 bitmaps
Range 4096 / 8192
Texture memory consumption: 1.014 GiB for 30 bitmaps
Range 8192 / 16384
Texture memory consumption: 1.014 GiB for 30 bitmaps
Uncompressed size of the textures 1.15GB's (Width (px) x Height (px) x color depth (bits) / 8 (bits) / 1024^3 = GigaBytes)
To me, it looks consistent. Whatever DS reports when going over the capacity/limits, is of little interest.
There is a small difference in how much DS reports for the texture to use when no compression is used (the last two tests) compared to calculated use, but that could be the result of GiB vs GB
Running RTX 2070 (8GB) on W7 Ultimate and 64MB's of RAM