A scheduling method of a computing cluster, a storage medium and an electronic device

By combining historical and real-time data with a decision tree model and a pre-scheduling mechanism, target servers suitable for computing or service applications are selected, solving the problem of inaccurate scheduling results in existing technologies and achieving more efficient utilization of server resources.

CN118484303BActive Publication Date: 2025-12-12MOBILE TECH COMPANY CHINA TRAVELSKY HLDG
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410662766.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-27
Publication Date
2025-12-12
Estimated Expiration
2044-05-27

AI Technical Summary

Technical Problem

Existing server cluster scheduling methods fail to take into account the different resource requirements of different types of applications, resulting in inaccurate scheduling results and the inability to load and run the corresponding applications in a timely and effective manner.

Method used

By combining historical and real-time data, using decision tree models and pre-scheduling mechanisms, target servers suitable for computing or service applications are selected based on the cluster's evaluation feature set, including feature data from multiple dimensions such as cluster storage resource topology ID, historical average task processing time, computing accuracy, and pressure feature sub-vectors.

Benefits of technology

It improves the accuracy and efficiency of server cluster scheduling, ensures the timely loading of computing and service applications, and reduces the risk of call failures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118484303B_ABST
    Figure CN118484303B_ABST
Patent Text Reader

Abstract

The present application relates to the field of server scheduling, in particular to a scheduling method of a computing cluster, a storage medium and an electronic device. The method comprises: performing optimal computing cluster evaluation on a plurality of computing clusters to filter out initial target computing clusters; performing pre-scheduling on each server in each initial target computing cluster to determine target scheduling servers; sending a scheduling request to the target scheduling servers to create a computing application in the target scheduling servers; determining an initial target application cluster through historical data; and determining the target scheduling servers through real-time data. Thus, through twice filtering and matching of data in different time dimensions, a suitable server can be more accurately scheduled for an application. Moreover, through multiple dimensions of a cluster storage and computing resource topology ID, a cluster historical task average processing time, a cluster historical computing accuracy and cluster pressure, a cluster that meets the computing application scheduling can be more accurately determined.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of server scheduling, and in particular to a scheduling method for a computing cluster, a storage medium and an electronic device. BACKGROUND

[0002] Server cluster scheduling refers to the efficient and reasonable allocation and management of various resources (such as computing resources, storage resources, network resources, etc.) in a cluster environment composed of multiple servers through specific scheduling algorithms and management software, to meet the running needs of various work tasks (such as application programs, services, data processing tasks, etc.), while ensuring the overall performance, availability, efficiency and fairness of the cluster.

[0003] Although the existing server cluster scheduling system has greatly improved resource utilization, service response speed and system stability, it still has some inherent drawbacks and challenges. For example, in the scheduling process, the differences in the resource requirements of each type of application on the corresponding servers in the cluster are not considered in detail, and the same scheduling standard is used to select servers in the cluster. However, for service-type applications and computing-type applications, the characteristics of their work are different, and the types of resources they require are also different. As a result, the existing scheduling method may lead to inaccurate final scheduling results, and thus the corresponding applications cannot be loaded and run in a timely and effective manner. SUMMARY

[0004] To solve the above technical problems, the technical solution adopted by the present application is as follows:

[0005] According to one aspect of the present application, a scheduling method for a computing cluster is provided, which is applied to a server cluster. The server cluster includes a plurality of computing clusters and a plurality of computing clusters. The method includes the following steps:

[0006] In response to a creation request of a computing-type application, the preferred computing cluster evaluation is performed on the plurality of computing clusters to filter out initial target computing clusters from the plurality of computing clusters. The preferred computing cluster evaluation is used to determine whether the cluster meets the scheduling condition according to the historical information of the cluster.

[0007] The pre-scheduling is performed on each server in each initial target computing cluster to determine target scheduling servers from the initial target computing clusters. The pre-scheduling is used to determine the target scheduling servers according to the matching degree between the real-time resource supply portrait of the cluster and the real-time resource demand portrait of the application.

[0008] The scheduling request is sent to the apiserver of the target scheduling server to create the computing-type application in the target scheduling server.

[0009] The preferred computing cluster evaluation includes:

[0010] According to historical data, an evaluation feature set corresponding to each computing cluster is generated, and the evaluation feature set includes a cluster storage and computing resource topology ID, a cluster historical task average processing time length, a cluster historical computing accuracy, and a cluster stress feature subvector.

[0011] The cluster storage and computing resource topology ID is used to represent the storage location of the data required by the computing application in each computing cluster.

[0012] The cluster stress feature subvector includes a historical CPU usage rate, a historical memory usage rate, a historical connection number, a historical QPS, and a historical soft interrupt number.

[0013] Each evaluation feature set is input into a target evaluation decision tree model to generate an evaluation result of whether each evaluation feature set corresponds to a computing cluster that meets a scheduling condition.

[0014] The computing cluster that meets the scheduling condition is used as an initial target computing cluster.

[0015] According to a second aspect of the present application, a non-transitory computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement the above-mentioned computing cluster scheduling method.

[0016] According to a third aspect of the present application, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the above-mentioned computing cluster scheduling method when executing the computer program.

[0017] The present application has at least the following beneficial effects:

[0018] In the present application, when the clusters are evaluated and screened, the initial target application cluster that is more suitable for the computing application scheduling is screened out through the performance of each cluster in the historical data. Then, the target scheduling server is determined according to the matching degree of the real-time resource supply portrait of each server in the initial target application cluster and the application real-time resource demand portrait through pre-scheduling. Therefore, the initial target application cluster can be screened and determined through historical data. At the same time, in order to prevent the current server state from being different from the state shown by the historical data, and thus causing a call failure, the target scheduling server is further determined through real-time data. Therefore, through the screening and matching of data in two different time dimensions, the appropriate server for the computing application scheduling can be more accurately determined.

[0019] And, when performing the preferred application cluster evaluation, the input features of the prediction are configured by multiple dimensions of the cluster storage and computing resource topology ID, the cluster historical task average processing time length, the cluster historical computing accuracy and the cluster stress feature sub-vector, respectively. Since the computing application mainly focuses on processing a large number of computing-intensive tasks, the design focus is to maximize the use of computing resources for complex computing or data analysis, and more attention is paid to the timeliness and accuracy of computing and the smoothness of obtaining related data participating in computing. In the present application, the cluster storage and computing resource topology ID can roughly reflect the storage location of the related data participating in computing, and thus can reflect the smoothness of obtaining the related data participating in computing in the cluster; the cluster historical task average processing time length and the cluster historical computing accuracy can roughly reflect and pay more attention to the timeliness and accuracy of computing; and the cluster stress feature can roughly reflect the busy state and load pressure of the cluster. Therefore, the above-mentioned multiple dimension feature data can more accurately determine the cluster that meets the scheduling of the computing application. BRIEF DESCRIPTION OF DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0021] Figure 1 A flowchart of an application cluster scheduling method provided by an embodiment of the present application is shown in FIG. 1.

[0022] Figure 2 A flowchart of a computing cluster scheduling method provided by an embodiment of the present application is shown in FIG. 2.

[0023] Figure 3 A flowchart of a multi-type cluster cooperative scheduling method provided by an embodiment of the present application is shown in FIG. 3.

[0024] Figure 4 A flowchart of a scheduling method based on server idle resources provided by an embodiment of the present application is shown in FIG. 4. DETAILED DESCRIPTION

[0025] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0026] As a possible embodiment of the present application, as shown in FIG. 1, the application cluster scheduling method provided by the present application comprises the following steps. Figure 1As shown, a scheduling method of an application cluster is provided, which is applied to scheduling work of a server cluster, the server cluster including a plurality of application clusters and a plurality of computing clusters.

[0027] The method includes the following steps:

[0028] S100: In response to a creation request of a service-type application, performing preferred application cluster evaluation on the plurality of application clusters to filter out an initial target application cluster from the plurality of application clusters. The preferred application cluster evaluation is used to determine whether the cluster meets a scheduling condition according to historical information of the cluster.

[0029] The preferred application cluster evaluation includes:

[0030] S101: According to historical data, generating an evaluation feature set corresponding to each application cluster, the evaluation feature set including a cluster stress feature sub-vector, a cluster resource feature sub-vector, and an inter-cluster network topology relationship feature sub-vector.

[0031] Specifically, the evaluation feature set can be an evaluation feature vector, which is spliced by the cluster stress feature sub-vector, the cluster resource feature sub-vector, and the inter-cluster network topology relationship feature sub-vector.

[0032] The cluster stress feature sub-vector includes historical CPU usage, historical memory usage, historical connection number, historical QPS (Queries-per-second), and historical soft interrupt number.

[0033] In the Linux kernel, the number of soft interrupts is defined by the macro NR_SOFTIRQS. Soft interrupts are managed by the softirq_vec array, and the size of this array depends on the value of NR_SOFTIRQS. Each soft interrupt corresponds to an element in the array, representing a specific type of deferred task, such as network packet processing (NET_RX_SOFTIRQ), timer events (HI_SOFTIRQ and TIMER_SOFTIRQ), etc. The exact number of soft interrupts should be checked in the corresponding Linux kernel source code or recorded by the corresponding monitoring components.

[0034] The cluster resource feature sub-vector includes historical network connection timeout state information and historical memory overflow state information.

[0035] The inter-cluster network topology relationship feature sub-vector includes historical inter-cluster connection hop count information and historical cluster communication delay information.

[0036] Specifically, the acquisition method of each feature sub-vector in S101 is as follows:

[0037] The acquisition of the cluster stress feature sub-vector can be performed according to the following method:

[0038] S111: Respectively acquire the historical data sequences of the CPU usage rate, the memory usage rate, the connection number, the QPS and the soft interrupt number corresponding to the application cluster generated in the first preset historical statistical period.

[0039] S121: According to the values in each historical data sequence, generate the feature values corresponding to the CPU usage rate, the memory usage rate, the connection number, the QPS and the soft interrupt number, respectively, and generate a cluster stress feature sub-vector. The feature values include: average value or maximum value or minimum value or standard deviation.

[0040] The acquisition of the cluster resource feature sub-vector can be performed according to the following method:

[0041] S131: Through the log management system, acquire the historical log data generated by the application cluster in the first preset historical statistical period.

[0042] S141: Use the bert model to perform named entity recognition on the historical log data, and extract the target named entity and its current state. The target named entity and its current state include: network connection entity and its corresponding timeout state, and memory entity and its corresponding overflow state.

[0043] This step is a named entity recognition process, which specifically identifies multiple entities and the relationship between entities in the log to infer whether certain states of the server (such as network connection timeout state, memory overflow state) are healthy.

[0044] For example, taking a line of normal log: 2024-04-23T06:57:01.354948078Z SLF4J:Class path contains multiple SLF4J bindings as an example, it can be identified that the entities are Class, path, SLF4J and bindings. These key entity information and the relationship between entities can indicate that the relationship is healthy.

[0045] S151: Use one-hot encoding technology to one-hot encode each entity state to generate a binary vector. The length of the binary vector is equal to the total number of all entity types.

[0046] S161: Map the binary vector to a fixed-length low-dimensional real vector through embedding mapping.

[0047] S171: Combine multiple low-dimensional real vectors into a cluster resource feature sub-vector by averaging, and the cluster resource feature sub-vector includes historical network connection timeout state information and historical memory overflow state information.

[0048] S131 to S171 are essentially a processing procedure of named entity recognition-entity vectorization-vector unification, specifically, after the named entity recognition of the log, the entities and their relationships are combined into a vector, then the vector is embedded, and then the vectors are combined into a vector by averaging, and the vector is subsequently spliced with other data and put into a decision tree.

[0049] After processing by S131 to S171, the entities and their states extracted from the log can be encoded using One-Hot Encoding, and finally the category type data vector is converted into a numerical type vector for subsequent calculation and use.

[0050] For obtaining a cluster resource feature sub-vector

[0051] For obtaining a cluster-to-cluster network topology relationship feature sub-vector, the following method can be used:

[0052] S181: According to the topology connection relationship between the application cluster and other application clusters in the first preset historical statistical period, the network topology ID corresponding to the application cluster is generated. The network topology ID is used to represent the connection hop relationship of the corresponding application cluster and the remaining application clusters when communicating. When the entire cluster deployment is completed, the network topology relationship of the servers in each cluster is also completely determined, and the corresponding network topology ID is also determined.

[0053] An example of network topology ID is given: Suppose there are 3 clusters, cluster 1-3, and the network topology ID of cluster 1 may be represented as [0, 1, 1] or [0, 1, 2] or [0, 2, 1].

[0054] S191: According to the communication data of the application cluster in the first preset historical statistical period, the cluster communication delay information corresponding to the application cluster is generated. The first preset historical statistical period is the same as the second preset historical statistical period, which can be 15 days.

[0055] S1101: According to the network topology ID and the cluster communication delay information corresponding to the application cluster, a cluster-to-cluster network topology relationship feature sub-vector is generated. The cluster-to-cluster network topology relationship feature sub-vector includes historical cluster-to-cluster connection hop information and historical cluster communication delay information.

[0056] Processing of missing values in the feature set:

[0057] For numerical features, the average value of the corresponding feature is used for filling.

[0058] For the category type data processed by one-hot encoding, missing values are encoded as an independent category.

[0059] S102: input each evaluation feature set into the target evaluation decision tree model, and generate an evaluation result of whether the application cluster corresponding to each evaluation feature set meets the scheduling condition.

[0060] S103: the application cluster meeting the scheduling condition is taken as the initial target application cluster.

[0061] In this fact instance, the evaluation prediction is performed by using the decision tree. Since the decision tree is trained, a better prediction effect can be obtained by using fewer samples (about 200), so as to meet the use of the current scene. Thus, the required result can be obtained at a smaller cost.

[0062] S200: pre-schedule each server in each initial target application cluster to determine the target scheduling server from the initial target application cluster. The pre-scheduling is used to determine the target scheduling server according to the matching degree of the real-time resource supply portrait of the server and the real-time resource demand portrait of the application.

[0063] S300: send a scheduling request to the apiserver of the target scheduling server to create a service type application in the target scheduling server.

[0064] In this embodiment, when the clusters are evaluated and screened, the initial target application cluster more suitable for service type application scheduling is first screened out according to the performance of each cluster in the historical data. Then, the target scheduling server is determined according to the matching degree of the real-time resource supply portrait of each server in the initial target application cluster and the real-time resource demand portrait of the application through pre-scheduling. Thus, the initial target application cluster can be screened and determined through the historical data. At the same time, in order to prevent the current server state from being different from the state shown by the historical data, and thus causing the call to fail, the target scheduling server is further determined through real-time data. Thus, through the screening and matching of data in two different time dimensions, the appropriate server for service type application scheduling can be more accurately determined.

[0065] Further, when performing the preferred application cluster evaluation, the input features of the prediction are configured from three dimensions of cluster stress features, cluster resource features and inter-cluster network topology relationship features. Since service-type applications generally refer to application programs and servers that focus on providing service functions, their design and optimization goals are to provide stable and efficient service response to external users. In the present application, the cluster stress features can generally reflect the busy state and load pressure of the cluster; the cluster resource features can generally reflect the health status of each entity in the cluster through historical logs, thereby reflecting the stability of the cluster; and the inter-cluster network topology relationship features can generally reflect the smoothness of cluster communication and the timeliness of request response. Thus, the above three dimensions of feature data can more accurately determine the cluster that meets the scheduling of service-type applications.

[0066] As another embodiment of the present application, as shown in Figure 2 There is also provided a computing cluster scheduling method, which is also applied to the scheduling of a server cluster, and the server cluster includes a plurality of computing clusters and a plurality of computing clusters.

[0067] The scheduling method includes the following steps:

[0068] W100: In response to a creation request of a computing-type application, performing preferred computing cluster evaluation on the plurality of computing clusters to screen out an initial target computing cluster from the plurality of computing clusters. The preferred computing cluster evaluation is used to determine whether the cluster meets the scheduling condition according to historical information of the cluster.

[0069] Specifically, the preferred computing cluster evaluation includes:

[0070] W101: According to historical data, generating an evaluation feature set corresponding to each computing cluster, and the evaluation feature set includes a cluster storage-computing resource topology ID, a cluster historical task average processing time, a cluster historical computing accuracy and a cluster stress feature sub-vector.

[0071] The evaluation feature set can be an evaluation feature vector, which is integrated by concatenating the storage-computing resource topology ID, the cluster historical task average processing time, the cluster historical computing accuracy and the cluster stress feature sub-vector.

[0072] The cluster storage-computing resource topology ID is used to indicate the storage location of the data required by the computing-type application in each computing cluster.

[0073] The cluster stress feature sub-vector includes a historical CPU usage, a historical memory usage, a historical connection number, a historical QPS and a historical soft interrupt number.

[0074] Specifically, the acquisition method of each feature sub-vector in W101 is as follows:

[0075] The obtaining of the cluster storage and computing resource topology ID can be performed according to the following steps:

[0076] The position of the data required by the application in the cluster can be obtained through the topology structure managed in the management component of the cluster, and a server ID, that is, the cluster storage and computing resource topology ID, is obtained. The ID is a manually defined mapping relationship.

[0077] The obtaining of the cluster historical task average processing duration and the cluster historical computing accuracy can be performed according to the following steps:

[0078] W111: Obtain the processing durations of all tasks corresponding to the computing cluster in the second preset historical statistical period.

[0079] W121: Take the average of the processing durations of all tasks as the cluster historical task average processing duration.

[0080] W131: Obtain the computing results of all tasks corresponding to the computing cluster in the second preset historical statistical period.

[0081] W141: Generate the cluster historical computing accuracy according to the computing results of all tasks.

[0082] The basic data of the cluster historical task average processing duration and the cluster historical computing accuracy come from the monitoring component, and the accuracy of the running results of the historical tasks of the cluster (if any) is counted. This part mainly reflects whether the computing result error caused by possible resource competition exists when the computing pressure exists in the cluster.

[0083] The obtaining of the cluster pressure feature sub-vector can be performed according to the following steps:

[0084] W151: Obtain the historical data sequences of the CPU usage rate, the memory usage rate, the connection number, the QPS, and the soft interrupt number corresponding to the computing cluster in the second preset historical statistical period, respectively.

[0085] W161: Generate the feature values corresponding to the CPU usage rate, the memory usage rate, the connection number, the QPS, and the soft interrupt number according to the values in each historical data sequence, and generate the cluster pressure feature sub-vector. The feature values include: average value or maximum value or minimum value or standard deviation.

[0086] The obtaining of the cluster pressure feature sub-vector can refer to S111 and S121 in the above embodiment.

[0087] W102: Input each evaluation feature set into the target evaluation decision tree model to generate the evaluation result of whether the computing cluster meets the scheduling condition corresponding to each evaluation feature set.

[0088] W103: The computing cluster meeting the scheduling condition is taken as an initial target computing cluster.

[0089] W200: Each server in each initial target computing cluster is pre-scheduled to determine a target scheduling server from the initial target computing cluster. The pre-scheduling is used to determine the target scheduling server according to the matching degree of the cluster real-time resource supply profile and the application real-time resource demand profile.

[0090] W300: A scheduling request is sent to the apiserver of the target scheduling server to create a computing application in the target scheduling server.

[0091] In the embodiment, when the cluster is evaluated and screened, the initial target application cluster more suitable for computing application scheduling is first screened out through the performance of each cluster in the historical data. Then, the target scheduling server is determined according to the matching degree of the real-time resource supply profile of each server in the initial target application cluster and the application real-time resource demand profile through pre-scheduling. Thus, the initial target application cluster can be screened and determined through historical data. At the same time, in order to prevent the current server state from being different from the state shown by the historical data, and thus causing a call failure, the target scheduling server is further determined through real-time data. Thus, through the screening and matching of data in two different time dimensions, the suitable server for computing application scheduling can be more accurately determined.

[0092] In addition, when the preferred application cluster is evaluated, the input features of the prediction are configured through multiple dimensions of the cluster storage and computing resource topology ID, the cluster historical task average processing time, the cluster historical computing accuracy and the cluster pressure feature sub-vector. Since the computing application mainly focuses on processing a large number of computing-intensive tasks, its design focus is to maximize the use of computing resources for complex computing or data analysis, and more attention is paid to the timeliness and accuracy of computing and the smoothness of obtaining related data participating in computing. In the present application, the cluster storage and computing resource topology ID can roughly reflect the storage location of the related data participating in computing, and thus can reflect the smoothness of obtaining the related data participating in computing in the cluster; the cluster historical task average processing time and the cluster historical computing accuracy can roughly reflect and pay more attention to the timeliness and accuracy of computing; and the cluster pressure feature can roughly reflect the busy state and load pressure of the cluster. Thus, the cluster suitable for computing application scheduling can be more accurately determined through the feature data in the above multiple dimensions.

[0093] As another embodiment of the present application, the pre-scheduling includes:

[0094] S201: Obtain an application resource demand profile vector corresponding to the service type application. The application resource demand profile vector includes CPU demand information, memory demand information, application role information and application dependency information.

[0095] S201 comprises:

[0096] S211: using svm (Support Vector Machine), the historical information sequence corresponding to the CPU requirement information, memory requirement information, application role information and application dependency information of the service type application respectively, generate the fitting expected value corresponding respectively.

[0097] S221: using the fitting expected value corresponding to the CPU requirement information, memory requirement information, application role information and application dependency information respectively, generate the application resource demand portrait vector corresponding to the service type application.

[0098] Thus, through svm, a near fitting expected value is obtained based on the historical information sequence of each index, and then a corresponding length vector can be formed.

[0099] S202: obtain the server real-time resource supply portrait vector corresponding to each server in the initial target application cluster. The server real-time resource supply portrait vector includes: CPU available information, GPU available information, memory available information, server storage calculation topology ID and server network topology ID.

[0100] Taking the server cluster as an example, S202 comprises:

[0101] S212: through the resource monitoring component, obtain the CPU available information, GPU available information and memory available information of each server.

[0102] S222: through the management component of the k8s cluster, obtain the server storage calculation topology ID of each server.

[0103] S232: according to the communication network topology design of the servers in the cluster, obtain the network topology ID of each server.

[0104] The server real-time resource supply portrait vector is generated through a series of current indicators. Among them, CPU, GPU and memory are obtained from monitoring indicators, and storage calculation topology ID returns device ID. The ID information is obtained from the management component of k8s.

[0105] S203: after splicing the application resource demand portrait vector with each server real-time resource supply portrait vector respectively, input into the target transformer model, generate the result of whether each server in the initial target application cluster meets the application loading condition.

[0106] Specifically, the application resource demand portrait vector is spliced with each server real-time resource supply portrait vector, and then a normalized vector is obtained through embedding logic, and then the normalized vector is input into a trained encoder transformer for output prediction.

[0107] S204: Simultaneously performing simulation loading test and real loading test on the service-type application that meets the application loading condition to generate simulation loading result and real loading result. The simulation loading test has a speed greater than that of the real loading test.

[0108] The simulation loading test can be implemented through an existing mock simulation test module. The real loading test is to load the corresponding application on the corresponding server and perform corresponding stress test to observe whether the server can stably run.

[0109] Specifically, since the simulation loading test has a speed greater than that of the real loading test, the simulation loading result can be obtained earlier. If the simulation loading running result is unsuccessful, the time interval for waiting for the real loading running result can be used to directly execute steps S400 to S600 to perform the scaling and rescheduling processing on the scalable application. If the real loading running result is also unsuccessful, the scaling and rescheduling processing is performed in advance, thereby saving processing time, so that the application can be loaded and run more timely.

[0110] S205: If the simulation loading result and the real loading result are both application loading running successful, the corresponding server is determined as a target scheduling server to determine the target scheduling server from the initial target application cluster.

[0111] In this embodiment, the target scheduling server is determined according to the matching degree of the real-time resource supply portrait of each server in the initial target application cluster and the real-time resource demand portrait of the application. Thus, through more accurate real-time data that fits the actual situation, the matching degree between each server and the corresponding application to be loaded can be more accurately reflected. Thus, the difference between the current server state and the state shown by the historical data can be prevented, thereby preventing the call failure from occurring, and the application can be more accurately scheduled to a suitable server.

[0112] As another possible embodiment of the present application, as Figure 3Also shown, a multi-type cluster cooperative scheduling method is provided for cross-cluster invocation to improve the use sufficiency of servers in each cluster. The server cluster includes a plurality of application clusters, a plurality of computing clusters, and a plurality of standby clusters. The performance of the application clusters and the computing clusters are both greater than the performance of the standby clusters. The application clusters are preferentially used to create service-type applications. The computing clusters are preferentially used to create computing-type applications.

[0113] The method includes the following steps:

[0114] S400: In response to the information that the application cluster cannot meet the service-type application creation condition, obtaining the Qos level of the service-type application. The Qos level includes an application scalable level and an application non-scalable level.

[0115] S500: If the Qos level of the service-type application is the application non-scalable level (i.e., high service level), performing server resource occupation according to the current idle resource view corresponding to the computing cluster, to schedule the resources of the computing cluster to create and load the service-type application.

[0116] S600: If the Qos level of the service-type application is the application scalable level (i.e., low service level), performing scalable rescheduling processing on the service-type application, to schedule the resources in the application cluster or the standby cluster to create and load the scaled service-type application.

[0117] Generally, in order to improve the request processing capability, the service-type application will use the horizontal scaling method in the deployment architecture. Horizontal scaling means increasing more server instances or containers, and each instance runs the same application copy to process more concurrent requests.

[0118] Therefore, reducing a certain number of application copies will not cause the service to be unavailable, but will only reduce the response speed. In the present scenario, the availability of the service needs to be preferentially guaranteed, and thus the success rate of application loading can be improved by scaling to ensure the availability of the service.

[0119] S601: The scalable rescheduling processing includes:

[0120] S602: Reducing the number of copies of the current service-type application to generate a scaled service-type application. In each scalable rescheduling processing, only one copy of the current service-type application is reduced.

[0121] S603: According to the scaled service-type application, pre-scheduling each server in each initial target application cluster to generate a scheduling result corresponding to the scaled service-type application. The scheduling result includes: the application cluster cannot meet the creation condition of the scaled service-type application and a server meets the creation condition of the scaled service-type application.

[0122] S604: The pre-scheduling is used for determining a target scheduling server according to a matching degree of a server real-time resource supply image and an application real-time resource demand image.

[0123] S605: If the scheduling result is that the server meets the creation condition of the scaling-in service type application, a scheduling request is sent to an apiserver of the corresponding server to create the scaling-in service type application in the server.

[0124] S700: If the number of replicas of the current service type application cannot be reduced, a scheduling request is sent to an apiserver of a server in the standby cluster to create the scaling-in service type application in the server in the standby cluster.

[0125] In the embodiment, when the server in the application cluster cannot meet the creation condition of the current service type application, subsequent server calling operations are performed according to a Qos (Quality of Service) level corresponding to the service type application. Specifically, idle resources in the computing cluster are directly called for the application of a level that cannot be scaled in, to complete the smooth loading of the service type application, thereby ensuring the smooth performance of the service. Since the service type application and the computing type application have different task characteristics and functional requirements, the occupation tendency of various resources is different. The service type application usually occupies more network resources and memory resources, and the occupation of computing resources (CPU) is relatively moderate; the computing type application significantly occupies computing resources (especially CPU, GPU and memory). In addition, there is a big difference between the working periods of the service type application and the computing type application. The service type application is usually executed in the daytime when human activities are frequent, while most of the statistical analysis applications in the computing type application are executed at night. Therefore, based on the above two characteristics, there is a high degree of idleness in a part of the computing cluster during the busy period of the service cluster. Therefore, the service type application with high Qos can be preferentially loaded into the computing cluster to ensure the timely availability of the service.

[0126] Meanwhile, for some service type applications with low Qos level (i.e., scaling-in applications), the number of replicas of the service type applications is gradually reduced to re-perform server calling. Therefore, the success rate of scheduling to the service cluster is improved by actively reducing the resource demand of the service type application. In addition, in the case where the application cannot be scaled in again, the service type application with the smallest resource demand is directly loaded into the standby cluster with lower performance to perform calling as a backup. Therefore, the success rate of scheduling the service type application is ensured, thereby ensuring the availability of the service type application. Under this setting, the standby cluster with lower performance can be used, thereby reducing the cost of building the cluster.

[0127] As another possible embodiment of the present application, as Figure 4As shown, a server idle resource-based scheduling method is also provided, the method comprising the following steps:

[0128] Z100: In response to a scheduling request of a target application to a server, obtaining residual quantity information of each type of resource in the server.

[0129] Specifically, the residual quantity information of each type of resource in the server comprises residual quantity information of memory, disk, CPU and GPU in the server. The residual quantity information of each type of resource in the server is the residual quantity of the total quantity of each type of resource in the server after removing the online occupation quantity and the resource reservation quantity.

[0130] Z200: Performing scheduling amplitude configuration processing on the residual quantity information of each type of resource to generate a schedulable quantity of each type of resource.

[0131] The scheduling amplitude configuration processing comprises:

[0132] Z201: If the generation time of the scheduling request of the target application to the server is within [5:00, 23:00], generating the schedulable quantity of each type of resource according to the configuration duration and the resource usage rate of the server. Wherein, the schedulable quantity of the i-th type of resource Q i satisfies the following conditions:

[0133]

[0134] Wherein, Q ID is the unit scheduling resource quantity of the i-th type of resource. t is the configuration duration. P i is the resource usage rate of the i-th type of resource in the server, that is, the usage pressure of the i-th type of resource. Y i 1 is the first usage rate threshold of the i-th type of resource, Y i 1 may be 75%. Y i 2 is the second usage rate threshold of the i-th type of resource, Y i 2 may be 85%. Y i 2 > Y i 1 . Q i Y2 is P i = Y i 2 , the schedulable quantity of the i-th type of resource.

[0135] Z202: If the generation time of the scheduling request of the target application to the server is located in (23:00, 4:40], the schedulable amount of each type of resource is generated according to the configured duration and the resource usage of the server. Wherein, the schedulable amount of the i-th type of resource Q i Satisfy the following conditions:

[0136]

[0137] Wherein, K i Max is the demand amount of the i-th type of resource declared by the publisher in the target application.

[0138] Z202 and Z203 add restrictions on the scheduling period, which is mainly used to distinguish the busy degree of resource use. In the higher busy degree [5:00, 23:00], the schedulable amount of resource needs to be configured gradually to prevent the server from causing greater resource pressure. And in the lower busy degree (23:00, 4:40], the corresponding K i Max , can be directly configured to the application, because there are more idle resources in the server in this period, and the resource pressure of the server is the lowest, so the corresponding K i Max can be directly configured to the application to ensure the timely and normal loading of the application and ensure the normal availability of the service.

[0139] Z300: Load the target application according to the schedulable amount of each type of resource, and detect the usage of each type of resource in the server in real time during the loading process.

[0140] Specifically, taking the server as an example of a server node in a K8s cluster,

[0141] Load according to the schedulable amount of each type of resource, including:

[0142] Z301: Adjust the cgroup allocation of the task corresponding to the target application to gradually allocate the corresponding resources to the task to create and load the target application in the corresponding server.

[0143] Z400: When the usage of any type of resource is greater than the preset usage threshold, delete the loading task of the target application on the server.

[0144] Z500: Set a node cooling period for the server, and prohibit the calling request of the application corresponding to the offline task to the server during the node cooling period. The length of the node cooling period is negatively related to the current resource usage of the server. For example, the node cooling period can be between 5 minutes and 10 minutes.

[0145] In this embodiment, when scheduling and allocating idle resources on the server, the current resource pressure level of each resource on the server is considered, that is, the utilization rate of the corresponding resource on the server. When the resource pressure on the server exceeds a preset utilization rate threshold after allocating the corresponding amount of resources, the target application is removed from the server. This promptly releases the resource pressure on the server to ensure the normal and stable operation of existing applications on the server.

[0146] At the same time, based on the schedulable amount Q of resources i The calculation formula shows that in the initial stage of resource allocation (i.e., P) i <Y i 1 (Time) Q i Growth occurs exponentially to quickly meet the resource requirements of the target application, thereby rapidly loading and running the application and providing timely services. This occurs during the mid-term of resource allocation (i.e., Y). i 1 <P i ≤Y i 2 (Time) Q i The resource allocation is increased slowly in a linear fashion to further meet the resource requirements of the target application while avoiding excessive pressure on the server and reducing the possibility of server crashes. Finally, at the end of the resource allocation process (P... i =Y i 2 (At that time), that is, when the server resource pressure reaches its highest level, Q i The load is instantly reduced to half to quickly relieve server pressure and expel the target application, thereby ensuring the normal operation of the server.

[0147] In addition, prior to S100, W100, and Z100, the scheduling methods also included:

[0148] S110: Retrieve the application type tag corresponding to the application creation request. The type tag includes computational tags, application tags, and user configuration tags.

[0149] S120: If the type tag is a computational tag, then obtain the task execution type tag corresponding to the application. Task execution type tags include: online task type tags and offline task type tags.

[0150] S130: If the task execution type label is an online task type label, then generate a creation request for the corresponding computing application in W100.

[0151] S140: If the task execution type label is an offline task type label, then generate a creation request for the corresponding computing application in Z100.

[0152] Meanwhile, when the computing cluster fails to meet the creation condition of the computing-type application or the application cluster fails to meet the creation condition of the service-type application, a corresponding creation request in Z100 is generated to invoke idle resources in other idle clusters to successfully create and load the application.

[0153] S150: If the type label is an application-type label, a creation request of a service-type application corresponding to the application in S100 is generated.

[0154] Through the screening and shunting processing of S110 to S150 described above, each application can be more appropriately and accurately shunted to different server scheduling processing schemes in the application to ensure that the application can be normally loaded and used.

[0155] In addition, although the various steps of the method in the present disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in this specific order, or that all of the steps shown must be performed to achieve the desired results. In addition or alternatively, some steps can be omitted, multiple steps can be combined into one step, and / or one step can be divided into multiple steps, etc.

[0156] Through the above description of the embodiments, those skilled in the art can easily understand that the example embodiments described herein can be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a U disk, a mobile hard disk, etc.) or a network, and includes a number of instructions to make a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) execute the method according to the embodiments of the present disclosure.

[0157] In the exemplary embodiments of the present disclosure, an electronic device capable of implementing the above method is also provided.

[0158] Those skilled in the art can understand that each aspect of the present application can be implemented as a system, a method or a program product. Therefore, each aspect of the present application can be embodied as a complete hardware embodiment, a complete software embodiment (including firmware, microcode, etc.), or an embodiment combining hardware and software aspects, which can be collectively referred to as "circuitry", "module" or "system" here.

[0159] The electronic device according to this embodiment of the present application. The electronic device is only an example, and should not limit the function and use range of the embodiments of the present application.

[0160] The electronic device is in the form of a general purpose computing device. Components of the electronic device can include, but are not limited to, the at least one processor described above, the at least one memory described above, a bus that connects the different system components including the memory and the processor.

[0161] The memory stores a program code that can be executed by the processor, such that the processor performs the steps described in the above "Exemplary Methods" section of the specification according to various exemplary embodiments of the present application.

[0162] The memory can include a readable medium in the form of volatile memory, such as random access memory (RAM) and / or cache memory, and can further include read only memory (ROM).

[0163] The memory can also include a program / utility having a set of program modules that include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each or a combination thereof, which may

[0164] The bus can be representative of one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor or local bus using any of a variety of bus structures, and the like.

[0165] The electronic device can also communicate with one or more external devices (e.g., a keyboard or a pointing device, etc.) that can be coupled to the electronic device through an input / output (I / O) interface. The electronic device can also communicate with one or more devices that enable a user to interact with the electronic device, and / or one or more devices (e.g., a router, a modem, etc.) that enable the electronic device to communicate with one or more other computing devices. Such communication can occur via an I / O interface. The electronic device can also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or the Internet) through a network adapter. It should be appreciated that, although not shown, the electronic device can include additional hardware and / or software modules that can be used in conjunction with the electronic device, such as, but not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc.

[0166] Those skilled in the art can clearly understand, through the description of the above embodiments, that the example embodiments described herein can be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a U disk, a mobile hard disk, etc.) or a network, and includes a plurality of instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.

[0167] In the example embodiments of the present disclosure, a computer-readable storage medium is also provided, which stores a program product capable of implementing the above-mentioned method of the present disclosure. In some possible embodiments, various aspects of the present disclosure can also be implemented in the form of a program product, which includes program code for causing a terminal device to perform the steps according to various example embodiments of the present disclosure described in the above-mentioned “example method” section of the present disclosure when the program product is run on the terminal device.

[0168] The program product can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0169] The computer-readable signal medium can include a data signal propagated in a baseband or as a part of a carrier wave, in which readable program code is borne. Such a propagated data signal can take on multiple forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The readable signal medium can also be any readable medium other than the readable storage medium, which can send, propagate or transmit programs for use by or in connection with an instruction execution system, device or component.

[0170] The program code contained on the readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.

[0171] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0172] Furthermore, the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of the present invention, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0173] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0174] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A scheduling method of a computing cluster, characterized in that, The method is applied to a server cluster, and the server cluster includes a plurality of computing clusters and a plurality of application clusters; the method comprises the following steps: In response to a creation request of a computing application, a preferred computing cluster evaluation is performed on a plurality of computing clusters to screen out initial target computing clusters from the plurality of computing clusters; the preferred computing cluster evaluation is used to determine whether a cluster meets a scheduling condition according to historical information of the cluster; Each server in each of the initial target computing clusters is pre-scheduled to determine a target scheduling server from the initial target computing cluster; The pre-scheduling is used to determine the target scheduling server according to a matching degree of a cluster real-time resource supply portrait and an application real-time resource demand portrait; A scheduling request is sent to an API server of the target scheduling server to create the computing application in the target scheduling server; The preferred computing cluster evaluation comprises: According to historical data, an evaluation feature set corresponding to each computing cluster is generated, and the evaluation feature set comprises a cluster storage and computing resource topology ID, a cluster historical task average processing time, a cluster historical computing accuracy, and a cluster stress feature sub-vector; The cluster stress feature sub-vector comprises a historical CPU usage, a historical memory usage, a historical connection number, a historical QPS, and a historical soft interrupt number; Each evaluation feature set is input into a target evaluation decision tree model to generate an evaluation result of whether each evaluation feature set corresponds to a computing cluster that meets a scheduling condition; The computing cluster that meets the scheduling condition is taken as an initial target computing cluster. Before the preferred computing cluster evaluation is performed on a plurality of computing clusters in response to a creation request of a computing application to screen out initial target computing clusters from the plurality of computing clusters, the method further comprises:

2. The method of claim 1, wherein, An application type label corresponding to the application creation request is obtained; the type label comprises a computing type label, an application type label, and a user configuration label; If the type label is the computing type label, a task execution type label of the application corresponding to the application creation request is obtained; the task execution type label comprises an online task type label and an offline task type label; If the task execution type label is the online task type label, a creation request of the computing application corresponding to the application is generated. According to historical data, an evaluation feature set corresponding to each computing cluster is generated, comprising:

3. The method of claim 2, wherein, The processing time of all tasks corresponding to the computing cluster generated in a second preset historical statistical period is obtained; The mean value of the processing time of all tasks is taken as the cluster historical task average processing time. According to historical data, an evaluation feature set corresponding to each computing cluster is generated, comprising:

4. The method of claim 3, wherein, The computing result of all tasks corresponding to the computing cluster generated in a second preset historical statistical period is obtained; The cluster historical computing accuracy is generated according to the computing result of all tasks. According to historical data, an evaluation feature set corresponding to each computing cluster is generated, comprising:

5. The method of claim 4, wherein, ​ respectively obtain historical data sequences of CPU usage, memory usage, connection number, QPS and soft interrupt number corresponding to the computing cluster in a second preset historical statistical period; generate feature values corresponding to CPU usage, memory usage, connection number, QPS and soft interrupt number according to the values in each historical data sequence, and generate a cluster stress feature sub-vector; the feature values include: mean value or maximum value or minimum value or standard deviation.

6. The method of claim 5, wherein, The evaluation feature set is an evaluation feature vector; According to the historical data, generate an evaluation feature set corresponding to each computing cluster, including: Splice and integrate the cluster storage-computing resource topology ID, cluster historical task average processing time, cluster historical computing accuracy and cluster stress feature sub-vector into the evaluation feature vector.

7. The method of claim 1, wherein, The pre-scheduling includes: Obtain an application real-time resource demand portrait vector corresponding to the computing application; the application real-time resource demand portrait vector includes CPU demand information, memory demand information, application role information and application dependency information; Obtain a cluster real-time resource supply portrait vector corresponding to each server in the initial target computing cluster; the cluster real-time resource supply portrait vector includes: CPU available information, GPU available information, memory available information, server storage-computing topology ID and server network topology ID; After splicing the application real-time resource demand portrait vector with each cluster real-time resource supply portrait vector, input them into a target transformer model to generate a result corresponding to whether each server in the initial target computing cluster meets the application loading condition; The servers meeting the application loading condition simultaneously perform simulation loading test and real loading test on the computing application to generate simulation loading results and real loading results; the speed of the simulation loading test is greater than that of the real loading test; If both the simulation loading result and the real loading result are application loading and running success, the corresponding server is determined as a target scheduling server to determine the target scheduling server from the initial target computing cluster.

8. The method of claim 7, wherein, Obtaining an application real-time resource demand portrait vector corresponding to the computing application includes: Using svm, generate fitting expected values respectively corresponding to the historical information sequences of CPU demand information, memory demand information, application role information and application dependency information of the computing application; Using the fitting expected values respectively corresponding to the CPU demand information, memory demand information, application role information and application dependency information, generate an application real-time resource demand portrait vector corresponding to the computing application. 9.A non-transitory computer-readable storage medium storing a computer program, the computer program comprising instructions causing a processor to perform the method according to any one of claims 1 to 8. The computer program is executed by the processor to implement a computing cluster scheduling method according to any one of claims 1 to 8.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the computer program to implement a computing cluster scheduling method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Spark platform task scheduling method based on improved quantum ant colony algorithm

    CN111459628A

  • Application container management method and device, and equipment

    CN112379971A