qrm

package
v0.5.13 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 2 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CPUDynamicPolicyConfig added in v0.3.0

type CPUDynamicPolicyConfig struct {
	// EnableCPUAdvisor indicates whether to enable sys-advisor module to calculate cpu resources
	EnableCPUAdvisor bool
	// EnableCPUPressureEviction indicates whether to enable cpu-pressure eviction, such as cpu load eviction or cpu
	// suppress eviction
	EnableCPUPressureEviction bool
	// LoadPressureEvictionSkipPools indicates the ignored pools when check load pressure.
	LoadPressureEvictionSkipPools []string
	// EnableSyncingCPUIdle is set to sync specific cgroup path with EnableCPUIdle
	EnableSyncingCPUIdle bool
	// EnableCPUIdle indicates whether enabling cpu idle
	EnableCPUIdle bool
	// CPUNUMAHintPreferPolicy decides hint preference calculation strategy
	CPUNUMAHintPreferPolicy string
	// CPUNUMAHintPreferPolicy indicates threshold to apply CPUNUMAHintPreferPolicy dynamically,
	// and it's working when CPUNUMAHintPreferPolicy is set to dynamic_packing
	CPUNUMAHintPreferLowThreshold float64
}

type CPUNativePolicyConfig added in v0.3.0

type CPUNativePolicyConfig struct {
	// EnableFullPhysicalCPUsOnly is a flag to enable extra allocation restrictions to avoid
	// different containers to possibly end up on the same core.
	EnableFullPhysicalCPUsOnly bool
	// CPUAllocationOption is the allocation option of cpu (packed/distributed).
	CPUAllocationOption string
}

type CPUQRMPluginConfig

type CPUQRMPluginConfig struct {
	// PolicyName is used to switch between several strategies
	PolicyName string
	// ReservedCPUCores indicates reserved cpus number for system agents
	ReservedCPUCores int
	// SkipCPUStateCorruption is set to skip cpu state corruption, and it will be used after updating state properties
	SkipCPUStateCorruption bool

	CPUDynamicPolicyConfig
	CPUNativePolicyConfig
}

func NewCPUQRMPluginConfig

func NewCPUQRMPluginConfig() *CPUQRMPluginConfig

type FragMemOptions added in v0.5.12

type FragMemOptions struct {
	EnableSettingFragMem bool
	// SetMemFragScoreAsync sets the threashold of frag score for async memory compaction.
	// The async compaction behavior will be triggered while exceeding this score.
	SetMemFragScoreAsync int
}

type GenericQRMPluginConfiguration

type GenericQRMPluginConfiguration struct {
	StateFileDirectory       string
	QRMPluginSocketDirs      []string
	ExtraStateFileAbsPath    string
	PodDebugAnnoKeys         []string
	UseKubeletReservedConfig bool
	// PodAnnotationKeptKeys indicates pod annotation keys will be kept in qrm state
	PodAnnotationKeptKeys []string
	// PodLabelKeptKeys indicates pod label keys will be kept in qrm state
	PodLabelKeptKeys []string
}

func NewGenericQRMPluginConfiguration

func NewGenericQRMPluginConfiguration() *GenericQRMPluginConfiguration

type IOCostOption added in v0.4.1

type IOCostOption struct {
	EnableSettingIOCost   bool
	CheckWBTDisabled      bool
	IOCostQoSConfigFile   string
	IOCostModelConfigFile string
}

type IOQRMPluginConfig added in v0.4.0

type IOQRMPluginConfig struct {
	// PolicyName is used to switch between several strategies
	PolicyName string

	WritebackThrottlingOption
	IOCostOption
	IOWeightOption
}

func NewIOQRMPluginConfig added in v0.4.0

func NewIOQRMPluginConfig() *IOQRMPluginConfig

type IOWeightOption added in v0.4.1

type IOWeightOption struct {
	EnableSettingIOWeight         bool
	IOWeightQoSLevelConfigFile    string
	IOWeightCgroupLevelConfigFile string
}

type LogCacheQRMPluginConfig added in v0.5.11

type LogCacheQRMPluginConfig struct {
	// EnableEvictingLogCache is used to enable evicting log cache by advise kernel to throw page cache for log files
	EnableEvictingLogCache bool
	// If the change value of the page cache between two operations exceeds this threshold, then increase the frequency of subsequent eviction operations.
	HighThreshold uint64
	// If the change value of the page cache between two operations is lower than this value, then slow down the frequency of subsequent eviction operations.
	LowThreshold uint64
	// The minimum time interval between two operations
	MinInterval time.Duration
	// The maximum time interval between two operations
	MaxInterval time.Duration
	// The file directory for evicting the log cache
	PathList []string
	// Keywords for recognizing log files
	FileFilters []string
}

type MemoryQRMPluginConfig

type MemoryQRMPluginConfig struct {
	// PolicyName is used to switch between several strategies
	PolicyName string
	// ReservedMemoryGB: the total reserved memories in GB
	ReservedMemoryGB uint64
	// SkipMemoryStateCorruption is ued to skip memory state corruption and it will be used after updating state properties
	SkipMemoryStateCorruption bool
	// EnableSettingMemoryMigrate is used to enable cpuset.memory_migrate for containers not numa_binding
	EnableSettingMemoryMigrate bool
	// EnableMemoryAdvisor indicates whether to enable sys-advisor module to calculate memory resources
	EnableMemoryAdvisor bool
	// ExtraControlKnobConfigFile: the absolute path of extra control knob config file
	ExtraControlKnobConfigFile string
	// EnableOOMPriority: enable oom priority enhancement
	EnableOOMPriority bool
	// OOMPriorityPinnedMapAbsPath: the absolute path of oom priority pinned bpf map
	OOMPriorityPinnedMapAbsPath string
	// EnableNonBindingShareCoresMemoryResourceCheck: enable the topology check for non-binding share cores pods
	EnableNonBindingShareCoresMemoryResourceCheck bool

	// SockMemQRMPluginConfig: the configuration for sockmem limitation in cgroup and host level
	SockMemQRMPluginConfig
	// LogCacheQRMPluginConfig: the configuration for logcache evicting
	LogCacheQRMPluginConfig
	// FragMemOptions: the configuration for memory compaction related features
	FragMemOptions
}

func NewMemoryQRMPluginConfig

func NewMemoryQRMPluginConfig() *MemoryQRMPluginConfig

type NetClassConfig added in v0.2.0

type NetClassConfig struct {
	// ReclaimedCores is the network class id for reclaimed_cores
	ReclaimedCores uint32
	// SharedCores is the network class id for shared_cores
	SharedCores uint32
	// DedicatedCores is the network class id for dedicated_cores
	DedicatedCores uint32
	// SystemCores is the network class id for system_cores
	SystemCores uint32
}

type NetworkQRMPluginConfig added in v0.2.0

type NetworkQRMPluginConfig struct {
	// PolicyName is used to switch between several strategies
	PolicyName string
	NetClass   NetClassConfig
	// Reserved network bandwidth in unit of Mbps for business-critical jobs (e.g. online services).
	// In phase 1, we only support the reservation for business-critical jobs. The system component reservation might be added later.
	// Also, we do not differentiate the egress and ingress reservation for now. That is, the reserved bandwidth on egress and ingress is supposed to be same
	ReservedBandwidth uint32
	// The ratio of available capacity to NIC line speed. For example, a 25Gbps NIC's max bandwidth is around 23.5Gbps.
	// Please note, the ingress rate throttling may need additional virtual device like ifb, which results in lower capacity than egress
	EgressCapacityRate  float32
	IngressCapacityRate float32
	// skip network state corruption and it will be used after updating state properties
	SkipNetworkStateCorruption                      bool
	PodLevelNetClassAnnoKey                         string
	PodLevelNetAttributesAnnoKeys                   string
	IPv4ResourceAllocationAnnotationKey             string
	IPv6ResourceAllocationAnnotationKey             string
	NetNSPathResourceAllocationAnnotationKey        string
	NetInterfaceNameResourceAllocationAnnotationKey string
	NetClassIDResourceAllocationAnnotationKey       string
	NetBandwidthResourceAllocationAnnotationKey     string
}

NetworkQRMPluginConfig is the config of network QRM plugin

func NewNetworkQRMPluginConfig added in v0.2.0

func NewNetworkQRMPluginConfig() *NetworkQRMPluginConfig

NewNetworkQRMPluginConfig returns a NetworkQRMPluginConfig

type SockMemQRMPluginConfig added in v0.4.0

type SockMemQRMPluginConfig struct {
	// EnableSettingSockMemLimit is used to limit tcpmem usage in cgroup and host level
	EnableSettingSockMem bool
	// SetGlobalTCPMemRatio limits host max global tcp memory usage.
	SetGlobalTCPMemRatio int
	// SetCgroupTCPMemRatio limit cgroup max tcp memory usage.
	SetCgroupTCPMemRatio int
}

type WritebackThrottlingOption added in v0.4.1

type WritebackThrottlingOption struct {
	EnableSettingWBT bool
	WBTValueHDD      int
	WBTValueSSD      int
	WBTValueNVME     int
	WBTValueVIRTIO   int
}

Jump to

Keyboard shortcuts

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