eviction

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

View Source
const (
	FakeMetricQoSLevel = "qos.pod"
	FakeMetricPriority = "priority.pod"
)

Fake metrics are not fetched from meta-server

View Source
const (
	// DefaultEnableNumaLevelDetection is the default value of whether enable numa-level detection
	DefaultEnableNumaLevelDetection = true
	// DefaultEnableSystemLevelDetection is the default value of whether enable system-level detection
	DefaultEnableSystemLevelDetection = true
	// DefaultNumaFreeBelowWatermarkTimesThreshold is the default threshold for the number of times
	// that NUMA's free memory falls below the watermark
	DefaultNumaFreeBelowWatermarkTimesThreshold = 4
	// DefaultSystemKswapdRateThreshold is the default threshold for the rate of kswapd reclaiming rate
	DefaultSystemKswapdRateThreshold = 2000
	// DefaultSystemKswapdRateExceedTimesThreshold is the default threshold for the number of times
	// that the kswapd reclaiming rate exceeds the threshold
	DefaultSystemKswapdRateExceedTimesThreshold = 4
	// DefaultGracePeriod is the default value of grace period
	DefaultGracePeriod int64 = -1
)

Variables

View Source
var (
	// FakeEvictionRankingMetrics is fake metrics to rank pods
	FakeEvictionRankingMetrics = []string{FakeMetricQoSLevel, FakeMetricPriority}
	// DefaultNumaEvictionRankingMetrics is the default metrics used to rank pods for eviction at the NUMA level
	DefaultNumaEvictionRankingMetrics = append(FakeEvictionRankingMetrics, consts.MetricsMemTotalPerNumaContainer)
	// DefaultSystemEvictionRankingMetrics is the default metrics used to rank pods for eviction at the system level
	DefaultSystemEvictionRankingMetrics = append(FakeEvictionRankingMetrics, consts.MetricMemUsageContainer)
)

Functions

This section is empty.

Types

type CPUPressureEvictionPluginConfiguration

type CPUPressureEvictionPluginConfiguration struct {
	EnableCPUPressureEviction                bool
	LoadUpperBoundRatio                      float64
	LoadThresholdMetPercentage               float64
	CPUPressureEvictionPodGracePeriodSeconds int64
	MetricRingSize                           int
	CPUPressureEvictionSyncPeriod            time.Duration
	CPUPressureEvictionColdPeriod            time.Duration
	MaxCPUSuppressionToleranceRate           float64
	MinCPUSuppressionToleranceDuration       time.Duration
}

CPUPressureEvictionPluginConfiguration is the config of CPUPressureEvictionPlugin

func NewCPUPressureEvictionPluginConfiguration

func NewCPUPressureEvictionPluginConfiguration() *CPUPressureEvictionPluginConfiguration

NewCPUPressureEvictionPluginConfiguration returns a new CPUPressureEvictionPluginConfiguration

func (*CPUPressureEvictionPluginConfiguration) ApplyConfiguration

ApplyConfiguration applies dynamic.DynamicConfigCRD to CPUPressureEvictionPluginConfiguration

type GenericEvictionConfiguration

type GenericEvictionConfiguration struct {
	// Inner plugins is the list of plugins implemented in katalyst to enable or disable
	// '*' means "all enabled by default"
	// 'foo' means "enable 'foo'"
	// '-foo' means "disable 'foo'"
	// first item for a particular name wins
	InnerPlugins []string

	// ConditionTransitionPeriod is duration the eviction manager has to wait before transitioning out of a condition.
	ConditionTransitionPeriod time.Duration

	// EvictionManagerSyncPeriod is the interval duration that eviction manager fetches information from registered plugins
	EvictionManagerSyncPeriod time.Duration

	// those two variables are used to filter out eviction-free pods
	EvictionSkippedAnnotationKeys sets.String
	EvictionSkippedLabelKeys      sets.String

	// EvictionBurst limit the burst eviction counts
	EvictionBurst int
}

func NewGenericEvictionConfiguration

func NewGenericEvictionConfiguration() *GenericEvictionConfiguration

func (*GenericEvictionConfiguration) ApplyConfiguration

func (c *GenericEvictionConfiguration) ApplyConfiguration(conf *dynamic.DynamicConfigCRD)

type MemoryPressureEvictionPluginConfiguration

type MemoryPressureEvictionPluginConfiguration struct {
	EnableNumaLevelDetection             bool
	EnableSystemLevelDetection           bool
	NumaFreeBelowWatermarkTimesThreshold int
	SystemKswapdRateThreshold            int
	SystemKswapdRateExceedTimesThreshold int
	NumaEvictionRankingMetrics           []string
	SystemEvictionRankingMetrics         []string
	GracePeriod                          int64
}

MemoryPressureEvictionPluginConfiguration is the config of MemoryPressureEvictionPlugin

func NewMemoryPressureEvictionPluginConfiguration

func NewMemoryPressureEvictionPluginConfiguration() *MemoryPressureEvictionPluginConfiguration

NewMemoryPressureEvictionPluginConfiguration returns a new MemoryPressureEvictionPluginConfiguration

func (*MemoryPressureEvictionPluginConfiguration) ApplyConfiguration

ApplyConfiguration applies dynamic.DynamicConfigCRD to MemoryPressureEvictionPluginConfiguration

type ReclaimedResourcesEvictionPluginConfiguration

type ReclaimedResourcesEvictionPluginConfiguration struct {
	EvictionReclaimedPodGracefulPeriod int64
	EvictionThreshold                  ResourceEvictionThreshold
	SkipZeroQuantityResourceNames      sets.String
}

func NewReclaimedResourcesEvictionPluginConfiguration

func NewReclaimedResourcesEvictionPluginConfiguration() *ReclaimedResourcesEvictionPluginConfiguration

func (*ReclaimedResourcesEvictionPluginConfiguration) ApplyConfiguration

type ResourceEvictionThreshold

type ResourceEvictionThreshold map[v1.ResourceName]float64

ResourceEvictionThreshold is map of resource name to rate of eviction water level

func (*ResourceEvictionThreshold) Set

func (t *ResourceEvictionThreshold) Set(value string) error

func (*ResourceEvictionThreshold) String

func (t *ResourceEvictionThreshold) String() string

func (*ResourceEvictionThreshold) Type

Jump to

Keyboard shortcuts

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