constraints

package
v0.3.69-rc-0ee09df Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UnschedulableReasonMaximumResourcesScheduled     = "maximum resources scheduled"
	UnschedulableReasonMaximumNumberOfJobsScheduled  = "maximum number of jobs scheduled"
	UnschedulableReasonMaximumNumberOfGangsScheduled = "maximum number of gangs scheduled"
)

Variables

This section is empty.

Functions

func IsTerminalUnschedulableReason added in v0.3.66

func IsTerminalUnschedulableReason(reason string) bool

IsTerminalUnschedulableReason returns true if reason indicates it's not possible to schedule any more jobs in this round.

Types

type PriorityClassSchedulingConstraints

type PriorityClassSchedulingConstraints struct {
	PriorityClassName     string
	PriorityClassPriority int32
	// Prevents jobs of this priority class from being scheduled if doing so would exceed
	// cumulative resource usage at priority priorityClassPriority for the queue the job originates from.
	//
	// Cumulative resource usage at priority x includes resources allocated to jobs of priorityClassPriority x or lower.
	MaximumCumulativeResourceFractionPerQueue map[string]float64
}

PriorityClassSchedulingConstraints contains scheduling constraints that apply to jobs of a specific priority class.

type SchedulingConstraints

type SchedulingConstraints struct {
	// Max number of jobs to scheduler per lease jobs call.
	MaximumJobsToSchedule uint
	// Max number of jobs to scheduler per lease jobs call.
	MaximumGangsToSchedule uint
	// Max number of jobs to consider for a queue before giving up.
	MaxQueueLookback uint
	// Jobs leased to this executor must be at least this large.
	// Used, e.g., to avoid scheduling CPU-only jobs onto clusters with GPUs.
	MinimumJobSize schedulerobjects.ResourceList
	// Scheduling constraints for specific priority classes.
	PriorityClassSchedulingConstraintsByPriorityClassName map[string]PriorityClassSchedulingConstraints
	// Limits fraction of total resources scheduled per invocation.
	MaximumResourceFractionToSchedule map[string]float64
}

SchedulingConstraints contains scheduling constraints, e.g., per-queue resource limits.

func SchedulingConstraintsFromSchedulingConfig

func SchedulingConstraintsFromSchedulingConfig(
	pool string,
	minimumJobSize schedulerobjects.ResourceList,
	config configuration.SchedulingConfig,
) SchedulingConstraints

func (*SchedulingConstraints) CheckPerQueueAndPriorityClassConstraints

func (constraints *SchedulingConstraints) CheckPerQueueAndPriorityClassConstraints(
	sctx *schedulercontext.SchedulingContext,
	queue string,
	priorityClassName string,
) (bool, string, error)

func (*SchedulingConstraints) CheckRoundConstraints added in v0.3.66

func (constraints *SchedulingConstraints) CheckRoundConstraints(sctx *schedulercontext.SchedulingContext) (bool, string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL