Using SAS Grid Manager for Server Load Balancing

Overview

SAS servers, such as SAS workspace servers and SAS OLAP servers, are capable of performing load balancing across multiple machines. These servers can be configured to use one of the default algorithms to provide load balancing. However, with SAS Grid Manager installed you can configure workspace servers and other SAS servers to use SAS Grid Manager to provide load balancing. Because SAS Grid Manager accounts for all of the resource consumption on the machine, SAS Grid Manager can make better decisions about which machine is the best candidate for a server session.
SAS Grid Manager can provide load-balancing capabilities for these types of servers:
  • workspace servers
  • pooled workspace servers
  • stored process servers
  • OLAP servers
Any SAS product or solution that uses workspace servers, pooled workspace servers, stored process servers, or OLAP servers would benefit from using SAS Grid Manager to provide load balancing. This includes (but is not limited to) SAS Enterprise Guide, SAS Studio Enterprise Edition, SAS Data Integration Studio, SAS Enterprise Miner, SAS Web Report Studio, and SAS Marketing Automation. However, using the grid to provide load balancing also increases overhead, so your jobs might take longer to run.
You can use two methods to provide workspace server load balancing through SAS Grid Manager. You can have SAS Grid Manager start the workspace servers, or you can have the object spawner start the servers.

Load Balancing Methods

Grid-Launched Servers

With grid-launched workspace servers, the spawner passes the request on to SAS Grid Manager when an application requests a SAS workspace server from the object spawner. SAS Grid Manager submits the job to the grid provider, which determines the best server to run the job based on the policy of the queue. The grid provider uses factors such as CPU utilization, network and disk input and output, disk space, available memory, and queue limits in determining which machine to use.
Because the grid-launched workspace servers are started by SAS Grid Manager, jobs on these servers appear as LSF jobs.
In the first maintenance release after SAS 9.4, pooled workspace servers and stored process servers can also be grid-launched.
An error will result if you use a grid-launched workspace server that specifies more hosts than the queue definition that you are using. For example, using a queue definition that specifies only host2 together with a logical workspace server definition that specifies host1, host2, and host3 causes an error. To accommodate this type of environment, add the line ENABLE_HOST_INTERSECTION=Y to the lsb.params file.

Servers Started by the Object Spawner

When an application or process (for example, SAS Enterprise Guide) requests a SAS server from the object spawner, the spawner determines which hosts can run the new servers. The spawner sends the list of hosts to SAS Grid Manager, which then determines which host is open and is the least busy. The object spawner then directs the client connection to a server on the least busy node on the grid. If there are multiple servers already running on the machine, then the spawner directs the client to the server with the fewest number of connections.
When using the grid load balancing algorithm, jobs are not started by LSF. As a result, jobs that run on the load-balanced servers do not appear as LSF jobs.
For more information, see Understanding Server Load Balancing in SAS Intelligence Platform: Application Server Administration Guide.

SAS OLAP Servers

Because the SAS object spawner is not used to start SAS OLAP servers, the request is not processed through the object spawner if the client requests a SAS OLAP server. However, the same load-sharing logic is used to determine which OLAP server is used for the client connection. As a result, the SAS client connections are spread around to all of the servers in the grid.

Converting Servers to Use Grid Load Balancing

To use SAS Grid Manager for load balancing for a workspace server or an OLAP server, follow these steps:
  1. In the Server Manager plug-in in SAS Management Console, select the server that will use load balancing.
  2. Select Convert Tothen selectLoad Balancing from the Actions menu or the context menu for the logical server. The Load Balancing Options dialog box appears.
    Server Load Balancing Options Dialog Box
    Load Balancing Options window
  3. Specify the following values:
    Balancing algorithm
    Select Grid.
    Launch Servers via Grid
    Select this check box to specify that SAS Grid Manager will launch the new servers. Deselect this check box if you want the object spawner to start the servers. This option is not available for OLAP servers.
    Grid server
    Select a grid server that was defined during installation and configuration. This field is active only if you did not select Launch Servers via Grid.
    Grid server credentials
    Select the credentials that the object spawner uses to authenticate to the grid server. This field is active only if you did not select Launch Servers via Grid.
  4. Click OK to save your changes to the server metadata.
To use SAS Grid Manager for load balancing for a stored process server or a pooled workspace server, follow these steps:
  1. In the Server Manager plug-in in SAS Management Console, select a logical server that will use load balancing.
  2. Select Properties from the Actions menu or the context menu. The Properties dialog box appears.
  3. Select the Load Balancing tab.
    Load Balancing Options for a Server
    Load Balancing tab
  4. Specify the following values:
    Balancing algorithm
    Select Grid.
    Launch Servers via Grid
    Select this check box to specify that SAS Grid Manager will launch the new servers. Deselect this check box if you want the object spawner to start the servers.
    Grid server
    Select a grid server that was defined during installation and configuration. This field is active only if you did not select Launch Servers via Grid.
    Grid server credentials
    Select the credentials that the object spawner uses to authenticate to the grid server. This field is active only if you did not select Launch Servers via Grid.
In addition to modifying these server definitions, you must also change server configuration files. For information about the changes that you need to make, see Understanding Server Load Balancing in SAS Intelligence Platform: Application Server Administration Guide.