Author Topic: Memory Leak v4.3.23  (Read 89 times)

Offline WASasquatch

  • Member
  • *
  • Posts: 3416
Memory Leak v4.3.23
« on: July 06, 2019, 08:52:58 PM »
There seems to be a memory leak in Terragen. This morning after finishing the path traced Lava Flows scene, I noticed my system was at memory usage, with the render closed. I was confused so I closed Terragen and thought it would clear the memory, but it didn't release any of it. The system wasn't released literally several gigabytes of memory. While it itself isn't going to break anything, it can cause crashes in the OS, which can break things.

I restarted my computer and it was back to the normal 18% usage. When you load a file, and Terragen loads a project, it uses 99% disk usage while memory doesn't change (I don't know what that's about?). Idle, terragen uses 0.2gb memory. With the lava flows project is uses a little over 3gb (I forgot as it quickly popped up when the preview loaded). With the project all loaded it uses an additional 0.4gb memory for a mean of 0.6gb. (pretty slim usage really). I than close the software and let the settle back down. I'm still at 18% usage (down from 21%) but, I've lost 0.1gb of memory. So there is definitely a issue with the memory not being released back to the system. That's just opening and closing a project for 0.1gb / ~100mb loss.

Before I restarted I was sure to use the detailed process tree to calculated all the memory including the kernel, and there was definitely several gigabytes of ghost memory used.


« Last Edit: July 06, 2019, 08:55:58 PM by WASasquatch »

Offline jaf

  • Member
  • *
  • Posts: 785
Re: Memory Leak v4.3.23
« Reply #1 on: July 06, 2019, 10:17:00 PM »
I wrote something here a while back (darned if I can find it now), but I found if I rendered a scene and then made a change and rendered again, it used more memory.  If I exited TG and then made the change, it didn't use as much memory.

I have to find that thread, or maybe someone remembers where it was.
(10jul19) Ryzen 1800x, 970 EVO 1TB NVME-M.2 SSD, Corsair Vengeance 64GB DDR4 3200 Mem,  EVGA GeForce GTX 1080 Ti FTW3 Graphics 431.36 (10jul19), Win 10 Pro x64, Terragen Frontier 4.4.18 BMark 0:10:18

Offline WASasquatch

  • Member
  • *
  • Posts: 3416
Re: Memory Leak v4.3.23
« Reply #2 on: July 07, 2019, 12:15:03 AM »
I wrote something here a while back (darned if I can find it now), but I found if I rendered a scene and then made a change and rendered again, it used more memory.  If I exited TG and then made the change, it didn't use as much memory.

I have to find that thread, or maybe someone remembers where it was.

It seems to be pretty random too. I checked my memory after testing some lava folds ideas and I was up another 0.2gb of ghost memory allocated to nothing, but than I just did some more glow tests in my lava flows scene and taking a break to go to dinner, and my system was able to reclaim all the memory back down to 2.8gb. So strange. Definitely seems to be something erroneous but TG can possible recover the memory if you open and close another blank/project.

Offline Dune

  • Member
  • *
  • Posts: 15194
    • www.ulco-art.nl
Re: Memory Leak v4.3.23
« Reply #3 on: July 07, 2019, 06:15:20 AM »
It has been mentioned several times over time. That's why it's best to restart TG for a major render (or anyway after some hours of work), and better still reboot machine. But it's not good, of course.

 

anything