CN114625493B - Kubernetes cluster resource scheduling method based on improved longhorn beetle whisker intelligent method - Google Patents

Kubernetes cluster resource scheduling method based on improved longhorn beetle whisker intelligent method Download PDF

Info

Publication number
CN114625493B
CN114625493B CN202011468382.2A CN202011468382A CN114625493B CN 114625493 B CN114625493 B CN 114625493B CN 202011468382 A CN202011468382 A CN 202011468382A CN 114625493 B CN114625493 B CN 114625493B
Authority
CN
China
Prior art keywords
cluster
resource scheduling
longicorn
scheme
whisker
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.)
Active
Application number
CN202011468382.2A
Other languages
Chinese (zh)
Other versions
CN114625493A (en
Inventor
李克文
张达
邴绍强
吴雪锋
杨建涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China University of Petroleum East China
Original Assignee
China University of Petroleum East China
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by China University of Petroleum East China filed Critical China University of Petroleum East China
Priority to CN202011468382.2A priority Critical patent/CN114625493B/en
Publication of CN114625493A publication Critical patent/CN114625493A/en
Application granted granted Critical
Publication of CN114625493B publication Critical patent/CN114625493B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5072Grid computing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]

Abstract

The invention discloses a Kubernetes cluster resource scheduling method based on an improved longhorn beetle whisker intelligent method, which is characterized in that yaml files are adopted to acquire parameters such as CPU core number, disk read-write speed and the like from cluster working nodes and a cluster task list Pod; initializing cluster resource information by using an ant colony intelligent method, and obtaining a global resource scheduling initial scheme according to the moving track of ants; and initializing population individual distribution in the longhorn beetle whisker intelligent method by using a global resource scheduling initial scheme, calculating a coordinate vector of longhorn beetle movement according to the cluster load degree, and outputting the global resource scheduling scheme after the longhorn beetle stops searching, namely the Kubertes cluster final resource scheduling scheme. According to the optimization result of the ant colony intelligent method, the scheduling scheme of the longhorn beetle whisker intelligent method is initialized, the longhorn beetle whisker intelligent method is applied to dynamically allocate the optimal working node for each task in the cluster environment, the searching precision of the cluster resource scheduling optimal scheme is improved, and the comprehensive utilization rate of the cluster resources is improved.

Description

Kubernetes cluster resource scheduling method based on improved longhorn beetle whisker intelligent method
Technical Field
The invention belongs to the technical field of Internet communication and the field of artificial intelligence, and particularly relates to a Kubernetes cluster resource scheduling method based on an improved longhorn beetle whisker intelligent method.
Background
In Kubernetes cluster resource scheduling, the original static scheduling method only considers CPU and memory resources, but ignores adverse effects of other resources such as storage, network bandwidth and the like on resource scheduling results. With the development of computer technology, compared with the traditional method, the artificial intelligence method has the advantage that the utilization rate of various types of data for scheduling problem processing is improved in the problem of processing multidimensional data types. The Kubernetes cluster resources are scheduled by adopting an artificial intelligence method, so that various types of cluster resources can be comprehensively considered, and reasonable and efficient scheduling of cluster resource requests is ensured.
The method aims at the problem that the comprehensive utilization rate of cluster resources is low due to single input parameters of the traditional Kubernetes cluster resource scheduling method. The method comprises the steps of initializing various cluster resource distribution by an ant colony intelligent method, and providing a Kubernetes cluster resource scheduling method based on an improved longhorn beetle whisker intelligent method by combining the longhorn beetle whisker intelligent method.
Disclosure of Invention
In order to solve the problem of low comprehensive utilization rate of resources of a traditional resource scheduling method of the Kubernetes, the invention provides a cluster resource scheduling method of the Kubernetes based on an improved longhorn beetle whisker intelligent method. The global resource scheduling initial scheme is generated by applying the global optimizing mechanism of the ant colony intelligent method, the population initial distribution in the longhorn beetle whisker intelligent method is optimized, and the improved longhorn beetle whisker intelligent method is used for dynamically distributing optimal working nodes for each task in the cluster environment, so that the problems of single input parameters of the current resource scheduling method and poor universality of the cluster resource scheduling method are solved.
In order to achieve the above purpose, the technical scheme of the invention mainly comprises the following steps:
1. obtaining cluster resource information by adopting yaml files:
CPU, memory, network, disk utilization rate, CPU core number, memory capacity, network rate, disk read-write rate and the like are obtained from the cluster working nodes, a task list Pod is obtained at the same time, and the resource balance degree S of the working nodes is calculated 1
2. Initializing cluster resource information by adopting an ant colony intelligent method:
(1) Setting the number of groups in an ant colony intelligent method as m, the number of tasks in a Pod list as n (n < m), the number of iterations as D, an objective function as H, taking the number of resources of cluster working nodes as pheromone concentration c, taking the pheromone volatilization factor as beta, and randomly selecting Pod to deploy ant individuals according to the number of groups m;
(2) Setting transfer value of ant individual in Pod list, and making objective function be formed from resource balance degree S of working node 1 Weighted with global pheromones. The ant individual judges whether a mobile point exists in the Pod list according to the transfer value, and if so, the cluster resource scheduling scheme is re-planned; if not, the current planning is considered to be optimal, and the ants stop moving;
(3) After all ant individuals stop transferring, the global pheromone concentration c is updated according to the movement track of the ant individuals and the pheromone volatilization factor beta;
(4) Repeating the steps (2) and (3) until the maximum iteration times are met or the set threshold is reached, and stopping ant population optimization to obtain a global resource scheduling initial scheme.
3. Scheduling cluster resources by adopting a longhorn beetle whisker intelligent method:
obtaining a global resource scheduling initial scheme by utilizing an ant colony intelligent method, initializing population individual distribution in the longhorn beetle whisker intelligent method, obtaining the current cluster load quantity and the task quantity in a Pod list according to the global resource scheduling initial scheme, and establishing an objective function F for representing the cluster load degree load
(1) Establishing two random orientation vectors by simulating the antenna of the longicorn, calculating the coordinate vector of the antenna of the longicorn, and setting the step length of the longicorn as d 0 The search distance is delta, the iteration times are L, and the step attenuation rate is alpha;
(2) According to an objective function F representing the degree of load of the cluster load Determining the antenna odor intensity of the longicorn;
(3) Comparing the antenna smell intensities of the longicorn in the step (2), determining the coordinate vector of the longicorn after the next iteration update, and synchronously updating the step length and the search distance of the longicorn;
(4) Repeating the steps (2) and (3) until the maximum iteration times are met or a set threshold is reached, stopping searching by the longicorn, wherein the longicorn coordinate is the global resource scheduling scheme, and the result is the final resource scheduling scheme of the Kubertes cluster.
The beneficial effects of the invention are as follows: aiming at the problems of single input parameters of the traditional Kuberttes cluster resource scheduling, low comprehensive utilization rate of cluster resources and poor universality of a cluster resource scheduling method, an ant colony intelligent method is applied to optimize by taking a plurality of parameters such as CPU core number, disk read-write speed and the like as influencing factors of the cluster resource scheduling, so that the cluster resource scheduling method is optimized; according to the optimization result of the ant colony intelligent method, initializing a scheduling scheme of the longhorn beetle whisker intelligent method, improving the searching precision of a cluster resource scheduling optimal scheme, and improving the comprehensive utilization rate of cluster resources.
Drawings
FIG. 1 is a diagram of a model structure of the present invention
Detailed Description
The invention is described in further detail below in connection with fig. 1:
1. obtaining cluster resource information by adopting yaml files:
obtaining disk utilization rate, CPU utilization rate, network utilization rate, memory utilization rate, disk read-write rate, CPU core number, network rate and memory capacity from cluster working nodes by using yaml file, and simultaneously obtaining task list Pod and working node resource balance degree S 1
S 1 The calculation formula is as follows:
wherein I (d) is disk utilization, I (c) is CPU utilization, I (n) is network utilization, I (m) is memory utilization, J (d) is disk read-write rate, e is CPU core number, J (c) is CPU frequency, J (n) is network rate, J (m) is memory capacity.
2. Initializing cluster resource information by adopting an ant colony intelligent method:
(1) Setting the number of groups in an ant colony intelligent method as m, the number of tasks in a Pod list as n (n < m), the number of iterations as D, an objective function as H, taking the number of resources of cluster working nodes as pheromone concentration c, taking the pheromone volatilization factor as beta, and randomly selecting Pod to deploy ant individuals according to the number of groups m;
(2) Setting transfer value of ant individual in Pod list, and making objective function H be formed from resource balance degree S of working node 1 Weighted with global pheromones. The ant individual judges whether a mobile point exists in the Pod list according to the transfer value, and if so, the cluster resource scheduling scheme is re-planned; if not, the current planning is considered to be optimal, and the ants stop moving;
the calculation formula of H is as follows:
(3) After all ant individuals stop transferring, the global pheromone concentration c is updated according to the movement track of the ant individuals and the pheromone volatilization factor beta;
(4) Repeating the steps (2) and (3) until the maximum iteration times are met or the set threshold is reached, and stopping ant population optimization to obtain a global resource scheduling initial scheme.
3. Scheduling cluster resources by adopting a longhorn beetle whisker intelligent method:
obtaining a global resource scheduling initial scheme by utilizing an ant colony intelligent method, initializing population individual distribution in the longhorn beetle whisker intelligent method, obtaining the current cluster load quantity and the task quantity in a Pod list according to the global resource scheduling initial scheme, and establishing an objective function F for representing the cluster load degree load
F load The calculation formula is as follows:
k is the current cluster load number, and n is the task number in the Pod list.
(1) Establishing two random orientation vectors by simulating the antenna of the longicorn, calculating the coordinate vector of the antenna of the longicorn, and setting the step length of the longicorn as d 0 The search distance is delta, the iteration times are L, and the step attenuation rate is alpha;
(2) According to an objective function F representing the degree of load of the cluster load Determining the antenna odor intensity of the longicorn;
(3) Comparing the antenna smell intensities of the longicorn in the step (2), determining the coordinate vector of the longicorn after the next iteration update, and synchronously updating the step length and the search distance of the longicorn;
(4) Repeating the steps (2) and (3) until the maximum iteration times are met or a set threshold is reached, stopping searching by the longicorn, wherein the longicorn coordinate is the global resource scheduling scheme, and the result is the final resource scheduling scheme of the Kubertes cluster.
The foregoing is only a preferred embodiment of the invention, and any modifications and variations of the embodiments described herein are possible to those skilled in the art, using the teachings set forth herein. Any simple modification, variation or variation of the above embodiments according to the technical solution of the present invention without departing from the technical solution of the present invention belongs to the protection scope of the technical solution of the present invention.

Claims (1)

1. The Kubernetes cluster resource scheduling method based on the improved longhorn beetle whisker intelligent method is characterized by comprising the following steps of:
obtaining a CPU, a memory, a network, a disk utilization rate, a CPU core number, a memory capacity, a network rate, a disk read-write rate and a cluster task list Pod from a Kubernetes cluster working node by using yaml files;
initializing cluster resource information by using an ant colony intelligent method, setting the number of clusters, the concentration of pheromones, the volatilization factors of the pheromones and the iteration times, taking the resource balance degree of working nodes and the weighting of global pheromones as objective functions, calculating the objective function values of ant individuals and moving, and obtaining a global resource scheduling initial scheme according to the moving track of the ants, wherein the method specifically comprises the following four steps: (1) Setting the population number in the ant colony intelligent method as m, and setting the task number in the Pod list as n, n<m, the iteration times are D, the objective function is H, the resource quantity of the cluster working nodes is used as the pheromone concentration c, the pheromone volatilization factor is beta, and Pod deployment ant individuals are randomly selected according to the population quantity m; (2) Setting transfer value of ant individual in Pod list, and making objective function be formed from resource balance degree S of working node 1 Weighted with global pheromone, S 1 The calculation formula is as follows:
i (d) is disk utilization rate, I (c) is CPU utilization rate, I (n) is network utilization rate, I (m) is memory utilization rate, J (d) is disk read-write rate, e is CPU core number, J (c) is CPU frequency, J (n) is network rate, J (m) is memory capacity, ant individuals judge whether moving points exist in the Pod list according to the transfer value, if so, the cluster resource scheduling scheme is re-planned, if not, the current planning is regarded as optimal, and the ants stop moving; (3) After all ant individuals stop transferring, the global pheromone concentration c is updated according to the movement track of the ant individuals and the pheromone volatilization factor beta; (4) Repeating the steps (2) and (3) until the maximum iteration times are met or the set threshold is reached, and stopping ant population optimization to obtain a global resource scheduling initial scheme;
initializing population individual distribution in the longhorn beetle whisker intelligent method by using a global resource scheduling initial scheme, setting the step length and the search distance of the longhorn beetles, calculating the moving coordinate vector of the longhorn beetles according to the cluster load degree, and outputting the global resource scheduling scheme after the longhorn beetles stop searching, namely the Kuberttes cluster final resource scheduling scheme, wherein the method specifically comprises the following four steps: (1) Establishing two random orientation vectors by simulating the antenna of the longicorn, calculating the coordinate vector of the antenna of the longicorn, and setting the step length of the longicorn as d 0 The search distance is delta, the iteration times are L, and the step attenuation rate is alpha; (2) According to an objective function F representing the degree of load of the cluster load Determining the antenna odor intensity of the longicorn, F load The calculation formula is as follows:
wherein k is the current cluster load number, and n is the task number in the Pod list; (3) Comparing the antenna smell intensities of the longicorn in the step (2), determining the coordinate vector of the longicorn after the next iteration update, and synchronously updating the step length and the search distance of the longicorn; (4) Repeating the steps (2) and (3) until the maximum iteration times are met or a set threshold is reached, stopping searching by the longicorn, wherein the longicorn coordinate is the global resource scheduling scheme, and the result is the final resource scheduling scheme of the Kubertes cluster.
CN202011468382.2A 2020-12-14 2020-12-14 Kubernetes cluster resource scheduling method based on improved longhorn beetle whisker intelligent method Active CN114625493B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011468382.2A CN114625493B (en) 2020-12-14 2020-12-14 Kubernetes cluster resource scheduling method based on improved longhorn beetle whisker intelligent method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011468382.2A CN114625493B (en) 2020-12-14 2020-12-14 Kubernetes cluster resource scheduling method based on improved longhorn beetle whisker intelligent method

Publications (2)

Publication Number Publication Date
CN114625493A CN114625493A (en) 2022-06-14
CN114625493B true CN114625493B (en) 2024-04-02

Family

ID=81897479

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011468382.2A Active CN114625493B (en) 2020-12-14 2020-12-14 Kubernetes cluster resource scheduling method based on improved longhorn beetle whisker intelligent method

Country Status (1)

Country Link
CN (1) CN114625493B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116170518B (en) * 2023-04-26 2023-07-18 北京太极信息系统技术有限公司 Method and equipment for cloud cross-architecture management of domestic chip container

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109902391A (en) * 2018-11-27 2019-06-18 中国石油大学(华东) A kind of oil-gas pipeline planing method based on random volatility coefficient ant group algorithm
CN109960585A (en) * 2019-02-02 2019-07-02 浙江工业大学 A kind of resource regulating method based on kubernetes
CN110086855A (en) * 2019-03-29 2019-08-02 江苏开拓信息与系统有限公司 Spark task Intellisense dispatching method based on ant group algorithm
CN110986982A (en) * 2019-12-02 2020-04-10 浙江工业大学 Multi-robot path planning method based on improved longicorn whisker algorithm
CN111311077A (en) * 2020-01-21 2020-06-19 南京航空航天大学 Method for solving flexible job shop scheduling by particle swarm algorithm based on longicorn stigma search
CN111310885A (en) * 2020-02-27 2020-06-19 辽宁工程技术大学 Chaotic space cattle herd search algorithm introducing variation strategy

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109902391A (en) * 2018-11-27 2019-06-18 中国石油大学(华东) A kind of oil-gas pipeline planing method based on random volatility coefficient ant group algorithm
CN109960585A (en) * 2019-02-02 2019-07-02 浙江工业大学 A kind of resource regulating method based on kubernetes
CN110086855A (en) * 2019-03-29 2019-08-02 江苏开拓信息与系统有限公司 Spark task Intellisense dispatching method based on ant group algorithm
CN110986982A (en) * 2019-12-02 2020-04-10 浙江工业大学 Multi-robot path planning method based on improved longicorn whisker algorithm
CN111311077A (en) * 2020-01-21 2020-06-19 南京航空航天大学 Method for solving flexible job shop scheduling by particle swarm algorithm based on longicorn stigma search
CN111310885A (en) * 2020-02-27 2020-06-19 辽宁工程技术大学 Chaotic space cattle herd search algorithm introducing variation strategy

Also Published As

Publication number Publication date
CN114625493A (en) 2022-06-14

Similar Documents

Publication Publication Date Title
CN109617826B (en) Storm dynamic load balancing method based on cuckoo search
CN109818786B (en) Method for optimally selecting distributed multi-resource combined path capable of sensing application of cloud data center
CN113141317B (en) Streaming media server load balancing method, system, computer equipment and terminal
Keshk et al. Cloud task scheduling for load balancing based on intelligent strategy
CN112988345A (en) Dependency task unloading method and device based on mobile edge calculation
Gu et al. A multi-objective fog computing task scheduling strategy based on ant colony algorithm
CN114625493B (en) Kubernetes cluster resource scheduling method based on improved longhorn beetle whisker intelligent method
CN113487029A (en) Transplantable neural network distributed parallel strategy searching method
Alnusairi et al. Binary PSOGSA for load balancing task scheduling in cloud environment
CN115658259A (en) Component scheduling method based on load balancing strategy and improved ant colony algorithm in multiple industrial networks
Awad et al. A swarm intelligence-based approach for dynamic data replication in a cloud environment
Nguyen et al. Deep reinforcement learning for collaborative offloading in heterogeneous edge networks
CN111176784A (en) Virtual machine integration method based on extreme learning machine and ant colony system
CN114546608A (en) Task scheduling method based on edge calculation
CN113722112A (en) Service resource load balancing processing method and system
CN110262879B (en) Monte Carlo tree searching method based on balanced exploration and utilization
CN115499875B (en) Satellite internet task unloading method, system and readable storage medium
CN114980216A (en) Dependent task unloading system and method based on mobile edge calculation
Li Optimization of task offloading problem based on simulated annealing algorithm in MEC
CN113672372A (en) Multi-edge cooperative load balancing task scheduling method based on reinforcement learning
CN106970840A (en) A kind of Method for HW/SW partitioning of combination task scheduling
Javvaji et al. Soft computing approach for multi-objective task allocation problem in wireless sensor network
Mary et al. Task Scheduling with Altered Grey Wolf Optimization (AGWO) in Mobile Cloud Computing using Cloudlet
Li A Study into Load Balancing in Cloud Computing Based on Whale Optimization Algorithm
Bao et al. QoS Preferences Edge User Allocation Using Reinforcement Learning

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
GR01 Patent grant
GR01 Patent grant