POV-Ray : Newsgroups : povray.programming : How does povray distribute jobs? Server Time: 26 Jun 2019 09:47:27 GMT
  How does povray distribute jobs? (Message 1 to 3 of 3)  
From: Jack Burton
Subject: How does povray distribute jobs?
Date: 24 Jan 2011 15:40:00
Message: <web.4d3d9ce399d6562fed1c03580@news.povray.org>
This question is probably best suited for the 3.7 beta, but I do know some have
gotten 3.6.1 working with OpenMPI, so here goes:

How does povray distribute jobs? If there are multiple cores (let's say 3 slaves
and a single master), how are jobs queued and distributed to cores?

For example, core 1 finishes its job and sits idle. There are jobs waiting on
cores 2 and 3 - is the master clever enough to tell core 1 to take up the slack?
Or does the master leave these jobs until the end and process the jobs itself?

Any information on this would be great.

Thanks.


Post a reply to this message

From: clipka
Subject: Re: How does povray distribute jobs?
Date: 24 Jan 2011 17:30:45
Message: <4d3db745@news.povray.org>
Am 24.01.2011 16:39, schrieb Jack Burton:

> How does povray distribute jobs? If there are multiple cores (let's say 3 slaves
> and a single master), how are jobs queued and distributed to cores?

First of all, to avoid misunderstanding, a few clarifications:

- POV-Ray 3.7 does not assign jobs to cores; it assigns jobs to threads, 
leaving it up to the OS to assign those to cores.

- POV-Ray's "back-end" (the portion of code that does the actual 
computations) is not based on a master-slave architecture; instead, 
there are identical threads, using mutexed access to some shared 
ressources. (There is, however, a separate "front-end" thread that 
collects the work results. It currently doesn't distribute the jobs though.)

> For example, core 1 finishes its job and sits idle. There are jobs waiting on
> cores 2 and 3 - is the master clever enough to tell core 1 to take up the slack?
> Or does the master leave these jobs until the end and process the jobs itself?

Workload distribution in POV-Ray is actually pretty simple:

- The image to be rendered is divided into tiles, typically 32x32 pixels 
in size; the computation of each such tile comprises one job.

- There is only one single job queue, shared by all threads. Whenever a 
thread finishes a job, it pulls the next job from the queue (using 
mutexing to prevent race conditions or some such).

- As soon as a thread would become truly idle (because there are no jobs 
left in the queue), it terminates, so there is actually no such thing in 
POV-Ray as an idle render thread (except while waiting for a mutex or 
some such of course).

- The tiles are the smallest work units there is, so it may happen that 
one thread is still busy computing a particularly "expensive" tile, 
while the other threads have already terminated due to lack of work.


Post a reply to this message

From: Jack Burton
Subject: Re: How does povray distribute jobs?
Date: 25 Jan 2011 16:35:00
Message: <web.4d3efb28456e245eed1c03580@news.povray.org>
Thanks, that's a lot of help.

I'll post back here if I have any more questions.


Post a reply to this message

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