Grid computing is form of distributed computing that uses
unused processing cycles of computers in a network for solving problems too
intensive for any one machine. PCQLinux 2006 comes with a grid-computing
solution called JCGrid (Java Grid computing). It has three components-JCGrid
server, worker and client. The server receives job requests from clients and
forwards them to the worker. The worker processes the requests. The client
splits the jobs into multiple requests.
Important Note: |
Note that the grid software is in its early stages of development and is yet to mature. This is included with PCQLinux as a technology demonstrator |
Setup
A minimum of three machines running PCQLinux 2006 is needed for setting up a
grid-one will run the JCGrid Server, the second will act as the worker and the
third as your client. To set up the JCGrid, first set up your server machine.
Boot the machine with the PCQLinux 2006 CD and select the 'Advanced
Install>Grid Computing' install type. For installing the worker and client
machines, you need to do the same thing as mentioned above. Now you need to
configure the JCGrid. Connect all grid machines to the switch or hub (preferably
switch) and assign them a fixed IP. For this discussion, we assign 192.168.3.78
to the Server, 192.168.3.79 to the worker and 192.168.3.80 to the client.
If you want to set up DHCP instead, open /etc/dhcpd.conf in
a text editor and change the following entries :
ddns-update-style
none;
default-lease-time
21600;
max-lease-time
21600;
option subnet-mask
255.255.255.0;
option broadcast-address
192.168.3.255;
option option-128 code 128 = string;
option option-129 code 129 = text;
subnet 192.168.3.0 netmask
255.255.255.0 {
range
dynamic-bootp
192.168.3.10 192.168.3.253;
# <-- DHCP IP Ranage
}
JCGrid client and it is currently using one server, two worker machine and one client machine. |
Save this file and issue the command 'service dhcpd
restart” This will start the DHCP server on the Grid Computing server. The
grid setup also includes grid enabled PoVRay (Persistence of Vision Raytracer).
This is installed by default when you select this option. It is used as the
example in this article.
Configuring JCGrid Server
Go to the server machine and open a terminal window in the GUI and issue the
following commands.
# services iptables stop
# cd /opt/jcgrid-server
# sh povray-server-go.sh&
This starts JCGrid Server as a background process. In case
of an error, check the error messages, and then check jcgrid-server.log in /opt/jcgrid-server
directory to understand what went wrong.
Configuring JCGrid Worker
Open a terminal window from the GUI, change directory to /opt/jcgrid-worker and
open povray-worker-go.sh file in a text editor. Here, set the variable
JCGRID_SERVER_NAME with the IP address of the JCGrid Server (in our case the IP
was 192.168.3.78). Now, set the variable JCGRID_WORKER_NAME with a unique name
(Note: you can't have multiple workers with the same name). Save this file and
execute the script as mentioned below.
# services iptables stop
#cd /opt/jcgrid-worker
# sh povray-worker-go.sh&
Configuring JCGrid Client
Open a terminal window in the Client machine, go to /opt/jcgrid-client
directory and open 'povray-client-go.sh' file in a text editor. Set the variable
JCGRID_SERVER_NAME with the IP address of the JCGrid Server and also set the
variable JCGRID_CLIENT_NAME with a unique name. Save this file and execute the
command '# services iptables stop'.
With this your grid computing setup is ready to process the
jobs.
Important Note: |
Before running the The files that need |
Running jobs on the grid from the Client
To run jobs, from the client machine, open a terminal window and go to /opt/jcgrid-client
directory. Here, you can test the grid setup with the demo PoVRay graphics
files. To run the test job, execute '# sh povray-guiclient.go.sh'. This will
open three GUI interfaces JCGrid Client, JCGrid Server Settings and Rendering
setting. JCGrid client will show the output of the running rendering process.
The JCGrid server setting window will be used to configure the JCGrid server
settings and rendering setting interface is used to run the rendering process.
Now on the JCGrid Server setting set the IP address of the
machine running 'povray-server'. Then come to Rendering settings window and
in “Working directory “ text box, select the povray graphics files that you
want to render on the JCGrid cluster.
Now, keeping the rest of the settings as default, click on
Start button to start the rendering process.
On the JCGrid client interface you will see the image being
rendered slowly, as you connect more worker nodes in the cluster the rendering
process will become faster.