instantreality 1.0

Single display cluster

Keywords:
tutorial, X3D, world, engine, distribution, cluster, load balancing
Author(s): Patrick Riess
Date: 2007-11-29

Summary: This tutorial shows how to setup a cluster for a single display configuration. It also describes how to use real load balancing with this setup.

Preconditions for this tutorial

Please read the tutorial Cluster Basics in the Clustering category to get an overview of how to configure a PC cluster using InstantCluster.

Single Display cluster

In this tutorial we want to use three PCs of our cluster to render an image on a single display. That means one PC is designated to display the final scene while the others support it by rendering parts of the scene on their local framebuffer and sending the results (pixels of the image region) back. The appropriate RenderJob section will look like this:

Code: Single display, load balanced cluster configuration

...
DEF render RenderJob { 
   windowGroups [
    WindowGroup {
      windows [
        LocalWindow {
          #This window is just for interaction
          enabled FALSE
        }
        ClusterWindow {
          servers [ "displaypc" "clusterpc1" "clusterpc2" ]
          hServers 1
          vServers 1
          size 1024 768
          balance TRUE
          showBalancing TRUE
        }
      ]
    }
   ]
}	
...
          

We see two windows here, the first one is the LocalWindow, which only exists for user interaction. We disable rendering here to gain a real speedup for the cluster window. Otherwise the PC with the local window would have to render the whole scene itself.

The important part of the configuration is the ClusterWindow. This line

servers [ "displaypc" "clusterpc1" "clusterpc2" ]

lists the hostnames of PCs, which should take part in the cluster. It is followed by the specification of the display area by setting the number of horizontal and vertical displays as well as the size of their render window:

hServers 1
vServers 1
size 1024 768
          

In this example we just use a single display with a window of 1024 x 768 pixels. The server which is responsible for displaying is "displaypc", because it is the first server in the servers list.

The next two lines set up the load balancing, where the field showBalancing is just for debugging purpose and pigments those areas of the rendered image which are generated by other servers and copied over the network.

balance TRUE
showBalancing TRUE
          
Image: Single display cluster setup with 3 computers

The image shows window content of three PCs, where the left one is dedicated to display the whole scene (single display constellation). The other ones generate rectangular parts of the scene and copy the pixel data to the first PC over a fast network. You can see the copied parts on the left image as coloured rectangles if showBalancing is set to TRUE.

It is very important for an effective load balancing to use a Gigabit network. Let's say we have a display PC and one additional server with a resolution of 1280 x 1024 pixels each. In a bad case the server has to deliver half or more of the the screen to the display PC. This is 1280 x 1024 / 2 = 655.360 pixels and for each pixel three color components (RGB), which results in almost 2 MB of data per frame. In a 100Mbit network we can send about 10 MB per second, so we would get a framerate of 5 fps!

Files:

Comments

This tutorial has no comments.


Add a new comment

Due to excessive spamming we have disabled the comment functionality for tutorials. Please use our forum to post any questions.