Skip to content

Commit

Permalink
apis: introduce cpu evict fields in NodeSLO (#161)
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Liu <jasonliu747@gmail.com>
  • Loading branch information
jasonliu747 committed May 24, 2022
1 parent 1d13d60 commit 27199b9
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 2 deletions.
14 changes: 12 additions & 2 deletions apis/slo/v1alpha1/nodeslo_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ type ResourceThresholdStrategy struct {
// +kubebuilder:validation:Maximum=100
// +kubebuilder:validation:Minimum=0
CPUSuppressThresholdPercent *int64 `json:"cpuSuppressThresholdPercent,omitempty"`

// CPUSuppressPolicy
CPUSuppressPolicy CPUSuppressPolicy `json:"cpuSuppressPolicy,omitempty"`

Expand All @@ -174,11 +173,22 @@ type ResourceThresholdStrategy struct {
// +kubebuilder:validation:Maximum=100
// +kubebuilder:validation:Minimum=0
MemoryEvictThresholdPercent *int64 `json:"memoryEvictThresholdPercent,omitempty"`

// lower: memory release util usage under MemoryEvictLowerPercent, default = MemoryEvictThresholdPercent - 2
// +kubebuilder:validation:Maximum=100
// +kubebuilder:validation:Minimum=0
MemoryEvictLowerPercent *int64 `json:"memoryEvictLowerPercent,omitempty"`

// cpu evict threshold percentage (0,100), default = 70
// +kubebuilder:default=70
// +kubebuilder:validation:Maximum=100
// +kubebuilder:validation:Minimum=0
CPUEvictThresholdPercent *int64 `json:"cpuEvictThresholdPercent,omitempty"`
// if be CPU RealLimit/allocatedLimit > CPUEvictBESatisfactionUpperPercent, then stop evict BE pods
CPUEvictBESatisfactionUpperPercent *int64 `json:"cpuEvictBESatisfactionUpperPercent,omitempty"`
// if be CPU (RealLimit/allocatedLimit < CPUEvictBESatisfactionLowerPercent and usage nearly 100%) continue CPUEvictTimeWindowSeconds,then start evict
CPUEvictBESatisfactionLowerPercent *int64 `json:"cpuEvictBESatisfactionLowerPercent,omitempty"`
// cpu evict start after continue avg(cpuusage) > CPUEvictThresholdPercent in seconds
CPUEvictTimeWindowSeconds *int64 `json:"cpuEvictTimeWindowSeconds,omitempty"`
}

// ResctrlQoSCfg stores node-level config of resctrl qos
Expand Down
20 changes: 20 additions & 0 deletions apis/slo/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions config/crd/bases/slo.koordinator.sh_nodeslos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,30 @@ spec:
resourceUsedThresholdWithBE:
description: BE pods will be limited if node resource usage overload
properties:
cpuEvictBESatisfactionLowerPercent:
description: if be CPU (RealLimit/allocatedLimit < CPUEvictBESatisfactionLowerPercent
and usage nearly 100%) continue CPUEvictTimeWindowSeconds,then
start evict
format: int64
type: integer
cpuEvictBESatisfactionUpperPercent:
description: if be CPU RealLimit/allocatedLimit > CPUEvictBESatisfactionUpperPercent,
then stop evict BE pods
format: int64
type: integer
cpuEvictThresholdPercent:
default: 70
description: cpu evict threshold percentage (0,100), default =
70
format: int64
maximum: 100
minimum: 0
type: integer
cpuEvictTimeWindowSeconds:
description: cpu evict start after continue avg(cpuusage) > CPUEvictThresholdPercent
in seconds
format: int64
type: integer
cpuSuppressPolicy:
description: CPUSuppressPolicy
type: string
Expand Down

0 comments on commit 27199b9

Please sign in to comment.