Working with Grid Options Sets

Understanding Grid Options Sets

A grid options set is a collection of grid options, SAS options, and required resources. Grid options sets are then mapped to a particular SAS client application and one or more specific metadata identities. The purpose of a grid options set is to enable a SAS grid administrator to define a collection of options in SAS metadata that map to one or more SAS client applications. Those options and are automatically applied to the workload that is submitted to the grid based on the identity of the user accessing the client application. SAS client applications such as the SAS Grid Manager Client Utility have been enhanced to support grid options sets.
For example, consider a scenario where you have many SAS Data Integration Studio users. The users are classified as either “power users” or “ad hoc users.” The power users should always submit their jobs to the POWERUSER queue and use the SAS options MEMSIZE=2048M and SORTSIZE=512M. The ad hoc users should always submit their jobs to the DIS queue and use the default SAS invocation options.
To support this scenario, define the workspace servers to be launched using the grid. You could define a grid options set called DISPOWERUSER that contains the grid option QUEUE=POWERUSER and SAS options MEMSIZE=2048M and SORTSIZE=512M. You would then map this grid options set to the SAS Data Integration Studio application and to the metadata identities that you identify as power users. You could then define a second grid options set called DISADHOCUSER that contains only the grid option QUEUE=DIS. You would also map this grid options set to the SAS Data Integration Studio application, but to the SASUSERS group. When a SAS Data Integration Studio user submits a job to the grid, the grid options set mapping identifies which grid options set to use, and applies the proper options for the job. This process is completely transparent to the user.

Merging Option Values

When you use a grid options set, its values are merged with the default option values for the logical grid server. The way the values are merged and evaluated differs according to the type of option:
SAS Options
values in the grid options set are appended to the values from the SAS Options field on the logical grid server’s Properties window. Because the options are evaluated from left to right, the value from the grid options set is evaluated last and therefore overrides any similar default SAS option.
For example, you have a logical grid server with a SAS option set to “-memsize 256” and you create a grid options set with a SAS option value of “-memsize 0”. When the job is executed on the grid, the SAS command line has the options “-memsize 256 -memsize 0” at the end of the command line. The option “-memsize 0” is evaluated last, so that is the value used when processing the job.
Required resources
values in the grid options set are added to the values from the Required Resources field on the logical grid server’s Properties window. When the job runs on the grid, all specified resources must be available.
For example, you might have a logical grid server with “SASApp” specified in the Required Resources field and a grid options set with a required resource specified as “MySQLDB”. When the grid provider selects a host on which to run the job, it must select a host that has both “SASApp” and “MySQLDB” as resources associated with the host.
Grid options
values in the grid options set are appended to the values from the Grid Options field on the logical grid server’s Properties window. Because the options are evaluated from left to right, the value from the grid options set is evaluated last and therefore overrides any similar default grid option.
For example, you might have a logical grid server with a Grid Options value of “queue=normal” and you create a grid options set with a value of “queue=priority”. When the job is passed to the grid provider module, the option string that is passed include the options “queue=normal queue=priority”. Because the option “queue=priority” appears after “queue=normal”, the priority queue is used for the job.

Creating Grid Options Sets

Grid options sets are created in SAS Management Console as part of a Grid Server definition. You must be a member of the SAS Administrators group in order to create a grid options set. To create a grid options set, follow these steps:
  1. In the Server Manager of SAS Management Console, select a Grid Logical Server and then the Grid Server component.
  2. In the Properties window, select the Options tab. The Grid Application Mappings table lists any existing mappings.
    grid server properties option tab
  3. Click New to display the Grid Options Set Mapping Wizard dialog box.
    The New, Edit, and Delete buttons are available only if you are a member of the SAS Administrators group.
    grid options set mapping wizard page
  4. In this dialog box, specify these options:
    SAS Application
    Specify the SAS application that should be associated with this grid options set. The applications that are listed in this field are ones that have been identified as grid capable either during deployment or by specifying the isGridCapable keyword in the application’s properties. If you select an application that launches a workspace server and you have specified that load balanced servers should be launched by the grid, rather than by the spawner, then the options in the grid options set can be used when the workspace server starts. The application name must also be matched with the isGridCapable keyword. See Specifying That an Application Is Grid Capable for more information.
    Grid Options Set
    Specifies a named set of grid options, required resources, and SAS options. The grid options set mapping associates this group of options and resources with a SAS application and identities. Click New to define a new grid options set.
    Identities
    Select identities (users or groups) to associate with the grid options set. You must select at least one identity to associate with the mapping. If no identity is selected, the mapping is not saved.

Specifying That an Application Is Grid Capable

The only applications that you can associate with a grid options set are ones that have been identified as being grid capable. Applications are identified as grid capable either by the application’s deployment process or by specifying the isGridCapable keyword through the application’s property values.
To verify which applications have been identified as grid capable during deployment, you can define a grid options set mapping before you have set the isGridCapable keyword on any applications through the application properties. The applications that are listed as available for mapping are the ones that were identified as grid capable during deployment.
For all other applications that you want to map to a grid options set, you must manually identify each of them as grid capable. In order to apply the isGridCapable keyword to the correct application when running a job, SAS Grid Manager must be able to match the application name as identified on the application folder with the name that is sent by the application when the object spawner starts the workspace server. If they do not match, then you can use wildcards to help match the names. This situation might occur if the application sends a different name from one invocation to the next or if you have multiple versions of the same application that you want to map to the same grid options set.
These examples illustrate several scenarios:
  • If the folder for an application is specified as “SAS Application A” and the application sends the name “SAS Application A”, then the names match exactly and you can set the keyword to isGridCapable.
  • If the folder for an application is specified as “SAS Application A” and the application sends the name “SAS Application A 4.6” some times and “SAS Application A 4.7” at other times, then you should specify the keyword in the form isGridCapable:SAS Application A*.
  • If the folder for an application is specified as “SAS Application A” and the application sends the name “SAS Application A” some times and “Web Infrastructure - SAS Application A” at other times, then you should specify the keyword in the form isGridCapable:*SAS Application A.
  • If the folder for an application is specified as “SAS Application A” and the application sends the name “Web Infrascture - SAS Application A” some times and “SAS Application A 4.6” at other times, then you should specify the keyword in the form isGridCapable:*SAS Application A*.
For example, to make SAS Studio a grid-enabled application, you might specify the keyword as isGridCapable:*SAS Studio Mid-Tier*.
  • The isGridCapable portion of the keyword enables SAS Studio Mid-Tier to be included in the list of grid-enabled applications.
  • The *SAS Studio Mid-Tier* portion of the keyword enables the IOM application name as sent by SAS Studio to be matched to the SAS Studio Mid-Tier application folder so that grid options sets can be applied. The wildcards enable SAS Grid Manager to recognize the IOM name (Web Infra Platform Services 9.4 - SAS Studio Mid-Tier 3.1) and match it with the SAS Studio Mid-Tier options sets.
To set the isGridCapable keyword for an application, follow these steps:
  1. In SAS Management Console, select the Folders tab.
  2. Open the Systemthen selectApplications folder.
  3. Select the folder for the application whose property you want to change. Then, select Filethen selectProperties.
  4. In the Properties window, click Add next to the Keyword area.
  5. In the Add Keyword dialog box, type isGridCapable or isGridCapable:<application_name> with wildcards as needed in the Name field.
    setting the isGridCapable keyword
  6. Click OK to close the Add Keyword dialog box and then the Properties window.
After applications are identified as being grid capable and grid options sets are mapped to those applications, the options in the grid options set are used to start any grid-launched servers. See Grid-Launched Servers for more information.