Configuring distribution policies

Configure all LSF License Scheduler distribution policies in the lsf.licensescheduler file.

Configure a separate Feature section for each license feature. For each license feature, specify the service domain and the distribution policy. Distribution is indicated by specifying the license project name and share assignment.

Checking configuration

To see the distribution policies configured by the License Scheduler administrator, run blinfo with no options.

Ownership and sharing

When you configure the ownership and sharing of the licenses for a feature in lsf.licensescheduler, specify the following for each project:

  • The number of license tokens that are owned and can be shared with other projects

  • The number of license tokens that are owned and not shared with other projects

  • The number of shares of the license feature that are assigned to each project

Tip:

Shared licenses can be borrowed while they are not required by their owners. Non-shared licenses cannot be borrowed from their owners.

Configure shared licenses without ownership

In lsf.licensescheduler, configure the feature with two license projects.

In the following example, each project is entitled to 50% of the total number of license tokens.

Begin Feature
NAME=AppZ
DISTRIBUTION=LanServer1(Lp1 1 Lp2 1)
End Feature

Initially, one project may be using most of the tokens. Later the other project may require tokens. As tokens become available, License Scheduler distributes them according to the ratio of the shares.

Configure shared licenses with ownership

In lsf.licensescheduler, configure the feature with two license projects.

  • Lp1 owns 5 licenses.

  • Lp1 is entitled to three quarters of the total number of license tokens.

  • Lp2 is entitled to one quarter of the total number of license tokens.

Begin Feature
NAME=AppZ
DISTRIBUTION=LanServer1(Lp1 3/5 Lp2 1)
End Feature

Lp1 is guaranteed 5 tokens and can preempt them from Lp2 if necessary. As tokens become available, License Scheduler distributes them according to their shares (3:1).

Configure non-shared licenses

In lsf.licensescheduler, configure the feature with two license projects.

  • Lp1 owns five licenses:

  • Three licenses that can be shared

  • Two licenses that cannot be shared

  • Lp1 is entitled to three quarters of the total number of license tokens.

  • Lp2 is entitled to one quarter of the total number of license tokens.

Do this by adding a non-shared distribution parameter to the Feature section.

Begin Feature
NAME=AppZ
DISTRIBUTION=LanServer1(Lp1 3/5 Lp2 1)
NON_SHARED_DISTRIBUTION=LanServer1(Lp1 2)
End Feature

Lp1 can receive five tokens on demand.

  • The two non-shared licenses it owns are always available to or being used by Lp1.

  • If necessary, Lp1 can preempt the three shared licenses it owns from Lp2.

As tokens become available, License Scheduler distributes them by their shares. For example, if the total number of licenses is 60, and Lp1 is guaranteed five owned licenses (three shared and preemptable, two not shared), it is entitled to another 40 licenses according to its share (3:1).

Use blinfo -a to display NON_SHARED_DISTRIBUTION information:

Configure default projects

You can optionally configure default projects for a feature.

Default includes all projects that have not been defined in the PROJECTS section of lsf.licensescheduler. Jobs that belong to projects that are defined in lsf.licensescheduler do not get a share of the tokens when the project is not explicitly defined in the distribution.

Use blinfo to display license usage information about jobs that you submit without specifying a project. They can be viewed under the default project.

Default projects behavior

  • You submit a job requiring a feature that is managed by License Scheduler, but you do not submit it to any projects configured in lsf.licenseschduler (and you have LSF_LIC_SCHED_STRICT_PROJECT_NAME=n in lsf.conf).

For example, you configure your Feature section as follows:

Begin Feature
NAME=AppZ
DISTRIBUTION=LanServer1(Lp1 2 Lp2 1)
End Feature

If you submit a job that requires a license for AppZ without specifying a project, your job will pend, even if projects Lp1 and Lp2 are not using or waiting for licenses.

  • You configure a default project for a feature in a policy that also has other projects defined. For example:

Begin Feature
NAME=AppZ
DISTRIBUTION=LanServer1(Lp1 2 Lp2 1 default 1)
End Feature

If you submit a job that requires a license for AppZ without specifying a project, your job runs if there are free licenses, which are distributed according to the shares specified in the policy. In this example, jobs that do not specify a project receive a quarter of the license tokens.

  • You can only configure a default project for a feature that has no other projects defined in the policy. For example:

Begin Feature
NAME=AppZ
DISTRIBUTION=LanServer1(default 1)
End Feature

If you submit a job that requires a license for AppZ without specifying a project, your job runs if there are free licenses. The only advantage of using this configuration is the ability to view usage information.

Configure reserved license preemption

In lsf.licensescheduler, you can configure a feature so that its license is preemptable when reserved or already in use by other projects. Do this by adding PREEMPT_RESERVE=Y to the Feature section.

For example,

Begin Feature
NAME=AppZ
DISTRIBUTION=LanServer1(Lp1 1/5 Lp2 1)
PREEMPT_RESERVE=Y
End Feature

If no licenses are available and project Lp1 is using fewer than 5 licenses, project Lp1 preempts a reserved license from project Lp2 and checks out the license from the license server.

Tip:

When PREEMPT_RESERVE is set, the project preempts either a reserved license or a license that is in use by another project. By default, reserved licenses are not preemptable.

Preempting reserved licenses

With License Scheduler, licenses are reserved before it is actually necessary to check them out from the license server.

When you submit a job that requires a license feature at the conclusion of its run, it could take a long time before the license actually is checked out by the application requiring it. While the job runs, the license is reserved even though it is not in use. The job has reserved this license.

At the same time, you may want to submit a shorter job that requires the same license. You can preempt the reserved license if all of the following criteria are true:

  • No licenses are available for the job

  • You submit the job to a project that owns a minimum number of licenses

  • The project is using fewer licenses than the number of licenses it owns

  • You have configured License Scheduler to allow preemption of reserved licenses

Aliasing license token names (FLEX_NAME)

Normally, license token names should be the same as the FLEXnet feature names, as they represent the same license. However, LSF does not support names that start with a number, or names containing a dash or hyphen character (-), which may be used in the FLEXnet feature name.

For these feature names, you must set both NAME and FLEX_NAME in the Features section of lsf.licensescheduler. FLEX_NAME is the actual FLEXnet feature name, and NAME is an arbitrary license token name you choose.

Example

Begin Feature
FLEX_NAME=201-AppZ
NAME=AppZ201
DISTRIBUTION=LanServer1(Lp1 1 Lp2 1)
End Feature