Announcement

Collapse
No announcement yet.

GPU memory leak toggling images while RT is running

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • GPU memory leak toggling images while RT is running

    UPDATE: It turns out this isn't actually a bug. There is an option in preferences > v-ray renderer > "update image map while painting".
    I had this enabled to test painting fur maps with real-time feedback in RT. It creates a new copy of textures which are continuously loaded by the GPU.
    Make sure you have this option disabled after you are done painting maps, to avoid further GPU memory errors.



    Please try this while running GPU-Z and watching the memory usage

    MODO 11.1v1 453071
    V-Ray 3.52.01 27547

    1. Start a new scene and add a sphere
    2. Press M and give it a material
    3. Press f6 to open preset browser and drag the modo assets > images > uv > checker image into your shader tree material
    4. Start RT GPU
    5. Toggle the image on and off in the shader tree. Make sure you wait for RT to update.
    6. Keep repeating step 5 and watch the GPU memory

    RESULT: Every time you toggle the image, GPU memory increases until it finally runs out Click image for larger version  Name:	20170725_gpu_memory_leak_toggling_images.png Views:	1 Size:	83.7 KB ID:	961633

    Last edited by 1funk; 25-07-2017, 05:54 AM.
    Win10 Pro 64 / AMD Ryzen 9 5950X / 128GB / RTX 3090 + 1080 Ti / MODO
    I am the resurrection, and the life: he that believeth in me, though he were dead, yet shall he live - Jesus Christ

  • #2
    While interactive rendering with GPU, once an image is been loaded it never gets unloaded. It works like a cache, it is not an actual leak.

    Best,
    Blago.
    V-Ray fan.
    Looking busy around GPUs ...
    RTX ON

    Comment


    • #3
      Blago, so does that mean a new copy of the image is being loaded into the GPU every time I toggle this image on and off? Its a single image in the scene

      I actually ran into this problem just changing the scale value on a triplanar texture, so decided to investigate and came up with these simple steps
      Win10 Pro 64 / AMD Ryzen 9 5950X / 128GB / RTX 3090 + 1080 Ti / MODO
      I am the resurrection, and the life: he that believeth in me, though he were dead, yet shall he live - Jesus Christ

      Comment


      • #4
        No, if it is the same image, it should not be loaded again (it should be reusued from the cache). If that is the case, it is most likely a bug.

        Best,
        Blago.
        V-Ray fan.
        Looking busy around GPUs ...
        RTX ON

        Comment


        • #5
          I just grabbed the new nightly (build 27556) and the memory leak is fixed. My triplanar test in the other scene also works without running out of memory
          Win10 Pro 64 / AMD Ryzen 9 5950X / 128GB / RTX 3090 + 1080 Ti / MODO
          I am the resurrection, and the life: he that believeth in me, though he were dead, yet shall he live - Jesus Christ

          Comment


          • #6
            Glad to hear!

            Best,
            Blago.
            V-Ray fan.
            Looking busy around GPUs ...
            RTX ON

            Comment


            • #7
              Vladimir gave me a hint. There is an option in the modo plugins called "update image map while painting". I actually had this enabled to test painting fur maps (we just got fur in the modo plugin). This creates a new copy of textures... so that's why toggling the texture actually loaded a new version each time.

              I checked this with the new build and see the same issue there too.

              At least I know the cause now
              Win10 Pro 64 / AMD Ryzen 9 5950X / 128GB / RTX 3090 + 1080 Ti / MODO
              I am the resurrection, and the life: he that believeth in me, though he were dead, yet shall he live - Jesus Christ

              Comment


              • #8
                It would be nice if textures could be marked as temporary, so the GPU code knows it should unload them.

                With this option turned on ("update image map while painting"), if I'm painting fur maps while using RT GPU, I will run into the memory errors again too, so a smarter solution is needed
                Win10 Pro 64 / AMD Ryzen 9 5950X / 128GB / RTX 3090 + 1080 Ti / MODO
                I am the resurrection, and the life: he that believeth in me, though he were dead, yet shall he live - Jesus Christ

                Comment

                Working...
                X