Configuring host attributes for job affinity

Configure job affinity by defining host attribute parameters in the lsb.params file.

Procedure

Edit the lsb.params file to define the parameters for host attributes.
  1. Define the ATTR_CREATE_USERS parameter to specify the users that can create host attributes.

    ATTR_CREATE_USERS=none | all | "user_name ..."

    Specify a space-separated list of users that have permission to create attributes, or specify the all keyword to indicate that all LSF users can create attributes. If you specify the none keyword, the host attribute affinity feature is disabled and no users have permission to create job attributes. Users that are not specified in this parameter cannot create host attributes. By default, this parameter is set to none.

  2. Define the ATTR_MAX_NUM parameter to specify a maximum number of host attributes that can exist in the cluster.

    Cluster performance might be affected if there are too many host attributes that co-exist in the cluster. Specify a maximum number of host attributes to limit the decrease in cluster performance.

    ATTR_MAX_NUM=integer

    If the number of host attributes in the cluster reaches this value, LSF rejects any requests to create new attributes. By default, this parameter is set to 100.
  3. Define the ATTR_TTL parameter to specify a time to live (TTL) for newly-created host attributes.

    ATTR_TTL=time_hours

    ATTR_TTL=time_minutesm | M

    When LSF creates a new host attribute, the time-to-live (TTL) of the attribute is set to this parameter value. When the attribute is used by a new job, the attribute's TTL is reset to the value of the ATTR_TTL parameter. Use the m or M keyword to indicate that the parameter value is in minutes, otherwise the parameter value is in hours. When the TTL reaches zero, the mbatchd daemon removes this attribute. The default TTL for host attributes is one hour.

  4. Optional: Enable the SAME_JOB_AFFINITY parameter to allow users to specify affinity preferences for jobs to run on the same host or compute unit as another job.

    SAME_JOB_AFFINITY=Y | y

    If enabled, users can use the samehost and samecu keywords with the bsub -jobaff command option when specifying affinity preferences for jobs to run on the same host or compute unit as another job. By default, this is disabled.