POV-Ray : Newsgroups : povray.general : Peak memory usage Server Time
22 Dec 2024 12:56:56 EST (-0500)
  Peak memory usage (Message 1 to 6 of 6)  
From: Bill Pragnell
Subject: Peak memory usage
Date: 13 Sep 2020 05:05:00
Message: <web.5f5ddf6efde305f81b6c6b3a0@news.povray.org>
Hi all

I remember older versions of POV-Ray would report the peak memory usage of a
render in the statistics, which I occasionally found useful (planning stupidly
complicated scenes etc). Apparently this statistic is no longer reported by more
recent versions. Of course process memory can be monitored with OS tools, but it
was such a convenient place to see it I find myself wondering why it was
removed. Anybody know what happened to it?

Bill


Post a reply to this message

From: Kenneth
Subject: Re: Peak memory usage
Date: 13 Sep 2020 14:50:00
Message: <web.5f5e694c3fd2a1f6d98418910@news.povray.org>
"Bill Pragnell" <bil### [at] hotmailcom> wrote:
>
> ...Apparently this statistic is no longer reported by more
> recent versions.

Hi Bill.

In Windows 7, I'm currently working on a scene in the latest v3.8 alpha (which
runs from within 3.7.0 of course), and it does report peak memory usage, in the
messages pane. But in my case, sometimes it's there, sometimes it isn't. I have
no idea why.

(During a render, it also gives a running tally of used memory at the bottom of
the main editor window-- but that value reverts back to the 'idle' memory-usage
value as soon as the render is complete.)


Post a reply to this message

From: Kenneth
Subject: Re: Peak memory usage
Date: 13 Sep 2020 16:30:01
Message: <web.5f5e80c73fd2a1f6d98418910@news.povray.org>
BTW, I wish that the peak memory value had standard commas in it; when it gets
into the hundreds-of-MBs or GB range, I have to visually count the decimal
places :-O


Post a reply to this message

From: Bill Pragnell
Subject: Re: Peak memory usage
Date: 13 Sep 2020 18:30:01
Message: <web.5f5e9cd93fd2a1f61b6c6b3a0@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:
> In Windows 7

Ah I should have specified I'm on the Mac; it didn't occur to me that it might
be different depending on platform. I don't actually have Windows to hand, but I
can check over the next day or so. Interesting that the statistic doesn't always
appear for you.

Bill


Post a reply to this message

From: Thorsten
Subject: Re: Peak memory usage
Date: 14 Sep 2020 07:01:50
Message: <5f5f4d9e$1@news.povray.org>
On 13.09.2020 10:59, Bill Pragnell wrote:
> I remember older versions of POV-Ray would report the peak memory usage of a
> render in the statistics, which I occasionally found useful (planning stupidly
> complicated scenes etc). Apparently this statistic is no longer reported by more
> recent versions. Of course process memory can be monitored with OS tools, but it
> was such a convenient place to see it I find myself wondering why it was
> removed. Anybody know what happened to it?

It wasn't removed, the data is just no longer available in 3.7 and later 
because it used to be collected by a non-thread-safe addition and 
subtraction. Back when 3.7 was developed, there was no thread-safe AND 
portable way to do this.

With the atomic integer functions in the newer STLs (C++ 2014 and 
forward, I think) that has been solved, but now this would require also 
overloading the default allocators for new and delete given most 
allocation works by way of the STL rather than malloc and free.

Thorsten


Post a reply to this message

From: Bill Pragnell
Subject: Re: Peak memory usage
Date: 14 Sep 2020 18:10:00
Message: <web.5f5fe9df3fd2a1f61b6c6b3a0@news.povray.org>
Thorsten <tho### [at] trfde> wrote:
> It wasn't removed, the data is just no longer available in 3.7 and later
> because it used to be collected by a non-thread-safe addition and
> subtraction. Back when 3.7 was developed, there was no thread-safe AND
> portable way to do this.
>
> With the atomic integer functions in the newer STLs (C++ 2014 and
> forward, I think) that has been solved, but now this would require also
> overloading the default allocators for new and delete given most
> allocation works by way of the STL rather than malloc and free.


Aha, thank you, that's very informative. I hadn't realised POV-Ray kept count of
its own allocation, I think I'd assumed some system magic.

I had a brief look through the code, but I don't really know it well. So the
POV_MALLOC (et al) macros did the memory tracking, but this was turned off when
it became inaccurate for the multithreading, and now they've mostly been
replaced with new and delete?


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.