Defining and Specifying Resources

Overview

Defining resources enables you to specify where jobs are run on the grid. You can define resource names on grid nodes and then specify those same resource names on jobs that are sent to the grid. The resource names specified on grid machines indicate the type of job each machine runs (for example, jobs from specified applications or high-priority jobs), so you can direct specific types of work to the nodes that are best suited for processing them.
By default, when a job is sent to the grid, the name of the SAS application server is sent as a resource name along with the job. You can further specify the type of machine used to run a job by specifying the WORKLOAD= parameter on the GRDSVC_ENABLE call.
For example, assume that you have installed and configured a grid that uses the application server name of SASApp. You now want to specify that SAS Data Integration Studio jobs should run on certain machines in the grid. To make this happen, follow these steps:
  1. Create a resource name of DI for SAS Data Integration Studio jobs. (DI is only an example; you can use any user-defined string.)
  2. Assign the resource names DI and SASApp to the machines that you want to use for processing SAS Data Integration Studio jobs.
  3. Add the value DI to the Workload field for the logical grid server definition.
  4. In SAS Data Integration Studio, choose the workload named DI in the Loop Properties window. This specifies that the job is sent to the DI workload, which sends the job to one of the machines with SASApp as a resource name and DI as a resource name. If there are no grid servers with resource names that match the value on the job, the job is not processed.

Defining Resource Names Using Addresource

SAS Grid Manager provides the addresource command to define hosts and resources. To use this command to specify resource names, follow these steps:
  1. Log on to the grid control machine as the LSF administrator.
  2. Issue the command addresource -r <resource_name> -m <machine_name>. If the machine_name contains spaces, you must change the spaces to underscores.
    For example, the command addresource -r DI -m D1234 assigns the resource name DI to the machine D1234.
  3. Run the LSF commands to reconfigure the grid to recognize the new resources.

Specifying Resource Names Using GRDSVC_ENABLE

You can use the GRDSVC_ENABLE function to specify resource names for jobs that run on the grid. Use the SERVER= option to specify the SAS application server and the WORKLOAD= option to specify resource requirements for jobs. For more information, see GRDSVC_ENABLE Function.

Specifying Resource Names Using the SAS Grid Manager Client Utility

You can specify resource names when submitting SAS programs to the grid using the SAS Grid Manager Client Utility. Use the -GRIDWORKLOAD option to specify a resource name for the job. For more information, see SASGSUB Syntax: Submitting a Job.

Specifying Resource Names in SAS Data Integration Studio

In order to specify the resource name for SAS Data Integration Studio jobs, you must complete these tasks:
  • Add the resource name as an allowed value for the logical grid server to which you send jobs.
  • Specify the workload that corresponds to the resource name in the loop transformation properties.
To add the resource name to the logical grid server metadata's Workload values, see Modifying SAS Logical Grid Server Definitions.
To specify the workload value in SAS Data Integration Studio, follow these steps:
  1. On the SAS Data Integration Studio menu bar, select Toolsthen selectOptions, and then select the SAS Server tab on the Options dialog box.
  2. Select the SAS grid server in the Server field.
  3. Select the workload to use for the submitted jobs in the Grid workload specification field.

Removing the Resource Name Requirement

If you have a floating grid license and do not define resources on any grid nodes, sending the SAS application server name as a required resource causes all jobs sent to the grid to fail. A floating grid license enables you to have a large number of grid resources available for use (300 cores, for example) but use SAS Grid Manager to limit the number of SAS processes that can run concurrently on the grid to a smaller number (for example, 175). In this environment, you can change the metadata definition of the grid server to not require a resource name. To change the definition, follow these steps:
  1. In SAS Management Console, open the Server Manager plug-in and locate the logical server definition for one of the servers identified in the lsf.cluster file.
  2. Expand the logical Grid Server node and select the Grid Server node.
  3. Select Properties from the pop-up menu or the File menu.
  4. In the Properties window, select the Options tab.
  5. Select the check box Do not require SAS Application Server name as a grid resource.
  6. Save and close the definition.
  7. Repeat this process for all grid servers.
If you remove the SAS application server name as a required resource, you can direct jobs to a specific queue that you have defined to limit the hosts and jobs slots that can be used. To set up this environment, follow these steps:
  1. Follow the preceding procedure to remove the SAS application server name as a required resource.
  2. Do not specify a workload value on the server definition.
  3. In the Additional Options field for the SAS Logical Grid Server definition, specify `queue=<new_queue_name>'.
  4. Define a new queue new_queue_name in the lsb.queues file. Use the definition to limit the hosts and job slots.