RAM Usage

Started by WAS, November 12, 2021, 01:53:16 PM

Previous topic - Next topic


So I used to be able to gauge scenes pretty well with RAM usage and see how a project will handle objects, etc. But now, my system is reporting just totally off numbers. For example, TG is using 8.3gb, Firefox is using 1.1gb, and the rest of the systems processes only amount to 4.8 gb. That's only 14.2 GB total registered on the system that it's aware of, but the consumption of the system itself states RAM is 64% full.

All I can account for via the system is 14.2 of 32gb. That should be like 44.38% (not 64%) of system resources. And The system is reporting accurate percentage of RAM used, as if I peek out the system will crash (I don't have swap set high at all on this system).

Where is all this extra RAM usage hiding? Why can't it be reported? When I create a distribution of points and populate it in Blender, task manager's usage of the process + everything else is accurate.

I'm starting to think the memory leak in TG is way worse than before and this is unrecoverable leaked memory  (adding up over the hours and hidden to the system) similar to the small amount lost when you just open TG and close it and loose a few MB of RAM, but now on a huge scale due to populations and usage of the software.


PS I am aware sometimes task manager doesn't display all memory used so to get these totals I used PowerShell and actually spit out every single item in actual physical memory total and associated processes.

(Use Ctrl - C to cancel loop)
$totalRam = (Get-CimInstance Win32_PhysicalMemory | Measure-Object -Property capacity -Sum).Sum
while($true) {
    $date = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
    $cpuTime = (Get-Counter '\Processor(_Total)\% Processor Time').CounterSamples.CookedValue
    $availMem = (Get-Counter '\Memory\Available MBytes').CounterSamples.CookedValue
    $date + ' > CPU: ' + $cpuTime.ToString("#,0.000") + '%, Avail. Mem.: ' + $availMem.ToString("N0") + 'MB (' + (104857600 * $availMem / $totalRam).ToString("#,0.0") + '%)'
    Start-Sleep -s 2

PPS if you edit a post with code, the forum just truncates the whole code BBCode bracket.


I don't know of any way an application can hold onto memory after the process ends. If there were a leak in Terragen (and there might be), it's my understanding that all resources get returned to the system when it closes. Perhaps this is a Windows support issue?
Just because milk is white doesn't mean that clouds are made of milk.


The RAM used after termination is very small, but even just opening and closing TG doesn't return the system to the exact same RAM usage, and is MBs higher. 

Im more interested why its so hard to gauge RAM usage. It seems TG uses up a lot of RAM just to store the points for objects, and then when rendering things seem to balloon up, but what my system is reporting is not whats being used, off by gigabytes.