memory

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: Apache-2.0 Imports: 27 Imported by: 1

Documentation

Index

Constants

View Source
const (
	EvictionPluginNameNumaMemoryPressure = "numa-memory-pressure-eviction-plugin"
	EvictionScopeNumaMemory              = "NumaMemory"
)
View Source
const (
	EvictionPluginNameRssOveruse = "rss-overuse-eviction-plugin"

	RssOveruseEvictionReason = "hit rss overuse policy, threshold is %.2f, current pod rss is %.2f, pod memory request is %d"
)
View Source
const (
	EvictionPluginNameSystemMemoryPressure = "system-memory-pressure-eviction-plugin"
	EvictionScopeSystemMemory              = "SystemMemory"
)

Variables

This section is empty.

Functions

func NewNumaMemoryPressureEvictionPlugin

func NewNumaMemoryPressureEvictionPlugin(_ *client.GenericClientSet, _ events.EventRecorder,
	metaServer *metaserver.MetaServer, emitter metrics.MetricEmitter, conf *config.Configuration) plugin.EvictionPlugin

NewNumaMemoryPressureEvictionPlugin returns a new MemoryPressureEvictionPlugin

Types

type EvictionHelper

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

EvictionHelper is a general tool collection for all memory eviction plugin

func NewEvictionHelper

func NewEvictionHelper(emitter metrics.MetricEmitter, metaServer *metaserver.MetaServer, conf *config.Configuration) *EvictionHelper

type NumaMemoryPressurePlugin

type NumaMemoryPressurePlugin struct {
	*process.StopControl
	// contains filtered or unexported fields
}

NumaMemoryPressurePlugin implements the EvictionPlugin interface It triggers pod eviction based on the numa node pressure

func (*NumaMemoryPressurePlugin) GetEvictPods

func (*NumaMemoryPressurePlugin) GetTopEvictionPods

func (*NumaMemoryPressurePlugin) Name

func (n *NumaMemoryPressurePlugin) Name() string

func (*NumaMemoryPressurePlugin) Start added in v0.3.0

func (n *NumaMemoryPressurePlugin) Start()

func (*NumaMemoryPressurePlugin) ThresholdMet

type RssOveruseEvictionPlugin

type RssOveruseEvictionPlugin struct {
	*process.StopControl
	// contains filtered or unexported fields
}

RssOveruseEvictionPlugin implements the EvictPlugin interface. It triggers pod eviction based on the rss usage ratio. Once a pod use more rss than the specified threshold, this plugin will evict the pod.The threshold is calculated based on pod's memory request. Its main goal is to make sure sufficient memory for page cache in some scenarios in which service use page cache to improve performance.

func (*RssOveruseEvictionPlugin) GetEvictPods

func (*RssOveruseEvictionPlugin) Name

func (r *RssOveruseEvictionPlugin) Name() string

func (*RssOveruseEvictionPlugin) Start added in v0.3.0

func (r *RssOveruseEvictionPlugin) Start()

func (*RssOveruseEvictionPlugin) ThresholdMet

type SystemPressureEvictionPlugin

type SystemPressureEvictionPlugin struct {
	*process.StopControl
	sync.Mutex
	// contains filtered or unexported fields
}

SystemPressureEvictionPlugin implements the EvictPlugin interface. It triggers pod eviction based on the system pressure of memory.

func (*SystemPressureEvictionPlugin) GetEvictPods

func (*SystemPressureEvictionPlugin) GetTopEvictionPods

func (*SystemPressureEvictionPlugin) Name

func (*SystemPressureEvictionPlugin) Start added in v0.3.0

func (s *SystemPressureEvictionPlugin) Start()

func (*SystemPressureEvictionPlugin) ThresholdMet

Jump to

Keyboard shortcuts

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