Platform LSF Administration Guide Version 6.2

Load Sharing X Applications
Administering Platform LSF
536
Load Sharing X Applications
Starting an xterm
If you are using the X Window System, you can start an xterm that opens a shell session
on the least loaded host by entering:
%
lsrun sh -c xterm &
The & in this command line is important as it frees resources on the host once xterm
is running, by running the X terminal in the background.
In this example, no processes are left running on the local host. The
lsrun command
exits as soon as
xterm starts, and the xterm on the remote host connects directly to
the X server on the local host.
xterm on a PC
Each X application makes a separate network connection to the X display on the user's
desktop. The application generally gets the information about the display from the
DISPLAY environment variable.
X-based systems such as
eXceed start applications by making a remote shell connection
to the UNIX server, setting the DISPLAY environment variable, and then invoking the
X application. Once the application starts, it makes its own connection to the display and
the initial remote shell is no longer needed.
This approach can be extended to allow load sharing of remote applications. The client
software running on the X display host makes a remote shell connection to any server
host in the LSF cluster. Instead of running the X application directly, the client invokes
a script that uses LSF to select the best available host and starts the application on that
host. Because the application then makes a direct connection to the display, all of the
intermediate connections can be closed. The client software on the display host must
select a host in the cluster to start the connection. You can choose an arbitrary host for
this; once LSF selects the best host and starts the X application there, the initial host is
no longer involved. There is no ongoing load on the initial host.
Setting up an X terminal to start an X session on the least loaded host
If you are using a PC as a desktop machine and are running an X Window server on your
PC, then you can start an X session on the least loaded host.
The following steps assume you are using
Exceed from Hummingbird
Communications. This procedure can be used to load share any X-based application.
You can customize host selection by changing the resource requirements specified with
-R "...". For example, a user could have several icons in the xterm program group:
one called
Best, another called Best_Sun, another Best_SGI.
Setting up Exceed to log on the least loaded host
To set up Exceed to log on to the least loaded host:
1
Click the Xstart icon in the Exceed program group.
2
Choose REXEC (TCP/IP, ...) as start method, program type is X window.
3
Set the host to be any server host in your LSF cluster:
lsrun -R "type==any order[cpu:mem:login]" xterm -sb -ls -display your_PC:0.0