Configuring global resources

Define global resources in the lsb.globalpolicies file.

Procedure

  1. Edit the lsb.globalpolicies file to define your global resources.
  2. Use the Resource section to define your global resources.

    The syntax for global resources is the same as the syntax specifying local resources (that is, the Resource section of the lsf.shared file), with some restrictions.

    1. Specify a name, resource type, and description for the resource using the RESOURCENAME, TYPE, and DESCRIPTION keywords.
      RESOURCENAME
      Resource names are case sensitive and can be up to 39 characters in length, with the following restrictions:
      • Cannot begin with a number
      • Cannot contain the following special characters
        :  .  (  )  [  +  - *  /  !  &  | <  >  @  = ,
        
      • Cannot be any of the following reserved names:
        cpu cpuf io logins ls idle maxmem maxswp maxtmp type model 
        status it mem ncpus nprocs ncores nthreads
        define_ncpus_cores define_ncpus_procs define_ncpus_threads
        ndisks pg r15m r15s r1m swap swp tmp ut local
        dchost jobvm
        
      • Cannot begin with inf or nan (uppercase or lowercase). Use infxx or nanxxinstead if required.
      • For Solaris machines, the keyword int is reserved and cannot be used.

      If the global resource has the same name as a local resource in the global policy daemon (GPD) cluster, LSF ignores the global resources and logs a warning message.

      TYPE
      For global resources, the resource type must be Numeric.
      DESCRIPTION
      The information here describes the meaning of the resource.
    2. Optional. Specify optional attributes for the resource.
      INTERVAL
      For dynamic resources, set the update interval in seconds.
      INCREASING
      Set to Y to indicate that a higher value indicates a greater load, or set to N to indicate that a higher value indicates a lower load.
      CONSUMABLE
      Set to Y since all global resources are numeric resources.
      RELEASE
      Set to Y since all global resources are numeric resources.

    The following example specifies a global static resource and two global dynamic resources:

    Begin Resource
    RESOURCENAME           TYPE    INTERVAL INCREASING CONSUMABLE RELEASE DESCRIPTION  # Keywords
    global_res_static      Numeric  ()        N          Y        Y       (Global static resources)
    global_res_dynamic     Numeric  60        N          Y        Y       (Global dynamic resources)
    global_res_dynamic2    Numeric  30        N          Y        Y       (Global dynamic resources)
    End Resource 
  3. Use the ResourceMap section to define the mapping between the global resources and their sharing clusters.

    The ResourceMap section specifies the global resources that are shared to all clusters. For static resources, you must also define an initial value for the resource.

    RESOURCENAME
    Specify the name of the resource. This resource must have a corresponding entry in the Resource section.
    LOCATION
    [resource_value@][all]

    For a static resource, specify an initial value and the at symbol (@). Do not specify an initial value for a dynamic resource. Specify [all] to share the global resource with all connected clusters.

    The following example shares the global resources with all connected clusters, and specifies an initial value of 5 for the static resource.

    Begin ResourceMap 
    RESOURCENAME        LOCATION 
    global_res_static   (5@[all]) 
    global_res_dynamic  ([all])
    global_res_dynamic2 ([all])  
    End ResourceMap
  4. Use the DistributePolicy sections to define the distribution policy for the global resources and the global limits.

    All clusters must use the same policy for global resources and the same policy for global limits.

    NAME
    Specify the name of the distribution policy. This name is any ASCII string that is 40 characters or less. You can use letters, digits, underscores (_) or dashes (-). You cannot use blank spaces.
    DISTRIBUTE
    To distribute global resources, specify resource. To distribute global limits, specify limit.
    POLICY
    Specify evenly for LSF to divide global resources evenly among all the connected clusters.

    The default policy is compete, which has each connected cluster compete to use the global resource. Under the compete distribution policy, each cluster can get all the available amount of global resources during each scheduling cycle. LSF reverts the allocation if there is any conflicts for different clusters. This policy might have negative effects on the scheduling efficiency if there are several conflicts, but has better performance than the evenly policy under most circumstances.

    The following example enables LSF to use the evenly distribution policy for both global resources and global limits.

    Begin DistributePolicy
    NAME=Resource_Even_Policy
    DISTRIBUTE=resource
    POLICY=evenly
    End DistributePolicy
    Begin DistributePolicy
    NAME=Limit_Even_Policy
    DISTRIBUTE=limit
    POLICY=evenly
    End DistributePolicy
  5. Use the ReservationUsage section to specify the global resources to reserve and to define the method of resource reservation.
    RESOURCE
    Specify the name of the resource. This resource must have a corresponding entry in the Resource section.
    METHOD
    Specify the resource reservation method: PER_JOB, PER_TASK, or PER_HOST.
    RESERVE

    Reserves the resource for pending jobs that are waiting for another resource to become available.

    The following example specifies the three resources, each with a different resource reservation method.

    Begin ReservationUsage 
    RESOURCE             METHOD        RESERVE
    global_res_static    PER_HOST      N
    global_res_dynamic   PER_TASK      Y
    global_res_dynamic2  PER_JOB       N
    End ReservationUsage