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 // DefaultEnableRssOveruseDetection is the default value of whether enable pod-level rss overuse detection DefaultEnableRssOveruseDetection = false // DefaultRssOveruseRateThreshold is the default threshold for the rate of rss DefaultRssOveruseRateThreshold = 1.05 )
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 EvictionConfiguration ¶
type EvictionConfiguration struct {
*EvictionPluginsConfiguration
}
func NewEvictionConfiguration ¶
func NewEvictionConfiguration() *EvictionConfiguration
func (*EvictionConfiguration) ApplyConfiguration ¶
func (c *EvictionConfiguration) ApplyConfiguration(conf *crd.DynamicConfigCRD)
type EvictionPluginsConfiguration ¶
type EvictionPluginsConfiguration struct { *MemoryPressureEvictionPluginConfiguration *ReclaimedResourcesEvictionPluginConfiguration }
func NewEvictionPluginsConfiguration ¶
func NewEvictionPluginsConfiguration() *EvictionPluginsConfiguration
func (*EvictionPluginsConfiguration) ApplyConfiguration ¶
func (c *EvictionPluginsConfiguration) ApplyConfiguration(conf *crd.DynamicConfigCRD)
type MemoryPressureEvictionPluginConfiguration ¶
type MemoryPressureEvictionPluginConfiguration struct { EnableNumaLevelDetection bool EnableSystemLevelDetection bool NumaFreeBelowWatermarkTimesThreshold int SystemKswapdRateThreshold int SystemKswapdRateExceedTimesThreshold int NumaEvictionRankingMetrics []string SystemEvictionRankingMetrics []string GracePeriod int64 EnableRssOveruseDetection bool RssOveruseRateThreshold float64 }
func NewMemoryPressureEvictionPluginConfiguration ¶
func NewMemoryPressureEvictionPluginConfiguration() *MemoryPressureEvictionPluginConfiguration
func (*MemoryPressureEvictionPluginConfiguration) ApplyConfiguration ¶
func (c *MemoryPressureEvictionPluginConfiguration) ApplyConfiguration(conf *crd.DynamicConfigCRD)
ApplyConfiguration applies dynamic.DynamicConfigCRD to MemoryPressureEvictionPluginConfiguration
type ReclaimedResourcesEvictionPluginConfiguration ¶
type ReclaimedResourcesEvictionPluginConfiguration struct {
EvictionThreshold native.ResourceThreshold
}
func NewReclaimedResourcesEvictionPluginConfiguration ¶
func NewReclaimedResourcesEvictionPluginConfiguration() *ReclaimedResourcesEvictionPluginConfiguration
func (*ReclaimedResourcesEvictionPluginConfiguration) ApplyConfiguration ¶
func (c *ReclaimedResourcesEvictionPluginConfiguration) ApplyConfiguration(conf *crd.DynamicConfigCRD)
Click to show internal directories.
Click to hide internal directories.