Parallel processing of single frames across several processors
is something rush does *not* support directly right now.
However, there are a couple of ways to do it using existing
techniques.
1) Use the rush 'ram' value on submit to secure memory
as a means to secure processors. See below.
2) Use 'rush -reserve' to reserve some of the processors
on the machines you need, so you can thread your renders
on these machines to use several processors.
3) Use frame blocks to represent the individual processors.
See below.
1) Securing Ram To Secure Processors
If you have a farm of dual proc machines that all have
a gig of ram configured in rush (eg. 'rush -lah' shows 1024
in the Ram column), and you submit a job with the 'ram' value
set to '1024', then you will effectively secure both processors
from rush, because when rush starts your render, it will subtract
the ram you requested from the configured ram value in the rush
hosts list, leaving zero available for any other job to use.
Also, you will only be able to start rendering on machines
that have 1024 available, which means both processors must be
unused by rush, otherwise rush will think less than 1024 is
available, preventing your job from running on the machine.
If you want to allow other renders to still be able to use
the other processors, then submit with your Ram value set
just a little bit lower, eg. 1023. You can then submit other
renders to these machines using a Ram value of 1, and they'll
be able to get on because of the 1MB your job leaves behind;
1024-1023=1MB available.
2) Disabling Processors in the Rush Hosts List
You can tell Rush each machine only has one processor instead
of two. Just change the number of cpus in the rush hosts file
to 1 for the dual proc machines. Then rush will only assign
one render per machine.
Such a change is only recommended if you want to affect all
jobs the same way, e.g. if all rendering you run through Rush
is multithreaded, and you would never want more than one frame
rendering on the dual proc machines you have modified.
3) Reserving Processors
This technique is pretty intuitive; simply use 'rush -reserve'
to reserve processors on the machines you want to use,
and then submit your job to use those machines.
Setup your render script to first check how many cpus
are reserved by your reserve job on the local machine
before starting the renderer. If no cpus got reserved
(they're busy doing someone else's job) then just render
on with one thread. But your reserve job has reserved
the other cpu, then tell the renderer to use two threads.
4) Frame Block Approach
Use a single job with the frame range scaled up, so the frames
are representative. For instance, to render frames 1 thru 5
using two procs per frame, submit a job where the frame range
is multipled by 10 and stepped by 5. (ie. 10 15 20 .. 50 55)
So you end up with:
_
10 |__ represents frame 1
15 _|
_
20 |__ " " 2
25 _|
_
30 |__ " " 3
35 _|
:
:
So in this case the 'even' frames (10 20 30..) start a 'render listener'
(or a 'sleep' if the render doesn't use listeners), and the odd frames
(15 25 35..) start the actual render, looking to the corresponding
even frames for the extra threading processor to use.
For example, when frame '10' starts, the render script simply sleeps,
or as is the case with some renderers, starts the 'listener' render
process.
When frame '15' starts, it looks to frame 10 for the cpu to use
as the threading processor, and starts the render for the real frame #1,
telling it to thread with frame 10's processor.
When 15 finishes rendering, it marks frame 10 as 'done' so its cpu
frees up, and the 'render listener' is killed.
If frame 15 starts, but seems frame 10 is not Busy (ie. 'Que'ed),
then it simply exits with a requeue (exit 2) and tries again.
Normally, though, frame 10 will always be running before 15 is started.
|