A method, device, medium, and program product for scheduling a run unit

By using a predictive load model for intelligent scheduling, the problem of unreasonable resource quotas in Kubernetes cluster resource scheduling strategies is solved, achieving stable worker node load and efficient resource utilization.

CN115658287BActive Publication Date: 2025-12-12SHANGHAI ZHANGMEN TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211122386.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-15
Publication Date
2025-12-12
Estimated Expiration
2042-09-15

AI Technical Summary

Technical Problem

Existing Kubernetes cluster resource scheduling strategies cannot be dynamically adjusted based on load conditions over a future period, resulting in unreasonable resource quotas and causing service instability or resource waste.

Method used

By predicting the computing resource load values ​​of running units and worker nodes through a predictive load model, intelligent scheduling is performed based on load information to ensure stable worker node load and effective resource utilization.

Benefits of technology

This reduces the load fluctuations on worker nodes, avoids the impact of computing resource contention on service stability, and improves resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115658287B_ABST
    Figure CN115658287B_ABST
Patent Text Reader

Abstract

The purpose of the present application is to provide a method, device, medium and program product for scheduling running units, comprising: in response to a scheduling request for a running unit in a cluster, obtaining first predicted load values of each computing resource of the running unit in one or more time periods from a current time to a future target time, and second predicted load values of the each computing resource of at least one worker node in the cluster in the one or more time periods; determining resource load status information corresponding to each worker node according to the first predicted load values and the second predicted load values; and scheduling the running unit according to the resource load status information. The present application can make the load fluctuation of the worker node lower, and effectively avoid the occupation of computing resources on the worker node by different services due to severe fluctuation, thereby affecting the stability of the service.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of communication, and in particular to a technology for scheduling running units. BACKGROUND

[0002] In the prior art, the resource scheduling strategy of the Kubernetes cluster cannot fully meet the actual business use scenarios. First, it can only perform static resource quota when the container is initially deployed, and does not objectively consider the load of the application in the future period of time. If the resource quota is too low, the service cannot be stably run, and if the resource quota is too high, the server utilization is low. In addition, the scheduling strategy does not comprehensively consider whether the use of various computing resources of the host in the future period of time is relatively balanced, which will increase the probability of resource fragmentation of the host and cause waste of computing resources. SUMMARY

[0003] An object of the present application is to provide a method, device, medium and program product for scheduling running units.

[0004] According to an aspect of the present application, a method for scheduling running units is provided, which comprises:

[0005] In response to a scheduling request for a running unit in a cluster, obtaining a first predicted load value corresponding to each computing resource of the running unit in one or more time periods from a current time to a future target time, and a second predicted load value corresponding to each computing resource of at least one worker node in the cluster in the one or more time periods;

[0006] According to the first predicted load value and the second predicted load value, determining resource load status information corresponding to each worker node;

[0007] According to the resource load status information, scheduling the running unit.

[0008] According to an aspect of the present application, a computer device for scheduling running units is provided, which comprises:

[0009] A first module for obtaining, in response to a scheduling request for a running unit in a cluster, a first predicted load value corresponding to each computing resource of the running unit in one or more time periods from a current time to a future target time, and a second predicted load value corresponding to each computing resource of at least one worker node in the cluster in the one or more time periods;

[0010] A second module for determining, according to the first predicted load value and the second predicted load value, resource load status information corresponding to each worker node;

[0011] a third module, configured to schedule the running unit according to the resource load status information.

[0012] According to an aspect of the present application, there is provided a computer device for scheduling a running unit, comprising a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the operation of any method as described above.

[0013] According to an aspect of the present application, there is provided a computer readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the operation of any method as described above.

[0014] According to an aspect of the present application, there is provided a computer program product comprising a computer program, which, when executed by a processor, implements the steps of any method as described above.

[0015] Compared with the prior art, in response to a scheduling request for a running unit in a cluster, the present application obtains first predicted load values of each computing resource corresponding to the running unit in one or more time periods from a current time to a future target time, and second predicted load values of the each computing resource corresponding to at least one worker node in the cluster in the one or more time periods, determines resource load status information corresponding to each worker node according to the first predicted load values and the second predicted load values, and schedules the running unit according to the resource load status information, so that the running unit is intelligently scheduled based on the load prediction results of the running unit to be scheduled and the worker nodes in the cluster in a future period of time, which can make the load fluctuation of the worker nodes lower, effectively avoid the occupation of computing resources on the worker nodes by different services due to severe fluctuation, thereby affecting the stability of the services, on the other hand, can also make the load of the worker nodes close to the expected set load upper limit, and can fully and effectively utilize the computing resources of the worker nodes. BRIEF DESCRIPTION OF DRAWINGS

[0016] Other features, objects and advantages of the present application will become more apparent from the following detailed description of non-limiting embodiments thereof, read in conjunction with the accompanying drawings:

[0017] Figure 1 a flow chart of a method for scheduling a running unit according to an embodiment of the present application is shown;

[0018] Figure 2 a system architecture diagram of a system for scheduling a running unit according to an embodiment of the present application is shown;

[0019] Figure 3FIG. 1 shows a diagram of a computer device structure for scheduling a running unit according to one embodiment of the present application;

[0020] Figure 4 FIG. 1 shows a diagram of a computer device structure for scheduling a running unit according to one embodiment of the present application;

[0021] The same or similar reference numerals in the drawings denote the same or similar components. DETAILED DESCRIPTION

[0022] The present application is further described in detail by the following embodiments.

[0023] In one typical configuration of the present application, the terminal, the device of the service network and the trusted party each comprises one or more processors (e.g., a central processing unit (CPU)), an input / output interface, a network interface and a memory.

[0024] The memory can include a non-persistent memory in a computer readable medium, a random access memory (RAM), and / or a non-volatile memory, etc., such as a read only memory (ROM) or a flash memory. The memory is an example of the computer readable medium.

[0025] Computer-readable media includes permanent and non-permanent, moveable and non- moveable media that can be implemented in any method or technology for storage of information, such as computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, without limitation, phase-change memory (PCM), programmable random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically-erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile discs (DVDs) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information for access by a computing device.

[0026] The device referred to in the present application includes, but is not limited to, a terminal, a network device, or a device formed by integrating a terminal and a network device through a network. The terminal includes, but is not limited to, any kind of mobile electronic product capable of human-computer interaction (for example, human-computer interaction through a touch panel), such as a smart phone, a tablet computer, etc. The mobile electronic product can adopt any operating system, such as an Android operating system, an iOS operating system, etc. The network device includes an electronic device capable of automatically performing numerical calculation and information processing according to a pre-set or stored instruction. The hardware of the network device includes, but is not limited to, a microprocessor, an application specific integrated circuit (ASIC), a programmable logic device (PLD), a field programmable gate array (FPGA), a digital signal processor (DSP), an embedded device, etc. The network device includes, but is not limited to, a computer, a network host, a single network server, a plurality of network servers, or a cloud formed by a plurality of servers. The cloud is formed by a large number of computers or network servers based on cloud computing. The cloud computing is a kind of distributed computing, which is a virtual supercomputer formed by a group of loosely coupled computer clusters. The network includes, but is not limited to, the Internet, a wide area network, a metropolitan area network, a local area network, a VPN network, a wireless Ad Hoc network, etc. Preferably, the device can also be a program running on the terminal, the network device, or a device formed by integrating a terminal and a network device, a network device, a touch terminal, or a device formed by integrating a touch terminal and a network device through a network.

[0027] Of course, those skilled in the art should understand that the above device is only an example, and other existing or future devices, such as devices that can be applicable to the present application, should also be included in the protection scope of the present application, and are hereby included by reference.

[0028] In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise explicitly and specifically limited.

[0029] Figure 1A method flowchart for scheduling running units according to one embodiment of the present application is shown, which includes steps S11, S12 and S13. In step S11, the computer device obtains, in response to a scheduling request for a running unit in a cluster, first predicted load values of respective computing resources of the running unit in one or more time periods from a current time to a future target time, and second predicted load values of the respective computing resources of at least one worker node in the cluster in the one or more time periods; in step S12, the computer device determines resource load status information corresponding to each worker node according to the first predicted load values and the second predicted load values; and in step S13, the computer device schedules the running unit according to the resource load status information.

[0030] In step S11, the computer device obtains, in response to a scheduling request for a running unit in a cluster, first predicted load values of respective computing resources of the running unit in one or more time periods from a current time to a future target time, and second predicted load values of the respective computing resources of at least one worker node in the cluster in the one or more time periods. In some embodiments, the computer device can be a network device, or also a user device. In some embodiments, the cluster refers to a container cluster, for example, a Kubernetes (K8S) cluster, where Kubernetes is a Google open-source container cluster management system, which is built on container technology and provides a complete set of functions such as resource scheduling, deployment and running, service discovery, scaling, etc. for containerized applications. Essentially, it can be regarded as a paas platform based on container technology. Relatively speaking, Kubernetes belongs to the upper layer of the container engine, the orchestration and scheduling layer. It can orchestrate and schedule each container of different machines to form a distributed system. Kubernetes is a new distributed architecture solution based on container technology, and is a one-stop, complete, distributed, and system development and support platform. A Kubernetes cluster is composed of a master node and multiple worker nodes (also known as host machines). These nodes can be physical computers or virtual machines, depending on the cluster. The master node controls the state of the cluster; for example, which applications are running and their corresponding container images. The master node is the source of all task assignments. It coordinates the process, and the worker node is the component that runs these applications. The worker node executes the tasks assigned by the master node. They can be virtual machines or physical computers, all running as part of a system. A Kubernetes cluster must have at least one master node and one worker node to run. In some embodiments, a running unit (Pod) is a logical component that collects one or more application containers, storage resources, dedicated IP, and other options to support container running. The Pod represents the deployment unit and atomic running unit of Kubernetes, i.e., a single running instance of an application. It is usually composed of one or more application containers that share resources and have close relationships.In some embodiments, in response to a user-initiated scheduling request for a certain running unit in the cluster, or in response to an automatically-initiated scheduling request for a certain running unit in the cluster, first predicted load values of respective computing resources of the running unit in one or more time periods from a current time to a future target time and second predicted load values of the respective computing resources of at least one worker node in the cluster in the one or more time periods are obtained, where the one or more time periods are one or more ordered time periods, a start point of a later time period is an end point of a previous time period, a time interval of each time period is the same, a start point of a first time period is the current time, an end point of a last time period is the future target time, or the one or more time periods are one or more ordered time periods, a start point of each time period is the current time, an end point of a last time period is the future target time, and a time interval of a later time period and a time interval of a previous time period have a difference of a time interval of a first time period. In some embodiments, the first predicted load values and the second predicted load values can be obtained by inputting historical load information of the respective resources of the running unit and / or basic parameter information of the running unit into a trained load prediction model to obtain the first predicted load values output by the load prediction model, and inputting historical load information of the at least one worker node in the cluster and / or basic parameter information of the at least one worker node into the load prediction model to obtain the second predicted load values output by the load prediction model, where the load prediction model is used to predict a load situation of a running unit or a worker node for respective computing resources in one or more future time periods, and here, the model type, the model structure, or the model training method of the load prediction model is not limited. In some embodiments, the computing resources include, but are not limited to, CPU, memory, and other computing resources.For example, the one or more time periods are time period T1【0,5】, time period T2【0,10】, time period T3【0,15】; the first predicted load value of the running unit for CPU at T1 is predAppCPU1, the first predicted load value of the running unit for memory at T1 is predAppMEM1, the first predicted load value of the running unit for CPU at T2 is predAppCPU2, the first predicted load value of the running unit for memory at T2 is predAppMEM2, the first predicted load value of the running unit for CPU at T3 is predAppCPU3, the first predicted load value of the running unit for memory at T3 is predAppMEM3; the set of worker nodes is N={N1, N2}; the first predicted load value of worker node N1 for CPU at T1 is predCPU11, the first predicted load value of N1 for memory at T1 is predMEM11, the first predicted load value of N1 for CPU at T2 is predCPU12, the first predicted load value of N1 for memory at T2 is predMEM12, the first predicted load value of N1 for CPU at T3 is predCPU13, the first predicted load value of N1 for memory at T3 is predMEM13; the first predicted load value of worker node N2 for CPU at T1 is predCPU21, the first predicted load value of N2 for memory at T1 is predMEM21, the first predicted load value of N2 for CPU at T2 is predCPU22, the first predicted load value of N2 for memory at T2 is predMEM22, the first predicted load value of N2 for CPU at T3 is predCPU23, the first predicted load value of N2 for memory at T3 is predMEM23. In some embodiments, at least one of the start point, the end point, the time interval of the future time period to which the predicted load value output by the load prediction model corresponds can be configured in the load prediction model.

[0031] In step S12, the computer device determines the resource load status information corresponding to each working node according to the first predicted load value and the second predicted load value. In some embodiments, the first predicted load value of each computing resource of the working node in each time period and the second predicted load value of each computing resource of the running unit in each time period can be obtained, then for each computing resource, the first predicted load value or the second predicted load value of the working node in each time period for the computing resource is averaged to obtain the average first predicted load value or the average second predicted load value of the working node for the computing resource from the current time to the future target time, then the first resource load score corresponding to the average first predicted load value and the second resource load score corresponding to the average second predicted load value are determined, which can be specifically inputting the average predicted load value into a predetermined function relationship to obtain the resource load score output by the function relationship, or a mapping relationship between a plurality of numerical intervals and resource load scores can be preset, and the resource load score mapped by the numerical interval into which the average predicted load value falls is obtained, then the first resource load score and the second resource load score are summed or averaged to obtain the target resource load score of the working node for the computing resource, then the target resource load scores of the working node for various computing resources are analyzed and summarized to obtain the resource load status information corresponding to the working node, wherein the resource load status information can also be a score information (load comprehensive score), which is used to quantify the load degree of the working node from the current time to the future target time, and the load comprehensive score is used to evaluate the advantages and disadvantages of each working node, the higher the load comprehensive score, the more stable the resource load of the working node, the lower the load comprehensive score, the more severe the resource load fluctuation of the working node, or it can also be a load degree description text information, for example, including but not limited to "load is relatively stable", "load fluctuation is relatively severe", "load utilization rate is relatively high", "load utilization rate is relatively low", etc.

[0032] In step S13, the computer device schedules the running unit according to the resource load status information. In some embodiments, the running unit can be automatically scheduled to a target working node in the at least one working node according to the resource load status information of each working node, for example, the working node with the highest load comprehensive score in the at least one working node is determined as the target working node. In some embodiments, the resource load status information of each working node can also be reported to the user, and then the user can manually select a working node as the target node in the at least one working node based on the resource load status information, and schedule the running unit to the target working node, for example, the user is presented in the order of the load comprehensive scores of the working nodes from high to low. Based on the load prediction results of the running unit to be scheduled and the working nodes in the cluster within a future period of time, the present application intelligently schedules the running unit, which can make the load fluctuation of the working nodes lower, effectively avoid the occupation of the computing resources on the working nodes by different services due to the severe fluctuation, thereby affecting the stability of the services, on the other hand, can also make the load of the working nodes close to the expected load upper limit, and can fully and effectively utilize the computing resources of the working nodes.

[0033] In some embodiments, the one or more time periods are one or more ordered time periods, the start point of a subsequent time period is the end point of a previous time period, and the time interval of each time period is the same. In some embodiments, the start point of the first time period is the current time, the end point of the previous time period is the start point of the subsequent time period, and the end point of the last time period is the future target time. For example, the current time is 0, the future target time is T, and the time interval of each time period is 5 minutes. The one or more time periods include time period T1【0, 5】, time period T2【5, 10】, time period T3【10, 15】…time period Ti

T-5, T

[0034] In some embodiments, the one or more time periods are one or more ordered time periods, the start point of each time period is the current time, and the time interval of a subsequent time period is twice the time interval of a previous time period. In some embodiments, the time interval of a subsequent time period is twice the time interval of a previous time period, that is, the difference between the end point of a subsequent time period and the end point of a previous time period is the time interval of the first time period, and the time interval of the last time period is equal to the time interval between the current time and the future target time. For example, the current time is 0, the future target time is T, and the time interval of the first time period is 5 minutes. The one or more time periods include time period T1【0, 5】, time period T2【0, 10】, time period T3【0, 15】…time period Ti【0, T】.

[0035] In some embodiments, the method further comprises: screening, by the computer device, one or more worker nodes in the cluster according to the resource requirement information of the running unit to obtain at least one worker node satisfying the running condition corresponding to the resource requirement information. In some embodiments, the one or more worker nodes in the cluster are first screened according to the resource requirement information of the running unit to obtain at least one worker node satisfying the running condition corresponding to the resource requirement information.

[0036] In some embodiments, the step S12 comprises: determining, by the computer device, for each worker node, a scheduled post-prediction load value of each computing resource of the worker node in the one or more time periods according to the first prediction load value and the second prediction load value; and determining resource load status information corresponding to the each worker node according to the scheduled post-prediction load value. In some embodiments, for each worker node, a scheduled post-prediction load value of each computing resource of the worker node in each time period can be obtained according to the first prediction load value of each computing resource of the worker node in each time period and the second prediction load value of each computing resource of the running unit in each time period, for example, the first prediction load value of CPU of the worker node N1 in the T1 time period is predCPU11, and the second prediction load value of CPU of the running unit in the T1 time period is predAppCPU1, then the scheduled post-prediction load value of CPU of the worker node in the T1 time period can be the sum predCPU11+predAppCPU1 of the two values, or the average (predCPU11+predAppCPU1) / 2 of the two values. In some embodiments, for each computing resource, the scheduled post-prediction load values of the worker node in each time period for the computing resource are averaged to obtain an average scheduled post-prediction load value of the worker node for the computing resource from the current time to the future target time, and then the resource load score of the worker node for the computing resource is determined according to the numerical value of the average scheduled post-prediction load value, and then the resource load scores of the worker node for each computing resource are analyzed and summarized to obtain the resource load status information corresponding to the worker node.

[0037] In some embodiments, the determining, for each worker node, a post-scheduling predicted load value of each computing resource of the worker node in the one or more time periods according to the first predicted load value and the second predicted load value comprises: for each worker node, taking a sum of the first predicted load value and the second predicted load value as the post-scheduling predicted load value of each computing resource of the worker node in the one or more time periods. For example, the first predicted load value of worker node N1 for CPU in time period T1 is predCPU11, and the second predicted load value of the running unit for CPU in time period T1 is predAppCPU1, and then the post-scheduling predicted load value of worker node N1 for CPU in time period T1 can be predCPU11+predAppCPU1.

[0038] In some embodiments, the determining, for each worker node, a post-scheduling predicted load value of each computing resource of the worker node in the one or more time periods according to the first predicted load value and the second predicted load value comprises: for each worker node, taking a sum of the first predicted load value and the second predicted load value as the post-scheduling predicted load value of each computing resource of the worker node in the one or more time periods. For example, the first predicted load value of worker node N1 for CPU in time period T1 is predCPU11, and the second predicted load value of the running unit for CPU in time period T1 is predAppCPU1, and then the post-scheduling predicted load value of worker node N1 for CPU in time period T1 can be predCPU11+predAppCPU1.

[0039] In some embodiments, the determining, for each of the worker nodes, a load deviation of the worker node from the current time to the future target time for each of the computing resources according to the scheduled predicted load value and the load upper limit value of the worker node for each of the computing resources comprises: determining, for each of the worker nodes, a load deviation of the worker node from the current time to the future target time for each of the computing resources according to a variance value of the scheduled predicted load value compared to the load upper limit value of the worker node for each of the computing resources. In some embodiments, for each of the computing resources, the load deviation of the worker node for the computing resource is determined by averaging (i.e., variance value) the square of the difference between the scheduled predicted load value of the worker node for the computing resource in each time period and the load upper limit value of the computing resource, i.e., the square of the difference between the scheduled predicted load value of the worker node for the computing resource in each time period and the load upper limit value of the computing resource is summed and then divided by the number of the one or more time periods.

[0040] In some embodiments, for each of the worker nodes, the resource load status information of the worker node is inversely proportional to the load deviation of the worker node. In some embodiments, the resource load status information of the worker node is inversely proportional to the load deviation value of the worker node for each of the computing resources, and the smaller the load deviation value is, the more stable the load of the worker node for each of the computing resources is, and the larger the load deviation value is, the more volatile the load of the worker node for each of the computing resources is. In some embodiments, if the resource load status information is a score information (load comprehensive score), the load comprehensive score is inversely proportional to the load deviation value of the worker node for each of the computing resources, and the smaller the load deviation value is, the higher the load comprehensive score is, and the more stable the resource load of the worker node is, and the larger the load deviation value is, the lower the load comprehensive score is, and the more volatile the resource load of the worker node is.

[0041] In some embodiments, the determining, according to the load deviation of each worker node, of resource load status information corresponding to the worker node comprises: taking, as a load comprehensive score of the worker node, a product of a predetermined coefficient and a result value obtained by sequentially subtracting 1 from the load deviation of the worker node; and determining, according to the load comprehensive score of each worker node, the resource load status information corresponding to the worker node. In some embodiments, according to experience, the maximum CPU and memory load utilization of a work unit is 100%, and therefore the load deviation value of each computing resource ranges between 0 and 0.36. Based on this, the calculation formula of the load comprehensive score of a worker node can be defined as varScore = 10*(1-varCPU-varMEM), where varScore is the load comprehensive score of a worker node, which ranges between 0 and 10, varCPU is the load deviation value of the worker node for CPU, varMEM is the load deviation value of the worker node for memory, and 10 is a predetermined coefficient. In some embodiments, for each worker node, the load comprehensive score of the worker node can be directly taken as the resource load status information corresponding to the worker node, or a mapping relationship between multiple score intervals and load degree description text information can be preset, and the load degree description text information mapped by the score interval in which the load comprehensive score of the worker node falls can be obtained, and the load degree description text information is taken as the resource load status information corresponding to the worker node.

[0042] In some embodiments, the step S13 comprises: the computer device scheduling the running unit to a target worker node in the at least one worker node according to the resource load status information. In some embodiments, the running unit can be automatically scheduled to a target worker node in the at least one worker node according to the resource load status information of each worker node, for example, the worker node corresponding to the highest load comprehensive score in the at least one worker node is automatically determined as the target worker node.

[0043] In some embodiments, the step S13 comprises: the computer device providing the resource load status information to a user; and scheduling the running unit to a target worker node selected by the user in the at least one worker node based on the resource load status information. In some embodiments, the resource load status information of each worker node can also be reported to the user, and then the user can manually select a target worker node in the at least one worker node based on the resource load status information, and schedule the running unit to the target worker node.

[0044] Figure 2A system architecture diagram for scheduling running units is shown according to one embodiment of the present application.

[0045] As shown in Figure 2 The monitoring module collects basic information such as IP and host name and computing resource information such as CPU and memory on each worker node in the cluster, which will be used for information retrieval and scheduling decision when scheduling. After receiving a scheduling request, the pre-selection algorithm module filters the worker nodes in the cluster according to the resource requirements of the running unit (Pod) to obtain a candidate worker node list that meets the running conditions of the running unit, which will be used for further filtering by the optimization algorithm. After obtaining the candidate worker node list filtered by the pre-selection algorithm module, the optimization algorithm module further scores each worker node according to the prediction information provided by the load prediction module, and finally returns the scheduling result after arranging the priority of each worker node according to the score. The resource object management module is responsible for receiving and processing requests initiated by external users, and interacting with the scheduling module in real time to feed back the result to the user. At the same time, the resource object management module is also responsible for storing the information reported by the monitoring module into the database for information retrieval and display.

[0046] Figure 3 A computer device structure diagram for scheduling running units is shown according to one embodiment of the present application. The device includes a first module 11, a second module 12 and a third module 13. The first module 11 is configured to, in response to a scheduling request for a running unit in a cluster, obtain first predicted load values of each computing resource of the running unit in one or more time periods from a current time to a future target time, and second predicted load values of the each computing resource of at least one worker node in the cluster in the one or more time periods. The second module 12 is configured to determine resource load status information corresponding to each worker node according to the first predicted load values and the second predicted load values. The third module 13 is configured to schedule the running unit according to the resource load status information.

[0047] The first module 11 is configured to obtain, in response to a scheduling request for a running unit in a cluster, first predicted load values of respective computing resources of the running unit in one or more time periods from a current time to a future target time, and second predicted load values of the respective computing resources of at least one worker node in the cluster in the one or more time periods. In some embodiments, the computer device can be a network device, or also a user device. In some embodiments, the cluster refers to a container cluster, for example, a Kubernetes (K8S) cluster, where Kubernetes is an open source container cluster management system built on container technology, which provides a complete set of functions such as resource scheduling, deployment and running, service discovery, expansion and contraction, etc. for containerized applications, and can be regarded as a paas platform based on container technology. In comparison, Kubernetes belongs to the upper layer of the container engine, the arrangement and scheduling layer, which can arrange and schedule each container of different machines to form a distributed system. Kubernetes is a new distributed architecture solution based on container technology, and is a one-stop, complete, distributed, system development and support platform. A Kubernetes cluster is composed of a master node and multiple worker nodes (also known as host machines), which can be physical computers or virtual machines, depending on the cluster. The master node controls the state of the cluster; for example, which applications are running and their corresponding container images. The master node is the source of all task assignments, which coordinates the process. The worker node is a component that runs these applications. The worker node executes the tasks assigned by the master node. They can be virtual machines or physical computers, all of which run as part of a system. A Kubernetes cluster must have at least one master node and one worker node to run. In some embodiments, a running unit (Pod) is a logical component that collects one or more application containers, storage resources, dedicated IP, and other options to support container operation. The Pod represents the deployment unit and atomic running unit of Kubernetes, i.e. a single running instance of an application. It is usually composed of one or more application containers that share resources and have close relationships.In some embodiments, in response to a user-initiated scheduling request for a certain running unit in the cluster, or in response to an automatically-initiated scheduling request for a certain running unit in the cluster, first predicted load values of respective computing resources of the running unit in one or more time periods from a current time to a future target time and second predicted load values of the respective computing resources of at least one worker node in the cluster in the one or more time periods are obtained, where the one or more time periods are one or more ordered time periods, a start point of a later time period is an end point of a previous time period, a time interval of each time period is the same, a start point of a first time period is the current time, an end point of a last time period is the future target time, or the one or more time periods are one or more ordered time periods, a start point of each time period is the current time, an end point of a last time period is the future target time, and a time interval of a later time period and a time interval of a previous time period have a difference of a time interval of a first time period. In some embodiments, the first predicted load values and the second predicted load values can be obtained by inputting historical load information of the respective resources of the running unit and / or basic parameter information of the running unit into a trained load prediction model to obtain the first predicted load values output by the load prediction model, and inputting historical load information of the at least one worker node in the cluster and / or basic parameter information of the at least one worker node into the load prediction model to obtain the second predicted load values output by the load prediction model, where the load prediction model is used to predict a load situation of a running unit or a worker node for respective computing resources in one or more future time periods, and here, the model type, the model structure, or the model training method of the load prediction model is not limited. In some embodiments, the computing resources include, but are not limited to, CPU, memory, and other computing resources.For example, the one or more time periods are time period T1【0,5】, time period T2【0,10】, time period T3【0,15】; the first predicted load value of the running unit for CPU at T1 is predAppCPU1, the first predicted load value of the running unit for memory at T1 is predAppMEM1, the first predicted load value of the running unit for CPU at T2 is predAppCPU2, the first predicted load value of the running unit for memory at T2 is predAppMEM2, the first predicted load value of the running unit for CPU at T3 is predAppCPU3, the first predicted load value of the running unit for memory at T3 is predAppMEM3; the set of worker nodes is N={N1, N2}; the first predicted load value of worker node N1 for CPU at T1 is predCPU11, the first predicted load value of N1 for memory at T1 is predMEM11, the first predicted load value of N1 for CPU at T2 is predCPU12, the first predicted load value of N1 for memory at T2 is predMEM12, the first predicted load value of N1 for CPU at T3 is predCPU13, the first predicted load value of N1 for memory at T3 is predMEM13; the first predicted load value of worker node N2 for CPU at T1 is predCPU21, the first predicted load value of N2 for memory at T1 is predMEM21, the first predicted load value of N2 for CPU at T2 is predCPU22, the first predicted load value of N2 for memory at T2 is predMEM22, the first predicted load value of N2 for CPU at T3 is predCPU23, the first predicted load value of N2 for memory at T3 is predMEM23. In some embodiments, at least one of the start point, the end point, the time interval of the future time period to which the predicted load value output by the load prediction model corresponds can be configured in the load prediction model.

[0048] a second module 12 configured to determine resource load status information corresponding to each working node according to the first predicted load value and the second predicted load value. In some embodiments, the resource load status information corresponding to each working node can be determined according to the first predicted load value of each working node for each computing resource in each time period and the second predicted load value of each working node for each computing resource in each time period. For each computing resource, the first predicted load value or the second predicted load value of each working node for the computing resource in each time period is averaged to obtain an average first predicted load value or an average second predicted load value of each working node for the computing resource from the current time to the target future time. Then, a first resource load score corresponding to the average first predicted load value and a second resource load score corresponding to the average second predicted load value are determined. The first resource load score and the second resource load score can be determined in the following manners. One manner is to input the average predicted load value into a predetermined function relationship to obtain a resource load score output by the function relationship. Another manner is to pre-set a mapping relationship between a plurality of numerical intervals and resource load scores, and obtain a resource load score mapped by a numerical interval into which the average predicted load value falls. The first resource load score and the second resource load score are summed or averaged to obtain a target resource load score of each working node for the computing resource. The target resource load scores of each working node for each computing resource are analyzed and summarized to obtain the resource load status information corresponding to each working node. The resource load status information can also be a score information (load comprehensive score) for quantifying the load degree of each working node from the current time to the target future time. The load comprehensive score is used to evaluate the pros and cons of each working node. The higher the load comprehensive score is, the more stable the resource load of the working node is. The lower the load comprehensive score is, the more severe the resource load fluctuation of the working node is. Alternatively, the resource load status information can also be a load degree description text information, for example, including but not limited to "load is relatively stable", "load fluctuation is relatively severe", "load utilization rate is relatively high", "load utilization rate is relatively low", etc.

[0049] A third module 13 is configured to schedule the running unit according to the resource load status information. In some embodiments, the running unit can be automatically scheduled to a target working node in the at least one working node according to the resource load status information of each working node, for example, the working node with the highest load comprehensive score in the at least one working node is determined as the target working node. In some embodiments, the resource load status information of each working node can also be reported to the user, and then the user can manually select a working node as the target node in the at least one working node based on the resource load status information, and schedule the running unit to the target working node, for example, the user is presented in the order of the load comprehensive scores of the working nodes from high to low. Based on the load prediction results of the running unit to be scheduled and the working nodes in the cluster within a future period of time, the application intelligently schedules the running unit, which can make the load fluctuation of the working nodes lower, effectively avoid the occupation of the computing resources on the working nodes by different services due to the severe fluctuation, thereby affecting the stability of the services, on the other hand, can also make the load of the working nodes close to the expected load upper limit, and can fully and effectively utilize the computing resources of the working nodes.

[0050] In some embodiments, the one or more time periods are one or more ordered time periods, the start of a later time period is the end of a previous time period, and the time interval of each time period is the same. Here, the related operations are the same as or similar to those of the embodiments shown in Figure 1 and will not be described here, which are hereby incorporated by reference.

[0051] In some embodiments, the one or more time periods are one or more ordered time periods, and the start of each time period is the current time. The difference between the time interval of a later time period and the time interval of a previous time period is the time interval of the first time period. Here, the related operations are the same as or similar to those of the embodiments shown in Figure 1 and will not be described here, which are hereby incorporated by reference.

[0052] In some embodiments, the device is further configured to: according to the resource requirement information of the running unit, screen one or more working nodes in the cluster to obtain at least one working node that meets the running condition corresponding to the resource requirement information. Here, the related operations are the same as or similar to those of the embodiments shown in Figure 1 and will not be described here, which are hereby incorporated by reference.

[0053] In some embodiments, the one or more modules 12 are configured to: for each worker node, determine, according to the first predicted load value and the second predicted load value, a post-scheduling predicted load value of each computing resource of the worker node in the one or more time periods; and determine, according to the post-scheduling predicted load value, resource load status information corresponding to the worker node. In this regard, the relevant operations are the same as or similar to those of the embodiments shown in Figure 1 and will not be described herein again by way of reference.

[0054] In some embodiments, the determining, for each worker node, a post-scheduling predicted load value of each computing resource of the worker node in the one or more time periods according to the first predicted load value and the second predicted load value comprises: for each worker node, taking a sum of the first predicted load value and the second predicted load value as the post-scheduling predicted load value of each computing resource of the worker node in the one or more time periods. In this regard, the relevant operations are the same as or similar to those of the embodiments shown in Figure 1 and will not be described herein again by way of reference.

[0055] In some embodiments, the determining, according to the post-scheduling predicted load value, resource load status information corresponding to each worker node comprises: determining, according to the post-scheduling predicted load value and a load upper limit value of each computing resource of the worker node, a load deviation degree of the worker node for the computing resource from the current time to the future target time; and determining, according to the load deviation degree of each worker node, resource load status information corresponding to the worker node. In this regard, the relevant operations are the same as or similar to those of the embodiments shown in Figure 1 and will not be described herein again by way of reference.

[0056] In some embodiments, the determining, according to the post-scheduling predicted load value and a load upper limit value of each computing resource of the worker node, a load deviation degree of the worker node for the computing resource from the current time to the future target time comprises: determining, according to a variance value of the post-scheduling predicted load value compared to the load upper limit value of each computing resource of the worker node, the load deviation degree of the worker node for the computing resource from the current time to the future target time. In this regard, the relevant operations are the same as or similar to those of the embodiments shown in Figure 1 and will not be described herein again by way of reference.

[0057] In some embodiments, for each worker node, the resource load status information corresponding to the worker node is inversely proportional to the load deviation degree of the worker node. In this regard, the relevant operations are the same as or similar to those of the embodiments shown in Figure 1The embodiments shown are the same or similar, and thus will not be described again, and are hereby incorporated by reference.

[0058] In some embodiments, the determining, according to the load deviation degree of each working node, the resource load status information corresponding to the working node, comprises: taking a product of a result value obtained by sequentially subtracting 1 from the load deviation degree of each working node and a predetermined coefficient as a load comprehensive score of the working node; and determining, according to the load comprehensive score of each working node, the resource load status information corresponding to the working node. Here, the related operations are the same as those in the above embodiments, and thus will not be described again, and are hereby incorporated by reference. Figure 1 The embodiments shown are the same or similar, and thus will not be described again, and are hereby incorporated by reference.

[0059] In some embodiments, the third module 13 is configured to: schedule the running unit to a target working node in the at least one working node according to the resource load status information. Here, the related operations are the same as those in the above embodiments, and thus will not be described again, and are hereby incorporated by reference. Figure 1 The embodiments shown are the same or similar, and thus will not be described again, and are hereby incorporated by reference.

[0060] In some embodiments, the third module is configured to: provide the resource load status information to a user; and schedule the running unit to a target working node in the at least one working node in response to the user selecting the target working node based on the resource load status information. Here, the related operations are the same as those in the above embodiments, and thus will not be described again, and are hereby incorporated by reference. Figure 4 The embodiments shown are the same or similar, and thus will not be described again, and are hereby incorporated by reference.

[0061] In addition to the methods and devices described in the above embodiments, the present application also provides a computer readable storage medium, which stores computer code, and when the computer code is executed, the method described in any one of the above embodiments is executed.

[0062] The present application also provides a computer program product, and when the computer program product is executed by a computer device, the method described in any one of the above embodiments is executed.

[0063] The present application also provides a computer device, which comprises:

[0064] one or more processors;

[0065] a memory for storing one or more computer programs;

[0066] When the one or more computer programs are executed by the one or more processors, the one or more processors implement the method described in any one of the above embodiments.

[0067] Figure 4An example system that can be used to implement various embodiments described in this application is shown;

[0068] As ​ shown, in some embodiments, system 300 can function as any of the devices in the various embodiments described. In some embodiments, system 300 can include one or more computer-readable media (e.g., system memory or NVM / storage 320) having instructions and one or more processors (e.g., processor(s) 305) coupled with the one or more computer-readable media and configured to execute the instructions to implement modules to perform the actions described in this application.

[0069] For one embodiment, system control module 310 can include any suitable interface controllers to provide for any suitable interface to at least one of processor(s) 305 and / or any suitable device or component in communication with system control module 310.

[0070] System control module 310 can include a memory controller module 330 to provide an interface to system memory 315. Memory controller module 330 can be a hardware module, a software module, and / or a firmware module.

[0071] System memory 315 can be used, for example, to load and store data and / or instructions for system 300. For one embodiment, system memory 315 can include any suitable volatile memory, such as suitable DRAM. In some embodiments, system memory 315 can include double data rate type four synchronous dynamic random access memory (DDR4 SDRAM).

[0072] For one embodiment, system control module 310 can include one or more input / output (I / O) controllers to provide an interface to NVM / storage 320 and communication interface(s) 325.

[0073] For example, NVM / storage 320 can be used to store data and / or instructions. NVM / storage 320 can include any suitable non-volatile memory (e.g., flash memory) and / or can include any suitable non-volatile storage device(s) (e.g., one or more hard disk drives (HDDs), one or more compact disk (CD) drives, and / or one or more digital versatile disk (DVD) drives).

[0074] NVM / storage 320 can include a storage resource that is physically part of the device on which system 300 is installed, or that is accessed via the device but not physically part of the device such as, for example, a network-accessible storage resource. For example, NVM / storage 320 can be accessed over a network via communication interface(s) 325.

[0075] The communication interface(s) 325 can provide an interface for system 300 to communicate with one or more networks and / or any other suitable devices. System 300 can communicate wirelessly with one or more components of a wireless network in accordance with any of one or more wireless network standards and / or protocols.

[0076] For one embodiment, at least one of the processor(s) 305 can be packaged together with logic of one or more controllers of the system control module 310 (e.g., the memory controller module 330). For one embodiment, at least one of the processor(s) 305 can be packaged together with logic of one or more controllers of the system control module 310 to form a system in a package (SiP). For one embodiment, at least one of the processor(s) 305 can be integrated on the same die with logic of one or more controllers of the system control module 310. For one embodiment, at least one of the processor(s) 305 can be integrated on the same die with logic of one or more controllers of the system control module 310 to form a system on a chip (SoC).

[0077] In various embodiments, system 300 can be, but is not limited to, a server, a workstation, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet, a netbook, etc.). In various embodiments, system 300 can have more or less components, and / or different architectures. For example, in some embodiments, system 300 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including touch screen displays), non- volatile memory port, multiple antennas, a graphics chip, an application specific integrated circuit (ASIC), and speakers.

[0078] It is noted that the present application can be implemented in software and / or in a combination of software and hardware, e.g., application specific integrated circuits (ASIC), general purpose computers, or any other similar hardware devices. In one embodiment, software routines of the present application are executed by a processor to perform the steps or functions described herein. As such, the software routines (and / or associated data structures) of the present application can be stored on a computer readable record medium, e.g., RAM memory, magnetic or optical drive or diskette, and the like. Further, some of the steps or functions can be implemented in hardware, e.g., as circuitry that is dedicated to performing one or more of the steps or functions described herein in conjunction with the processor.

[0079] In addition, part of the present application can be applied as a computer program product, for example, computer program instructions, when executed by a computer, through the operation of the computer, the method and / or technical solutions according to the present application can be called or provided. Those skilled in the art should understand that the form of computer program instructions in computer readable medium includes but is not limited to source file, executable file, installation package file and the like, and accordingly, the way of computer program instructions executed by computer includes but is not limited to: the computer directly executes the instructions, or the computer compiles the instructions and then executes the corresponding compiled program, or the computer reads and executes the instructions, or the computer reads and installs the instructions and then executes the corresponding installed program. Here, the computer readable medium can be any available computer readable storage medium or communication medium accessible to the computer.

[0080] Communication media includes any medium through which computer readable instructions, data structures, program modules, or other data is communicated from one system to another, e.g., according to the present application. Communication media can include wired media such as a wired network or direct-wired connection carrying one or more data signals, and wireless media such as acoustic, electromagnetic, RF, microwave, and infrared, capable of propagating energy patterns including multiple frequencies. Computer readable instructions, data structures, program modules, or other data can be embodied as modulated data signals, e.g., carrier waves, such as those implemented as part of an extended spectrum technique. The term "modulated data signal" refers to a signal that has one or more of its characteristics changed or set in a manner to encode information in the signal. The modulation can be analog, digital, or a combination of the two.

[0081] By way of example, and not limitation, computer readable storage media can include volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. For example, computer readable storage media includes, but is not limited to, random access memory (RAM), such as dynamic RAM (DRAM), static RAM (SRAM), and / or non-volatile memory, such as read only memory (ROM), programmable ROM (PROM), erasable programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), flash memory, magnetic and / or optical disks, other magnetic media, and / or optical storage. The computer readable storage media can also include, but is not limited to, any other medium that can be used to store computer readable instructions, data structures, program modules or other data, which can be accessed by a computer system.

[0082] Here, according to one embodiment of the present application includes a device, the device includes a memory for storing computer program instructions and a processor for executing program instructions, wherein when the computer program instructions are executed by the processor, the device is triggered to run the method and / or technical solutions based on the foregoing according to the plurality of embodiments of the present application.

[0083] It will be obvious to a person skilled in the art that the application is not limited to the details of the above-described exemplary embodiments, but that the application can be implemented in other embodiments without departing from the scope of the application. The application is therefore not limited to the details of the above-described exemplary embodiments, but can be implemented in other specific forms without departing from the essential characteristics of the application. The embodiments should therefore be considered in all respects as illustrative and not restrictive, the scope of the application being defined by the appended claims rather than by the above description, and all changes which come within the meaning and range of equivalents of the claims are therefore intended to be embraced therein. Any reference signs in the claims should not be construed as limiting the claims concerned. The word "comprising" does not exclude other elements or steps not mentioned in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. Multiple elements can be provided by a single element provided that it functions in the same way. The expression "at least one of A and B" should be understood as used in the claims to mean that "at least one of A or B" and "A and B".

Claims

1. A method for scheduling a run unit, wherein, The method comprises: obtaining, in response to a scheduling request for a running unit in a cluster, first predicted load values of respective computing resources of the running unit in one or more time periods from a current time to a future target time, and second predicted load values of the respective computing resources of at least one worker node in the cluster in the one or more time periods; for each worker node, determining, according to the first predicted load values and the second predicted load values, post-scheduling predicted load values of the respective computing resources of the worker node in the one or more time periods; determining, according to the post-scheduling predicted load values and load upper limit values of the respective computing resources of each worker node, load deviation degrees of the respective computing resources of the worker node from the current time to the future target time; determining, according to the load deviation degrees of each worker node, resource load status information corresponding to the worker node; scheduling the running unit according to the resource load status information.

2. The method of claim 1, wherein, The one or more time periods are one or more ordered time periods, and the start point of a later time period is the end point of a former time period, and the time interval of each time period is the same.

3. The method of claim 1, wherein, The one or more time periods are one or more ordered time periods, and the start point of each time period is the current time, and the time interval of a later time period is different from the time interval of a former time period, and the time interval of the first time period is the difference between the time interval of the first time period and the time interval of the last time period.

4. The method of claim 1, wherein, The method further comprises: screening one or more worker nodes in the cluster according to resource requirement information of the running unit to obtain at least one worker node satisfying a running condition corresponding to the resource requirement information.

5. The method of claim 1, wherein, For each worker node, the post-scheduling predicted load values of the respective computing resources of the worker node in the one or more time periods are determined according to the first predicted load values and the second predicted load values. For each worker node, the sum of the first predicted load values and the second predicted load values is taken as the post-scheduling predicted load values of the respective computing resources of the worker node in the one or more time periods.

6. The method of claim 1, wherein, The load deviation degrees of the respective computing resources of each worker node from the current time to the future target time are determined according to the variance of the post-scheduling predicted load values compared with the load upper limit values of the respective computing resources of the worker node. For each worker node, the resource load status information corresponding to the worker node is inversely proportional to the load deviation degree of the worker node.

7. The method of claim 6, wherein, The resource load status information corresponding to each worker node is determined according to the load deviation degree of the worker node.

8. The method of claim 6, wherein, ​ for each of the worker nodes, subtracting, as a load comprehensive score of the worker node, a product of a result value obtained by sequentially subtracting 1 from a load deviation degree of the worker node with respect to each of the computing resources and a predetermined coefficient; determining, according to the load comprehensive score of each of the worker nodes, resource load status information corresponding to the worker node.

9. The method of claim 1, wherein, the scheduling of the running unit according to the resource load status information comprises: scheduling the running unit to a target worker node in the at least one worker node according to the resource load status information.

10. The method of claim 1, wherein, the scheduling of the running unit according to the resource load status information comprises: providing the resource load status information to a user; scheduling the running unit to a target worker node selected by the user from the at least one worker node based on the resource load status information.

11. A computer device for scheduling a running unit, comprising a memory, a processor and a computer program stored on the memory, characterized in that, the processor executes the computer program to implement the steps of the method according to any one of claims 1 to 10.

12. A computer readable storage medium having stored thereon computer programs / instructions, characterized in that, the computer program / instruction is executed by the processor to implement the steps of the method according to any one of claims 1 to 10.

13. A computer program product comprising a computer program, characterized in that, the computer program is executed by the processor to implement the steps of the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • A dynamic scheduling method and device for a container cluster management system

    CN109710376A