An offline task scheduling method to maximize resource utilization

By adopting a scheduling method based on future resource usage in the data center, dynamically defining resource fragments, and using heuristic functions to optimize the search, the resource fragmentation problem is solved, and resource utilization and scheduling efficiency are improved.

CN116560849BActive Publication Date: 2026-01-30SOUTHEAST UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310586320.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-23
Publication Date
2026-01-30
Estimated Expiration
2043-05-23

AI Technical Summary

Technical Problem

Existing technologies, when deploying online and offline tasks in a mixed manner in data centers, neglect to optimize the remaining resources of nodes, resulting in resource fragmentation and failing to effectively improve resource utilization.

Method used

A scheduling method based on future resource usage is adopted. The preprocessing stage determines the task's runtime and resource availability in the container, establishes an arrival and time distribution prediction model, and uses heuristic functions to filter search objects in the search tree, reducing the number of searches, dynamically defining resource fragments, and improving resource utilization.

Benefits of technology

It effectively solves the problem of resource fragmentation caused by resource fluctuations, improves the resource utilization rate of data centers, and reduces resource waste and scheduling time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116560849B_ABST
    Figure CN116560849B_ABST
Patent Text Reader

Abstract

This invention discloses an offline task scheduling method that maximizes resource utilization, belonging to the fields of cloud computing applications, computer technology, and green computing. Addressing the shortcomings of current methods such as low resource utilization and the fact that scheduling processes only consider current resource usage without incorporating future resource needs, this invention proposes a method for maximizing resource utilization in offline task scheduling. It employs a resource prediction method, considering future resource waste at the current scheduling point in time, and appropriately increases the predicted resource demand value through a feasibility index, thereby improving the future success rate of scheduled tasks. Heuristic and search pruning methods are used to reduce the number of searches when searching a large number of server states, reaching the search target faster. By setting termination conditions, this method can output scheduling results more quickly and ensure the quality of the results. This method is particularly suitable for scheduling offline tasks to clusters with existing online tasks.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to an offline task scheduling method for maximizing resource utilization in a data center, belonging to the fields of cloud computing application, computer technology and green computing. BACKGROUND

[0002] Large-scale data centers are the key support for today's enterprise-level Internet applications and cloud computing systems. In order to meet the growing computing needs of Internet applications and cloud computing systems, data centers need to be continuously expanded, and their scale and total number of servers are showing a rapid growth trend. Different enterprise users and individual users have different needs for data centers. Enterprise users tend to deploy cloud applications and the like developed by them in data centers, while individual users tend to AI model training and the like. At the same time, enterprise users also have certain large model training and other needs, which will occupy more resources than individual users.

[0003] From the submitted tasks of users to the data center, they can be divided into two categories. One is online tasks, such as cloud applications arranged by enterprises, and the other is offline tasks, such as AI model training tasks. And the characteristics of these two types of tasks are very different.

[0004] Online tasks need to be continuously deployed in data centers and occupy a certain amount of resources in data centers at all times to wait for processing of requests submitted by target customers of corresponding enterprise users. However, due to various factors in reality such as work and rest, the number of requests submitted by these target customers within a day is tide-like, and different request quantities require different amounts of resources occupied by online tasks. Specifically, the amount of resources required by online tasks within a day will show a phenomenon of more or less, and online tasks need to pay attention to request response processing time when processing requests. Too long time will lead to a decline in the satisfaction of target customers.

[0005] Offline tasks do not have a tide-like phenomenon. First of all, they are not deployed for a long time. After a period of time after submission, the offline task flow is completed, and the resources occupied by the offline task are released immediately. Faced with soft deadline constraints, it may require a large amount of computing resources. However, too many offline tasks will not bring benefits to the data center.

[0006] Deploying online tasks and offline tasks in a cluster at the same time can effectively improve the resource utilization of the cluster and reduce the cost of the data center. However, the current research on mixed deployment of offline tasks basically considers the interference problem between jobs. The solution of their interference problem will improve the processing speed of tasks and reduce the hardware resource occupation, thereby reducing the cost of the cluster. Some research focuses on improving the speed of task scheduling and separates the scheduling of online tasks and offline tasks. However, they ignore the method of optimizing the remaining resources of nodes, resulting in fragmented resources left in the cluster nodes. Summary of the Invention

[0007] Problem Description: This invention considers hybrid deployment of on- and off-line tasks in a data center, aiming to achieve higher resource utilization. Server cluster VM = {vm1, vm2, ..., vm...} n The task set T = {t1, t2, ..., t} m}

[0008] The i-th virtual machine (vm) i The total amount of resources is Let represent the array of predicted idle resource values ​​for the i-th virtual machine within 24 hours, where t indicates that the 24 hours are divided into t blocks, each block having a duration of 24 / t. Indicates VM i The minimum value of the predicted resource within the x-th time block.

[0009] The i-th task t i The resource prediction array is Let represent the array of predicted resource requirements for the i-th task within a 24-hour period, where t represents dividing the 24-hour period into t blocks, each block lasting 24 / t. Indicates t i The highest predicted resource value within time block x.

[0010] The i-th task t i The actual resource demand array is Let represent the array of predicted resource requirements for the i-th task within a 24-hour period, where t represents dividing the 24-hour period into t blocks, each block lasting 24 / t. Indicates t i The highest predicted resource value within time block x.

[0011] β i ∈{0,1} represents t i Whether the process was ultimately successful and ended.

[0012] The goal is to improve resource utilization. The higher the better.

[0013] Purpose of the invention: In view of the above-mentioned situation, in order to overcome the shortcomings of the existing technology, an online and offline scheduling method based on future resource usage is provided to effectively solve the resource fragmentation problem caused by resource fluctuations and improve resource utilization.

[0014] Technical solution: To achieve the above objectives, the technical solution adopted by this invention is as follows:

[0015] An offline task scheduling method that maximizes resource utilization, the method comprising the following stages:

[0016] A. Preprocessing stage: Determine the task's runtime in the container, compare the server's time window, determine the predictive resource availability and adjust the task resource prediction value accordingly, obtain the arrival distribution prediction model and the time distribution prediction model, determine the tolerance values ​​of the two models and the upper bounds of resource waste and time waste values; finally, determine the comparison server model, establish a waiting search queue, a search completion queue, and initialize the best server.

[0017] B. Scheduling Phase: Select a comparison server from the waiting search queue and match it with the task resource value. If the resources are insufficient, enter the completed search queue and reselect a comparison server. Otherwise, calculate the priority and compare it with the model and termination conditions to determine whether to complete the search. If the search ends, return the best server.

[0018] The preprocessing stage includes the following steps:

[0019] A1. Determine the task's runtime within the container. t The runtime of online tasks is calculated in 24-hour windows; the runtime of offline tasks is determined in the following ways:

[0020] A101. If there are records of similar offline tasks, then take that time as the offline task's execution time.

[0021] A102. Offline tasks run for one minute on a separate server to determine the processing speed within that minute and estimate the run time based on the total task volume.

[0022] A2. Determine the server comparison time window N t The comparison window for online tasks is 24 hours; the comparison window for offline tasks is from the start time of scheduling to the deadline of the offline task.

[0023] A3. The preprocessed container resources and the remaining server resources data are aggregated into 24 blocks, each representing the highest predicted resource value within one hour, to determine the preprocessed resource sequence.

[0024] A4. Determine the reliability α of the predicted resources. Based on the principle that the reliability decreases as the prediction time point is further away from the current time point, increase the resource values ​​of different prediction time points in the container resource sequence and adjust the predicted resource value to (1+αt).

[0025] A5. Establish an arrival distribution prediction model β based on the arrival status of offline tasks. The horizontal axis of this prediction model represents the resource requirement of offline tasks, and the vertical axis represents the arrival probability. Establish a runtime distribution prediction model γ based on the runtime of offline tasks. The horizontal axis of this prediction model represents the runtime length of offline tasks, and the vertical axis represents the arrival probability. Update both models once per hour.

[0026] A6. Determine the tolerance value p for resource waste. γ When the wasted task execution time is represented by the y-axis in the γ model... γ >p γ In some cases, the waste is considered acceptable; otherwise, it is unacceptable.

[0027] A7. Determine the upper bound of resource waste, which is the time waste value w. t With resource waste value w r .

[0028] A8. Create a search completion queue and initialize it to empty, create a waiting search queue and add all servers to it, and create and initialize the best server.

[0029] The scheduling phase includes the following steps:

[0030] B1. Select the first server from the waiting search queue and determine the current comparison level R of the server. The comparison level is equal to the current comparison round of the server.

[0031] B2. Determine the comparison length L based on the comparison level R. The comparison length gradually decreases as the comparison level increases until it becomes 1.

[0032] B3. When comparison level R ≠ 2, proceed to B5. When comparison level R = 2, determine the server's current comparison range. The deadline for offline tasks is more lenient, i.e., D. t Less than N t There might be a situation where a server currently lacks resources but will have sufficient resources in the future. Therefore, offline tasks can be scheduled to run on the server after a certain period of time. This scheduling method is called pre-scheduling, and the idle time is called fragment time S. t S t ∈(0,N t -D t When the scheduling time is t, the server comparison range is t+S. t to t+S t +D t .

[0033] B4.S t The corresponding ordinate in the γ model is y. γ When S t <w tor y γ >p γ If the search is successful, proceed to B5; otherwise, the server state will be pruned, added to the search completion queue, and the search for all states under that branch will cease, proceeding to B7.

[0034] B5. Based on the comparison length, compare the maximum value of the container resources with the maximum value of the server's remaining resources within that comparison length. If the maximum value of the container resources is greater than the maximum value of the server's remaining resources, and R = 2, return to B3. If R ≠ 2, the server state will be pruned and added to the search completion queue. The search for all states under this branch will cease, and the process will proceed to B7. If the maximum value of the container resources is less than the maximum value of the server's remaining resources, calculate the server priority using the following steps.

[0035] B501. Calculate the difference M between the maximum remaining server resources and the maximum resource requirement of the container within each L-length block. l And for M within the comparison range l Add them together, then divide by the length of the comparison range to calculate the average difference M of resources within the comparison range.

[0036] B502. Based on the M and β models, calculate the ordinate y of M in the β model. β y β This is the priority of the current search.

[0037] B6. When L=1, add the current search server to the search completion queue and sort it; when M... <w r If the search fails, replace the best server with this server, terminate the search, and proceed to B8; otherwise, compare its priority with the best server's priority. β If it's larger, then it will replace the best server.

[0038] B7. If the waiting search queue is not empty, return to B1; otherwise, terminate the search and go to B8.

[0039] B8. Once the search termination condition is met or it is determined that the termination condition cannot be met, the best server becomes the target server, and scheduling is executed.

[0040] Beneficial Effects: The online / offline scheduling method based on future resource usage provided by this invention has the following beneficial effects compared with existing technologies:

[0041] (1) When performing scheduling, this invention considers future resource usage, not just current resource usage. Furthermore, this invention focuses on improving resource utilization and reducing unusable resource fragments. In defining resource fragments, it adds the concept of time-based resource fragments, dynamically defining resource fragments through probabilistic model prediction, rather than using fixed values. Simultaneously, it utilizes heuristic functions to filter search objects in the search tree, reducing the number of searches and accelerating scheduling. Attached Figure Description

[0042] Figure 1 This is a schematic diagram illustrating the basic principle of a preferred embodiment;

[0043] Figure 2 This is a flowchart illustrating the specific implementation algorithm of a preferred embodiment of the present invention;

[0044] Figure 3 This is a resource sequence diagram of the aggregated resources required by the offline tasks to be scheduled in a preferred embodiment of the present invention;

[0045] Figure 4 This is a resource sequence diagram of the aggregated remaining resources of multiple servers in a preferred embodiment of the present invention;

[0046] Figure 5 This is a resource sequence diagram of the remaining resources of multiple servers after availability processing in a preferred embodiment of the present invention;

[0047] Figure 6 This is the offline task arrival prediction and arrival distribution prediction model in the preferred embodiment of the present invention;

[0048] Figure 7 This is the offline task runtime distribution prediction model in a preferred embodiment of the present invention. Detailed Implementation

[0049] The present invention will be further illustrated below with reference to the accompanying drawings and specific implementation examples. It should be understood that these examples are for illustrative purposes only and are not intended to limit the scope of the invention. After reading this invention, any modifications of the invention in various equivalent forms by those skilled in the art will fall within the scope defined by the appended claims.

[0050] Example: The basic principle of a preferred embodiment of the present invention is as follows Figure 1 As shown, an offline task scheduling method that maximizes resource utilization includes the following stages:

[0051] A. Preprocessing stage: Determine the task's runtime in the container, compare the server's time window, determine the predictive resource availability and adjust the task resource prediction value accordingly, obtain the arrival distribution prediction model and the time distribution prediction model, determine the tolerance values ​​of the two models and the upper bounds of resource waste and time waste values; finally, determine the comparison server model, establish a waiting search queue, a search completion queue, and initialize the best server.

[0052] B. Scheduling Phase: Select a comparison server from the waiting search queue and match it with the task resource value. If the resources are insufficient, enter the completed search queue and reselect a comparison server. Otherwise, calculate the priority and compare it with the model and termination conditions to determine whether to complete the search. If the search ends, return the best server.

[0053] The preprocessing stage includes the following steps:

[0054] A1. Determine the task's runtime within the container. t In this example, it is an offline task. If there are similar offline task records in the history, the running time is taken as the duration of the offline task, which is 4 hours.

[0055] A2. Determine the server comparison time window N t In this example, which is an offline task, the comparison time is from the scheduling time to the offline task's deadline. The deadline for this offline task is 6:00 AM. Therefore, the server comparison time length is N. t =6.

[0056] A3. Preprocess the container resource and server remaining resource data, aggregating them into 24 blocks, each representing the predicted highest resource value within a one-hour period, thus obtaining the processed resource sequence, such as... Figure 3 and Figure 4 As shown.

[0057] A4. Determine the reliability α of the predicted resources, which is set to 0.05 in this example. Based on the principle that the further the predicted time point is from the current time point, the lower the reliability, increase the resource values ​​at different predicted time points in the container resource sequence. In this example, simply multiply the original predicted value by a coefficient (1 + 0.05t), where t is the distance of the resource from the starting point in the time dimension. The processed resource map is shown below. Figure 5 As shown.

[0058] A5. Based on the arrival status of offline tasks, establish an arrival distribution prediction model β. In this example, the β model follows a χ² distribution, such as... Figure 6As shown in the figure. The horizontal axis of the prediction model represents the resource requirement of the offline task, and the vertical axis represents the arrival probability. A runtime distribution prediction model γ is established based on the runtime of the offline task. In this example, the γ model also follows a χ² distribution. The horizontal axis of this prediction model represents the runtime of the offline task, and the vertical axis represents the arrival probability. Both models are updated once per hour.

[0059] A6. Determine the tolerance value p for resource waste. γ In this example, p is set... γ = 0.9. This indicates that the wasted task runtime corresponds to the y-axis in the γ model. γ When the value is greater than 0.9, the waste is considered acceptable; otherwise, it is unacceptable.

[0060] A7. Determine the upper bound of resource waste, which is the time waste value w. t With resource waste value w r In this example, w is set to... t =1, w r =0.5 means that when the pre-scheduled idle time does not exceed one hour, the scheme can be accepted directly without considering resource waste; when the average resource waste does not exceed 0.5 cores, the resource waste is considered acceptable, and the scheduling algorithm will directly select the scheme and end the search early.

[0061] A8. Create a search completion queue and initialize it to empty, create a waiting search queue and add all servers to it, and create and initialize the best server.

[0062] The scheduling phase is as follows Figure 2 As shown, it includes the following steps:

[0063] B1. Select the first server from the waiting search queue and determine the current comparison level R of the server. The comparison level is equal to the current comparison round of the server.

[0064] B2. Determine the comparison length L based on the comparison level R. The comparison length gradually decreases as the comparison level increases until it becomes 1.

[0065] B3. When comparison level R ≠ 2, proceed to B5. When comparison level R = 2, determine the server's current comparison range. The deadline for offline tasks is more lenient, i.e., D. t Less than N t There might be a situation where a server currently lacks resources but will have sufficient resources in the future. Therefore, offline tasks can be scheduled to run on the server after a certain period of time. This scheduling method is called pre-scheduling, and the idle time is called fragment time S. t S t ∈(0,N t -D tWhen the scheduling time is t, the server comparison range is t+S. t to t+S t +D t .

[0066] B4.S t The corresponding ordinate in the γ model is y. γ When S t <w t or y γ >p γ If the search is successful, proceed to B5; otherwise, the server state will be pruned, added to the search completion queue, and the search for all states under that branch will cease, proceeding to B7.

[0067] B5. Based on the comparison length, compare the maximum value of the container resources with the maximum value of the server's remaining resources within that comparison length. If the maximum value of the container resources is greater than the maximum value of the server's remaining resources, and R = 2, return to B3. If R ≠ 2, the server state will be pruned and added to the search completion queue. The search for all states under this branch will cease, and the process will proceed to B7. If the maximum value of the container resources is less than the maximum value of the server's remaining resources, calculate the server priority using the following steps.

[0068] B501. Calculate the difference M between the maximum remaining server resources and the maximum resource requirement of the container within each L-length block. l And for M within the comparison range l Add them together, then divide by the length of the comparison range to calculate the average difference M of resources within the comparison range.

[0069] B502. Based on the M and β models, calculate the ordinate y of M in the β model. β y β This is the priority of the current search.

[0070] B6. When L=1, add the current search server to the search completion queue and sort it; when M... <w r If the search fails, replace the best server with this server, terminate the search, and proceed to B8; otherwise, compare its priority with the best server's priority. β If it's larger, then it will replace the best server.

[0071] B7. If the waiting search queue is not empty, return to B1; otherwise, terminate the search and go to B8.

[0072] B8. Once the search termination condition is met or it is determined that the termination condition cannot be met, the best server becomes the target server, and scheduling is executed.

[0073] It should be noted that the above embodiments are not intended to limit the scope of protection of the present invention. Equivalent transformations or substitutions made based on the above technical solutions all fall within the scope of protection of the claims of the present invention.

Claims

1. An off-line task scheduling method to maximize resource utilization, characterized in that, The method comprises the following steps: A. The preprocessing stage: specifically as follows: A1. Determine the run time of the task at the container The run time of the online task is calculated in a time window of 24 hours; the run time of the offline task is determined by the following way: A101. If there is a record of similar offline tasks, take the time as the offline task running time; A102. The offline task runs on a separate server for one minute, determines the processing speed within one minute, and estimates the running time according to the total task amount; A2. Determine the server comparison time window The comparison time window for online tasks is 24 hours; the comparison time window for offline tasks is from the dispatch start time to the offline task deadline. A3. Aggregate the pre-processing container resources and the server remaining resource data into 24 blocks respectively, each block representing the highest value of resources within one hour, and determine the pre-processed resource sequence; A4. Determine the predicted resource credibility , according to the principle that the farther the predicted time point is from the current time point, the lower the credibility is, increase the resource value of different predicted time points in the container resource sequence, and adjust the predicted resource value to ; A5. Establishing an arrival distribution prediction model according to the arrival of offline tasks The prediction model has the resource demand of offline tasks as the horizontal coordinate and the arrival probability as the vertical coordinate; an operation time distribution prediction model is established according to the operation time length of offline tasks The prediction model has the operation time length of offline tasks as the horizontal coordinate and the arrival probability as the vertical coordinate; the two models are updated once every hour respectively; A6. Determine a resource waste tolerance value When the length of wasted task run time is less than the corresponding ordinate in the model the waste is considered acceptable, otherwise it is not; A7. determining a resource waste upper bound, respectively a time waste value with the resource waste value ; A8. Establish a search completion queue and initialize it as empty, establish a waiting search queue and add all servers to it, establish and initialize the best server; B. The scheduling stage: select a comparison server from the waiting search queue, match it with the task resource value, if the resources are insufficient, enter the completion search queue, select a comparison server again, otherwise calculate the priority, compare it with the model and the end condition, and determine whether the search is completed, if the search is completed, return the best server, otherwise determine whether the server ends the search, if it is completed, enter the completion search queue, otherwise enter the waiting search queue, and sort according to the priority, the server with high priority is in the front.

2. The method of offline task scheduling that maximizes resource utilization according to claim 1, wherein, B. The scheduling stage: specifically comprises the following steps: B1. Select the first server from the search queue, determine the current comparison rank of the server , the comparison rank is equal to the current comparison round of the server; B2. a comparison rank , determining a comparison length , the comparison length being progressively reduced as the comparison rank increases, until 1. B3. When the comparison level goes to B5, when the comparison level , the server current comparison range is determined, the offline task deadline is more relaxed, that is less than , there may be a certain server insufficient resources at the moment but future resources sufficient, so the offline task scheduling to the server can run for a period of time, this scheduling method is called pre-scheduling, and the idle time is called fragmented time , , the scheduling time is , the server comparison range is to ; B4. In The corresponding ordinate on the model is When Or B5, otherwise the server state will be pruned, into the search complete queue, no longer continue to search all states under this branch, enter B7; B5. According to the comparison length, the container resource and the server remaining resource are compared in sequence with the maximum value of the resource sequence within the comparison length. If the maximum value of the container resource is greater than the maximum value of the server remaining resource, when B3 is returned, and when the server state is pruned and is put into the search completion queue, and the branch is no longer searched, and B7 is entered. If the maximum value of the container resource is less than the maximum value of the server remaining resource, the server priority is calculated according to the following steps. B6. When the current search server is added to the search completion queue and ordered, when the server replaces the best server, and the search terminates, entering B8, otherwise its priority is compared to the best server priority, and if it is greater, the best server is replaced, B7. If the waiting search queue is not empty, return to B1, otherwise the search is terminated, go to B8, B8. When the search termination condition is reached or it is determined that the termination condition cannot be reached, the best server is the target server, and the scheduling is executed.

3. The offline task scheduling method for maximizing resource utilization according to claim 2, characterized in that, Step B5 is specifically as follows: B501. Calculate the maximum value of the remaining resources of the server in the length block minus the maximum value of the resource demand of the container the difference between the maximum value of the remaining resources of the server in the length block minus the maximum value of the resource demand of the container and the average difference value of the resources in the comparison range is calculated by adding the maximum value of the remaining resources of the server in the length block minus the maximum value of the resource demand of the container and then dividing by the length of the comparison range , B502. According to and model, calculate In corresponding ordinate , is the priority of the current search.

Citation Information

Patent Citations

  • Workflow cost-delay optimization task allocation method based on hybrid cloud

    CN110308967A

  • High throughput cloud computing resource recovery system

    WO2023015787A1