Using SAS Enterprise Guide and SAS Add-In for Microsoft Office with a SAS Grid

Types of Grid Enablement

Jobs generated by SAS Enterprise Guide and SAS Add-In for Microsoft Office can take advantage of a SAS grid using one or a combination of these approaches:
  • Using server-side load balancing through a workspace server. You can convert a workspace server to use load balancing, and then specify grid as the balancing algorithm. When you send jobs from SAS Enterprise Guide or SAS Add-In for Microsoft Office to this workspace server, the server automatically sends the job to the least busy node in the grid. See Using SAS Grid Manager for Server Load Balancing for more information about specifying grid load balancing on a workspace server.
  • If you are using SAS Enterprise Guide or SAS Add-In for Microsoft Office 5.1, specifying a value of Force for the GridPolicy extended attribute on the logical grid server definition. This attribute causes output from SAS Enterprise Guide or SAS Add-In for Microsoft Office to be sent to the grid.
  • For SAS Enterprise Guide or SAS Add-In for Microsoft Office 5.1, enabling projects or tasks to run on the grid. If you specify the option Use grid if available in the Project Properties window or the Task Properties window, the code for the project or the task is automatically sent to the SAS grid for processing.
  • For SAS Enterprise Guide or SAS Add-In for Microsoft Office 4.3 or earlier, modifying the code that is submitted with the program to enable the code to run on the grid. You specify the necessary code in the program options as custom code that is inserted before and after the code that is submitted with the program. You must also modify the application servers, the SAS Enterprise Guide configuration files, and the SAS Add-In for Microsoft Office options. Download the code and instructions from http://support.sas.com/rnd/scalability/grid/download.html.
SAS Enterprise Guide and SAS Add-In for Microsoft Office 5.1 do not require that custom code be added before and after the program code that is submitted to the grid. This approach is required only with SAS Enterprise Guide and SAS Add-In for Microsoft Office 4.3 and earlier.

Assigning Libraries in a Grid

In SAS 9.2 and later versions, SAS sessions on the grid use the METAAUTORESOURCES option by default. This option causes SAS libraries that are defined in metadata and identified as “pre-assigned” to automatically be assigned when the SAS session is started. Using pre-assigned libraries with the METAAUTORESOURCES option ensures that the libraries used in the code generated by SAS Enterprise Guide and SAS Add-In for Microsoft Office are available to the SAS sessions on the grid.
However, if your programs use a large number of libraries, you might not want to make all of these libraries pre-assigned. Automatically assigning a large number of libraries could cause performance problems, and not all libraries are likely to be used for all programs. To minimize the performance overhead, define the libraries in SAS metadata but do not identify them as pre-assigned. When you need to refer to the library, you can then use a LIBNAME statement using the META LIBNAME engine.

Developing SAS Programs Interactively Using a Grid

Maintaining a Connection to the Grid

By default, when you start SAS Enterprise Guide or SAS Add-In for Microsoft Office, it connects to a single workspace server and keeps that connection active for the length of the session. If you interactively develop programs in SAS Enterprise Guide or SAS Add-In for Microsoft Office by highlighting and submitting lines of code, the codes use items such as libraries, WORK files, and SAS global statements on the workspace server. If you are using SAS Enterprise Guide or SAS Add-In for Microsoft Office in a grid environment, the items such as libraries and SAS global statements must be accessed through the grid, rather than a single workspace server. To maintain access to these items, you must maintain a connection to the grid while you are developing programs interactively.

Managing Interactive Workload

When SAS Enterprise Guide or SAS Add-In for Microsoft Office is used for interactive program development, the workload is likely to consist of short bursts of work interspersed with varying periods of inactivity while the user considers their next action. The SAS grid configuration can best support this scenario with these configuration settings:
  • Increase the number of job slots for each machine.
    Increasing the number of job slots increases the number of simultaneous SAS sessions on each grid node. Because the jobs that are run on the grid are not I/O or compute intensive like large batch jobs, more jobs can be run on each machine.
  • Implement CPU utilization thresholds for each machine.
    If all users submit CPU-intensive work at the same time, SAS Grid Manager can suspend some jobs and resume the suspended jobs when resources are available. This capability prevents resources from being overloaded.
The following example shows a sample LSB.HOSTS file that is configured with job slots set to 32 and CPU utilization thresholds set to 80%. The settings needed for a specific site depend on the number of users and the size of the grid nodes.
HOST_NAME MXJ    ut        r1m     pg    ls    tmp  DISPATCH_WINDOW  #Keywords
#default   !     ()         ()     ()    ()     ()     ()            #Example
host01     32    0.7/0/8    ()     ()    ()     ()     ()            # host01
host02     32    0.7/0/8    ()     ()    ()     ()     ()            # host02
host03     32    0.7/0/8    ()     ()    ()     ()     ()            # host03
host04     32    0.7/0/8    ()     ()    ()     ()     ()            # host04
host05     32    0.7/0/8    ()     ()    ()     ()     ()            # host05
End Host