Scheduling method and device for container cluster management system

By using ARIMA and BP neural network prediction models in the container cluster management system, container resources are adjusted in advance, which solves the problems of failures and low resource utilization caused by insufficient resources, and improves system performance and response speed.

CN114296872BActive Publication Date: 2024-10-22CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111589860.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-23
Publication Date
2024-10-22
Estimated Expiration
2041-12-23

AI Technical Summary

Technical Problem

When the existing container cluster management system is insufficient in resources, it is easy to cause untimely fault response, slow business access, or even downtime. The resource utilization rate is low, and manual participation in decision-making is required to complete resource scheduling, resulting in delayed response.

Method used

Use prediction models (ARIMA and BP neural network) based on historical data to predict container resource needs, schedule resources in advance at the start time of the future cycle, integrate prediction data through model weights, determine resource upper and lower limit indicator values, automatically adjust resource allocation, and optimize Resource utilization.

Benefits of technology

It reduces the frequency of faults, improves application performance and resource utilization, enables more accurate resource scheduling, and reduces the need for manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114296872B_ABST
    Figure CN114296872B_ABST
Patent Text Reader

Abstract

The present disclosure relates to scheduling and devices for container cluster management systems, and computer storable media, and to the field of computer technology. The scheduling method for a container cluster management system includes: obtaining historical data of resources of multiple containers in the container cluster management system in a historical period; predicting predicted data of resources of each container in a future period based on the historical data of resources of each container; for each container, scheduling resources for each container at the start time of the future period based on the corresponding predicted data. According to the present disclosure, the frequency of failures can be reduced, and application performance and resource utilization can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a scheduling method and device for a container cluster management system, and a computer storable medium. Background Art

[0002] The container cluster management system is used to manage containerized applications on multiple hosts in the cloud platform.

[0003] In the related art, when the resources of a container are insufficient, an alarm message is issued, and maintenance personnel manually participate in decision-making to complete the resource scheduling of the container based on the alarm message. Summary of the invention

[0004] In the related technology, the post-event alarm mechanism is used, which is prone to problems such as untimely fault response, slow business access, and even downtime, resulting in low resource utilization.

[0005] In view of the above technical problems, the present disclosure proposes a solution that can reduce the frequency of failures and improve application performance and resource utilization.

[0006] According to a first aspect of the present disclosure, a scheduling method for a container cluster management system is provided, comprising: obtaining historical data of resources of multiple containers in the container cluster management system within a historical period; predicting predicted data of the resources of each container within a future period based on the historical data of the resources of each container; and for each container, scheduling resources for each container at a start time of the future period based on the corresponding predicted data.

[0007] In some embodiments, based on the historical data of the resources of each container, predicting the prediction data of the resources of each container in a future period includes: inputting the historical data of the resources of each container into a first prediction model and a second prediction model, respectively, to obtain first data and second data; and determining the prediction data corresponding to each container based on the first data and the second data.

[0008] In some embodiments, determining the predicted data corresponding to each container based on the first data and the second data includes: determining the model weights of the first prediction model and the second prediction model; using the model weights of the first prediction model and the second prediction model, fusing the first data and the second data to obtain the predicted data corresponding to each container.

[0009] In some embodiments, determining the model weights of the first prediction model and the second prediction model includes: determining the model weights of the first prediction model and the second prediction model based on the sum of squared errors of the first prediction model and the sum of squared errors of the second prediction model.

[0010] In some embodiments, determining the model weights of the first prediction model and the second prediction model based on the sum of squared errors of the first prediction model and the sum of squared errors of the second prediction model includes: calculating the sum of the sum of squared errors of the first prediction model and the sum of squared errors of the second prediction model; determining the ratio of the sum of squared errors of the first prediction model to the sum as the model weight of the first prediction model; and determining the ratio of the sum of squared errors of the second prediction model to the sum as the model weight of the second prediction model.

[0011] In some embodiments, using the model weights of the first prediction model and the second prediction model to fuse the first data and the second data to obtain the prediction data corresponding to each container includes: using the model weights of the first prediction model and the second prediction model to perform weighted processing on the first data and the second data to obtain the prediction data corresponding to each container.

[0012] In some embodiments, the first prediction model is a differential integrated moving average autoregressive ARIMA model, and the second prediction model is a feedforward BP neural network model.

[0013] In some embodiments, the prediction data corresponding to each container includes the prediction index value of each resource of each container at each time in the future period. For each container, according to the corresponding prediction data, resource scheduling of each container at the start time of the future period includes: determining the upper limit index value and the lower limit index value of each resource of each container; for each resource of each container, if the prediction index value at each time exceeds the upper limit index value, increasing each resource of each container; for each resource of each container, if the prediction index value at each time exists or is lower than the lower limit index value, recycling each resource of each container.

[0014] In some embodiments, increasing each resource of each container includes: determining the difference between the average value of the predicted index value of each resource of each container in the future period and the corresponding upper limit index value, which is the resource increase amount of each resource of each container; and increasing each resource of each container according to the resource increase amount of each resource of each container.

[0015] In some embodiments, recycling each resource of each container includes: obtaining the expected resource quantity of each resource of each container in the future period; determining the difference between the expected resource quantity of each resource of each container in the future period and the average value of the predicted index value, which is the resource recycling quantity of each resource of each container; and recycling each resource of each container according to the resource recycling quantity of each resource of each container.

[0016] In some embodiments, determining the upper limit indicator value and the lower limit indicator value of each resource of each container includes: obtaining the application amount and the maximum application limit of each resource of each container in the future period; determining the upper limit indicator value of each resource of each container according to the maximum application limit and the upper limit resource utilization; determining the lower limit indicator value of each resource of each container according to the application amount and the lower limit resource utilization.

[0017] In some embodiments, the prediction data corresponding to each container includes the prediction index value of each resource of each container at each time in the future period. For each container, according to the corresponding prediction data, resource scheduling of each container at the start time of the future period includes: for each resource of each container, determining from the various times the earliest time at which the prediction index value exceeds the upper limit index value or is lower than the lower limit index value as the critical time of each resource of each container; determining the resource scheduling priority of each resource of each container according to the critical time of each resource of the multiple containers, the resource scheduling priority being positively correlated with the corresponding critical time; for each container, determining the container scheduling priority of each container according to the resource scheduling priority of each resource corresponding to it; and scheduling resources of the multiple containers at the start time of the future period in descending order of the container scheduling priorities.

[0018] In some embodiments, each container has multiple resources. For each container, determining the container scheduling priority of each container according to the resource scheduling priority of each resource corresponding to the container includes: for each container, determining the container scheduling priority of each container according to the resource scheduling priority of each resource corresponding to the container and the resource scheduling weight of each resource, wherein the resource scheduling weight of each resource of each container is related to the resource consumption type of the application carried by each container, and the sum of the resource scheduling weights of different resources of each container is 1.

[0019] In some embodiments, the container cluster management system includes multiple nodes, each node runs one or more pods, each pod includes one or more containers, and the scheduling method further includes:

[0020] For each container, when the resources on the node where each container is located cannot meet the resource scheduling requirements of each container, in response to the pod resource allocation request for the application carried by each container, obtain the resource request amount of the application for each resource in the pod resource allocation request; use the pre-selection algorithm to preliminarily screen out nodes that meet the initial conditions from the multiple nodes as candidate nodes; when there are multiple candidate nodes, for each candidate node, determine the resource allocation amount of each candidate node according to the total amount of resources and the consumed resources of each candidate node for each resource, and the resource request amount of the application for each resource. the expected resource utilization of the candidate node for each resource, the expected resource utilization representing the expected resource utilization of each candidate node for each resource when the application is deployed to each candidate node; for each candidate node, according to the expected resource utilization of each candidate node for each resource, determining a balance score of resource utilization of different resources by each candidate node, the balance score representing the balance of resource utilization of different resources by each candidate node; determining a target node from the multiple candidate nodes according to the balance scores of multiple candidate nodes; and scheduling the application to the target node.

[0021] In some embodiments, based on the expected resource utilization of each candidate node for each resource, determining the balance score of the resource utilization of each candidate node for different resources includes: for each candidate node, calculating the difference between the expected resource utilization of every two resources; for multiple resources of each candidate node, calculating the average of each difference; and determining the balance score of each candidate node based on the average of the each difference.

[0022] In some embodiments, based on the balance scores of multiple candidate nodes, determining the target node from the multiple candidate nodes includes: when the balance score of each candidate node is positively correlated with the average value of the respective differences, selecting the candidate node with the lowest balance score as the target node; when the balance score of each candidate node is negatively correlated with the average value of the respective differences, selecting the candidate node with the highest balance score as the target node.

[0023] According to a second aspect of the present disclosure, a scheduling device for a container cluster management system is provided, comprising: an acquisition module, configured to acquire historical data of resources of multiple containers in the container cluster management system within a historical period; a prediction module, configured to predict predicted data of resources of each container in a future period based on the historical data of resources of each container; and a resource scheduling module, configured to schedule resources for each container at the start time of the future period based on the corresponding predicted data for each container.

[0024] According to a third aspect of the present disclosure, a scheduling device for a container cluster management system is provided, comprising: a memory; and a processor coupled to the memory, wherein the processor is configured to execute the scheduling method for a container cluster management system described in any of the above embodiments based on instructions stored in the memory.

[0025] According to a fourth aspect of the present disclosure, a computer storable medium is provided, on which computer program instructions are stored. When the instructions are executed by a processor, the scheduling method for a container cluster management system described in any of the above embodiments is implemented.

[0026] In the above embodiments, the frequency of failures can be reduced, and application performance and resource utilization can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The accompanying drawings, which constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0028] The present disclosure may be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:

[0029] Figure 1 is a flowchart illustrating a scheduling method according to some embodiments of the present disclosure;

[0030] Figure 2 is a block diagram showing a scheduling device for a container cluster management system according to some embodiments of the present disclosure;

[0031] Figure 3 is a block diagram showing a scheduling device for a container cluster management system according to some other embodiments of the present disclosure;

[0032] Figure 4 is a block diagram illustrating a scheduling system for a container cluster management system according to some embodiments of the present disclosure;

[0033] Figure 5 is a block diagram illustrating a computer system for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION

[0034] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present disclosure unless otherwise specifically stated.

[0035] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0036] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.

[0037] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.

[0038] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0039] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0040] Figure 1 is a flowchart illustrating a scheduling method according to some embodiments of the present disclosure.

[0041] like Figure 1 As shown, the scheduling method for the container cluster management system includes steps S11 to S13. For example, the scheduling method is executed by a control node (Master) of the container cluster management system.

[0042] In step S11, historical data of resources of multiple containers in the container cluster management system within a historical period is obtained. In some embodiments, the cAdvisor module deployed on each node in the container cluster management system is used to collect pod data of the corresponding node. The pod data of each node includes historical data of resources of multiple containers within a historical period. For example, after the pod data is collected, it can be aggregated to a third-party storage backend, that is, a monitoring system. For example, the monitoring system includes but is not limited to the open source system monitoring and alarm system Prometheus.

[0043] In step S12, based on the historical data of the resources of each container, the predicted data of the resources of each container in the future period is predicted. In some embodiments, the prediction can be made before the start time of the future period, or at the start time of the future period. Prediction at the start time of the future period can obtain more comprehensive historical data of the previous historical period of the future period, thereby improving the accuracy of the prediction, thereby improving the accuracy of scheduling and resource utilization.

[0044] In some embodiments, the above step S12 can be implemented through the following steps 1)-2).

[0045] 1) Inputting historical data of resources of each container into a first prediction model and a second prediction model respectively to obtain first data and second data.

[0046] 2) Determine prediction data corresponding to each container based on the first data and the second data.

[0047] In the above embodiment, the two models are combined with the prediction data corresponding to the prediction container to improve the accuracy of the prediction and the scheduling accuracy, thereby further reducing the frequency of failures and improving application performance and resource utilization.

[0048] In some embodiments, the model weights of the first prediction model and the second prediction model can be determined first; then the model weights of the first prediction model and the second prediction model are used to fuse the first data and the second data to obtain prediction data corresponding to each container. By fusing the prediction results of the two models using the model weights, the characteristics of different prediction models can be combined to improve the accuracy of the prediction, thereby further improving the accuracy of the scheduling, and further reducing the frequency of failures, improving application performance and resource utilization.

[0049] In some embodiments, the model weights of the first prediction model and the second prediction model may be determined based on the sum of squared errors of the first prediction model and the sum of squared errors of the second prediction model.

[0050] In some embodiments, the sum of the sum of the squared errors of the first prediction model and the sum of the squared errors of the second prediction model is first calculated; then the ratio of the sum of the squared errors of the first prediction model to the sum is determined as the model weight of the first prediction model; finally, the ratio of the sum of the squared errors of the second prediction model to the sum is determined as the model weight of the second prediction model.

[0051] For example, the sum of squared errors of prediction model j is expressed as e j .w j Represents the model weight of prediction model j. Combining the single weight calculation method, we can get: Where n is the number of models and j is the index of the prediction model. The sum of squared errors is inversely proportional to the model weight. n is a positive integer.

[0052] In some embodiments, the first data and the second data are weighted using the model weights of the first prediction model and the second prediction model to obtain prediction data corresponding to each container. For example, the initial index value of a container at a certain time predicted by prediction model j is expressed as Then the target index value of the container at that time predicted by n models is The target indicator value belongs to the predicted data. In some embodiments, the first data, the second data and the predicted data of each resource of each container can be represented by a time sequence diagram.

[0053] In some embodiments, the first prediction model is an ARIMA (Autoregressive Integrated Moving Average) model, and the second prediction model is a BP (Back Propagation) neural network model. The two prediction models are used for combined prediction to eliminate the residuals of the single ARIMA model prediction, eliminate the nonlinearity and chaos of the time series resource model summary as much as possible, improve the accuracy of the prediction, and further improve the accuracy of the scheduling.

[0054] In step S13, for each container, resources are scheduled for each container at the start time of the future cycle according to the corresponding prediction data.

[0055] In the above embodiment, historical data of the container's resources in historical periods are used to predict predicted data in future periods, and then corresponding resources of the container are scheduled according to the predicted data. This allows resources to be scheduled for the container in advance, which can reduce the frequency of failures and improve application performance and resource utilization.

[0056] In some embodiments, the prediction data corresponding to each container includes the prediction index value of each resource of each container at each time in the future period. For example, the prediction index value is the resource usage. In this case, the above step S13 can be implemented in the following manner.

[0057] First, determine the upper and lower limit indicator values ​​for each resource of each container. In some embodiments, first obtain the application amount and maximum application limit of each resource of each container in the future period; then determine the upper limit indicator value of each resource of each container based on the maximum application limit and the upper resource utilization; finally, determine the lower limit indicator value of each resource of each container based on the application amount and the lower resource utilization. The application amount and the maximum application limit are the application parameters request and limit of the resource, respectively. For example, taking Kubernetes as an example, when applying for a container, you can specify the request parameters of the resource, usually in the configuration file.

[0058] In some embodiments, taking each container including CPU resources and storage resources as an example, the upper limit index value and the lower limit index value of the CPU resources of the i-th container are respectively expressed as R icu and R icd , the upper limit index value and lower limit index value of the storage resource of the i-th container are represented as R iMu and R iMd The upper and lower limits of resource utilization are denoted as σ and γ respectively. They are thresholds given by users in monitoring. The upper and lower limits of resource utilization of different resources can be the same or different. For example, when the upper and lower limits of resource utilization of different resources are the same, R icu =σ×CPU ilimit , CPU ilimit The maximum application limit for CPU resources. icd =γ×CPU irequest , CPU irequest The amount of CPU resources requested. icu =σ×Mem ilimit , Mem ilimit The maximum application limit for storage resources. icu =γ×Mem irequest , Mem irequest The amount of storage resources requested.

[0059] Then, for each resource of each container, when the predicted index value at each time exceeds the upper limit index value, the resource of each container is increased. In some embodiments, the difference between the average value of the predicted index value of each resource of each container in the future period and the corresponding upper limit index value is first determined, which is the resource increase amount of each resource of each container; then, each resource of each container is increased according to the resource increase amount of each resource of each container.

[0060] Finally, for each resource of each container, when the predicted index value at each time exists or is lower than the lower limit index value, each resource of each container is recycled. In some embodiments, the expected resource amount of each resource of each container in the future period is first obtained; then the difference between the expected resource amount of each resource of each container in the future period and the average value of the predicted index value is determined, which is the resource recycling amount of each resource of each container; finally, according to the resource recycling amount of each resource of each container, each resource of each container is recycled.

[0061] For example, the scheduling period is set to T, and the start time of the scheduling period is t now , for the CPU resource interception of the i-th container (t now , t now +T) at each time, if there is a prediction index value f(t icu )=R icu , then the CPU resource of the i-th container has reached the resource limit in the future cycle, and a scheduling task record is generated (status = first value, t icu ,avg(R ic )), where the first value of status indicates that the critical state of the CPU resource of the i-th container exceeds the resource limit, and avg(R ic ) represents the average value of the prediction index value of the CPU resource of the i-th container in the scheduling period. In some embodiments, the first value is 1.

[0062] Similarly, if there is a predicted indicator value f(t icd )=R icd , then the CPU resource of the i-th container touches the resource lower limit in the future cycle, and a scheduling task record is generated (status = second value, t icd ,avg(R ic )), where the first value of status indicates that the critical state of the CPU resource of the i-th container exceeds the resource limit, and avg(R ic ) represents the average value of the prediction index value of the CPU resource of the i-th container in the scheduling period. In some embodiments, the second value is 2.

[0063] Similarly, scheduling tasks for other resources can also be generated, which will not be described here.

[0064] If status=1, the amount of resources needs to be increased, and the amount of resources increased is avg(R i )-R iu , where avg(R i ) is the average value of the prediction index value of the resource in the corresponding scheduling period, R iuIt is the resource upper limit indicator value.

[0065] If status = 2, the amount of resources to be recycled is R iw -avg(R i ), where avg(R i ) is the average value of the prediction index value of the resource in the corresponding scheduling period, R iw It is a value between the upper limit indicator value and the lower limit indicator value of the resource, which can be set to the expected resource usage.

[0066] In some embodiments, taking the example that the prediction data corresponding to each container includes the prediction index value of each resource of each container at each time in the future period, the above step S13 can be implemented in the following manner.

[0067] First, for each resource of each container, the earliest time when the predicted index value exceeds the upper limit index value or falls below the lower limit index value is determined from various times as the critical time of each resource of each container.

[0068] Secondly, according to the critical time of each resource of multiple containers, the resource scheduling priority of each resource of each container is determined. The resource scheduling priority is positively correlated with the corresponding critical time.

[0069] Then, for each container, the container scheduling priority of each container is determined according to the resource scheduling priority of each resource corresponding to it. In some embodiments, taking each container having multiple resources as an example, for each container, the container scheduling priority of each container is determined according to the resource scheduling priority of each resource corresponding to it and the resource scheduling weight of each resource, wherein the resource scheduling weight of each resource of each container is related to the resource consumption type of the application carried by each container. The sum of the resource scheduling weights of different resources of each container is 1. For a certain container, the resource consumption type of the application carried by the container is determined by the resource corresponding to the maximum resource utilization rate of the resource utilization rate of each resource of the application.

[0070] For example, if a container has CPU resources and storage resources, the resource utilization rate of the application carried by the container for CPU resources is higher than the resource utilization rate of other resources, indicating that the application carried by the container is a CPU-consuming application. In this case, the resource scheduling weight of the CPU resources of the container is the largest, and the resource scheduling weight of the storage resources is second. Similarly, the resource utilization rate of the application carried by the container for storage resources is higher than the resource utilization rate of other resources, indicating that the application carried by the container is a memory-consuming application. In this case, the resource scheduling weight of the storage resources of the container is the largest, and the resource scheduling weight of the CPU resources is second. By assigning a corresponding resource scheduling weight to each resource of each container according to the resource consumption type of the application carried by the container, the resource consumption types of different applications are taken into account during the scheduling process, thereby improving the balance and accuracy of the scheduling.

[0071] For example, a container includes CPU resources and storage resources. C Indicates the resource scheduling priority of CPU resources, P M represents the resource scheduling priority of storage resources, α and β represent the resource scheduling weights of CPU resources and storage resources respectively, then the container scheduling priority of the container P = α × P C +β×P M The sum of α and β is 1. Different resource scheduling weights can be set according to the different resource consumption types of applications carried by the container.

[0072] Finally, in descending order of container scheduling priority, multiple containers are scheduled for resources at the start time of the future cycle. The resource scheduling amount of each resource of each container can refer to the calculation process of resource increase amount and resource recovery amount in the above embodiment, which will not be repeated here.

[0073] In the above embodiment, by obtaining the critical time, the resource scheduling priority of each resource of each container is determined according to the order in which the critical time appears, and then the container scheduling priority of different containers is comprehensively determined. Resource scheduling is performed according to the container scheduling priority, which can further improve resource utilization and improve scheduling accuracy.

[0074] In some embodiments, the container cluster management system includes multiple nodes, each node runs one or more pods, and each pod includes one or more containers.

[0075] For each container, if the resources on the node where each container is located cannot meet the resource scheduling requirements of each container, scheduling can be achieved in the following ways.

[0076] First, in response to a pod resource allocation request for an application carried by each container, a resource request amount (ie, an actual resource request amount) for each resource of the application in the pod resource allocation request is obtained.

[0077] Secondly, a pre-selection algorithm is used to preliminarily select nodes that meet the initial conditions from multiple nodes as candidate nodes. For example, the pre-selection algorithm is a predicate scheduling algorithm. For example, the initial conditions include that the node is normal and the resource requirements of the pod to which the application belongs can be met by the node.

[0078] Again, when there are multiple candidate nodes, for each candidate node, the expected resource utilization of each candidate node for each resource is determined based on the total amount of resources of each candidate node for each resource and the amount of resources it has consumed, and the amount of resource requests of the application for each resource. The expected resource utilization represents the expected resource utilization of each candidate node for each resource when the application is deployed to each candidate node.

[0079] Taking the application currently deployed on the i-th node as an example, for the j-th candidate node including CPU resources and storage resources, S jcused , S jmused represents the consumed amount of CPU resources and storage resources of candidate node j, S jcpu , S jmem S represents the total amount of CPU resources and storage resources of candidate node j. icpu , S imem represents the resource request amount for CPU resources and storage resources in the pod resource allocation request for the application. Then, the expected resource utilization rate W of candidate node j for CPU resources is jcpu =(S jcused +S icpu ) / S jcpu , the expected resource utilization W of candidate node j for storage resources jmem =(S jmused +S imem ) / S jmem .

[0080] Then, for each candidate node, according to the expected resource utilization rate of each candidate node for each resource, a balance score of resource utilization of each candidate node for different resources is determined.

[0081] In some embodiments, first, for each candidate node, the difference between the expected resource utilization of each two resources is calculated; then, for the multiple resources of each candidate node, the average of each difference is calculated; finally, the balance score of each candidate node is determined based on the average of each difference. The balance score of each candidate node represents the balance of resource utilization of the candidate node for different resources. Taking the above candidate node j as an example, the balance score of candidate node j can be expressed as score=(1-|W jcpu-W jmem |) × 10. The difference here is a positive number, so it is expressed in absolute value.

[0082] Then, according to the balance scores of the multiple candidate nodes, the target node is determined from the multiple candidate nodes.

[0083] In some embodiments, when the balance score of each candidate node is positively correlated with the average value of each difference, the candidate node with the lowest balance score is selected as the target node; when the balance score of each candidate node is negatively correlated with the average value of each difference, the candidate node with the highest balance score is selected as the target node.

[0084] In some embodiments, when there is only one candidate node, the candidate node is directly used as the target node.

[0085] Finally, the application is scheduled to the target node.

[0086] In the above embodiment, the target node is screened by calculating the balance score of the utilization of different resources of each candidate node, taking into account the resource consumption type of the application, which may cause applications of the same resource consumption type to be scheduled to the same node, resulting in a shortage of a certain resource of the node and resource imbalance, thereby causing the OOM (Out Of Memory) phenomenon, thereby improving the balance of scheduling and resource utilization. The OOM phenomenon is that in the actual operation process, container cluster management systems such as Kubernetes will start to evict Pods when resources are scarce, and QoS (Quality of Service) differences will directly affect the priority of eviction Pods.

[0087] Figure 2 is a block diagram illustrating a scheduling device for a container cluster management system according to some embodiments of the present disclosure.

[0088] like Figure 2 As shown, the scheduling device 21 for a container cluster management system includes an acquisition module 211 , a prediction module 212 and a resource scheduling module 213 .

[0089] The acquisition module 211 is configured to acquire historical data of resources of multiple containers in the container cluster management system within a historical period, for example, by executing Figure 1 Step S11 is shown.

[0090] The prediction module 212 is configured to predict the predicted data of the resources of each container in the future period according to the historical data of the resources of each container, for example, by performing the following steps: Figure 1 Step S12 is shown.

[0091] The resource scheduling module 213 is configured to schedule resources for each container at the start time of a future cycle according to the corresponding prediction data, for example, executing the following steps: Figure 1 Step S13 is shown.

[0092] Figure 3 is a block diagram illustrating a scheduling device for a container cluster management system according to some other embodiments of the present disclosure.

[0093] like Figure 3 As shown, the scheduling device 31 for a container cluster management system includes a memory 311; and a processor 312 coupled to the memory 311. The memory 311 is used to store instructions for executing the corresponding embodiment of the scheduling method for the container cluster management system. The processor 312 is configured to execute the scheduling method for the container cluster management system in any of the embodiments of the present disclosure based on the instructions stored in the memory 311.

[0094] Figure 4 is a block diagram illustrating a scheduling system for a container cluster management system according to some embodiments of the present disclosure.

[0095] like Figure 4 As shown, taking the Kubernetes system as an example, the scheduling system 4 for the container cluster management system includes a Master node 41 and multiple Node nodes 42. The Master node 41 includes a monitoring module 411, a prediction module 412, a dynamic scheduling module 413, a resource application module 414, a load balancing module 415, a schedule component 416, and an API Server component 417. The Node node 42 includes a cAdvisor component 421 and a kubelet component 422, wherein the cAdvisor component 421 performs real-time monitoring and performance data collection on the resources and containers on the node machine, including CPU usage, memory usage, etc., and the kubelet component 422 maintains the running Pods and provides the Kubernetes runtime environment.

[0096] The monitoring module 411 uses the cAdvisor component 421 in the Node node 42 to obtain historical data of resources of multiple containers in the container cluster management system within a historical period.

[0097] The prediction module 412 predicts the prediction data of the resources of each container in a future period according to the historical data of the resources of each container from the monitoring module 411 .

[0098] The dynamic scheduling module 413 performs resource scheduling for each container at the start time of a future cycle according to the corresponding prediction data from the prediction module 412 .

[0099] In some embodiments, the dynamic scheduling module 413 generates a scheduling task according to the corresponding prediction data from the prediction module 412. The scheduling task is, for example, to add resources to a container or to recycle resources.

[0100] The resource application module 414 sends the generated scheduling task to the load balancing module 415. The load balancing module 415 determines whether the resources on the node where the container is located can meet the resource scheduling requirements of the container. If they can be met, the scheduling task is directly sent to the schedule component 416. The schedule component 416 executes the scheduling process through the API Server component 417.

[0101] If it cannot be satisfied, the load balancing module 415 pre-selects nodes that meet the initial conditions from multiple nodes as candidate nodes, calculates the balance score of each candidate node, determines the target node from multiple candidate nodes, and notifies the determined target node to the schedule component 416. The schedule component 416 executes the scheduling process through the API Server component 417, that is, scheduling the application carried by the container to the target node. The scheduling here is to schedule the entire pod to which the application carried by the container belongs to the target node.

[0102] The basic principle of node selection when applying for application resources is to select newly deployed applications according to the original scheduling method. For existing applications, the resource utilization of the application is judged based on the application's past resource usage. Combined with the remaining resources of the node itself, the node score is calculated using an algorithm. The score comprehensively considers the balance of the node's resource utilization after the application resources are deployed, and the node with the highest score is used as the node to be allocated. In this process, it is necessary to judge the first deployment: when a pod deployment request is received, first determine whether the application is deployed for the first time. If it is the first time to deploy the application, select the node selection strategy according to the original load balancing strategy. If it is not the first time to deploy the application, enter the load balancing strategy of this disclosure, that is, pre-select candidate nodes, calculate the balance score of candidate nodes, screen target nodes and schedule them to the target nodes.

[0103] Figure 5 is a block diagram illustrating a computer system for implementing some embodiments of the present disclosure.

[0104] like Figure 5 As shown, the computer system 50 may be embodied in the form of a general purpose computing device. The computer system 50 includes a memory 510, a processor 520, and a bus 500 that connects the various system components.

[0105] The memory 510 may include, for example, a system memory, a non-volatile storage medium, and the like. The system memory may store, for example, an operating system, an application, a boot loader, and other programs. The system memory may include a volatile storage medium, such as a random access memory (RAM) and / or a cache memory. The non-volatile storage medium may store, for example, instructions for executing at least one of the corresponding embodiments of the scheduling method for a container cluster management system. The non-volatile storage medium includes, but is not limited to, a disk memory, an optical memory, a flash memory, and the like.

[0106] The processor 520 can be implemented by a general processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistors, etc. Discrete hardware components. Accordingly, each module such as the judgment module and the determination module can be implemented by a central processing unit (CPU) running instructions in a memory that execute corresponding steps, or can be implemented by a dedicated circuit that executes corresponding steps.

[0107] The bus 500 may use any of a variety of bus architectures, including, but not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, and a Peripheral Component Interconnect (PCI) bus.

[0108] The computer system 50 may also include an input / output interface 530, a network interface 540, a storage interface 550, etc. These interfaces 530, 540, 550, the memory 510, and the processor 520 may be connected via a bus 500. The input / output interface 530 may provide a connection interface for input / output devices such as a display, a mouse, and a keyboard. The network interface 540 may provide a connection interface for various networked devices. The storage interface 550 may provide a connection interface for external storage devices such as a floppy disk, a USB flash drive, and an SD card.

[0109] Here, various aspects of the present disclosure are described with reference to flowcharts and / or block diagrams of methods, devices, and computer program products according to embodiments of the present disclosure. It should be understood that each frame of the flowchart and / or block diagram and the combination of frames can be implemented by computer-readable program instructions.

[0110] These computer-readable program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable device to produce a machine, so that the processor executes the instructions to produce means for implementing the functions specified in one or more blocks in the flowchart and / or block diagram.

[0111] These computer-readable program instructions may also be stored in a computer-readable memory, which cause the computer to work in a specific manner to produce an article of manufacture, including instructions for implementing the functions specified in one or more blocks in the flowchart and / or block diagram.

[0112] The present disclosure can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects.

[0113] Through the scheduling and device for container cluster management system and computer storable medium in the above embodiments, the frequency of failures can be reduced and application performance and resource utilization can be improved.

[0114] So far, the scheduling and device for the container cluster management system according to the present disclosure, and the computer storable medium have been described in detail. In order to avoid obscuring the concept of the present disclosure, some details known in the art are not described. Based on the above description, those skilled in the art can fully understand how to implement the technical solution disclosed here.

Claims

1. A scheduling method for a container cluster management system, comprising: Obtaining historical data of resources of multiple containers in the container cluster management system within a historical period, wherein the container cluster management system includes multiple nodes, each node runs one or more pods, and each pod includes one or more containers; Predicting the predicted data of the resources of each container in a future period according to the historical data of the resources of each container; For each container, according to the corresponding prediction data, performing resource scheduling for each container at the start time of the future period; For each container, when the resources on the node where each container is located cannot meet the resource scheduling requirements of each container, in response to the pod resource allocation request for the application carried by each container, obtain the resource request amount of each resource of the application in the pod resource allocation request; use the pre-selection algorithm to preliminarily screen out nodes that meet the initial conditions from the multiple nodes as candidate nodes; when there are multiple candidate nodes, for each candidate node, determine the resource allocation amount of each candidate node according to the total amount of resources and the consumed resources of each candidate node for each resource, and the resource request amount of the application for each resource. Selecting a node for expected resource utilization of each resource, wherein the expected resource utilization represents the expected resource utilization of each candidate node for each resource when the application is deployed to each candidate node; for each candidate node, determining a balance score of resource utilization of different resources by each candidate node based on the expected resource utilization of each candidate node for each resource, wherein the balance score represents the balance of resource utilization of different resources by each candidate node; determining a target node from the multiple candidate nodes based on the balance scores of multiple candidate nodes; and scheduling the application to the target node.

2. The scheduling method for a container cluster management system according to claim 1, wherein: According to the historical data of the resources of each container, the predicted data of the resources of each container in the future period are predicted to include: Inputting historical data of resources of each container into the first prediction model and the second prediction model respectively to obtain first data and second data; Prediction data corresponding to each container is determined according to the first data and the second data.

3. The scheduling method for a container cluster management system according to claim 2, wherein: Determining the prediction data corresponding to each container according to the first data and the second data includes: Determining model weights of the first prediction model and the second prediction model; The first data and the second data are fused by using the model weights of the first prediction model and the second prediction model to obtain prediction data corresponding to each container.

4. The scheduling method for a container cluster management system according to claim 3, wherein: Determining the model weights of the first prediction model and the second prediction model includes: The model weights of the first prediction model and the second prediction model are determined according to the sum of square errors of the first prediction model and the sum of square errors of the second prediction model.

5. The scheduling method for a container cluster management system according to claim 4, wherein: Determining model weights of the first prediction model and the second prediction model according to the sum of squared errors of the first prediction model and the sum of squared errors of the second prediction model includes: Calculating the sum of the sum of squared errors of the first prediction model and the sum of squared errors of the second prediction model; Determine a ratio of a sum of squared errors of the first prediction model to the total as a model weight of the first prediction model; A ratio of the sum of squared errors of the second prediction model to the total is determined as a model weight of the second prediction model.

6. The scheduling method for a container cluster management system according to any one of claims 3 to 5, wherein: Using the model weights of the first prediction model and the second prediction model, fusing the first data and the second data to obtain prediction data corresponding to each container includes: The first data and the second data are weighted by using the model weights of the first prediction model and the second prediction model to obtain prediction data corresponding to each container.

7. The scheduling method for a container cluster management system according to claim 2, wherein: The first prediction model is a differential integrated moving average autoregressive ARIMA model, and the second prediction model is a feedforward BP neural network model.

8. The scheduling method for a container cluster management system according to claim 1, wherein: The prediction data corresponding to each container includes prediction index values ​​of each resource of each container at each time in the future period. For each container, according to the corresponding prediction data, resource scheduling of each container at the start time of the future period includes: Determine the upper and lower limit values ​​for each resource of each container; For each resource of each container, if the predicted index value at each time exceeds the upper limit index value, increase the resource of each container; For each resource of each container, when the predicted index value at each time exists or is lower than the lower limit index value, the each resource of each container is recycled.

9. The scheduling method for a container cluster management system according to claim 8, wherein: Increasing each resource of each container includes: Determine a difference between an average value of the predicted index value of each resource of each container in the future period and a corresponding upper limit index value as a resource increase amount of each resource of each container; According to the resource increase amount of each resource of each container, each resource of each container is increased.

10. The scheduling method for a container cluster management system according to claim 8, wherein: Recycling each resource of each container includes: Obtaining the expected resource quantity of each resource of each container in the future period; Determine the difference between the expected resource amount of each resource of each container in the future period and the average value of the predicted index value as the resource recovery amount of each resource of each container; The each resource in each container is recycled according to the resource recycling amount of the each resource in each container.

11. The scheduling method for a container cluster management system according to claim 8, wherein: Determining the upper and lower limit values ​​of each resource for each container includes: Obtain the application quantity and maximum application limit of each resource of each container in the future period; Determine the upper limit index value of each resource of each container according to the maximum application limit and the upper limit resource utilization rate; The lower limit indicator value of each resource of each container is determined according to the application amount and the lower limit resource utilization rate.

12. The scheduling method for a container cluster management system according to claim 1, wherein: The prediction data corresponding to each container includes prediction index values ​​of each resource of each container at each time in the future period. For each container, according to the corresponding prediction data, resource scheduling of each container at the start time of the future period includes: For each resource of each container, determine, from the various times, the earliest time at which the predicted index value exceeds the upper limit index value or falls below the lower limit index value as the critical time of each resource of each container; Determine, according to the critical time of each resource of the multiple containers, a resource scheduling priority of each resource of each container, wherein the resource scheduling priority is positively correlated with the corresponding critical time; For each container, determine the container scheduling priority of each container according to the resource scheduling priority of each resource corresponding to the container; The resources of the multiple containers are scheduled in descending order of the container scheduling priorities at the start time of the future period.

13. The scheduling method for a container cluster management system according to claim 12, wherein: Each container has multiple resources. For each container, according to the resource scheduling priority of each resource corresponding to the container, determining the container scheduling priority of each container includes: For each container, the container scheduling priority of each container is determined according to the resource scheduling priority of each resource corresponding to it and the resource scheduling weight of each resource, wherein the resource scheduling weight of each resource of each container is related to the resource consumption type of the application carried by each container, and the sum of the resource scheduling weights of different resources of each container is 1.

14. The scheduling method for a container cluster management system according to claim 1, wherein: Determining the balance score of resource utilization of each candidate node for different resources according to the expected resource utilization of each candidate node for each resource includes: For each candidate node, calculating the difference between the expected resource utilization rates of each two resources; For the multiple resources of each candidate node, calculate the average value of each difference; The balance score of each candidate node is determined according to the average value of the differences.

15. The scheduling method for a container cluster management system according to claim 14, wherein: Determining a target node from the plurality of candidate nodes according to the balance scores of the plurality of candidate nodes comprises: In the case where the balance score of each candidate node is positively correlated with the average value of each difference, selecting the candidate node with the lowest balance score as the target node; In the case that the balance score of each candidate node is negatively correlated with the average value of each difference, the candidate node with the highest balance score is selected as the target node.

16. A scheduling device for a container cluster management system, comprising: an acquisition module, configured to acquire historical data of resources of multiple containers in the container cluster management system within a historical period, wherein the container cluster management system includes multiple nodes, each node runs one or more pods, and each pod includes one or more containers; A prediction module, configured to predict the prediction data of the resources of each container in a future period according to the historical data of the resources of each container; The resource scheduling module is configured to schedule resources for each container at the start time of the future cycle according to the corresponding prediction data, and for each container, in the case where the resources on the node where each container is located cannot meet the resource scheduling requirements of each container, in response to the pod resource allocation request for the application carried by each container, obtain the resource request amount for each resource of the application in the pod resource allocation request; use the pre-selection algorithm to preliminarily screen out nodes that meet the initial conditions from the multiple nodes as candidate nodes; if there are multiple candidate nodes, for each candidate node, according to the total amount of resources for each resource and the amount of resources consumed by each candidate node , determining the expected resource utilization of each candidate node for each resource based on the resource request amount of the application for each resource, the expected resource utilization representing the expected resource utilization of each candidate node for each resource when the application is deployed to each candidate node; for each candidate node, determining a balance score of resource utilization of different resources by each candidate node based on the expected resource utilization of each candidate node for each resource, the balance score representing the balance of resource utilization of different resources by each candidate node; determining a target node from the multiple candidate nodes based on the balance scores of multiple candidate nodes; and scheduling the application to the target node.

17. A scheduling device for a container cluster management system, comprising: Memory; as well as A processor coupled to the memory, wherein the processor is configured to execute the scheduling method for a container cluster management system according to any one of claims 1 to 15 based on instructions stored in the memory.

18. A computer storable medium having computer program instructions stored thereon, which, when executed by a processor, implements the scheduling method for a container cluster management system according to any one of claims 1 to 15.