Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize SchedulingLatency Index View in K8s

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

K8s how to achieve SchedulingLatency indicators view, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.

1.1. Metrics.go indicator definition

Pkg/scheduler/metrics/metrics.go

SchedulingLatency = prometheus.NewSummaryVec (

Prometheus.SummaryOpts {

Subsystem: SchedulerSubsystem

Name: SchedulingLatencyName

Help: "Scheduling latency in seconds split by sub-parts of the scheduling operation"

/ / Make the sliding window of 5h.

/ / TODO: The value for this should be based on some SLI definition (long term).

MaxAge: 5 * time.Hour

}

[] string {OperationLabel}

)

Line 64: Scheduling latency in seconds split by sub-parts of the scheduling operation

A schedule is divided into the sum of the operating time of the subcomponents

1.1. Scheduler.go scheduling entry 1.1.1. Pkg/scheduler/scheduler.go

/ / Run begins watching and scheduling. It waits for cache to be synced, then starts a goroutine and returns immediately.

Func (sched * Scheduler) Run () {

If! sched.config.WaitForCacheSync () {

Return

}

Go wait.Until (sched.scheduleOne, 0, sched.config.StopEverything)

}

1.1.1. Core scheduling logic sequence

1. Sched.schedule

2. Sched.assumeVolumes

3. Sched.assume

4. Sched.bindVolumes

5. Sched.Cache

6. Sched.bind

1.1. Implementation of generic_scheduler.go scheduling algorithm 1.1.1. Is it helpful for pkg/scheduler/core/generic_scheduler.go to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report