VRAM usage analysis and findings

alexander.naghiualexander.naghiu Posts: 18
edited February 23 in Daz Studio Discussion

Hi all.

My question: why does a simple scene use up >10 Gb of VRAM

My system: AMD Ryzen 9 7950X, 128 gb RAM, nVidia RTX 4090 24 Gb VRAM. | Daz version 4.21 (not the BETA) 

Scene setup: 1 x Genesis 9 figure + 1 x Sofa (see attachment for detailed scene content)

I actually went into all the surfaces that have textures, opened them in their folders and noted down their size on my hard drive. The total texture size on HDD: 0.99 Gb (detailed break-up in attachment).

I did 2 test runs. First one with the figure set at SubD4 and the second one with the figure set at SubD3. Between them I've restarted my PC. I took a measurement of VRAM usage with the scene loaded before and after render for both runs (details in attachment).

Findings: 

Run 1 - SubD 4:

  • used VRAM during render: 12.16 Gb used (difference between VRAM load and baseline VRAM usage)
  • render: 151 iterations / 56 seconds / 76.19 convergence

Run 2 - SubD 3:

  • used VRAM during render: 10.80 Gb used (difference between VRAM load and baseline VRAM usage)
  • render: 154 iterations / 56 seconds / 76.28 convergence

How can this be explained? One Genesis 9 figure with complex skin and one simple couch, 10-12 Gb VRAM usage. That is insane!

Please let me know what you think and tell me if my test logic was wrong. 

Thanks! Alex

DazStudio_VRAM_Usage.jpg
2560 x 1440 - 611K
Post edited by alexander.naghiu on

Comments

  • crosswindcrosswind Posts: 8,069

    I don't think the logic of your test was wrong but I suspect if there's any other figures / settings that brought you high VRAM consumption... 

    Well, I couldn't reproduce the same VRAM consumption with 4090 and DS 4.21, by using more or less the same figures in your scene as far as I can see...: MSO Maxine HD, Linday's Long Sleek hair (though it's heavy...), GP, some clothing, and a Sofa, etc.  I set Render SubD as 4, even no Texture Compression...  

    My initial VRAM Used was 1.8GB,  then it reached 10.8GB when full rendering the scene. After the render is finished and closed, VRAM Used was 4.8GB, in which nearly appr. 3GB was reserved by Iray Render Engine (this part of consumption can only be released after fully closing DS),  i.e. the scene consumption was appr. 6GB. This comsumptions made sense to me.

    Maybe you can  dbl-check your scene...

    SNAG-2025-2-23-026.png
    2560 x 1392 - 938K
    SNAG-2025-2-23-023.png
    2560 x 1392 - 1M
    SNAG-2025-2-23-024.png
    2560 x 1392 - 947K
  • crosswind said:

    I don't think the logic of your test was wrong but I suspect if there's any other figures / settings that brought you high VRAM consumption... 

    Well, I couldn't reproduce the same VRAM consumption with 4090 and DS 4.21, by using more or less the same figures in your scene as far as I can see...: MSO Maxine HD, Linday's Long Sleek hair (though it's heavy...), GP, some clothing, and a Sofa, etc.  I set Render SubD as 4, even no Texture Compression...  

    My initial VRAM Used was 1.8GB,  then it reached 10.8GB when full rendering the scene. After the render is finished and closed, VRAM Used was 4.8GB, in which nearly appr. 3GB was reserved by Iray Render Engine (this part of consumption can only be released after fully closing DS),  i.e. the scene consumption was appr. 6GB. This comsumptions made sense to me.

    Maybe you can  dbl-check your scene...

    I think I know where the difference is. So you got 10.8 and I got 12.6, so there's a 1.8 Gb difference. I have a custom skin for Maxine. It has 8 maps per surface which is I think double than what the original Maxine has. But still, all the textures in the entire scene are only 1 Gb. Does Iray duplicate textures somehow? Or is the ray tracing component what causes the large VRAM usage? 

    I am also reading a lot on how Iray uses VRAM, about global illumination and bounding volume hierarchies. Not sure if these apply to DazStudio. MIPmapping also increases VRAM but this should be a feature used in games, not Daz. 

    So my take on this is that 10 Gb for a Genesis 9 SubD4 with a simple prop is normal. Right?

  • crosswindcrosswind Posts: 8,069
    edited February 23

    alexander.naghiu said:

    crosswind said:

    I don't think the logic of your test was wrong but I suspect if there's any other figures / settings that brought you high VRAM consumption... 

    Well, I couldn't reproduce the same VRAM consumption with 4090 and DS 4.21, by using more or less the same figures in your scene as far as I can see...: MSO Maxine HD, Linday's Long Sleek hair (though it's heavy...), GP, some clothing, and a Sofa, etc.  I set Render SubD as 4, even no Texture Compression...  

    My initial VRAM Used was 1.8GB,  then it reached 10.8GB when full rendering the scene. After the render is finished and closed, VRAM Used was 4.8GB, in which nearly appr. 3GB was reserved by Iray Render Engine (this part of consumption can only be released after fully closing DS),  i.e. the scene consumption was appr. 6GB. This comsumptions made sense to me.

    Maybe you can  dbl-check your scene...

    I think I know where the difference is. So you got 10.8 and I got 12.6, so there's a 1.8 Gb difference. I have a custom skin for Maxine. It has 8 maps per surface which is I think double than what the original Maxine has. But still, all the textures in the entire scene are only 1 Gb. Does Iray duplicate textures somehow? Or is the ray tracing component what causes the large VRAM usage? 

    I am also reading a lot on how Iray uses VRAM, about global illumination and bounding volume hierarchies. Not sure if these apply to DazStudio. MIPmapping also increases VRAM but this should be a feature used in games, not Daz. 

    So my take on this is that 10 Gb for a Genesis 9 SubD4 with a simple prop is normal. Right?

    No, that's not correct... The total VRAM Used on your side was 15.4GB (shown in your screenshot with Render SubD Level 4 ..) while the total VRAM Used on my side was 10.8 GB. In other words, the VRAM consumption on your side was nearly double mine.. with simple calculation.

    That was weird to me... even if you had custom texture maps, I didn't think they would increase VRAM consumption that much ~~

    Post edited by crosswind on
  • You're correct. I calculated the VRAM usage without the "background" VRAM allocated. So yeah, there is a substantial difference. 

    I just need a point in the right direction. What do you think, can the Sun-Sky setting cause this? Can some nVidia card settings be at fault?

    I don't need to get an exact answer, just an opinion so I know where to look smiley

    And thank you for doing your render and testing it, I know it took some time and I appreciate it yes

  • crosswindcrosswind Posts: 8,069
    edited February 23

    alexander.naghiu said:

    You're correct. I calculated the VRAM usage without the "background" VRAM allocated. So yeah, there is a substantial difference. 

    I just need a point in the right direction. What do you think, can the Sun-Sky setting cause this? Can some nVidia card settings be at fault?

    I don't need to get an exact answer, just an opinion so I know where to look smiley

    And thank you for doing your render and testing it, I know it took some time and I appreciate it yes

    Ha, I'm scratching my head now... I have no idea by now what caused that consumption on your side ~~ but I'm sure that Sun-Sky settings are definitely not.

    Maybe you can try it again with my DUF file, as attached... see what you'll get.  It's the stock MSO Maxine ~

    Just ignore / delete the items that're reported as "missing...." after opening the file. If you could get the similar VRAM consumption data like what I had, it means there's nothing wrong with your card / driver, DS... etc. and the "culprits" must be there in your scene file. You may find it out by using a process of elimination.

    For instance, check Render SubD level on each item especially that heavy hair from Linday... re-apply default material preset to Maxine... yada yada ~

    zip
    zip
    MAXINE.zip
    1M
    Post edited by crosswind on
  • crosswind said:

    Ha, I'm scratching my head now... I have no idea by now what caused that consumption on your side ~~ but I'm sure that Sun-Sky settings are definitely not.

    Maybe you can try it again with my DUF file, as attached... see what you'll get.  It's the stock MSO Maxine ~

    Just ignore / delete the items that're reported as "missing...." after opening the file. If you could get the similar VRAM consumption data like what I had, it means there's nothing wrong with your card / driver, DS... etc. and the "culprits" must be there in your scene file. You may find it out by using a process of elimination.

    For instance, check Render SubD level on each item especially that heavy hair from Linday... re-apply default material preset to Maxine... yada yada ~

    Tested and I get the same VRAM usage as you do. A tick over 10.5 Gb. So there is definitely something in the scene. At least I know that.

    I will go and check what the cause could be. I will start with the textures since I suspect they are the main reason. 

    Thanks again for checking with me!

  • MattymanxMattymanx Posts: 6,955

    Daz Studio used to report vram use when rendering with Iray.  I have a product in the store that contains this info on the promos if its of any use to you - https://www.daz3d.com/resource-saver-shaders-collection-for-iray

  • Mattymanx said:

    Daz Studio used to report vram use when rendering with Iray.  I have a product in the store that contains this info on the promos if its of any use to you - https://www.daz3d.com/resource-saver-shaders-collection-for-iray

    Iray stopped reporting it, Daz Studio can't pass on information it doesn't receive.

Sign In or Register to comment.