Question about VRAM usage

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

  • PerttiAPerttiA Posts: 10,024
    edited January 2022

    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

    RenderTST2.PNG
    615 x 574 - 40K
    Post edited by PerttiA on
  • DokroDokro Posts: 0

    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.

  • PadonePadone Posts: 3,688

    Also the daz/iray log is approximated and not to be trusted too much, it just gives you an idea.

  • PerttiAPerttiA Posts: 10,024
    edited January 2022

    Padone said:

    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. 

    Post edited by PerttiA on
  • PadonePadone Posts: 3,688

    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.

  • PerttiAPerttiA Posts: 10,024

    Which texture compression are you talking about?

  • ???

    It is telling how much is used in rendering

    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:

    SubD 5

    Iray [INFO] - IRAY:RENDER ::   1.17  IRAY   rend progr: CUDA device 0 (NVIDIA GeForce RTX 2060 SUPER): Processing scene...
    Iray [VERBOSE] - IRAY:RENDER ::   1.6   IRAY   rend stat : Geometry memory consumption: 894.761 MiB (device 0), 0.000 B (host)
    Iray [VERBOSE] - IRAY:RENDER ::   1.6   IRAY   rend stat : Texture memory consumption: 945.000 MiB for 44 bitmaps (device 0)
    Iray [INFO] - IRAY:RENDER ::   1.6   IRAY   rend info : Importing lights for motion time 0
    Iray [INFO] - IRAY:RENDER ::   1.6   IRAY   rend info : Initializing light hierarchy.
    Iray [INFO] - IRAY:RENDER ::   1.6   IRAY   rend info : Light hierarchy initialization took 0.002s
    Iray [VERBOSE] - IRAY:RENDER ::   1.6   IRAY   rend stat : Lights memory consumption: 196.000 B (device 0)
    Iray [VERBOSE] - IRAY:RENDER ::   1.6   IRAY   rend stat : Material measurement memory consumption: 0.000 B (GPU)
    Iray [VERBOSE] - IRAY:RENDER ::   1.6   IRAY   rend stat : Materials memory consumption: 89.145 KiB (GPU)
    Iray [INFO] - IRAY:RENDER ::   1.17  IRAY   rend info : CUDA device 0 (NVIDIA GeForce RTX 2060 SUPER): Scene processed in 3.589s
    Iray [INFO] - IRAY:RENDER ::   1.17  IRAY   rend info : CUDA device 0 (NVIDIA GeForce RTX 2060 SUPER): Allocated 16.480 MiB for frame buffer
    Iray [INFO] - IRAY:RENDER ::   1.17  IRAY   rend info : CUDA device 0 (NVIDIA GeForce RTX 2060 SUPER): Allocated 1.750 GiB of work space (2048k active samples in 0.005s)
    Iray [INFO] - IRAY:RENDER ::   1.17  IRAY   rend info : CUDA device 0 (NVIDIA GeForce RTX 2060 SUPER): Used for display, optimizing for interactive usage (performance could be sacrificed)

    SubD 6

    Iray [INFO] - IRAY:RENDER ::   1.17  IRAY   rend progr: CUDA device 0 (NVIDIA GeForce RTX 2060 SUPER): Processing scene...
    Iray [VERBOSE] - IRAY:RENDER ::   1.6   IRAY   rend stat : Geometry memory consumption: 3.471 GiB (device 0), 0.000 B (host)
    Iray [ERROR] - IRAY:RENDER ::   1.6   IRAY   rend error: Unable to allocate 6.981 GiB from 3.135 GiB of available device memory
    Iray [ERROR] - IRAY:RENDER ::   1.17  IRAY   rend error: CUDA device 0 (NVIDIA GeForce RTX 2060 SUPER): Scene setup failed
    Iray [ERROR] - IRAY:RENDER ::   1.17  IRAY   rend error: CUDA device 0 (NVIDIA GeForce RTX 2060 SUPER): Device failed while rendering
    Iray [WARNING] - IRAY:RENDER ::   1.17  IRAY   rend warn : CUDA device 0 (NVIDIA GeForce RTX 2060 SUPER) ran out of memory and is temporarily unavailable for rendering.
    Iray [WARNING] - IRAY:RENDER ::   1.17  IRAY   rend warn : All available GPUs failed.
    Iray [WARNING] - IRAY:RENDER ::   1.17  IRAY   rend warn : No devices activated. Enabling CPU fallback.
    Iray [ERROR] - IRAY:RENDER ::   1.17  IRAY   rend error: All workers failed: aborting render 

     

  • PerttiAPerttiA Posts: 10,024
    edited January 2022

    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

    Post edited by PerttiA on
Sign In or Register to comment.