A scheduling method based on server idle resources, storage medium and device

By monitoring resource utilization in real time and configuring schedulable resources in the server cluster, the problem of server pressure surge caused by idle resource scheduling is solved, and stable management of server resources and normal operation of applications are achieved.

CN118535334BActive Publication Date: 2026-03-20MOBILE TECH COMPANY CHINA TRAVELSKY HLDG
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-27
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

Existing methods for scheduling idle resources in server clusters may cause a surge in server operating pressure, leading to application instability or unavailability.

Method used

By acquiring the remaining information of each type of resource in the server, scheduling amplitude configuration is performed to generate schedulable quantities, and resource utilization is monitored in real time. When the utilization exceeds the threshold, the target application is deleted. During the scheduling process, schedulable quantities in exponential or linear form are generated based on the configured duration and resource utilization to avoid resource pressure overload.

Benefits of technology

Effectively manage server resource utilization, prevent resource overload, ensure the normal and stable operation of applications on the server, reduce the possibility of server crashes, and release resource pressure in a timely manner.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118535334B_ABST
    Figure CN118535334B_ABST
Patent Text Reader

Abstract

The present application relates to the field of server scheduling, in particular to a scheduling method based on idle resources of a server, a storage medium and equipment. The method comprises: obtaining residual information of each type of resource in the server; performing scheduling amplitude configuration processing on the residual information of each type of resource to generate a schedulable amount of each type of resource; loading a target application according to the schedulable amount of each type of resource and detecting the usage rate of each type of resource in the server in real time; and when the usage rate of any type of resource is greater than a preset usage rate threshold, deleting the loading task of the target application on the server. In the present application, the current resource water level pressure in the server is considered when scheduling and allocating idle resources. If the resource water level pressure exceeds the preset usage rate threshold after scheduling and allocating the corresponding amount of resources, the application is expelled from the server. The server resource pressure is thus released to ensure the normal operation of the existing applications on the server.
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, in particular to a scheduling method based on idle resources of servers, a storage medium and equipment. BACKGROUND

[0002] Server cluster scheduling refers to, in a cluster environment composed of multiple servers, efficiently and reasonably allocating and managing various resources (such as computing resources, storage resources, network resources, etc.) 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] Generally, when setting up a server cluster, in order to more efficiently and reasonably utilize the resources in the cluster, the existing server cluster usually sets up multiple role sub-clusters, such as an application cluster, a computing cluster and a backup cluster. Among them, the application cluster is used to create and load service-type applications, the computing cluster is used to create and load computing-type applications, and the backup cluster can load both service-type applications and computing-type applications for emergency.

[0004] In order to further improve the utilization rate of the performance of each server in the cluster, cluster scheduling is usually involved to utilize the remaining idle resources in other clusters. However, the existing idle resource scheduling method directly loads the application to the idle server that meets the resource demand. However, this scheduling method may cause the running pressure of the idle server to surge, thereby causing the running of all applications on the server to be unstable or unavailable. SUMMARY

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

[0006] According to one aspect of the present application, a scheduling method based on idle resources of servers is provided, the method comprising the following steps:

[0007] In response to a scheduling request of a target application to the server, obtaining the residual amount information of each type of resource in the server;

[0008] Performing scheduling amplitude configuration processing on the residual amount information of each type of resource to generate the schedulable amount of each type of resource;

[0009] Loading the target application according to the schedulable amount of each type of resource, and detecting the usage rate of each type of resource in the server in real time during the loading process;

[0010] When the usage rate of any type of resource is greater than a preset usage rate threshold, deleting the loading task of the target application on the server;

[0011] The scheduling amplitude configuration processing comprises:

[0012] According to the configuration duration and the resource usage rate of the server, a schedulable quantity of each type of resource is generated; wherein the schedulable quantity Q i Satisfies the following condition:

[0013]

[0014] Wherein Q i d is a 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; Y i 1 is the first usage rate threshold of the i-th type of resource; Y i 2 is the second usage rate threshold of the i-th type of resource; 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.

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

[0016] According to a third aspect of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the above-mentioned scheduling method based on idle resources of a server.

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

[0018] In the present application, when scheduling and allocating the idle resources in the server, the current resource water level pressure of each resource in the server, i.e., the usage rate of the corresponding resource in the server, is considered. If the resource water level pressure in the server exceeds the preset usage rate threshold after scheduling and allocating the corresponding amount of resources, the target application is expelled from the server. Further, the resource pressure of the server is released in time to ensure the normal and stable operation of the existing applications on the server.

[0019] Meanwhile, according to the schedulable quantity Q iThe calculation formula can know that, in the initial stage of resource allocation (that is, P i <Y i 1 ) Q i increases in exponential form to quickly meet the resource demand of the target application, and then quickly complete the loading and running of the target application, and provide the corresponding service in time. In the middle stage of resource allocation (that is, Y i 1 <P i ≤Y i 2 ) Q i slowly increases in linear form to further meet the resource demand of the target application while avoiding greater pressure on the server, reducing the possibility of server crash. Finally, in the last stage of resource allocation (P i =Y i 2 ), that is, when the server resource pressure reaches the highest level, Q i instantly reduces to half to quickly release the pressure of the server and expel the target application, thereby ensuring the normal operation of the server. 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 on the basis of these drawings.

[0021] Figure 1 A flowchart of a scheduling method of an application cluster provided by the embodiment of the present application;

[0022] Figure 2 A flowchart of a scheduling method of a computing cluster provided by the embodiment of the present application;

[0023] Figure 3 A flowchart of a multi-type cluster cooperative scheduling method provided by the embodiment of the present application;

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

[0025] With reference to the drawings of the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of the present application.

[0026] As a possible embodiment of the present application, as shown in Figure 1 A scheduling method of 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 the 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 a cluster inter-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 cluster inter-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 pressure feature sub-vector can be performed according to the following method:

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

[0039] S121: According to the values in each historical data sequence, generate feature values corresponding to CPU usage, memory usage, connection number, QPS, and soft interrupt number, respectively, and generate a cluster pressure feature sub-vector. The feature values include: mean 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: Obtain the historical log data generated by the application cluster in the first preset historical statistical period through the log management system.

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

[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 and 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 Class, path, SLF4J and bindings are identified. These key entity information and the relationship between entities can indicate that this relationship is healthy.

[0045] S151: One-Hot Encoding is used to encode each entity state into a binary vector. The length of the binary vector is equal to the total number of all entity types.

[0046] S161: The binary vector is mapped to a fixed-length low-dimensional real vector through embedding mapping.

[0047] S171: A plurality of low-dimensional real vectors are combined 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 process of named entity recognition-entity vectorization-vector unification, which specifically combines entities and their relationships into a vector after named entity recognition of the log, then does embedding vectorization, and then combines these vectors into a vector by averaging, and then the vector is spliced with other data and put into the decision tree.

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

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

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

[0052] S181: According to the topological 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 is deployed, 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 three 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: Generate a feature vector of inter-cluster network topology relationships based on the network topology ID corresponding to the application cluster and the cluster communication latency information. The feature vector of inter-cluster network topology relationships includes historical hop count information between clusters and historical cluster communication latency information.

[0056] Handling of missing values ​​in the evaluation feature set:

[0057] For numerical features, fill in the values ​​using the average of the corresponding features.

[0058] For categorical data that has undergone one-hot encoding, missing data is treated as an independent category and encoded accordingly.

[0059] S102: Input each set of evaluation features into the target evaluation decision tree model to generate an evaluation result of whether the application cluster corresponding to each set of evaluation features meets the scheduling conditions.

[0060] S103: Select the application cluster that meets the scheduling conditions as the initial target application cluster.

[0061] In this example, a decision tree is used for evaluation and prediction. Because decision trees can be trained with a relatively small number of samples (around 200), good prediction results can be obtained to meet the needs of the current scenario. This allows for obtaining the required results at a lower 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. Pre-schedule is used to determine the target scheduling server based on the matching degree between the server's real-time resource supply profile and the application's real-time resource demand profile.

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

[0064] In this embodiment, when evaluating and screening clusters, the initial target application clusters that better match the service application scheduling are first selected based on the performance of each cluster in historical data. Then, through pre-scheduling, the target scheduling server is determined based on the matching degree between the real-time resource supply profile of each server in the initial target application cluster and the real-time resource demand profile of the application. Thus, the initial target application cluster can be determined by first screening using historical data. Simultaneously, to prevent discrepancies between the current server state and the state shown in historical data, which could lead to call failures, the target scheduling server is further determined using real-time data. Therefore, through two screening and matching processes using data from different time dimensions, suitable servers can be more accurately scheduled for the service application.

[0065] And, 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 responses 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 A scheduling method for computing clusters is also provided, which is also applied to the scheduling of server clusters, and the server clusters include 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, the evaluation feature set including 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 duration of all tasks corresponding to the computing cluster in the second preset historical statistical period.

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

[0080] W131: Obtain the computing result 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 result 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 result of the historical task 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 sequence 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 value corresponding to the CPU usage rate, the memory usage rate, the connection number, the QPS and the soft interrupt number according to the value in each historical data sequence, and generate the cluster pressure feature sub-vector. The feature value includes: 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: Select the computing cluster that meets the scheduling conditions as the initial target computing cluster.

[0089] W200: Pre-schedules each server in each initial target computing cluster to determine the target scheduling server from the initial target computing cluster. Pre-schedule is used to determine the target scheduling server based on the matching degree between the cluster's real-time resource supply profile and the application's real-time resource demand profile.

[0090] W300: Sends a scheduling request to the apiserver of the target scheduling server to create a compute application in the target scheduling server.

[0091] In this embodiment, when evaluating and screening clusters, the initial target application clusters that are more suitable for scheduling compute-intensive applications are first selected based on the performance of each cluster in historical data. Then, through pre-scheduling, the target scheduling server is determined based on the matching degree between the real-time resource supply profile of each server in the initial target application cluster and the real-time resource demand profile of the application. Thus, the initial target application cluster can be determined by first screening using historical data. Simultaneously, to prevent discrepancies between the current server state and the state shown in historical data, which could lead to call failures, the target scheduling server is further determined using real-time data. Therefore, through two screening and matching processes using data from different time dimensions, suitable servers can be scheduled for compute-intensive applications more accurately.

[0092] Furthermore, when evaluating preferred application clusters, the predicted input features are configured using multiple dimensions, including cluster storage resource topology ID, average historical task processing time, historical computational accuracy, and cluster pressure feature sub-vectors. Since computational applications primarily focus on handling a large number of computationally intensive tasks, their design prioritizes maximizing the utilization of computing resources for complex calculations or data analysis, with a greater emphasis on the timeliness and accuracy of computations and the ease of accessing relevant data. In this invention, the cluster storage resource topology ID can roughly reflect the storage location of relevant data involved in computation, thus reflecting the ease of accessing relevant data within the cluster; the average historical task processing time and historical computational accuracy of the cluster can roughly reflect, and place greater emphasis on, the timeliness and accuracy of computations; and the cluster pressure features can roughly reflect the cluster's busy state and load pressure. Therefore, by using the aforementioned multi-dimensional feature data, clusters suitable for computational application scheduling can be more accurately determined.

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

[0094] S201: Obtain the application resource requirement profile vector corresponding to the service application. The application resource requirement profile vector includes CPU requirement information, memory requirement 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: splice the application resource demand portrait vector and each server real-time resource supply portrait vector respectively, and input into the target transformer model to 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: Simulating loading test and real loading test are performed on the servers that meet the application loading conditions and the service-type applications, and simulated loading results and real loading results are generated. The speed of the simulated loading test is greater than the speed of the real loading test.

[0108] The simulated loading test can be implemented by using 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 run stably.

[0109] Specifically, since the speed of the simulated loading test is greater than the speed of the real loading test, the simulated loading result can be obtained earlier. If the simulated loading running result is unsuccessful, the time interval for waiting for the real loading running result can be used to directly execute the steps of 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 can be performed in advance, thereby saving the processing time, so that the application can be loaded and run more timely.

[0110] S205: If the simulated loading result and the real loading result are both 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. Therefore, the matching degree between each server and the corresponding application to be loaded can be more accurately reflected by using real-time data that is more accurate and closer to the actual situation. Thus, the difference between the current server state and the state shown by the historical data can be prevented, thereby preventing the call failure, and the appropriate server can be more accurately scheduled for the application.

[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 smooth loading of the service type application, thereby ensuring smooth 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 is gradually reduced to re-call the server. Therefore, the resource demand of the service type application is actively reduced to improve the success rate of scheduling the service cluster. 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 call the bottom. 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 a 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 the schedulable quantity of the i-th type of resource when P i = Y i 2 .

[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 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 Because there are more idle resources in the server in this period, 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 the embodiment, when scheduling and allocating the idle resources in the server, the current resource water level pressure of each resource in the server is considered, that is, the usage rate of the corresponding resource in the server. If the corresponding amount of resources is scheduled and allocated, the resource water level pressure in the server exceeds the preset usage rate threshold, the target application is expelled from the server. Further, the resource pressure of the server is released in time to ensure the normal and stable operation of the existing applications on the server.

[0146] Meanwhile, according to the schedulable amount Q i of the resource, it can be known that, in the initial stage of resource allocation (that is, P i <Y i 1 ), Q i increases in an exponential form to quickly meet the resource demand of the target application, and then quickly complete the loading and running of the target application, and provide the corresponding service in time. In the middle stage of resource allocation (that is, Y i 1 <P i ≤Y i 2 ), Q i slowly increases in a linear form to further meet the resource demand of the target application while avoiding causing great pressure to the server and reducing the possibility of server crash. Finally, in the final stage of resource allocation (P i =Y i 2 ), that is, when the resource pressure of the server reaches the highest water level, Q i instantly reduces to half to quickly release the pressure of the server and expel the target application, and then ensure the normal operation of the server.

[0147] In addition, before S100, W100 and Z100, the scheduling method further includes:

[0148] S110: Obtain the type label of the application corresponding to the application creation request. The type label includes a computing type label, an application type label and a user configuration label.

[0149] S120: If the type label is a computing type label, obtain the task execution type label corresponding to the application. The task execution type label includes an online task type label and an offline task type label.

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

[0151] S140: If the task execution type label is an offline task type label, generate a creation request of a computing application corresponding to the 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 the 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 the steps shown must be performed to achieve the desired results. In addition or alternatively, some steps can be omitted, a plurality of steps can be combined into one step, and / or one step can be divided into a plurality of 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 specifically implemented as follows: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of 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 further include a program / utility having a set (at least one) 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.

[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 thereto, and / or one or more devices that enable a user to interact with the electronic device (e.g., a display, a remote control device, a mouse, a keypad, a microphone, etc.), and / or one or more devices that enable the electronic device to communicate with one or more other computing devices. Such communication can occur via an input / output (I / O) interface. Still yet, the electronic device can communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or the Internet) through a network adapter. It should be appreciated that the network adapter can also be utilized to enable the electronic device to communicate with other electronic devices or devices of the system 100 that are not explicitly shown, which can include through any appropriate connectivity and wirelessly (such as via wireless networking, TTY, etc.). The network adapter can be implemented as part of the electronic device or as a separate component that is coupled thereto. Further, the electronic device can include an infrared port (not shown) in electrical communication with the bus. The infrared port can be used to communicate to / from the electronic device with other electronic devices, such as one or more computers, televisions, 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, be but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, 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 the program for use by or in connection with an instruction execution system, apparatus or device.

[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 method for scheduling based on server idle resources, the method comprising: The method comprises the following steps: In response to a scheduling request of the target application to the server, obtaining the residual quantity information of each type of resource in the server; 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; Loading the target application according to the schedulable quantity of each type of resource and detecting the usage rate of each type of resource in the server in real time during the loading process; When the usage rate of any type of resource is greater than a preset usage rate threshold, deleting the loading task of the target application on the server; The scheduling amplitude configuration processing comprises: If the generation time of the scheduling request of the target application to the server is located within [5:00, 23:00], the schedulable quantity of each type of resource is generated according to the configuration duration and the resource usage of the server; wherein the schedulable quantity of the i-th type of resource Q i The following conditions are met: ; wherein Q i d is the unit scheduling resource amount 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; Y i 1 is the first usage rate threshold of the i-th type of resource; Y i 2 is the second usage rate threshold of the i-th type of resource; Y i 2 > Y i 1 ; Q i Y2 is P i = Y i 2 is the schedulable amount of the i-th type of resource.

2. The method of claim 1, wherein, Before responding to the scheduling request of the target application to the server, the method further comprises: Obtaining the type label of the application corresponding to the application creation request; the type label comprises a computing type label, an application type label and a user configuration label; If the type label is a computing type label, obtaining the task execution type label corresponding to the application; the task execution type label comprises an online task type label and an offline task type label; If the task execution type label is an offline task type label, generating the scheduling request of the target application to the server.

3. The method of claim 1, wherein, The scheduling amplitude configuration processing further comprises: If the generation time of the scheduling request of the target application to the server is located in (23:00, 4:40], the schedulable quantity of each type of resource is generated according to the configuration duration and the resource usage of the server; wherein the schedulable quantity of the i-th type of resource Q i satisfies the following conditions: ; where K i Max is the demand for the i-th type of resource in the target application.

4. The method of claim 1, wherein, Obtaining the residual quantity information of each type of resource in the server comprises: Obtaining the residual quantity information of memory, disk, CPU and GPU in the server.

5. The method of claim 4, wherein, The residual quantity information of each type of resource in the server is the remaining quantity after removing the online occupancy quantity and the resource reservation quantity from the total quantity of each type of resource in the server.

6. The method of claim 1, wherein, The server is a server node in a K8s cluster; Loading according to the schedulable quantity of each type of resource comprises: By adjusting the cgroup allocation of the task corresponding to the target application, the corresponding resource is allocated to the task step by step to create a server for loading the target application. 7.A non-transitory computer-readable storage medium storing a computer program, and the computer program comprises the following steps of, The computer program is executed by the processor to implement the scheduling method based on the idle resources of the server according to any one of claims 1 to 6.

8. 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 the scheduling method based on the idle resources of the server according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Resource adjustment method and device, electronic equipment and storage medium

    CN114780201A

  • Task scheduling method and device and Kubernetes scheduler

    CN115454589A