Configure Preemption, Adaptive Resource Allocation, and Backfilling

Applies To: Windows HPC Server 2008

You can adjust how resources are allocated to jobs, and how jobs are handled, by configuring job scheduling policy options for preemption, backfilling, and adaptive resource allocation. This topic provides a brief description of these policies, and an example of how to configure policy options.

In this topic:

  • Scheduling policies overview

  • Example: Configuring scheduling policies

    • Using HPC Cluster Manager

    • Using HPC PowerShell

    • Using the command prompt window

Scheduling policies

The following table summarizes these three policies. For more detailed information about these and other job scheduling policies, and information about how to leverage them using job templates, see Understanding Job Scheduling Policies.

Policy Description Default setting

Preemption

Allows higher priority jobs to take resources away from lower priority, preemptable jobs that are already running.

  • Graceful preemption shrinks preempted jobs, allowing running tasks to finish so that work is not lost.

  • Immediate preemption cancels all running tasks of the preempted jobs so that resources can be allocated to the high priority job immediately.

Graceful pre-emption

Adaptive resource allocation (grow/shrink)

Dynamically adjusts the resources allocated to a job based on its tasks.

  • With automatic growth enabled, the HPC Job Scheduler service can allocate free resources to running jobs that have additional tasks to run.

  • With automatic shrink enabled, the HPC Job Scheduler service can release unused resources from running jobs that have no additional tasks to run.

Automatic growth and shrink are both enabled

Backfilling

Maximizes cluster utilization and throughput by allowing smaller jobs lower in the queue to run ahead of a job waiting at the top of the queue, as long as the job at the top is not delayed as a result.

The backfill look ahead setting determines the number of jobs that the HPC Job Scheduler service searches to find jobs that can fill gaps in the schedule.

noteNote
Backfilling is only effective when jobs submitted to the cluster have a maximum run time specified. Administrators can enforce a maximum run time on all jobs by using job templates.

Enabled, with the backfill look ahead set at 1000 jobs

Example: Configuring scheduling policies

As an example of how to configure scheduling policies, consider the following scenario:

  • You noticed that the jobs with a high priority that are submitted to your cluster are taking longer to start than you would like. You decide to reduce the wait time for jobs with a high priority by changing from graceful preemption (the default setting) to immediate preemption.

  • Your cluster users often add tasks to jobs that are already running. To ensure the necessary resources are available to them, you decide to disable job shrink.

  • You are tired of explaining to your cluster users why a small job that was recently submitted ran before other big jobs that were waiting in the queue. You do not want to disable backfilling, so you decide to compromise and set the look ahead to 100 jobs instead of the default of 1000.

The procedures below include steps for implementing these changes. You must have administrative permissions on the head node to complete these procedures.

Using HPC Cluster Manager

You can use HPC Cluster Manager to configure job scheduling options. The following example procedure includes steps for setting immediate preemption, disabling job shrink, and setting the backfill look ahead to 100 jobs.

To configure job scheduling options using HPC Cluster Manager

  1. On the head node, open HPC Cluster Manager:

    Click Start, point to All Programs, click Microsoft HPC Pack, and then click HPC Cluster Manager.

  2. In the Options menu, click Job Scheduler Configuration. The Job Scheduler Configuration dialog box appears.

  3. Select the Policy Configuration tab.

  4. Under Job pre-emption options, select the Immediate pre-emption radio button.

  5. Under Adjust resources automatically, deselect the Decrease resources automatically check box.

  6. Under Backfilling, verify that the Allow backfilling from the queue up to X jobs radio button is selected, and set the number at 100 jobs.

  7. Click OK to apply your settings and close the dialog box.

Using HPC PowerShell

You can use the Set-HpcClusterProperty cmdlet to configure job scheduling options. The following example procedure includes steps for setting immediate preemption, disabling job shrink, and setting the backfill look ahead to 100 jobs.

To configure job scheduling options using the Set-HpcClusterProperty cmdlet

  1. On the head node, open HPC PowerShell and run it as an administrator:

    Click Start, point to All Programs, click Microsoft HPC Pack, right-click HPC PowerShell, then click Run as administrator.

  2. Type the following cmdlet:

    Set-HpcClusterProperty –PreemptionType Immediate –AutomaticShrinkEnabled 0 –BackfillLookAhead 100

  3. To verify your changes, type:

    Get-HpcClusterProperty

Using the command prompt window

You can use the cluscfg setparams command-line tool to configure job scheduling options. The following example procedure includes steps for setting immediate preemption, disabling job shrink, and setting the backfill look ahead to 100 jobs.

To configure job scheduling options using the cluscfg setparams command-line tool

  1. On the head node, open a command prompt window and run it as an administrator:

    Click Start, point to All Programs, click Accessories, right-click Command Prompt, then click Run as administrator.

  2. Type the following command:

    cluscfg setparams preemptiontype=immediate automaticshrinkenabled=false backfilllookahead=100

  3. To verify your changes, type:

    cluscfg listparams

Additional references