optimiser

package
v0.16.10 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FairnessOptimisingGangScheduler

type FairnessOptimisingGangScheduler struct {
	// contains filtered or unexported fields
}

func NewFairnessOptimisingScheduler

func NewFairnessOptimisingScheduler(
	nodeScheduler NodeScheduler,
	jobDb jobdb.JobRepository,
	nodeDb *nodedb.NodeDb,
	minFairnessImprovementPercentage float64,
) *FairnessOptimisingGangScheduler

func (*FairnessOptimisingGangScheduler) Schedule

Schedule It will group nodes by the nodeUniformity of the gang Attempt to schedule against each group of nodes independently and then pick the best result

type GangScheduler

type GangScheduler interface {
	Schedule(ctx *armadacontext.Context, gctx *context.GangSchedulingContext, sctx *context.SchedulingContext) (bool, []*context.JobSchedulingContext, string, error)
}

type NodeScheduler

type NodeScheduler interface {
	Schedule(schedContext *SchedulingContext, jctx *context.JobSchedulingContext, node *internaltypes.Node) (*nodeSchedulingResult, error)
}

type PreemptingNodeScheduler

type PreemptingNodeScheduler struct {
	// contains filtered or unexported fields
}

func NewPreemptingNodeScheduler

func NewPreemptingNodeScheduler(jobDb jobdb.JobRepository, maximumJobSizeToPreempt *internaltypes.ResourceList) *PreemptingNodeScheduler

func (*PreemptingNodeScheduler) Schedule

func (n *PreemptingNodeScheduler) Schedule(schedContext *SchedulingContext, jctx *context.JobSchedulingContext, node *internaltypes.Node) (*nodeSchedulingResult, error)

Schedule This function is responsible for determining if a job can be scheduled on a node, and the cost to do so High level steps: - Determine all the jobs that can be preempted - Order these jobs in the ideal order to preempt them in

  • Group these jobs by queue and order them by the order that queue would want those jobs ordered
  • This will give you N ordered lists, one of each queue
  • Combine these ordered lists into a "global" order, which is the ideal order to preempt jobs in

- Attempt to schedule the new job on the node, preempting one job at a time until the job fit

type QueueContext

type QueueContext struct {
	Name        string
	CurrentCost float64
	Fairshare   float64
	Weight      float64
}

type SchedulingContext

type SchedulingContext struct {
	Sctx   *context.SchedulingContext
	Queues map[string]*QueueContext
}

func FromSchedulingContext

func FromSchedulingContext(sctx *context.SchedulingContext) *SchedulingContext

Jump to

Keyboard shortcuts

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