To make resource preemption useful, you may need to work through all of these steps.
Preemptive Scheduling
Resource Preemption
Resource Reservation
Customizing Resources
Customizing Job Controls
Custom job controls: Find out what signals or actions you can use with your application to control the preemption resource when you suspend and resume jobs.
Existing cluster configuration: Your design might be based on preemptive queues or custom resources that are already configured in your cluster.
Requirements for resource preemption: Your design must be able to work. If a host-based resource such as memory is the preemption resource, you cannot set up only one queue for each host because preemption occurs when 2 jobs are competing for the same resource.
Set PREEMPTION in at least one queue (to PREEMPTIVE in a high-priority queue, or to PREEMPTABLE in a low-priority queue).
Set JOB_CONTROLS (or TERMINATE_WHEN) in the low-priority queues. Optional. Set RES_REQ to automatically reserve the custom resource.
Define the custom resource in the Resource section.
Set PREEMPTABLE_RESOURCES and specify the custom resource.
Optional. Set PREEMPTION_WAIT_TIME to specify how many seconds to wait for dynamic resources to become available.
Optional. Set PREEMPT_JOBTYPE to enable preemption of exclusive and backfill jobs. Specify one or both of the keywords EXCLUSIVE and BACKFILL. By default, exclusive and backfill jobs are only preempted if the exclusive low priority job is running on a host that is different than the one used by the preemptive high priority job.
Define how the custom resource is shared in the ResourceMap section.
Optional. Configure the RemoteTasks section to automatically reserve the custom resource.
Use resource reservation to reserve the preemption resource (this might be configured to occur automatically). For dynamic resources, you must specify a duration as well as a quantity.
Distribute jobs that use the preemption resource in way that allows preemption to occur between queues (this should happen as a result of the cluster design).
Use bparams -l to view information about preemption configuration in your cluster.