POV-Ray : Newsgroups : povray.unix : Pausing processes between reboots Server Time
29 Apr 2024 21:06:37 EDT (-0400)
  Pausing processes between reboots (Message 1 to 10 of 13)  
Goto Latest 10 Messages Next 3 Messages >>>
From: Valerij Rozouvan
Subject: Pausing processes between reboots
Date: 7 Jun 2009 08:15:00
Message: <web.4a2bae342fde3e092d0ad04d0@news.povray.org>
Hi all,

I want to pause a process, reboot my computer, and continue running that
processes. Is it possible? For example rendering a large POV-Ray render job can
take weeks, if not months. So it would be beneficial to be able to turn off your
computer temporarily (for whatever reason). I googled, but beyond "kill -STOP
pid" and "kill -CONT pid" (see below) couldn't find anything useful.

http://tombuntu.com/index.php/2007/11/23/how-to-pause-a-linux-process/

http://www.articleworld.org/index.php/How_to_pause_and_resume_programs_on_Unix_and_Unix-like_systems/

Thanks in advance,
Valerij Rozouvan

http://www.freewebs.com/rozouvan/


Post a reply to this message

From: clipka
Subject: Re: Pausing processes between reboots
Date: 7 Jun 2009 09:30:01
Message: <web.4a2bbf6d800c7d16a18a93d0@news.povray.org>
"Valerij Rozouvan" <val### [at] gmailcom> wrote:
> I want to pause a process, reboot my computer, and continue running that
> processes. Is it possible?

Generally speaking, the answer is a definite "No".

However, speaking of POV-Ray in particular, you can abort a render, and resume
it later using the +C command line option (make sure all other options are the
same).

Make sure to try it on a quick render first though ;). Also make sure you
specify exactly the same parameters aside from the +C option.

Note that in the POV-Ray 3.7 beta, +C may not yet work properly when using
certain features; for instance, Radiosity will probably require you to
explicitly specify a sample cache file using the new "Radiosity_File_Name",
"Radiosity_To_File" and/or "Radiosity_From_File" options for now.


> For example rendering a large POV-Ray render job can
> take weeks, if not months. So it would be beneficial to be able to turn off your
> computer temporarily (for whatever reason).

How about one of those energy-saving standby modes? Maybe suspend-to-disk is
sufficiently close to what you want. (Don't know whether Linux supports it; but
given that Windows does, Linux should be perfectly capable of such stunts as
well, right? :P)


Post a reply to this message

From: Valerij Rozouvan
Subject: Re: Pausing processes between reboots
Date: 7 Jun 2009 10:25:00
Message: <web.4a2bcc50800c7d12d0ad04d0@news.povray.org>
"clipka" <nomail@nomail> wrote:
> However, speaking of POV-Ray in particular, you can abort a render, and resume
> it later using the +C command line option (make sure all other options are the
> same).

I am aware of this. However, it is sufficient only in the case when you stop a
render job once or twice. If you do it every couple of lines, the startup times
for each new resume add up. Now you can imagine that if a line takes 10~15
minutes, it would take 5~6 days of constant rendering (800x600 image). Now if
you introduce interrupt/resume, it will take MORE than 12 days (assuming that
you render half of a day). I imagine that it will take close to 2 months! Why?
Because when POV-Ray resumes a job with 2 lines already rendered, it processes
them fairly quickly (5~10 minutes), and starts rendering new lines. But if it
starts a resumed render with 200~300 lines, it will take ~11 hours!!!! before
it will get to actually rendering new material...

That's why I am looking for alternate ways of doing large renderings.

> How about one of those energy-saving standby modes? Maybe suspend-to-disk is
> sufficiently close to what you want. (Don't know whether Linux supports it; but
> given that Windows does, Linux should be perfectly capable of such stunts as
> well, right? :P)

For now, this approach is faulty. Hibernate is not that stable to do 20+
hibernates (without a proper shutdown in between). Especially when there are
programs running which are using nearly 100% memory (RAM + swap).

Thanks in advance,
Valerij Rozouvan

http://www.freewebs.com/rozouvan/


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Pausing processes between reboots
Date: 7 Jun 2009 10:54:47
Message: <4a2bd4b7@news.povray.org>
Valerij Rozouvan wrote:
> "clipka" <nomail@nomail> wrote:
>> However, speaking of POV-Ray in particular, you can abort a render, and resume
>> it later using the +C command line option (make sure all other options are the
>> same).
> 
> I am aware of this. However, it is sufficient only in the case when you stop a
> render job once or twice. If you do it every couple of lines, the startup times
> for each new resume add up. Now you can imagine that if a line takes 10~15
> minutes, it would take 5~6 days of constant rendering (800x600 image). Now if
> you introduce interrupt/resume, it will take MORE than 12 days (assuming that
> you render half of a day). I imagine that it will take close to 2 months! Why?
> Because when POV-Ray resumes a job with 2 lines already rendered, it processes
> them fairly quickly (5~10 minutes), and starts rendering new lines. But if it
> starts a resumed render with 200~300 lines, it will take ~11 hours!!!! before
> it will get to actually rendering new material...

How did you come up with those numbers? This sounds more like POV-Ray is 
actually rendering the image again. Did you check the message output? It 
takes only seconds to continue a render! What version are you using, and 
what is your setup? You are not by any chance trying to resume a render over 
a slow connection like an NFS share or something like that?

	Thorsten, POV-Team


Post a reply to this message

From: clipka
Subject: Re: Pausing processes between reboots
Date: 7 Jun 2009 11:20:00
Message: <web.4a2bd9be800c7d16a18a93d0@news.povray.org>
"Valerij Rozouvan" <val### [at] gmailcom> wrote:
> For now, this approach is faulty. Hibernate is not that stable to do 20+
> hibernates (without a proper shutdown in between). Especially when there are
> programs running which are using nearly 100% memory (RAM + swap).

If POV-Ray has to use swap space (let alone almost maxing it out), then you're
in deep trouble, and it's no surprise picking up a render takes ages. Chances
are, with some more main memory you may not even *need* to pause the render.

What type of machine are we talking about? And what type of shot?


Post a reply to this message

From: Valerij Rozouvan
Subject: Re: Pausing processes between reboots
Date: 7 Jun 2009 14:25:01
Message: <web.4a2c0577800c7d12d0ad04d0@news.povray.org>
Thorsten Froehlich <tho### [at] trfde> wrote:
> How did you come up with those numbers? This sounds more like POV-Ray is
> actually rendering the image again. Did you check the message output? It
> takes only seconds to continue a render! What version are you using, and
> what is your setup? You are not by any chance trying to resume a render over
> a slow connection like an NFS share or something like that?
>
>  Thorsten, POV-Team

OK. I haven't provided enough "specificicim". I resume the render job with the
following command:

$ povray cube_of_spheres.ini
....
^C        <--- (Ctrl+c)
$

To show its output, I modify it as the following:

$ povray cube_of_spheres.ini > cube_of_spheres.out 2>&1
^C        <--- (Ctrl+c)
$

Below is "cube_of_spheres.out":
// Start of: "cube_of_spheres.out"
povray: cannot open the user configuration file
/home/valerij/.povray/3.6/povray.conf: No such file or directory
Persistence of Vision(tm) Ray Tracer Version 3.6.1 (g++ 4.3.2 @
 i686-pc-linux-gnu)
This is an unofficial version compiled by:
 Valerij Rozouvan <val### [at] mailru>
 The POV-Ray Team(tm) is not responsible for supporting this version.
POV-Ray is based on DKBTrace 2.12 by David K. Buck & Aaron A. Collins
Copyright 1991-2003 Persistence of Vision Team
Copyright 2003-2004 Persistence of Vision Raytracer Pty. Ltd.

Primary POV-Ray 3.5/3.6 Developers: (Alphabetically)
  Chris Cason         Thorsten Froehlich  Nathan Kopp         Ron Parker

Contributing Authors: (Alphabetically)
  Steve Anger         Eric Barish         Dieter Bayer        Steve A. Bennett
  David K. Buck       Nicolas Calimet     Aaron A. Collins    Chris Dailey
  Steve Demlow        Andreas Dilger      Alexander Enzmann   Dan Farmer
  Mark Gordon         Christoph Hormann   Mike Hough          Chris Huff
  Kari Kivisalo       Lutz Kretzschmar    Jochen Lippert      Pascal Massimino
  Jim McElhiney       Douglas Muir        Juha Nieminen       Bill Pulver
  Eduard Schwan       Wlodzimierz Skiba   Robert Skinner      Yvo Smellenbergh
  Zsolt Szalavari     Scott Taylor        Massimo Valentini   Timothy Wegner
  Drew Wells          Chris Young

Other contributors are listed in the documentation.

Support libraries used by POV-Ray:
  ZLib 1.2.3.3, Copyright 1995-1998 Jean-loup Gailly and Mark Adler
  LibPNG 1.2.5, Copyright 1998-2002 Glenn Randers-Pehrson
  LibJPEG 6b, Copyright 1998 Thomas G. Lane
  LibTIFF 3.6.1, Copyright 1988-1997 Sam Leffler, 1991-1997 SGI
Redirecting Options
  All Streams to console..........On
  Debug Stream to console.........On
  Fatal Stream to console.........On
  Render Stream to console........On
  Statistics Stream to console....On
  Warning Stream to console.......On
Parsing Options
  Input file: cube_of_spheres.pov (compatible to version 3.61)
  Remove bounds........On
  Split unions.........Off
  Library paths:
    /usr/local/share/povray-3.6
    /usr/local/share/povray-3.6/ini
    /usr/local/share/povray-3.6/include
    /usr/local/share/povray-3.6/include
Output Options
  Image resolution 800 by 600 (rows 1 to 600, columns 1 to 800).
  Output file: /home/valerij/povray_rend/cube_of_spheres.png, 24 bpp PNG
  Graphic display......Off
  Mosaic preview.......Off
  CPU usage histogram..Off
  Continued trace......On
Tracing Options
  Quality:  9
  Bounding boxes.......On   Bounding threshold: 3
  Light Buffer.........On
  Vista Buffer.........On   Draw Vista Buffer....Off
  Antialiasing.........On  (Method 2, Threshold 0.003, Depth 8, Jitter 1.00)
  Clock value:    0.000  (Animation off)

  0:00:00 Parsing
  0:00:01 Parsing 1725K tokens
  0:00:02 Parsing 4184K tokens
  0:00:03 Parsing 6647K tokens
  0:00:04 Parsing 9106K tokens
  0:00:05 Parsing 11552K tokens
  0:00:06 Parsing 14015K tokens
  0:00:07 Parsing 16476K tokens
  0:00:08 Parsing 18945K tokens
  0:00:09 Parsing 21406K tokens
  0:00:10 Parsing 23869K tokens
  0:00:11 Parsing 26333K tokens
  0:00:12 Parsing 28799K tokens
  0:00:13 Parsing 31262K tokens
  0:00:14 Parsing 33730K tokens
  0:00:15 Parsing 36194K tokens
  0:00:16 Parsing 38660K tokens
  0:00:17 Parsing 41123K tokens
  0:00:18 Parsing 43592K tokens
  0:00:19 Parsing 46055K tokens
  0:00:20 Parsing 48521K tokens
  0:00:20 Creating bounding slabs
  0:00:23 Creating vista buffer
  0:00:24 Creating light buffers
  0:00:24 Creating light buffers
  0:00:24 Creating light buffers 49324K tokens
Scene Statistics
  Finite objects:       331776
  Infinite objects:          3
  Light sources:             1
  Total:                331780

  0:00:00 Resuming interrupted trace
  0:00:00 Rendering line -223 of 376, 0 supersamples
Possible Rendering Error: Got 1 SIGINT.

  0:03:47 Aborting render!
  0:03:47 User abort
Total Scene Processing Times
  Parse Time:    0 hours  0 minutes 24 seconds (24 seconds)
  Photon Time:   0 hours  0 minutes  0 seconds (0 seconds)
  Render Time:   0 hours  3 minutes 48 seconds (228 seconds)
  Total Time:    0 hours  4 minutes 12 seconds (252 seconds)

// End of: "cube_of_spheres.out"

To reproduce this test case, I have uploaded the necessary files:


http://www.freewebs.com/rozouvan/temp/cube_of_spheres.ini
(md5sum 9e2eae12655199031e655020a907274b)

http://www.freewebs.com/rozouvan/temp/cube_of_spheres.pov
(md5sum dc3c0851ec01e1c15573c20c6717f6bd)

http://www.freewebs.com/rozouvan/temp/cube_of_spheres.png
(md5sum 31a84d6ef19981bd6577263a996a8f26)


Post a reply to this message

From: Valerij Rozouvan
Subject: Re: Pausing processes between reboots
Date: 7 Jun 2009 14:30:01
Message: <web.4a2c064f800c7d12d0ad04d0@news.povray.org>
"clipka" <nomail@nomail> wrote:
> What type of machine are we talking about?

Intel Core 2 Duo (2.00 GHz)
1 GB RAM


Post a reply to this message

From: Jim Henderson
Subject: Re: Pausing processes between reboots
Date: 7 Jun 2009 14:31:01
Message: <4a2c0765$1@news.povray.org>
On Sun, 07 Jun 2009 08:10:28 -0400, Valerij Rozouvan wrote:

> I want to pause a process, reboot my computer, and continue running that
> processes. Is it possible? For example rendering a large POV-Ray render
> job can take weeks, if not months. So it would be beneficial to be able
> to turn off your computer temporarily (for whatever reason). I googled,
> but beyond "kill -STOP pid" and "kill -CONT pid" (see below) couldn't
> find anything useful.

Povray can continue (as someone already pointed out), but you can also 
break the render into smaller parts.

But with a Linux box, you shouldn't have to reboot that frequently - so 
perhaps the question you ask shouldn't be "how do I pause/resume a 
process with a reboot in between" but rather "what's wrong with my system 
or my workflow that's causing me to reboot my system so much?"

Jim


Post a reply to this message

From: Valerij Rozouvan
Subject: Re: Pausing processes between reboots
Date: 7 Jun 2009 14:45:01
Message: <web.4a2c09c0800c7d12d0ad04d0@news.povray.org>
Jim Henderson <nos### [at] nospamcom> wrote:
> But with a Linux box, you shouldn't have to reboot that frequently - so
> perhaps the question you ask shouldn't be "how do I pause/resume a
> process with a reboot in between" but rather "what's wrong with my system
> or my workflow that's causing me to reboot my system so much?"

Here in Kiev, Ukraine (at least my part of the town) we get power outages at
least once a month that last for more than my UPS can handle. So perhaps the
question I should ask: what is a good UPS scheme that would enable my PC to run
for a day?

Valerij Rozouvan


Post a reply to this message

From: clipka
Subject: Re: Pausing processes between reboots
Date: 7 Jun 2009 16:10:00
Message: <web.4a2c1e5c800c7d1d3c810450@news.povray.org>
"Valerij Rozouvan" <val### [at] gmailcom> wrote:
> To reproduce this test case, I have uploaded the necessary files:

HOLY MOLY!

Having looked at & tried this, I'm actually pretty sure that the problem is
*not* that the +C re-starting of the render takes longer each time.

I'm pretty sure that it's the complexity of the lower part of the scene that
cranks up rendering time like crazy.

In other words: From line ~200 onward, you're not getting 11 hours for a +C
re-start - you're getting ~11 HOURS PER LINE!


You should *really* tune down those anti-aliasing settings. Are you aware that
with Sampling_Method=2, Antialias_Depth=8 means that you may be rendering up to
257*257 (= 66049) rays *PER PIXEL*? And that Antialias_Threshold=0.003 means
that POV-Ray will virtually *always* go down to this depth, except for areas
showing only large-scale structures?

What on earth, in heaven or in hell do you need that for? There's no way anyone
will *ever* be able to notice any difference.

Any pixel effects you're still seeing in your printout (or whatever you do with
the output) are definitely due to the low resolution, not a lack of
anti-aliasing - so maybe you want get those settings back to decent levels
(Antialias_Depth=3 and Antialias_Threshold=0.1 should perfectly suffice for
your scene), and double or quadruple your resolution instead.

I promise, you'll be more than happy with the results - and you won't have to
wait for ages. Maybe 16 hours for a 3200*2400 pixels render. Which you'll be
perfectly able to abort and then continue later.


Post a reply to this message

Goto Latest 10 Messages Next 3 Messages >>>

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