POV-Ray : Newsgroups : povray.advanced-users : Computer locked up Server Time
22 Dec 2024 22:20:10 EST (-0500)
  Computer locked up (Message 1 to 10 of 25)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Mike Horvath
Subject: Computer locked up
Date: 13 Aug 2015 01:04:17
Message: <55cc2551$1@news.povray.org>
My computer just locked up due to lack of memory. I got a black screen 
and had to reboot. Is this supposed to happen? Shouldn't POVray be 
switching over to virtual memory?

Windows 7 Pro x64
8GB RAM
POV-ray 3.7.0.msvc10.win32

Not sure how much swap memory got used up during the render.


Mike


Post a reply to this message

From: Le Forgeron
Subject: Re: Computer locked up
Date: 13 Aug 2015 02:22:49
Message: <55cc37b9$1@news.povray.org>
Le 13/08/2015 07:04, Mike Horvath a écrit :
> My computer just locked up due to lack of memory. I got a black screen
> and had to reboot. Is this supposed to happen? Shouldn't POVray be
> switching over to virtual memory?

The system is in charge of virtual memory. Povray is just an application 
with sometime huge need of memory.

>
> Windows 7 Pro x64
> 8GB RAM
> POV-ray 3.7.0.msvc10.win32
>
> Not sure how much swap memory got used up during the render.

Next time, open the task manager before starting the render, to see how 
it goes.

The handling of swap (virtual memory) by most OS can be such a slow down 
with random access that it turns super-speedy processor into very slow 
snail. Some operating system do not even have protected special pages of 
memory for themselves (excepted the swap routine... if you swap that 
part of memory on disk, you're dead soon), and that might include the 
data to draw the display: so, when refreshing the picture, such as when 
moving the mouse and asking a redraw to all applications when exiting 
screen-blank-economy mode (or other), it would need to access a lot of 
pages while an active process is still asking a hell lot of other 
pages... so refreshing the screen would take hours... hence your black 
screen.

Usually swap is used with huge documents (photos or movie, or even 
texts) whose only a tiny part need to be access at once, and the 
distribution of the data is such that the accessed part for the current 
task is usually a small set of continuous portions of the memory, so 
putting the remainder of the memory on the disk is invisible to the user 
(and the program is waiting 99.9% for user's interaction, so reaction 
time is not impacted).

Povray with a huge scene is not like that: it takes all the CPU it can 
for rendering, and want to access unpredictable locations all the time. 
You might help to keep the reaction time for the user in a reasonnable 
area by using less cpu-cores (via the -WT option), if at least you have 
more than one true cores.

Some operating systems can enforce a memory limit per process: once 
reached, they kill the offender without negotiation.


Post a reply to this message

From: scott
Subject: Re: Computer locked up
Date: 13 Aug 2015 02:42:22
Message: <55cc3c4e$1@news.povray.org>
>> My computer just locked up due to lack of memory. I got a black screen
>> and had to reboot. Is this supposed to happen? Shouldn't POVray be
>> switching over to virtual memory?
>
> The system is in charge of virtual memory. Povray is just an application
> with sometime huge need of memory.

So it should probably give an option of a maximum amount of memory to 
ask the OS for? I have similar issues with simulation tools on my 
windows box, but they (the apps) all give an option to limit the total 
amount of RAM used. If you set it just under the amount of physical RAM 
then at least you get an error before things go very screwy.

The problem is when you have a scene (or simulation in my case) where 
you've done something that unexpectedly asks for a huge amount of RAM 
(eg typo in a loop or something). Before you have chance to realise it, 
your machine has effectively locked up.

Does anyone actualy render anything that takes more RAM than they have 
physically? Wouldn't it take a lifetime to render?


Post a reply to this message

From: Mike Horvath
Subject: Re: Computer locked up
Date: 13 Aug 2015 03:03:53
Message: <55cc4159$1@news.povray.org>
On 8/13/2015 2:22 AM, Le_Forgeron wrote:
> Next time, open the task manager before starting the render, to see how
> it goes.

I am using Process Hacker 2. Not sure how to monitor swap usage. I can 
only find the option to monitor physical memory, which does not take 
long to deplete.

Can POV-Ray monitor this type of stuff? Would be nice to have it log the 
info automatically.


Mike


Post a reply to this message

From: Mike Horvath
Subject: Re: Computer locked up
Date: 13 Aug 2015 03:25:28
Message: <55cc4668$1@news.povray.org>
On 8/13/2015 2:42 AM, scott wrote:
> So it should probably give an option of a maximum amount of memory to
> ask the OS for? I have similar issues with simulation tools on my
> windows box, but they (the apps) all give an option to limit the total
> amount of RAM used. If you set it just under the amount of physical RAM
> then at least you get an error before things go very screwy.
>

It might be nice to be able to set an upper limit on how much memory 
POV-Ray is allowed to use and then fail gracefully when this limit is 
reached.


> The problem is when you have a scene (or simulation in my case) where
> you've done something that unexpectedly asks for a huge amount of RAM
> (eg typo in a loop or something). Before you have chance to realise it,
> your machine has effectively locked up.
>
> Does anyone actualy render anything that takes more RAM than they have
> physically? Wouldn't it take a lifetime to render?
>

The Lego town I am working on takes a lot of RAM when you turn the 
little top studs on.


Mike


Post a reply to this message

From: scott
Subject: Re: Computer locked up
Date: 13 Aug 2015 03:29:38
Message: <55cc4762$1@news.povray.org>
>> Next time, open the task manager before starting the render, to see how
>> it goes.
>
> I am using Process Hacker 2. Not sure how to monitor swap usage. I can
> only find the option to monitor physical memory, which does not take
> long to deplete.

You need to look how much RAM the POV process is using. If it's anywhere 
near the amount of physical RAM in your machine then it's going to start 
causing major slowdowns.


Post a reply to this message

From: clipka
Subject: Re: Computer locked up
Date: 13 Aug 2015 06:29:11
Message: <55cc7177$1@news.povray.org>
Am 13.08.2015 um 09:25 schrieb Mike Horvath:
> On 8/13/2015 2:42 AM, scott wrote:
>> So it should probably give an option of a maximum amount of memory to
>> ask the OS for? I have similar issues with simulation tools on my
>> windows box, but they (the apps) all give an option to limit the total
>> amount of RAM used. If you set it just under the amount of physical RAM
>> then at least you get an error before things go very screwy.
>>
>
> It might be nice to be able to set an upper limit on how much memory
> POV-Ray is allowed to use and then fail gracefully when this limit is
> reached.

If you are happy with a fixed limit of 3GB, a simple solution would be 
to use the 32-bit version of POV-Ray.


As for setting an arbitrary limit, it should be no surprise that this is 
something that's not portable across operating systems.

 From what I'm finding on the 'net, on Windows machines "Job Objects" 
seems to be a viable mechanism to achieve this. The idea would be to 
tell Windows that it should simply pretend to POV-Ray that it is out of 
memory if POV-Ray's memory requests exceed a given total size; POV-Ray's 
failure mode would be the same as with the 32-bit version exceeding the 
3GB limit. Whether this causes it to "fail gracefully" depends on 
whether every nook and cranny of POV-Ray deals gracefully with an 
out-of-memory condition; I currently can't vouch for that.

Alternatively, the front-end could continuously monitor POV-Ray's memory 
consumption (it already does that for the status bar display anyway), 
and if it exceeds the set limit it could send an abort request to the 
back-end. This would make sure POV-Ray doesn't crash, and instead just 
terminate the render; however, this mechanism may fail if memory 
consumption increases too fast.


On Unix machines, the problem isn't that much of an issue, as operating 
systems designed for multi-user operation are typically quite robust 
against all sorts of ways an application could possibly run amok.


Post a reply to this message

From: clipka
Subject: Re: Computer locked up
Date: 13 Aug 2015 06:43:53
Message: <55cc74e9@news.povray.org>
Am 13.08.2015 um 09:04 schrieb Mike Horvath:
> On 8/13/2015 2:22 AM, Le_Forgeron wrote:
>> Next time, open the task manager before starting the render, to see how
>> it goes.
>
> I am using Process Hacker 2. Not sure how to monitor swap usage. I can
> only find the option to monitor physical memory, which does not take
> long to deplete.

No need to look any further - if POV-Ray has to resort to virtual 
memory, rendering performance will degrade fast, to the point where it's 
pointless to continue the render. Worse yet, on Windows it will drag the 
entire system into a state I call "Swap Hell", where even a simple thing 
like opening the task manager may take half an hour.

> Can POV-Ray monitor this type of stuff? Would be nice to have it log the
> info automatically.

The Windows version already displays its current memory usage in the 
status bar; and the render statistics output includes the peak memory 
usage during the render (IIRC the Unix version does that as well).


Post a reply to this message

From: Mike Horvath
Subject: Re: Computer locked up
Date: 13 Aug 2015 09:57:12
Message: <55cca238$1@news.povray.org>
On 8/13/2015 6:43 AM, clipka wrote:
> The Windows version already displays its current memory usage in the
> status bar; and the render statistics output includes the peak memory
> usage during the render (IIRC the Unix version does that as well).
>

Eventually Windows will step in and terminate the program, at which time 
any statistics are lost unless POVray stores them somewhere on disk.


Mike


Post a reply to this message

From: Mike Horvath
Subject: Re: Computer locked up
Date: 13 Aug 2015 09:57:58
Message: <55cca266$1@news.povray.org>
On 8/13/2015 1:04 AM, Mike Horvath wrote:
> My computer just locked up due to lack of memory. I got a black screen
> and had to reboot. Is this supposed to happen? Shouldn't POVray be
> switching over to virtual memory?
>
> Windows 7 Pro x64
> 8GB RAM
> POV-ray 3.7.0.msvc10.win32
>
> Not sure how much swap memory got used up during the render.
>
>
> Mike


I just increased the size of the swap file to 32GB and that still wasn't 
enough. Time to give up.


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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