Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(agent): support cpu burst #101

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,26 @@ spec:
type: number
type: object
type: object
fineGrainedResourceConfig:
description: FineGrainedResourceConfig stores configurations related
to fine-grained resource management
properties:
cpuBurstConfig:
description: CPUBurstConfig stores cpu burst related configurations
properties:
cpuBurstPercent:
description: CPUBurstPercent identifies the upper limit
of the allowed burst percent optional
format: int64
minimum: 0
type: integer
cpuBurstPolicy:
description: 'CPUBurstPolicy indicates which policy to
enable the cpu burst feature. Optional values: none/static/dynamic
Default value: none optional'
type: string
type: object
type: object
reclaimedResourceConfig:
description: ReclaimedResourceConfig is a configuration for reclaim
resource
Expand Down
23 changes: 23 additions & 0 deletions pkg/apis/config/v1alpha1/adminqos.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ type AdminQoSConfig struct {

// +optional
AdvisorConfig *AdvisorConfig `json:"advisorConfig,omitempty"`

// FineGrainedResourceConfig stores configurations related to fine-grained resource management
// +optional
FineGrainedResourceConfig *FineGrainedResourceConfig `json:"fineGrainedResourceConfig,omitempty"`
}

type ReclaimedResourceConfig struct {
Expand Down Expand Up @@ -128,6 +132,12 @@ type AdvisorConfig struct {
MemoryAdvisorConfig *MemoryAdvisorConfig `json:"memoryAdvisorConfig,omitempty"`
}

type FineGrainedResourceConfig struct {
// CPUBurstConfig stores cpu burst related configurations
// +optional
CPUBurstConfig *CPUBurstConfig `json:"cpuBurstConfig,omitempty"`
}

type CPUAdvisorConfig struct {
// AllowSharedCoresOverlapReclaimedCores is a flag, when enabled,
// we will rely on kernel features to ensure that shared_cores pods can suppress and preempt reclaimed_cores pods.
Expand Down Expand Up @@ -621,3 +631,16 @@ type NumaEvictionRankingMetric string
// system level
// +kubebuilder:validation:Enum=qos.pod;priority.pod;mem.usage.container;native.qos.pod;owner.pod
type SystemEvictionRankingMetric string

type CPUBurstConfig struct {
// CPUBurstPolicy indicates which policy to enable the cpu burst feature.
// Optional values: none/static/dynamic
// Default value: none
// optional
CPUBurstPolicy string `json:"cpuBurstPolicy,omitempty"`

// CPUBurstPercent identifies the upper limit of the allowed burst percent
// +kubebuilder:validation:Minimum=0
// optional
CPUBurstPercent *int64 `json:"cpuBurstPercent,omitempty"`
}
47 changes: 47 additions & 0 deletions pkg/apis/config/v1alpha1/zz_generated.deepcopy.go

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

17 changes: 17 additions & 0 deletions pkg/consts/qos.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,23 @@ const (
//
// - this enhancement is only supported for shared-cores, for now and foreseeable future
PodAnnotationCPUEnhancementSuppressionToleranceRate = "suppression_tolerance_rate"

// PodAnnotationCPUEnhancementCPUBurstPolicy indicates which policy to enable the cpu burst feature.
// Optional values: none/static/dynamic
// Default value: none
PodAnnotationCPUEnhancementCPUBurstPolicy = "cpu_burst_policy"

// PodAnnotationCPUEnhancementCPUBurstPolicyNone is the value of cpu burst policy none
PodAnnotationCPUEnhancementCPUBurstPolicyNone = "none"

// PodAnnotationCPUEnhancementCPUBurstPolicyStatic is the value of cpu burst policy static
PodAnnotationCPUEnhancementCPUBurstPolicyStatic = "static"

// PodAnnotationCPUEnhancementCPUBurstPolicyDynamic is the value of cpu burst policy dynamic
PodAnnotationCPUEnhancementCPUBurstPolicyDynamic = "dynamic"

// PodAnnotationCPUEnhancementCPUBurstPercent identifies the upper limit of the allowed burst percent
PodAnnotationCPUEnhancementCPUBurstPercent = "cpu_burst_percent"
)

// const variables for pod annotations about qos level enhancement in network
Expand Down
Loading