How to see VRAM usage when the render falls back to the CPU?

Hi everyone! :D

I wanted to check how much VRAM I would need for my next GPU creating the heaviest scene I could think of using. I checked the log file, but it doesn't tell me how much VRAM it would be needed to process it!

2019-01-23 17:31:32.024 Iray INFO - module:category(IRAY:RENDER):   1.0   IRAY   rend info : Initializing local rendering.
2019-01-23 17:31:32.037 Iray INFO - module:category(IRAY:RENDER):   1.0   IRAY   rend info : CPU: using 11 cores for rendering
2019-01-23 17:31:32.128 Iray INFO - module:category(IRAY:RENDER):   1.0   IRAY   rend info : Rendering with 2 device(s):
2019-01-23 17:31:32.128 Iray INFO - module:category(IRAY:RENDER):   1.0   IRAY   rend info :     CUDA device 0 (GeForce GTX 1060 3GB)
2019-01-23 17:31:32.128 Iray INFO - module:category(IRAY:RENDER):   1.0   IRAY   rend info :     CPU
2019-01-23 17:31:32.129 Iray INFO - module:category(IRAY:RENDER):   1.0   IRAY   rend info : Rendering...
2019-01-23 17:31:32.129 Iray VERBOSE - module:category(IRAY:RENDER):   1.13  IRAY   rend progr: CPU: Processing scene...
2019-01-23 17:31:32.131 Iray VERBOSE - module:category(IRAY:RENDER):   1.3   IRAY   rend progr: CUDA device 0 (GeForce GTX 1060 3GB): Processing scene...
2019-01-23 17:31:32.266 Iray VERBOSE - module:category(IRAY:RENDER):   1.10  IRAY   rend stat : Geometry memory consumption: 545.878 MiB (device 0), 0 B (host)
2019-01-23 17:32:59.645 Iray INFO - module:category(IRAY:RENDER):   1.9   IRAY   rend info : Importing lights for motion time 0
2019-01-23 17:32:59.941 Iray INFO - module:category(IRAY:RENDER):   1.9   IRAY   rend info : Initializing light hierarchy.
2019-01-23 17:33:02.288 Iray INFO - module:category(IRAY:RENDER):   1.9   IRAY   rend info : Light hierarchy initialization took 2.33s
2019-01-23 17:33:03.420 Iray VERBOSE - module:category(IRAY:RENDER):   1.9   IRAY   rend stat : Native CPU code generated in 1.05s
2019-01-23 17:33:10.599 Iray INFO - module:category(IRAY:RENDER):   1.13  IRAY   rend info : CPU: Scene processed in 98.465s
2019-01-23 17:33:10.644 Iray INFO - module:category(IRAY:RENDER):   1.13  IRAY   rend info : CPU: Allocated 63.2852 MiB for frame buffer
2019-01-23 17:33:14.167 WARNING: ..\..\..\..\..\src\pluginsource\DzIrayRender\dzneuraymgr.cpp(304): Iray ERROR - module:category(IRAY:RENDER):   1.10  IRAY   rend error: Unable to allocate 36000000 bytes from 10703667 bytes of available device memory
2019-01-23 17:33:14.187 WARNING: ..\..\..\..\..\src\pluginsource\DzIrayRender\dzneuraymgr.cpp(304): Iray ERROR - module:category(IRAY:RENDER):   1.3   IRAY   rend error: CUDA device 0 (GeForce GTX 1060 3GB): Scene setup failed
2019-01-23 17:33:14.204 WARNING: ..\..\..\..\..\src\pluginsource\DzIrayRender\dzneuraymgr.cpp(304): Iray ERROR - module:category(IRAY:RENDER):   1.3   IRAY   rend error: CUDA device 0 (GeForce GTX 1060 3GB): Device failed while rendering

During the render my RAM usage went from 4,7Gb to 14,6Gb: does this mean that that scene would use 10Gb of VRAM?

Thanks in advance! ^^

Comments

  • LenioTGLenioTG Posts: 2,118

    I've made another try, with an actual scene, but on the heavier side and without any optimization, here's the log:

    2019-01-23 17:55:48.877 Iray INFO - module:category(IRAY:RENDER):   1.0   IRAY   rend info : Rendering with 2 device(s):
    2019-01-23 17:55:48.877 Iray INFO - module:category(IRAY:RENDER):   1.0   IRAY   rend info :     CUDA device 0 (GeForce GTX 1060 3GB)
    2019-01-23 17:55:48.877 Iray INFO - module:category(IRAY:RENDER):   1.0   IRAY   rend info :     CPU
    2019-01-23 17:55:48.877 Iray INFO - module:category(IRAY:RENDER):   1.0   IRAY   rend info : Rendering...
    2019-01-23 17:55:48.878 Iray VERBOSE - module:category(IRAY:RENDER):   1.10  IRAY   rend progr: CPU: Processing scene...
    2019-01-23 17:55:48.880 Iray VERBOSE - module:category(IRAY:RENDER):   1.4   IRAY   rend progr: CUDA device 0 (GeForce GTX 1060 3GB): Processing scene...
    2019-01-23 17:55:48.975 Iray VERBOSE - module:category(IRAY:RENDER):   1.2   IRAY   rend stat : Geometry memory consumption: 334.112 MiB (device 0), 0 B (host)
    2019-01-23 17:56:36.512 Iray INFO - module:category(IRAY:RENDER):   1.11  IRAY   rend info : Importing lights for motion time 0
    2019-01-23 17:56:36.540 Iray INFO - module:category(IRAY:RENDER):   1.11  IRAY   rend info : Initializing light hierarchy.
    2019-01-23 17:56:37.127 Iray INFO - module:category(IRAY:RENDER):   1.11  IRAY   rend info : Light hierarchy initialization took 0.59s
    2019-01-23 17:56:37.500 Iray VERBOSE - module:category(IRAY:RENDER):   1.11  IRAY   rend stat : Native CPU code generated in 0.333s
    2019-01-23 17:56:41.203 WARNING: ..\..\..\..\..\src\pluginsource\DzIrayRender\dzneuraymgr.cpp(304): Iray ERROR - module:category(IRAY:RENDER):   1.2   IRAY   rend error: Unable to allocate 4194304 bytes from 0 bytes of available device memory
    2019-01-23 17:56:41.212 WARNING: ..\..\..\..\..\src\pluginsource\DzIrayRender\dzneuraymgr.cpp(304): Iray ERROR - module:category(IRAY:RENDER):   1.4   IRAY   rend error: CUDA device 0 (GeForce GTX 1060 3GB): Scene setup failed
    2019-01-23 17:56:41.217 WARNING: ..\..\..\..\..\src\pluginsource\DzIrayRender\dzneuraymgr.cpp(304): Iray ERROR - module:category(IRAY:RENDER):   1.4   IRAY   rend error: CUDA device 0 (GeForce GTX 1060 3GB): Device failed while rendering

    I've noticed "Unable to allocate 4194304 bytes from 0 bytes of available device memory": does this mean that that scene would use 4,2Gb, and the previous one 36Gb?

    And how much VRAM would actually be usable? Right now, with Daz closed, I'm using 764Mb.

  • NorthOf45NorthOf45 Posts: 5,553

    If you have Windows 10, you can see what is going on with the GPU with Task Manager. The Performance tab can show graphs and info for the main widgets, one of which should be GPU (on mine, it is the last one). If you don't see the graph, right-click and deselect Summary View. You can show one or several graphs, and the bottom will show some numbers you will find relevant. The Details tab can be customized to show different columns, several related to GPU, so that you can see which application is using memory, and how much.

    VRAM is not only used by DAZ Studio. Every application you run will use some, the more graphics it has (like browsers) the more will be used up. Studio also holds on to some memory it has already used, so if you want to maximize availability, basically close all applications and restart Studio.

    As to RAM usage, textures use the most memory, and it all has to be loaded from disc first, then "processed" before being sent to the GPU. There should be some sort of optimization going on there, but if your scene still does not fit, you will need to start cutting corners. There are different ways to do that, which have been discussed often in the forums. There is some excellent advice out there, and a product or two to do that, including a couple of freebies that might help.

  • LenioTGLenioTG Posts: 2,118
    edited January 2019
    NorthOf45 said:

    If you have Windows 10, you can see what is going on with the GPU with Task Manager. The Performance tab can show graphs and info for the main widgets, one of which should be GPU (on mine, it is the last one). If you don't see the graph, right-click and deselect Summary View. You can show one or several graphs, and the bottom will show some numbers you will find relevant. The Details tab can be customized to show different columns, several related to GPU, so that you can see which application is using memory, and how much.

    VRAM is not only used by DAZ Studio. Every application you run will use some, the more graphics it has (like browsers) the more will be used up. Studio also holds on to some memory it has already used, so if you want to maximize availability, basically close all applications and restart Studio.

    As to RAM usage, textures use the most memory, and it all has to be loaded from disc first, then "processed" before being sent to the GPU. There should be some sort of optimization going on there, but if your scene still does not fit, you will need to start cutting corners. There are different ways to do that, which have been discussed often in the forums. There is some excellent advice out there, and a product or two to do that, including a couple of freebies that might help.

    Thank you for your answer :D

    I've done a guide myself for fitting scenes in a small VRAM (https://www.daz3d.com/forums/discussion/303666/a-noob-s-experiment-reducing-needed-vram-and-render-time#latest), I just wanted to know how much VRAM I would need to forget any worry and just render

    The task manager is not very accurate in Windows 10, I use GPU-Z, but if the scene goes over your VRAM it doesn't help! ^^

    Post edited by LenioTG on
  • prixatprixat Posts: 1,590
    There is a link to an estimator in my signature. It's based on info I found for a much earlier version of Iray and I threw in some assumptions, so it could be hopelessly out of date!
  • LenioTGLenioTG Posts: 2,118
    prixat said:
    There is a link to an estimator in my signature. It's based on info I found for a much earlier version of Iray and I threw in some assumptions, so it could be hopelessly out of date!

    Thanks! :D
    Where can I find those data?

  • prixatprixat Posts: 1,590
    edited January 2019
    kameneko said:
    Where can I find those data?

    I can't remember the exact place, I think it was spread over the Iray Beta forums:

    https://forum.nvidia-arc.com/

    (It looks like everything over there has changed since they licensed the Iray plugins to third parties.)

    Post edited by prixat on
  • LenioTGLenioTG Posts: 2,118
    edited January 2019
    prixat said:
    kameneko said:
    Where can I find those data?

    I can't remember the exact place, I think it was spread over the Iray Beta forums:

    https://forum.nvidia-arc.com/

    (It looks like everything over there has changed since they licensed the Iray plugins to third parties.)

    I mean the number of maps etc! :D

    So don't you think it was those 4Gb?

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