Energy-aware profit maximization-based task allocation method in heterogeneous computing systems
By building a fixed execution time and average power consumption matrix in the high-performance computing center, combining profit calculation formulas, and optimizing task allocation, the problem of difficulty in maximizing profits in the existing technology is solved, and the energy efficiency and economic benefits of task allocation in heterogeneous computing systems are improved.
Patent Information
- Application Number
- CN202211039025.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-29
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2042-08-29
AI Technical Summary
The prior art is difficult to achieve profit-maximizing task allocation in high-performance computing centers, especially when taking into account the fixed execution time and average power consumption of user tasks on each machine.
A task allocation method based on energy perception in heterogeneous computing system is proposed. By constructing a fixed execution time matrix and an average power consumption matrix, and combining profit calculation formulas, task allocation is optimized to maximize profits.
It realizes the maximization of task allocation that comprehensively considers task execution time and power consumption in heterogeneous computing systems, and improves the energy efficiency and economic benefits of the computing center.
Smart Images

Figure CN115454623B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of heterogeneous computing systems, and more specifically, relates to a task allocation method based on energy-aware profit maximization in a heterogeneous computing system. Background Art
[0002] With the rapid growth of energy consumption in data centers, it is increasingly important to focus on energy-efficient resource allocation in high-performance computing systems. Recently, a static scheduling model called bag-of-tasks has been proposed. Compared with the previous classical scheduling model, the estimated time to compute a task on a machine depends on the type of task and the type of machine. This new model determines the number of different types of tasks executed on each different type of machine, rather than arbitrarily assigning these tasks. Although there may be thousands of machines in a high-performance computing center, and the number of tasks that need to be executed cannot be estimated, the types of both are very limited, which makes it possible to design an algorithm for the model that can obtain quasi-optimal scheduling.
[0003] The classic energy-aware scheduling model aims to minimize the energy consumed by bag-of-tasks or the maximum completion time (makespan). However, high-performance computing centers would rather maximize the operating profit per unit time, where the profit is equal to the price paid by the user for a task package minus the electricity cost consumed during execution, which determines the enthusiasm of high-performance computing centers to participate in task allocation. Therefore, it is necessary to study the task allocation method with the goal of maximizing profit to meet the needs of actual application scenarios. Summary of the invention
[0004] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a task allocation method based on energy-aware profit maximization in a heterogeneous computing system. The method comprehensively considers the fixed execution time and average power consumption of user tasks on each machine, performs task allocation based on profit, and realizes energy-aware profit maximization.
[0005] In order to achieve the above-mentioned object of the invention, the task allocation method based on energy-aware profit maximization in a heterogeneous computing system of the present invention comprises the following steps:
[0006] S1: Let the number of machines in the heterogeneous computing system be M, the number of users be N, and the number of tasks in the task package submitted by user i be a. i , the revenue generated by executing the task of user i is p i ,i=1,2,…,N;Construct a fixed execution time matrix ETC=(ETC ij ), among which ETC ijrepresents the fixed execution time of a single task of user i on machine j, j = 1, 2, ..., M, and constructs an average power consumption matrix APC of size N × M = (APC ij ), where APC ij represents the average power consumption per unit time of a single task of user i on machine j; initialize the load of each machine The total energy consumption of M machines is E 0 =0;
[0007] S2: Set user number i=1;
[0008] S3: Calculate the product of user i’s fixed execution time and average power consumption APC on each machine ij ETC ij , sort the M machines according to the product from large to small, and record the original serial number of the mth machine after sorting as j m , m=1,2,…,M;
[0009] S4: Let the task allocation starting machine number τ=1,2,…,M respectively, and solve the following equations to obtain M task allocation vectors
[0010]
[0011]
[0012]
[0013] in, It represents the number of tasks assigned to user i on the mth machine after sorting when τ is used as the starting machine number for task allocation. represents the load of the mth machine after the task assignment of user i-1 is completed. represents the fixed execution time of a single task of user i on the mth machine after sorting, MS τ,i It means that the load of all machines after the task assignment to user i is completed by using τ as the starting machine number of the task assignment. The maximum value of Machine load The calculation formula is:
[0014]
[0015] S5: For the M task allocation vectors obtained in step S4 Use the following formula to calculate the corresponding profit value g τ :
[0016]
[0017] Among them, p k represents the revenue generated by executing the task of user k, c represents the cost of each unit of energy consumption, represents the average power consumption per unit time of a single task of user i on the mth machine after sorting;
[0018] Screen M profit values g τ The task assignment vector corresponding to the maximum value is used as the task assignment vector of user i
[0019] S6: Task allocation vector for user i obtained in step S5 Set user i's a i tasks are assigned to M machines;
[0020] S7: Use the following formula to update the load of each machine after the task allocation for user i is completed.
[0021]
[0022] The following formula is used to update the total energy consumption E of M machines after task assignment to user i is completed. i :
[0023]
[0024] S8: Determine whether i < N, if yes, go to step S9, otherwise the task allocation ends;
[0025] S9: Let i=i+1 and return to step S3.
[0026] The present invention provides a task allocation method based on energy-aware profit maximization in a heterogeneous computing system, obtains data of machines and users in the heterogeneous computing system, including the fixed execution time and average power consumption of user tasks on each machine, and then allocates tasks to each user in turn. In each allocation, all machines are first sorted according to the product of the fixed execution time and average power consumption of the user tasks, and then task allocation vectors are calculated at different task allocation starting machine numbers, the profit value of each task allocation vector is calculated, the task allocation vector corresponding to the maximum profit value is selected to allocate tasks to the user, the load and energy consumption of the machine are updated, and then the task is allocated to the next user until the task allocation of all users is completed.
[0027] The present invention comprehensively considers the fixed execution time and average power consumption of user tasks on each machine, and calculates the profits of different task allocation schemes based on this, and performs task allocation with the goal of maximizing energy-aware profit to achieve energy-aware profit maximization. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 It is a schematic diagram of the structure of the heterogeneous computing system in the present invention;
[0029] Figure 2 It is a flowchart of a specific implementation method of the task allocation method based on energy-aware profit maximization in a heterogeneous computing system of the present invention;
[0030] Figure 3 It is a diagram of the task allocation result in this embodiment. DETAILED DESCRIPTION
[0031] The specific implementation of the present invention is described below in conjunction with the accompanying drawings so that those skilled in the art can better understand the present invention. It should be noted that in the following description, when the detailed description of known functions and designs may dilute the main content of the present invention, these descriptions will be omitted here.
[0032] Example
[0033] In order to better illustrate the technical solution of the present invention, the scheduling model of the present invention is first briefly described. Figure 1 Schematic diagram of the heterogeneous computing system structure in the present invention. Let the number of machines in the heterogeneous computing system be M, the number of users be N, and the number of tasks in the task package submitted by user i be a. i , the revenue generated by executing the task of user i is p i , i = 1, 2, ..., N. That is, the heterogeneous computing system of the present invention includes different types of machines, each of which can perform many tasks, but the number of task types is also limited. Then construct a fixed execution time matrix ETC of size N × M = (ETC ij ), among which ETC ij represents the fixed execution time (estimated time to compute) of a single task of user i on machine j, j = 1, 2, ..., M, and constructs an average power consumption matrix APC of size N × M = (APC ij ), where APC ij It represents the average power consumption per unit time of a single task of user i on machine j. The fixed execution time and average power consumption of tasks on different machines can be obtained through historical operation statistics.
[0034] Let x ij represents the number of tasks assigned to user i on machine j. For a feasible task assignment matrix x = (x ij ), the load L of machine j j is defined as:
[0035]
[0036] Then the maximum completion time (makespan) MS(x) of all machines can be expressed as follows:
[0037]
[0038] Accordingly, the energy consumption E(x) of N users is:
[0039]
[0040] Let c represent the cost of each unit of energy consumption. Then the energy-aware profit maximizing problem (EAPM) for task allocation can be formally expressed as follows using nonlinear integer programming:
[0041]
[0042]
[0043]
[0044]
[0045] As shown in the above formula, the objective function (4) is to maximize the revenue per unit time, where the task allocation matrix x is the decision variable. Among the constraints, the first constraint ensures that each task of each user is assigned to a machine. Since the goal of maximizing the revenue per unit time is equivalent to minimizing the maximum completion time, the second constraint ensures that MS(x) is the maximum completion time of all machines.
[0046] However, in actual scenarios, when a user arrives, all of his tasks need to be assigned to the machine without knowing the information of the unreached user. Therefore, it is necessary to study the online algorithm of the EAPM problem considering task packages. Without loss of generality, assume that all tasks of user i will be assigned to one or several machines before user i+1 arrives, where i = 1, 2, ..., N-1. More importantly, when the number of tasks a to be assigned to user i is i When it is very large, it cannot be allocated one by one. i Therefore, it is necessary to design an effective algorithm for the EAPM problem considering task packages.
[0047] In this invention, an effective algorithm for solving the EAPM problem that can be calculated online considering the task package is proposed. For each user i, use and E irepresents the load and total energy consumption of machine j after the first i users’ task assignments are completed. Initially, the load of machine j is The total energy consumption of M machines is E 0 = 0. According to the definition, for any i = 1, 2, ..., N, the following relationship can be obtained:
[0048]
[0049]
[0050] When user i arrives, it can be determined that x ij The value of The profit value (i.e. target value) at this time is:
[0051]
[0052] in:
[0053]
[0054] The maximization problem can be formally expressed as the following integer program (IP):
[0055]
[0056]
[0057]
[0058]
[0059] Inequality (14) is equivalent to:
[0060]
[0061] For ease of operation, the machines serving the tasks of user i are assigned according to APC ij ETC ij Sort in descending order. Without loss of generality, assume
[0062] APC i1 ETC i1 ≥APC i2 ETC i2 ≥...≥APC iM ETC iM (17)
[0063] It is easy to prove that in the optimal case, there exists a task allocation starting machine number τ∈{1,2,...,M} such that
[0064]
[0065] Then for each τ=1,...,m, only some of the decision variables x need to be considered ij (j=τ,...,m). To obtain all x when user i arrives ij value, while MS i The value of is also unknown. However, the required results can be obtained by solving the following system of equations:
[0066]
[0067] x ij =0,j=1,2,...,τ-1 (19)
[0068]
[0069] Note that the linear equation system has a total of M-τ+2 equations and M-τ+2 unknowns, including MS i and x ij (j=τ,...,M). Therefore, this linear equation system can be solved in polynomial time. For each τ=1,...,M, we can get a set of x ij By comparing the profit values of these M groups of feasible solutions, we can find the optimal solution and perform task allocation based on it.
[0070] Based on the above derivation process, the task allocation method based on energy-aware profit maximization in the heterogeneous computing system of the present invention is obtained. Figure 2 This is a flowchart of a specific implementation method of the task allocation method based on energy-aware profit maximization in a heterogeneous computing system of the present invention. Figure 2 As shown, the specific steps of the task allocation method based on energy-aware profit maximization in the heterogeneous computing system of the present invention include:
[0071] S201: Obtaining heterogeneous computing system data:
[0072] Let the number of machines in the heterogeneous computing system be M, the number of users be N, and the number of tasks in the task package submitted by user i be a i , the revenue generated by executing the task of user i is p i ,i=1,2,…,N;Construct a fixed execution time matrix ETC=(ETC ij ), among which ETC ij represents the fixed execution time of a single task of user i on machine j, j = 1, 2, ..., M, and constructs an average power consumption matrix APC of size N × M = (APC ij ), where APC ijrepresents the average power consumption per unit time of a single task of user i on machine j. Initialize the load of each machine The total energy consumption of M machines is E 0 =0.
[0073] S202: Set user serial number i=1.
[0074] S203: Machine sorting:
[0075] Calculate the product of user i's fixed execution time and average power consumption on each machine APC ij ETC ij , sort the M machines according to the product from large to small, and record the original serial number of the mth machine after sorting as j m , m=1,2,…,M.
[0076] S204: Solve the M groups of task allocation vectors:
[0077] Let the task allocation starting machine number τ=1,2,…,M respectively, and solve the following equations to obtain M task allocation vectors
[0078]
[0079]
[0080]
[0081] in, It represents the number of tasks assigned to user i on the mth machine after sorting when τ is used as the starting machine number for task allocation. represents the load of the mth machine after the task assignment of user i-1 is completed. represents the fixed execution time of a single task of user i on the mth machine after sorting, MS τ,i It means that the load of all machines after the task assignment to user i is completed by using τ as the starting machine number of the task assignment. The maximum value of Machine load The calculation formula is:
[0082]
[0083] S205: Filter the optimal task allocation vector:
[0084] For the M task allocation vectors obtained in step S204 Use the following formula to calculate the corresponding profit value g τ :
[0085]
[0086] Among them, p k represents the revenue generated by executing the task of user k, c represents the cost of each unit of energy consumption, It represents the average power consumption per unit time of a single task of user i on the mth machine after sorting.
[0087] Screen M profit values g τ The task assignment vector corresponding to the maximum value is used as the task assignment vector of user i
[0088] S206: User i task allocation:
[0089] According to the task allocation vector of user i obtained in step S205 Set user i's a i tasks are assigned to M machines. In order to maximize the profit as much as possible, the following method can be preferably used when assigning tasks:
[0090] Task allocation vector The corresponding task allocation starting machine number is τ * , then after sorting, the τth * +1 to the number of tasks assigned to user i on the Mth machine is Indicates rounding up, m′=τ * +1,τ * +2,...,M, the τth order after sorting * The number of tasks assigned to user i on the machine is
[0091] S207: Update machine load and energy consumption:
[0092] Use the following formula to update the load of each machine after the task assignment for user i is completed:
[0093]
[0094] The following formula is used to update the total energy consumption E of M machines after task assignment to user i is completed. i :
[0095]
[0096] S208: Determine whether i<N, if yes, go to step S209, otherwise the task allocation ends.
[0097] S209: Let i=i+1, and return to step S203.
[0098] In order to better illustrate the technical solution of the present invention, a specific example is used to experimentally verify the present invention. In this embodiment, there are 4 machines in the heterogeneous computing system, and their CPU types are as follows:
[0099] 1. AMD A8-3870K
[0100] 2. AMD FX-8150
[0101] 3. Intel Core i3 2120
[0102] 4. Intel Core i5 2400S
[0103] There are two users in the heterogeneous computing system. The types of tasks that each user needs to perform are as follows:
[0104] 1. C-Ray
[0105] 2. 7-Zip Compression
[0106] Table 1 is the fixed execution time matrix of the tasks of two users on four machines in this embodiment.
[0107]
[0108] Table 1
[0109] Table 2 is the average power consumption matrix of the tasks of two users on four machines in this embodiment.
[0110]
[0111] Table 2
[0112] In this example, the number of tasks for user 1 is set to 40, and the number of tasks for user 2 is set to 80. Assume that the benefits of the two user tasks are p1 = 200000, p2 = 800000, and the cost of each unit of energy consumption is c = 1. When the task of user 1 arrives, the APC is calculated first. 1j ETC 1j value, and press APC 1j ETC 1j The values are arranged from large to small.
[0113] Table 3 is a ranking table of the four machines when assigning tasks to user 1 in this embodiment.
[0114]
[0115] Table 3
[0116] Let the task allocation starting machine number τ = 1. At this time, there is no x = 0. Solving the following linear equations can get the solution when the task allocation starting machine number τ = 1:
[0117]
[0118]
[0119] The obtained task allocation vector is For ease of description, it is restored to the original machine order, that is, At this time, the profit value is -125.363. Then, we calculate the solutions and profit values when the task allocation starting machine number τ=2, 3, and 4 in turn. We can find that when τ=4, the maximum profit value is -2.676. At this time (x 11 ,x 12 ,x 13 ,x 14 )=(0,0,0,40). That is, all tasks of task type 1 are assigned to machine 4, that is, Intel Core i5 2400S machine for execution. Update the load of machine 4 and the total energy consumption of the four machines, and then repeat the above steps to assign tasks to user 2. Figure 3 is the task allocation result diagram in this embodiment. Figure 3 As shown, in this embodiment, the tasks of user 1 are assigned to machine 4, and the tasks of user 2 are assigned to machines 3 and 4.
[0120] Although the above describes the illustrative specific embodiments of the present invention to facilitate those skilled in the art to understand the present invention, it should be clear that the present invention is not limited to the scope of the specific embodiments. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations using the concept of the present invention are protected.
Claims
1. A task allocation method based on energy-aware profit maximization in a heterogeneous computing system, characterized in that include: S1: Let the number of machines in the heterogeneous computing system be M, the number of users be N, and the number of tasks in the task package submitted by user i be a. i , the revenue generated by executing the task of user i is p i ,i=1,2,…,N;Construct a fixed execution time matrix ETC=(ETC ij ), among which ETC ij represents the fixed execution time of a single task of user i on machine j, j = 1, 2, ..., M, and constructs an average power consumption matrix APC of size N × M = (APC ij ), where APC ij represents the average power consumption per unit time of a single task of user i on machine j; initialize the load of each machine The total energy consumption of M machines is E 0 =0; S2: Set user number i=1; S3: Calculate the product of user i’s fixed execution time and average power consumption APC on each machine ij ETC ij , sort the M machines according to the product from large to small, and record the original serial number of the mth machine after sorting as j m , m=1,2,…,M; S4: Let the task allocation starting machine number τ=1,2,…,M respectively, and solve the following equations to obtain M task allocation vectors in, It represents the number of tasks assigned to user i on the mth machine after sorting when τ is used as the starting machine number for task allocation. represents the load of the mth machine after the task assignment of user i-1 is completed. represents the fixed execution time of a single task of user i on the mth machine after sorting, MS τ,i It means that the load of all machines after the task assignment to user i is completed by using τ as the starting machine number of the task assignment. The maximum value of Machine load The calculation formula is: S5: For the M task allocation vectors obtained in step S4 Use the following formula to calculate the corresponding profit value g τ : Among them, p k represents the revenue generated by executing the task of user k, c represents the cost of each unit of energy consumption, represents the average power consumption per unit time of a single task of user i on the mth machine after sorting; Screen M profit values g τ The task assignment vector corresponding to the maximum value is used as the task assignment vector of user i S6: Task allocation vector for user i obtained in step S5 Set user i's a i tasks are assigned to M machines; S7: Use the following formula to update the load of each machine after the task allocation for user i is completed. The following formula is used to update the total energy consumption E of M machines after task assignment to user i is completed. i : S8: Determine whether i < N, if yes, go to step S9, otherwise the task allocation ends; S9: Let i=i+1 and return to step S3.
2. The method for task allocation based on energy-aware profit maximization in a heterogeneous computing system according to claim 1, characterized in that: The specific method of task allocation in step S6 is: Task allocation vector The corresponding task allocation starting machine number is τ * , then after sorting, the τth * +1 to the number of tasks assigned to user i on the Mth machine is Indicates rounding up, m′=τ * +1,τ * +2,...,M, the τth order after sorting * The number of tasks assigned to user i on the machine is
Citation Information
Cited By
Heterogeneous computing cluster resource management and task scheduling method for reconfigurable hardware accelerator
CN117785421A
Resource management and task scheduling method for reconfigurable hardware accelerator oriented heterogeneous computing cluster
CN117785421B