region

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 27 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRegionBasicMetricTags added in v0.3.0

func GetRegionBasicMetricTags(r QoSRegion) []metrics.MetricTag

GetRegionBasicMetricTags returns metric tag slice of region info and status

Types

type QoSRegion

type QoSRegion interface {
	// Name returns region's global unique identifier, combined with region type and uuid
	Name() string
	// Type returns region's type
	Type() types.QoSRegionType
	// OwnerPoolName returns region's owner pool name
	OwnerPoolName() string

	// IsEmpty returns true if no container remains in region
	IsEmpty() bool
	// Clear clears all topology and container info in region
	Clear()

	// GetBindingNumas returns numa ids assigned to this region
	GetBindingNumas() machine.CPUSet
	// GetPods return the latest pod set of this region
	GetPods() types.PodSet

	// SetBindingNumas overwrites numa ids assigned to this region
	SetBindingNumas(machine.CPUSet)
	// SetEssentials updates essential region values for policy update
	SetEssentials(essentials types.ResourceEssentials)

	SetThrottled(throttled bool)

	// AddContainer stores a container keyed by pod uid and container name to region
	AddContainer(ci *types.ContainerInfo) error

	// TryUpdateProvision runs an episode of control knob adjustment
	TryUpdateProvision()
	// TryUpdateHeadroom runs an episode of headroom estimation
	TryUpdateHeadroom()
	// UpdateStatus are triggered outside to update status for this region
	UpdateStatus()

	// GetProvision returns the latest updated control knob value
	GetProvision() (types.ControlKnob, error)
	// GetHeadroom returns the latest updated cpu headroom estimation
	GetHeadroom() (float64, error)

	IsThrottled() bool

	// GetProvisionPolicy returns provision policy for this region,
	// the first is policy with top priority, while the second is the policy that is in-use currently
	GetProvisionPolicy() (types.CPUProvisionPolicyName, types.CPUProvisionPolicyName)
	// GetHeadRoomPolicy returns headroom policy for this region,
	// the first is policy with top priority, while the second is the policy that is in-use currently
	GetHeadRoomPolicy() (types.CPUHeadroomPolicyName, types.CPUHeadroomPolicyName)

	// GetStatus returns region status
	GetStatus() types.RegionStatus
	// GetControlEssentials returns the latest control essentials
	GetControlEssentials() types.ControlEssentials
}

QoSRegion is internal abstraction, managing a group of containers with similar QoS sensitivity and updating their resource provision and headroom by preset policies

func NewQoSRegionDedicatedNumaExclusive

func NewQoSRegionDedicatedNumaExclusive(ci *types.ContainerInfo, conf *config.Configuration, numaID int,
	extraConf interface{}, metaReader metacache.MetaReader, metaServer *metaserver.MetaServer, emitter metrics.MetricEmitter) QoSRegion

NewQoSRegionDedicatedNumaExclusive returns a region instance for dedicated cores with numa binding and numa exclusive container

func NewQoSRegionIsolation

func NewQoSRegionIsolation(ci *types.ContainerInfo, customRegionName string, conf *config.Configuration, extraConf interface{},
	metaReader metacache.MetaReader, metaServer *metaserver.MetaServer, emitter metrics.MetricEmitter) QoSRegion

NewQoSRegionIsolation returns a region instance for isolated pods

func NewQoSRegionShare

func NewQoSRegionShare(ci *types.ContainerInfo, conf *config.Configuration, extraConf interface{},
	metaReader metacache.MetaReader, metaServer *metaserver.MetaServer, emitter metrics.MetricEmitter) QoSRegion

NewQoSRegionShare returns a region instance for shared pool

type QoSRegionBase

type QoSRegionBase struct {
	sync.Mutex

	types.ResourceEssentials
	types.ControlEssentials
	// contains filtered or unexported fields
}

func NewQoSRegionBase

func NewQoSRegionBase(name string, ownerPoolName string, regionType types.QoSRegionType, conf *config.Configuration, extraConf interface{},
	metaReader metacache.MetaReader, metaServer *metaserver.MetaServer, emitter metrics.MetricEmitter) *QoSRegionBase

NewQoSRegionBase returns a base qos region instance with common region methods

func (*QoSRegionBase) AddContainer

func (r *QoSRegionBase) AddContainer(ci *types.ContainerInfo) error

func (*QoSRegionBase) Clear

func (r *QoSRegionBase) Clear()

func (*QoSRegionBase) EnableReclaim added in v0.4.0

func (r *QoSRegionBase) EnableReclaim() bool

func (*QoSRegionBase) GetBindingNumas

func (r *QoSRegionBase) GetBindingNumas() machine.CPUSet

func (*QoSRegionBase) GetControlEssentials added in v0.3.1

func (r *QoSRegionBase) GetControlEssentials() types.ControlEssentials

func (*QoSRegionBase) GetHeadRoomPolicy

func (r *QoSRegionBase) GetHeadRoomPolicy() (policyTopPriority types.CPUHeadroomPolicyName, policyInUse types.CPUHeadroomPolicyName)

func (*QoSRegionBase) GetHeadroom

func (r *QoSRegionBase) GetHeadroom() (float64, error)

func (*QoSRegionBase) GetPods

func (r *QoSRegionBase) GetPods() types.PodSet

func (*QoSRegionBase) GetProvision

func (r *QoSRegionBase) GetProvision() (types.ControlKnob, error)

func (*QoSRegionBase) GetProvisionPolicy

func (r *QoSRegionBase) GetProvisionPolicy() (policyTopPriority types.CPUProvisionPolicyName, policyInUse types.CPUProvisionPolicyName)

func (*QoSRegionBase) GetStatus added in v0.3.0

func (r *QoSRegionBase) GetStatus() types.RegionStatus

func (*QoSRegionBase) IsEmpty

func (r *QoSRegionBase) IsEmpty() bool

func (*QoSRegionBase) IsIdle added in v0.4.1

func (r *QoSRegionBase) IsIdle() bool

func (*QoSRegionBase) IsThrottled added in v0.4.1

func (r *QoSRegionBase) IsThrottled() bool

func (*QoSRegionBase) Name

func (r *QoSRegionBase) Name() string

func (*QoSRegionBase) OwnerPoolName

func (r *QoSRegionBase) OwnerPoolName() string

func (*QoSRegionBase) SetBindingNumas

func (r *QoSRegionBase) SetBindingNumas(numas machine.CPUSet)

func (*QoSRegionBase) SetEssentials

func (r *QoSRegionBase) SetEssentials(essentials types.ResourceEssentials)

func (*QoSRegionBase) SetThrottled added in v0.4.1

func (r *QoSRegionBase) SetThrottled(throttled bool)

func (*QoSRegionBase) TryUpdateHeadroom

func (r *QoSRegionBase) TryUpdateHeadroom()

func (*QoSRegionBase) TryUpdateProvision added in v0.4.0

func (r *QoSRegionBase) TryUpdateProvision()

TryUpdateProvision is implemented in specific region

func (*QoSRegionBase) Type

func (r *QoSRegionBase) Type() types.QoSRegionType

func (*QoSRegionBase) UpdateStatus added in v0.4.0

func (r *QoSRegionBase) UpdateStatus()

UpdateStatus updates region status based on resource and control essentials

type QoSRegionDedicatedNumaExclusive

type QoSRegionDedicatedNumaExclusive struct {
	*QoSRegionBase
}

func (*QoSRegionDedicatedNumaExclusive) EnableReclaim added in v0.4.0

func (r *QoSRegionDedicatedNumaExclusive) EnableReclaim() bool

func (*QoSRegionDedicatedNumaExclusive) TryUpdateProvision

func (r *QoSRegionDedicatedNumaExclusive) TryUpdateProvision()

type QoSRegionIsolation

type QoSRegionIsolation struct {
	*QoSRegionBase
}

func (*QoSRegionIsolation) TryUpdateProvision

func (r *QoSRegionIsolation) TryUpdateProvision()

type QoSRegionShare

type QoSRegionShare struct {
	*QoSRegionBase
}

func (*QoSRegionShare) TryUpdateProvision

func (r *QoSRegionShare) TryUpdateProvision()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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