memoryadvisor

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRegisteredControlKnobHandlers

func GetRegisteredControlKnobHandlers() map[MemoryControlKnobName]MemoryControlKnobHandler

func RegisterControlKnobHandler

func RegisterControlKnobHandler(name MemoryControlKnobName, handler MemoryControlKnobHandler)

Types

type MemoryControlKnobHandler

type MemoryControlKnobHandler func(
	coreConf *config.Configuration,
	extraConf interface{},
	dynamicConf *dynamicconfig.DynamicAgentConfiguration,
	emitter metrics.MetricEmitter,
	metaServer *metaserver.MetaServer,
	entryName, subEntryName string,
	calculationInfo *advisorsvc.CalculationInfo,
	podResourceEntries state.PodResourceEntries) error

MemoryControlKnobHandler may trigger operations for corresponding control knobs or set control knob value to memory plugin checkpoint and take effect asynchronously

func ControlKnobHandlerWithChecker

func ControlKnobHandlerWithChecker(handler MemoryControlKnobHandler) MemoryControlKnobHandler

type MemoryControlKnobName

type MemoryControlKnobName string
const (
	ControlKnobKeyMemoryLimitInBytes MemoryControlKnobName = "memory_limit_in_bytes"
	ControlKnobKeyDropCache          MemoryControlKnobName = "drop_cache"
	ControlKnobKeyCPUSetMems         MemoryControlKnobName = "cpuset_mems"
	ControlKnobReclaimedMemorySize   MemoryControlKnobName = "reclaimed_memory_size"
	ControlKnobKeyBalanceNumaMemory  MemoryControlKnobName = "balance_numa_memory"
	ControlKnobKeySwapMax            MemoryControlKnobName = "swap_max"
	ControlKnowKeyMemoryOffloading   MemoryControlKnobName = "memory_offloading"
)

Jump to

Keyboard shortcuts

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