Blender load balancing workload manager
by Marc O. Gloor

Abstract

The render.sh command is a simple shellscript which automatically divides a blender sequence into a subset of single jobs to turn it over to the mosix load balancing workload manager (also known as mosix job scheduler).
 

Rendering blender sequences on a mosix cluster

If you have access to a full featured mosix cluster for running your jobs on a fast cluster in parallel, together with blender, there is no reason to install some other render daemons to use the capabilities of your cluster environment. A blender model scene (also called a sequence) is divisible into several parts, e.g. a sequence containing 1000 images is divisible into two parts of 500 images (1-500 and 501-1000). Therefore, after a short process migration delay, these packages can be rendered by blender on different nodes about 90% faster. The speed advantage is dependent of the used hardware components and network technology.

Starting these two jobs manually from the commandline on a 2-node cluster:

root@masternode# blender -b scene.blend -s 0 -e 500 -a &
root@masternode# blender -b scene.blend -s 501 -e 1000 -a &


...or the easy way, by a shellscript which produce some different rendering commands without manually dividing the no. of pictures in relation to nodes. On a two node cluster this is a simple task but it becomes more difficult on systems using more than 2 nodes.
 

The render command itself

This render-script example below will render 1000 images from scene.blend on 2 nodes:

root@masternode# render.sh scene.blend 0 1000 2


Next example will render 800 images from scene.blend beginning from image 200 on 4 nodes:

root@masternode# render scene.blend 200 1000 4


Next example will render 5000 images from scene.blend on 16 nodes:

root@masternode# render.sh scene.blend 0 5000 16


Last example will also render 5000 images from scene.blend on 16 nodes (2jobs/node):

root@masternode# render.sh scene.blend 0 5000 32


After starting a render job without a following ampersand (&) on a cluster, it appears the following output:

Rendering 1000 images from scene.blend on 16 nodes.
Tasks forked, network rendering in progress.
Job started at: 16-01-01 23:12:06
Please wait while rendering...
Rendering successfully finished.
Job ended at: 16-01-01 23:16:15


You may start your render job in the background using an ampersand, redirecting the standard output to a file. So after a while, you can check the status from the job (finished or running) which was written to /tmp/scene.blend.status:

root@masternode# render.sh scene.blend 0 5000 32 > /tmp/scene.blend.status &


Another idea is an notification by e-mail if the job was finished successfully, like example below:

root@masternode# render.sh scene.blend 0 5000 32 | mail -s "render status" you@host &


If you would like to know how many images are finished while rendering, a simple 'ls -l | wc -l' will display the no. of images currently rendered. In my case, the render command works fine rendering blender scenes on my mosix cluster. Note that on scenes containing less than 50 images, it makes no sense using the render command except the calculation of an image takes a while.
 

Requirements


License

The distribution is licensed under the GNU General Public License.
 

Installation

Download render.sh, set permission to 755 (chmod 755 render.sh or chmod +x render.sh) and run this command using your blender scene.
 

Download

render.sh [.sh, 2kb]

$Id: mosix-blender.html,v 1.16 2020/11/21 11:13:30 gloor Exp $
Author:
marc_dot_gloor_at_u_dot_nus_dot_edu


home