CN110347490A - A kind of resource scalable combined schedule method in kubernetes - Google Patents
A kind of resource scalable combined schedule method in kubernetes Download PDFInfo
- Publication number
- CN110347490A CN110347490A CN201910631475.3A CN201910631475A CN110347490A CN 110347490 A CN110347490 A CN 110347490A CN 201910631475 A CN201910631475 A CN 201910631475A CN 110347490 A CN110347490 A CN 110347490A
- Authority
- CN
- China
- Prior art keywords
- pod
- resource
- group
- kubernetes
- scheduling
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 20
- 208000019901 Anxiety disease Diseases 0.000 claims abstract description 7
- 230000036506 anxiety Effects 0.000 claims abstract description 7
- 238000004064 recycling Methods 0.000 claims abstract description 3
- 230000010485 coping Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 239000002699 waste material Substances 0.000 description 3
- 230000007812 deficiency Effects 0.000 description 1
- 238000005538 encapsulation Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5011—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
- G06F9/5022—Mechanisms to release resources
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/52—Program synchronisation; Mutual exclusion, e.g. by means of semaphores
- G06F9/524—Deadlock detection or avoidance
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a kind of scalable combined schedule methods of resource in kubernetes, it specifically includes: step 1: with Pod group for basic thread, the corresponding priority of one Pod group, it include multiple resources copy in Pod group, minimum and maximum Pod number, the corresponding resource requirement of each Pod is arranged in each Resource Replica;Step 2: the Pod group priority scheduling that combined schedule device selects priority high, after getting all resource requirements in Pod group, each Pod of polling dispatching reserves the successful Pod resource of scheduling;Step 3: when cluster resource anxiety, under the premise of meeting the minimum Pod number demand of all Resource Replicas, by recycling its part Pod resource, high-priority applications is allowed to start operation as early as possible;Step 4: the strictly all rules strategy of the compatible primary scheduler of Kubernetes.
Description
Technical field
Invention is related to technical field of information processing, the scalable combined schedule side of resource in specially a kind of kubernetes
Method.
Background technique
Kubernetes is an open source container cluster management platform of Google.Kubernetes possesses very complete
Cluster management ability, is capable of providing fine-grained resource management, intelligent load balancing function, powerful online extended capability and
Fault-tolerant ability etc..Kubernetes management tool abundant can solve the container scheduling links problem.For simplification
Management to cluster, Kubernetes devise the concept of Pod, and Pod is the set of (co-located) container of cooperating together, this
A little containers are disposed and are dispatched jointly.
Kubernetes dispatching method is fairly simple at present, using Pod as the minimum unit of scheduling.In actual application
There is also following deficiencies:
1. resource deadlock: may include multiple associated Pod in an application service, if only part Pod is obtained
Resource is unable to operate normally then the Pod that resource has not been obtained may cause entire application service, causes part resource waste and dead
Lock.
2. resource is fought for: for part scarce resource may there is a situation where resources to fight for.But the primary tune of Kubernetes
Degree device does not support that resource is seized between the dispatching priority and group of group rank, coping resources can not fight for well.
3. resource is flexible: Kubernetes is using fixed resource bid amount, the fixed money in actual production environment
Source applications often will cause a large amount of wasting of resources.
Summary of the invention
A kind of scalable combined schedule method of resource of invention being designed to provide in kubernetes, it is above-mentioned to solve
The problem of being proposed in background technique.
To achieve the above object, invention provides the following technical solutions: the scalable combination of resource in a kind of kubernetes
Dispatching method, specifically includes the following steps:
Step 1: with Pod group for basic thread, the corresponding priority of a Pod group, interior Pod group includes a variety of
Minimum and maximum Pod number, the corresponding resource requirement of each Pod is arranged in Resource Replica, each Resource Replica;
Step 2: the Pod group priority scheduling that combined schedule device selects priority high gets all resources in Pod group
After demand, each Pod of polling dispatching reserves the successful Pod resource of scheduling;If there is a Pod scheduling failure, release is all
Pod group, is put into scheduling queue again, waits next dispatching cycle again by reserved Pod resource, label Pod group scheduling failure
Scheduling;
Step 3: when cluster resource anxiety, under the premise of meeting the minimum Pod number demand of all Resource Replicas, pass through
Its part Pod resource is recycled, high-priority applications is allowed to start operation as early as possible;
Step 4: the strictly all rules strategy of the compatible primary scheduler of Kubernetes.
Preferably, it is specially to define in the annotation of Pod that the basic thread in the step 1, which is Pod group,
The information of its affiliated Pod group, Pod group are defined as follows:
Preferably, each Pod group in the step 1 includes multiple Resource Replicas, the setting of each Resource Replica it is maximum and
Minimum number of copies, Resource Replica are defined as follows:
Compared with prior art, advantageous effect of the invention is:
1, the scalable combined schedule method of resource in the kubernetes, with Pod group for basic thread, one
Pod group corresponds to a priority, includes multiple resources copy in Pod group, and minimum and maximum Pod number is arranged in each Resource Replica,
The problem of each Pod corresponds to a resource requirement, avoids part resource waste and deadlock.
2, the scalable combined schedule method of resource in the kubernetes, the Pod that combined schedule device selects priority high
Group priority scheduling, after getting all resource requirements in Pod group, each Pod of polling dispatching reserves the successful Pod money of scheduling
Source;If there is a Pod scheduling failure, all Pod resources reserved, label Pod group scheduling failure, again Pod are discharged
Group is put into scheduling queue, waits reschedule next dispatching cycle, coping resources can fight for well.
3, the scalable combined schedule method of resource in the kubernetes, it is all meeting when cluster resource anxiety
Under the premise of the minimum Pod number demand of Resource Replica, by recycling its part Pod resource, high-priority applications is allowed to start fortune as early as possible
The problem of going, a large amount of wasting of resources can be avoided.
Specific embodiment
Below in conjunction with the embodiment of the present invention, technical scheme in the embodiment of the invention is clearly and completely described,
Obviously, described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Based in the present invention
Embodiment, every other embodiment obtained by those of ordinary skill in the art without making creative efforts, all
Belong to the scope of protection of the invention.
Invention provides a kind of technical solution: a kind of scalable combined schedule method of resource in kubernetes, specific to wrap
Include following steps:
Step 1: with Pod group for basic thread, the corresponding priority of a Pod group, interior Pod group includes a variety of
Minimum and maximum Pod number, the corresponding resource requirement of each Pod is arranged in Resource Replica, each Resource Replica;
Step 2: the Pod group priority scheduling that combined schedule device selects priority high gets all resources in Pod group
After demand, each Pod of polling dispatching reserves the successful Pod resource of scheduling;If there is a Pod scheduling failure, release is all
Pod group, is put into scheduling queue again, waits next dispatching cycle again by reserved Pod resource, label Pod group scheduling failure
Scheduling;
Step 3: when cluster resource anxiety, under the premise of meeting the minimum Pod number demand of all Resource Replicas, pass through
Its part Pod resource is recycled, high-priority applications is allowed to start operation as early as possible;
Step 4: the strictly all rules strategy of the compatible primary scheduler of Kubernetes.
Preferably, it is specially to define in the annotation of Pod that the basic thread in the step 1, which is Pod group,
The information of its affiliated Pod group, Pod group are defined as follows:
Preferably, each Pod group in the step 1 includes multiple Resource Replicas, the setting of each Resource Replica it is maximum and
Minimum number of copies, Resource Replica are defined as follows:
All not scheduled Pod information are monitored in scheduler, find Pod to be added belonging to it after qualified Pod
Pod group in, the Pod group that finally encapsulation is finished is added priority query and waits scheduling.
The scheduling flow of Pod group is as follows:
1. scheduler obtains the Pod group of highest priority from priority query.
2. traversing all Resource Replicas, attempt according to the Pod in minimum number of copies scheduling Resource Replica, if dispatched successfully
Reserved Pod resource, while marking Pod is to stablize Pod.
3. if according to the scheduling Pod failure of minimum number of copies, Pod group is put into priority team by label Pod group scheduling failure
Column are waited and being rescheduled.
4. if according to the scheduling Resource Replica success of minimum number of copies.Each money is dispatched respectively as the upper limit using maximum number of copies
Source copy considers the weight of each Resource Replica in scheduling process, and weight is bigger, and the scheduling probability of affiliated Pod is bigger.Mark
It is unstable Pod that note, which dispatches successful Pod,.
5. if some of them Pod scheduling failure, continues to attempt to dispatch the Pod in other Resource Replicas.
6. calling Kubernetes api to carry out bind operation to all Pod if all Pod dispatch completion.
7. when cluster resource anxiety, the resource of the unstable Pod of scheduler recovery section allows high priority to answer as much as possible
With starting operation as early as possible.
Advantageous effect of the invention is: the scalable combined schedule method of resource in the kubernetes, is basic with Pod group
Thread, the corresponding priority of a Pod group, interior Pod group includes multiple resources copy, and each Resource Replica setting is maximum
The problem of with minimum Pod number, each Pod corresponds to a resource requirement, avoids part resource waste and deadlock.It should
The scalable combined schedule method of resource in kubernetes, the Pod group priority scheduling that combined schedule device selects priority high, is obtained
After getting all resource requirements in Pod group, each Pod of polling dispatching reserves the successful Pod resource of scheduling;If there is one
Pod scheduling failure, discharges all Pod resources reserved, and Pod group is put into scheduling team again by label Pod group scheduling failure
Column, wait reschedule next dispatching cycle, coping resources can fight for well.Resource in the kubernetes is scalable
Combined schedule method, when cluster resource anxiety, under the premise of meeting the minimum Pod number demand of all Resource Replicas, by returning
Its part Pod resource is received, the problem of allowing high-priority applications to start operation as early as possible, a large amount of wasting of resources can be avoided.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art
Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to include these modifications and variations.
Claims (3)
1. a kind of scalable combined schedule method of resource in kubernetes, it is characterised in that: specifically includes the following steps:
Step 1: with Pod group for basic thread, the corresponding priority of a Pod group, interior Pod group includes multiple resources
Minimum and maximum Pod number, the corresponding resource requirement of each Pod is arranged in copy, each Resource Replica;
Step 2: the Pod group priority scheduling that combined schedule device selects priority high gets all resource requirements in Pod group
Afterwards, each Pod of polling dispatching reserves the successful Pod resource of scheduling;If there is a Pod scheduling failure, all reserved is discharged
Pod resource, label Pod group scheduling failure, Pod group is put into scheduling queue again, waits reschedule next dispatching cycle;
Step 3: when cluster resource anxiety, under the premise of meeting the minimum Pod number demand of all Resource Replicas, pass through recycling
Its part Pod resource, allows high-priority applications to start operation as early as possible;
Step 4: the strictly all rules strategy of the compatible primary scheduler of Kubernetes.
2. the scalable combined schedule method of resource in a kind of kubernetes as described in claim 1, it is characterised in that: institute
Stating the basic thread in step 1 is the letter that Pod group specially defines its affiliated Pod group in the annotation of Pod
Breath, Pod group are defined as follows:
3. the scalable combined schedule method of resource in a kind of kubernetes as described in claim 1, it is characterised in that: institute
Stating each Pod group in step 1 includes multiple Resource Replicas, and minimum and maximum number of copies, resource pair is arranged in each Resource Replica
This is defined as follows:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910631475.3A CN110347490A (en) | 2019-07-12 | 2019-07-12 | A kind of resource scalable combined schedule method in kubernetes |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910631475.3A CN110347490A (en) | 2019-07-12 | 2019-07-12 | A kind of resource scalable combined schedule method in kubernetes |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110347490A true CN110347490A (en) | 2019-10-18 |
Family
ID=68176075
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910631475.3A Pending CN110347490A (en) | 2019-07-12 | 2019-07-12 | A kind of resource scalable combined schedule method in kubernetes |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110347490A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110990121A (en) * | 2019-11-28 | 2020-04-10 | 中国—东盟信息港股份有限公司 | Kubernetes scheduling strategy based on application portrait |
US11336588B2 (en) | 2020-06-26 | 2022-05-17 | Red Hat, Inc. | Metadata driven static determination of controller availability |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180285383A1 (en) * | 2017-03-29 | 2018-10-04 | Commvault Systems, Inc. | Managing pod cells using a global repository cell |
US20180341524A1 (en) * | 2017-05-24 | 2018-11-29 | Joydeep Sen Sarma | Task packing scheduling process for long running applications |
CN109117265A (en) * | 2018-07-12 | 2019-01-01 | 北京百度网讯科技有限公司 | The method, apparatus, equipment and storage medium of schedule job in the cluster |
CN109714181A (en) * | 2017-10-25 | 2019-05-03 | 北京航天长峰科技工业集团有限公司 | A kind of command dispatching system using micro services framework |
-
2019
- 2019-07-12 CN CN201910631475.3A patent/CN110347490A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180285383A1 (en) * | 2017-03-29 | 2018-10-04 | Commvault Systems, Inc. | Managing pod cells using a global repository cell |
US20180341524A1 (en) * | 2017-05-24 | 2018-11-29 | Joydeep Sen Sarma | Task packing scheduling process for long running applications |
CN109714181A (en) * | 2017-10-25 | 2019-05-03 | 北京航天长峰科技工业集团有限公司 | A kind of command dispatching system using micro services framework |
CN109117265A (en) * | 2018-07-12 | 2019-01-01 | 北京百度网讯科技有限公司 | The method, apparatus, equipment and storage medium of schedule job in the cluster |
Non-Patent Citations (5)
Title |
---|
IOANNIS TZOLAS 等: "Virtual job management and scheduling for media services", 《 2017 IEEE 22ND INTERNATIONAL WORKSHOP ON COMPUTER AIDED MODELING AND DESIGN OF COMMUNICATION LINKS AND NETWORKS (CAMAD)》 * |
M.A. JETTE: "Performance Characteristics of Gang Scheduling in Multiprogrammed Environments", 《SC "97: PROCEEDINGS OF THE 1997 ACM/IEEE CONFERENCE ON SUPERCOMPUTING》 * |
ZOUX: "kube-batch 具体如何实现gang scheduler", 《HTTPS://WWW.JIANSHU.COM/P/0C191C4AEB5A》 * |
杜军: "基于Kubernetes的云端资源调度器改进", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
杜威科: "基于Kubemetes的大数据流式计算Spark平台设计与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110990121A (en) * | 2019-11-28 | 2020-04-10 | 中国—东盟信息港股份有限公司 | Kubernetes scheduling strategy based on application portrait |
US11336588B2 (en) | 2020-06-26 | 2022-05-17 | Red Hat, Inc. | Metadata driven static determination of controller availability |
US11991094B2 (en) | 2020-06-26 | 2024-05-21 | Red Hat, Inc. | Metadata driven static determination of controller availability |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101051280A (en) | Intelligent card embedded operation system and its control method | |
Goel et al. | A comparative study of cpu scheduling algorithms | |
US8539498B2 (en) | Interprocess resource-based dynamic scheduling system and method | |
CN105892996A (en) | Assembly line work method and apparatus for batch data processing | |
CN101996099A (en) | Method and system for processing information | |
CN108920261A (en) | A kind of two-stage self-adapting dispatching method suitable for large-scale parallel data processing task | |
CN105589750B (en) | A kind of cpu resource dispatching method and server | |
CN108345501A (en) | A kind of distributed resource scheduling method and system | |
CN110347490A (en) | A kind of resource scalable combined schedule method in kubernetes | |
CN110427257A (en) | Multi-task scheduling method, device and computer readable storage medium | |
WO2014173339A1 (en) | Task scheduling service system and method | |
CN106161480A (en) | SMS platform service scheduling method based on gateway resource pond | |
CN101896886A (en) | Uniform synchronization between multiple kernels running on single computer systems | |
CN106445675A (en) | B2B platform distributed application scheduling and resource allocation method | |
CN104079502B (en) | Multi-user multi-queue scheduling method | |
CN109684060A (en) | A kind of mixed scheduling method of polymorphic type time-critical task | |
CN109522101A (en) | For dispatching the method, system and/or device of multiple operating system tasks | |
CN101917386A (en) | Cluster multimedia transcoding system and task processing method thereof | |
CN103365711A (en) | Task scheduling mechanism and method applied to business platform of internet of Things | |
CN110362391A (en) | Resource regulating method, device, electronic equipment and storage medium | |
CN105677467A (en) | Yarn resource scheduler based on quantified labels | |
CN101968749B (en) | Method for receiving message passing interface (MPI) information under circumstance of over-allocation of virtual machine | |
CN102025652B (en) | Service bus and message processing method | |
CN105468682B (en) | A kind of event scheduling system | |
CN114579285A (en) | Task running system and method and computing device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20191018 |
|
RJ01 | Rejection of invention patent application after publication |