Workflow task scheduling method and system based on vGPU
By constructing a DAG model and introducing genetic algorithms and Pareto optimal front strategies through a vGPU-based multi-user workflow task scheduling method, the problem of excessive resource utilization and difficulty in balancing multi-user fairness in existing GPU scheduling methods is solved. This achieves multi-objective optimized resource allocation, improving system efficiency and user experience.
Patent Information
- Application Number
- CN202511518699.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-23
- Publication Date
- 2026-01-23
AI Technical Summary
Existing GPU-based workflow scheduling methods suffer from problems such as excessive resource utilization, difficulty in achieving fairness among multiple users, and imbalance of weights among multiple objectives in resource-priority, efficiency-priority, and single-user-priority scheduling methods, making them unsuitable for complex scenarios where multiple users share GPUs.
A multi-user workflow task scheduling method based on vGPU is adopted. By constructing a directed acyclic graph (DAG) model and combining genetic algorithms and simulated binary crossover and mutation algorithms, multiple sets of subtask-vGPU mapping relationships are generated. Workflow completion time deviation penalties are introduced, and a Pareto optimal frontier screening strategy is adopted to optimize resource allocation to balance system efficiency, user experience, and resource utilization.
It achieves a balance between individual user time constraints, multi-user fairness, and cluster throughput in multi-user scenarios, solving the problems of excessive resource utilization and imbalance of multi-objective weights in existing scheduling methods, and improving the overall system performance.
Smart Images

Figure CN121387484A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of GPU resource scheduling technology, and more specifically, relates to a workflow task scheduling method and system based on vGPU. Background Technology
[0002] With the rapid development of artificial intelligence, deep learning, scientific computing and other fields, workflow tasks are characterized by "high parallelism, strong computing power dependence and heterogeneous resource requirements". These tasks (such as deep learning model training, 3D rendering, finite element analysis, etc.) not only require a lot of computing resources, but also have extremely high requirements for graphics processing capabilities. The traditional CPU (central processing unit)-based scheduling architecture can no longer meet its requirements for low latency and high throughput. GPUs, with their many-core parallel computing characteristics, have become the core hardware resource for processing these tasks.
[0003] Existing GPU-based workflow scheduling methods can be mainly divided into three categories: resource-priority scheduling methods, which aim to maximize GPU resource utilization. They allocate GPU resources (such as fixed allocation of video memory and computing core percentage) to different user tasks by statically dividing GPU resources, prioritizing the allocation of idle GPU resources to tasks to be executed, and avoiding resource idleness; efficiency-priority scheduling methods, which focus on minimizing the total completion time of system tasks. They adopt task priority sorting strategies (such as sorting by task submission time and computational load) to prioritize scheduling high-priority tasks to occupy GPU resources, thereby reducing the overall task queuing time; and single-user experience-priority scheduling methods, which allocate dedicated GPU resources or priority scheduling rights to workflow tasks based on specific user needs, ensuring that the user tasks are completed on schedule. These methods are commonly used in latency-sensitive single-user scenarios.
[0004] However, the aforementioned GPU-based workflow scheduling methods all have some significant drawbacks: First, the above-mentioned resource-priority scheduling method overemphasizes resource utilization and achieves resource reuse by compressing the vGPU resource allocation of a single user workflow (such as reducing video memory and core count). This can easily lead to user tasks exceeding the deadline due to insufficient resources, and ignores the time constraints of a single user workflow. Second, although the above-mentioned efficiency-first scheduling method can shorten the total task completion time of the system, it may over-allocate resources to high-priority tasks, causing low-priority user tasks to queue for a long time, reducing cluster throughput, and making it difficult to take into account the fairness of multiple users. Third, the aforementioned single-user experience-first scheduling method, as well as the efficiency-first and resource-first methods, all suffer from the problem of multi-objective weight imbalance. They only focus on the duration of a single user task and lack an effective mechanism to coordinate and optimize the total system duration, user task duration, and resource utilization. Therefore, they cannot adapt to complex scenarios where multiple users share a GPU. Summary of the Invention
[0005] To address the above-mentioned deficiencies or improvement needs of existing technologies, this invention provides a workflow task scheduling method and system based on vGPU. The purpose is to solve the technical problems of existing resource-priority scheduling methods ignoring the time constraints of individual user workflows, existing efficiency-priority scheduling methods that struggle to balance multi-user fairness and reduce cluster throughput, and existing single-user experience-priority scheduling methods that suffer from multi-objective weight imbalance and lack of coordination mechanisms.
[0006] To achieve the above objectives, according to one aspect of the present invention, a workflow task scheduling method based on a virtual graphics processing unit (vGPU) is provided, comprising the following steps: A multi-user workflow task scheduling method based on vGPU includes the following steps: (1) Obtain the resource purchase request and workflow task request of the u-th user from the scheduling platform, parse the resource purchase request to obtain the resource requirement metadata of the u-th user, including the number of vGPU cores. and memory quantity Where u∈[1, the total number of users in the scheduling platform]; (2) Parse the workflow task request of the u-th user obtained in step (1) to obtain the task dependency relationship, and construct the workflow of the u-th user in the form of a directed acyclic graph (DAG) based on the task dependency relationship. ,in Workflow for the u-th user The set of subtasks , Represents the set of subtasks of the u-th customer. There are subtasks, i∈[1, ... ... ]; Let be the set of dependencies between subtasks of the u-th user, and have . Directed edge This represents the p-th subtask of the u-th user. For the s-th subtask of the u-th user The preceding task, i.e., the subtask Need to be in subtask Execute upon completion; For workflow Deadline constraints, i.e. Requirements must be met by the deadline. Complete execution before the deadline; (3) is the workflow of the u-th user obtained in step (2). Subtask set Each subtask in Randomly assign vGPU instances to obtain each subtask. The mapping relationship S1 between the vGPU instance and the vGPU instance is established, and this process is repeated n times to obtain a set of mapping relationships S = {S1, S2, ..., S...}. n}, where n ranges from 20 to 100, preferably 50; (4) Obtain each mapping relation S in the mapping relation set S obtained in step (3). x Total execution time of the corresponding workflow Workflow completion time deviation penalty and vGPU resource pool utilization The total execution time of the workflow corresponding to all mapping relationships, the workflow completion time deviation penalty, and the vGPU resource pool utilization constitute the evaluation vector set. where x∈[1,n]; (5) Set the number of iterations for the genetic algorithm to index=0; (6) Determine whether the number of iterations of the genetic algorithm is greater than or equal to the preset iteration threshold. If it is, proceed to step (12); otherwise, proceed to step (7). (7) Select multiple elements from the mapping relationship set S obtained in step (3) using the matching selection algorithm, and process all selected elements using the simulated binary crossover algorithm and the mutation algorithm in turn to obtain a new mapping relationship set Q; (8) Obtain each mapping relation Q in the new mapping relation set Q obtained in step (7). y Total execution time of the corresponding workflow Workflow completion time deviation penalty and vGPU resource pool utilization All mapping relationships correspond to the total execution time of the workflow, the workflow completion time deviation penalty, and the vGPU resource pool utilization, which together form the sub-generation evaluation vector set. ,in ; (9) Merge the set of offspring evaluation vectors obtained in step (8) with the set of evaluation vectors obtained in step (4) to obtain a mixed set of evaluation vectors. = ; (10) Select n elements from the mixed evaluation vector set U obtained in step (9) through the environment selection strategy, and replace all elements in the mapping relationship set S with the selected n elements to obtain the updated mapping relationship set S; (11) Set index = index + 1 and return to step (6); (12) Obtain the set of mixed evaluation vectors The Pareto optimal frontier is used as the optimal scheduling scheme set to schedule the workflow tasks of all users in the scheduling platform.
[0007] Preferably, the total execution time of the workflow in step (4) is... It is calculated through the following steps: (4-1) Based on each mapping relation S in the set S obtained in step (3) x Workflow for obtaining the u-th user Subtask set Each subtask in Execution time on the corresponding vGPU instance ; Specifically, this step uses the following formula: in, Represents the mapping relationship S j The subtask reflected The sequence number of the assigned vGPU instance among all vGPU instances in the scheduling platform. Subtasks The computational load, This represents the computational performance of the k-th vGPU instance; (4-2) Based on each mapping relation S in the set S obtained in step (3) x Workflow for obtaining the u-th user Subtask set Each subtask in Precursor tasks in the subtask set The assigned vGPU instance, and the predecessor task obtained based on that vGPU instance. To subtask Data transmission time ; (4-3) Based on the precursor task obtained in step (4-2) To subtask Data transmission time Get subtasks start time ; Specifically, this step uses the following formula: ; in, For subtasks The set of predecessor tasks constitutes all predecessor tasks in the subtask set. Workflow for the u-th user Precursor mission Completion time, This indicates taking the maximum value; (4-4) Subtasks obtained from step (4-3) start time The subtask obtained in step (4-1) Execution time on the corresponding vGPU instance Get the subtask Completion time ; Specifically, this step uses the following formula: ; (4-5) Subtasks obtained from step (4-4) Completion time Get the total execution time of the workflow .
[0008] Preferably, step (4-2) includes the following sub-steps: (4-2-1) Based on each mapping relation S in the set S obtained in step (3) j Workflow for obtaining the u-th user Subtask set Each subtask in Precursor mission The assigned vGPU instance, and the determination of subtasks. The assigned vGPU instance and its predecessor task If the assigned vGPU instance belongs to the same server, proceed to step (4-2-2); otherwise proceed to step (4-2-3). (4-2-2) Set up the predecessor task To subtask Data transmission time Then the process ends; (4-2-3) Based on the precursor mission To subtask Output data volume and the precursor mission sub-tasks The network bandwidth of the server worker Acquire Precursor Mission To subtask Data transmission time ; Specifically, this step uses the following formula: .
[0009] Preferably, step (4-5) includes the following sub-steps: (4-5-1) Subtasks obtained from step (4-4) Completion time Workflow for obtaining the u-th user Completion time ; Specifically, this step uses the following formula: (4-5-2) Based on the workflow of the u-th user obtained in step (4-5-1) Get the total execution time of the workflow from the completion time. ; Specifically, this step uses the following formula: .
[0010] Preferably, a penalty for workflow completion time deviation. It is calculated using the following formula: ; in Let represent the penalty time for the u-th user, and we have: ; in The penalty weight ranges from 0.1 to 10, with 1 being the preferred value.
[0011] Preferably, vGPU resource pool utilization It is calculated using the following formula: ; in This is a binary variable indicating whether task i is assigned to the k-th vGPU instance. Indicates that it has been assigned. (This indicates that it has not been assigned). This represents the number of cores consumed when task i is assigned to the k-th vGPU instance; This represents the amount of memory consumed by task i when it is allocated to the k-th vGPU instance. It is a set consisting of all vGPU instances in the scheduling platform.
[0012] Preferably, the environment selection strategy in step (10) is a Pareto-level screening strategy based on congestion distance.
[0013] According to another aspect of the present invention, a multi-user workflow task scheduling system based on vGPU is provided, comprising: The first module is used to obtain the resource purchase request and workflow task request of the u-th user from the scheduling platform, parse the resource purchase request to obtain the resource requirement metadata of the u-th user, including the number of vGPU cores. and memory quantity Where u∈[1, the total number of users in the scheduling platform]; The second module parses the workflow task request of the u-th user obtained from the first module to obtain the task dependencies, and constructs the workflow of the u-th user in the form of a directed acyclic graph (DAG) based on the task dependencies. ,in Workflow for the u-th user The set of subtasks , Represents the set of subtasks of the u-th customer. There are subtasks, i∈[1, ... ... ]; Let be the set of dependencies between subtasks of the u-th user, and have . Directed edge This represents the p-th subtask of the u-th user. For the s-th subtask of the u-th user The preceding task, i.e., the subtask Need to be in subtask Execute upon completion; For workflow Deadline constraints, i.e. Requirements must be met by the deadline. Complete execution before the deadline; The third module is used to process the workflow of the u-th user obtained from the second module. Subtask set Each subtask in Randomly assign vGPU instances to obtain each subtask. The mapping relationship S1 between the vGPU instance and the vGPU instance is established, and this process is repeated n times to obtain a set of mapping relationships S = {S1, S2, ..., S...}. n}, where n ranges from 20 to 100, preferably 50; The fourth module is used to obtain each mapping relationship S in the mapping relationship set S obtained by the third module. x Total execution time of the corresponding workflow Workflow completion time deviation penalty and vGPU resource pool utilization The total execution time of the workflow corresponding to all mapping relationships, the workflow completion time deviation penalty, and the vGPU resource pool utilization constitute the evaluation vector set. where x∈[1,n]; The fifth module is used to set the number of iterations for the genetic algorithm to index=0; The sixth module is used to determine whether the number of iterations of the genetic algorithm, index, is greater than or equal to the preset iteration threshold. If it is, proceed to the twelfth module; otherwise, proceed to the seventh module. The seventh module is used to select multiple elements from the mapping set S obtained in the third module using a matching selection algorithm, and then process all selected elements using a simulated binary crossover algorithm and a mutation algorithm to obtain a new mapping set Q. The eighth module is used to obtain each mapping relationship Q in the new mapping relationship set Q obtained by the seventh module. y Total execution time of the corresponding workflow Workflow completion time deviation penalty and vGPU resource pool utilization All mapping relationships correspond to the total execution time of the workflow, the workflow completion time deviation penalty, and the vGPU resource pool utilization, which together form the sub-generation evaluation vector set. ,in ; The ninth module is used to merge the set of offspring evaluation vectors obtained from the eighth module with the set of evaluation vectors obtained from the fourth module to obtain a hybrid evaluation vector set. = ; The tenth module is used to select n elements from the mixed evaluation vector set U obtained from the ninth module through an environment selection strategy, and replace all elements in the mapping relationship set S with the selected n elements to obtain the updated mapping relationship set S.
[0014] The eleventh module is used to set index = index + 1 and return to the sixth module; The twelfth module is used to obtain the set of mixed evaluation vectors. The Pareto optimal frontier is used as the optimal scheduling scheme set to schedule the workflow tasks of all users in the scheduling platform.
[0015] In summary, compared with the prior art, the above-described technical solutions conceived by this invention can achieve the following beneficial effects: (1) Since the present invention adopts steps (1)-(2) and steps (4), it obtains the demand metadata such as the number of vGPU cores and the amount of memory by parsing the user resource purchase request, constructs a DAG workflow model with deadline constraints, and introduces "workflow completion time deviation penalty" to impose a penalty time on tasks that exceed the deadline, incorporates user time constraints into the scheduling evaluation system, avoids tasks from being overdue due to compression of vGPU resources, and thus solves the technical problem of the existing resource priority scheduling method ignoring the time constraints of individual user workflows; (2) Since the present invention adopts steps (3) and (7)-(10), it generates multiple sets of sub-task-vGPU mapping relationships to form an initial population, uses matching selection, simulated binary crossover and mutation algorithms to generate offspring population, integrates parent and offspring evaluation vectors, and adopts Pareto hierarchical screening strategy based on congestion distance to retain high-quality and diverse scheduling schemes, rather than simply allocating resources according to priority. It can balance the task requirements of different users and avoid long-term queuing of low-priority tasks, thereby solving the technical problem that the existing efficiency-first scheduling method is difficult to take into account the fairness of multiple users and reduce the throughput of the cluster.
[0016] (3) Since the present invention adopts steps (4) and (12), by constructing a three-dimensional evaluation vector of “total execution time of workflow, deviation penalty of workflow completion time, and utilization rate of vGPU resource pool”, it simultaneously covers system efficiency, user experience and resource efficiency. Then, by outputting the Pareto optimal frontier, it selects the optimal solution of the three collaborations, thereby solving the technical problems of multi-objective weight imbalance and lack of collaboration mechanism in the existing single user experience priority scheduling method. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the vGPU resource pool architecture used in this invention; Figure 2 This is a schematic diagram of the present invention based on user workflow task modeling; Figure 3 This is a flowchart of the workflow task scheduling method based on vGPU of the present invention. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0019] This invention designs a workflow task scheduling method based on vGPU. By modeling the vGPU resource pool and multi-user workflow tasks, a multi-objective optimization model is constructed. This model constitutes a three-dimensional optimization problem with three objectives: minimizing the total workflow execution time, minimizing the completion time deviation of individual workflows, and maximizing the utilization of the vGPU resource pool. These three objectives are conflicting; improving the performance of one objective will lead to a decrease in the performance of another. Therefore, this invention considers the characteristics of genetic algorithms and proposes a new genetic algorithm to optimize the model and obtain a set of superior solutions.
[0020] Figure 1 Modeling a vGPU resource pool, which includes server nodes, physical GPUs, and vGPU instances, is as follows: A resource pool consists of multiple server workers, denoted as a set. Where n is the number of servers, and each server It possesses independent computing, storage, and network resources and serves as the physical GPU's supporting unit.
[0021] Each server Several physical GPUs are deployed on the server. The physical GPU set is Where mi is the server The number of physical GPUs on the device. Physical GPUs are heterogeneous, with differences in core count, memory capacity, and computing performance. For example, as shown in the figure, GPU physical resources (heterogeneous) in different areas can handle different tasks.
[0022] Through GPU virtualization technology, each physical GPU can be divided into multiple vGPU instances. Each vGPU inherits some of the computing and storage capabilities of its parent physical GPU and can independently provide services for workflow tasks. For example, a physical GPU can be virtualized into vGPU instances such as G1 and G2, which execute tasks such as task1 and task2 respectively. Different vGPU instances on the same physical GPU can process tasks in parallel. For example, G1:task1 and G2:task1 on GPU1 can be executed in parallel at different times or on different resources.
[0023] Based on the characteristics of the vGPU resource pool, the nodes in the vGPU resource pool have the following relationships: physical GPUs within the same server belong to the same node, and data transmission between vGPU instances within the node can be completed through the high-speed bus inside the node without the need for additional network transmission; vGPU instances on different servers belong to different nodes, and data transmission between them needs to be carried out through the cluster network, which will generate transmission latency and overhead.
[0024] like Figure 3As shown, this invention provides a multi-user workflow task scheduling method based on vGPU, comprising the following steps: (1) Obtain the resource purchase request and workflow task request of the u-th user from the scheduling platform (e.g., Figure 2 (As shown), the resource purchase request is parsed to obtain the resource requirement metadata for the u-th user, including the number of vGPU cores. and memory quantity Where u∈[1, the total number of users in the scheduling platform]; (2) Parse the workflow task request of the u-th user obtained in step (1) to obtain the task dependency relationship, and construct the workflow of the u-th user in the form of a directed acyclic graph (DAG) based on the task dependency relationship. ,in Workflow for the u-th user The set of subtasks , Represents the set of subtasks of the u-th customer. There are subtasks, i∈[1, ... ... ], and subtasks The attributes include: computational cost (It is measured in FLOPs) and data output volume (It is in GB); Let be the set of dependencies between subtasks of the u-th user, and have . Directed edge This represents the p-th subtask of the u-th user. For the s-th subtask of the u-th user The preceding task, i.e., the subtask Need to be in subtask Execute upon completion; For workflow Deadline constraints, i.e. Requirements must be met by the deadline. Complete execution beforehand.
[0025] The advantages of the above steps (1) and (2) are that they accurately capture the vGPU resource requirements of a single user, provide personalized data support for subsequent resource allocation, and intuitively present the task dependency relationship through the DAG model. At the same time, they include the subtask computation volume, data output volume and workflow deadline, providing a structured basis for the time calculation and time constraint management of the subsequent scheduling scheme.
[0026] (3) is the workflow of the u-th user obtained in step (2). Subtask set Each subtask in Randomly assign vGPU instances to obtain each subtask. The mapping relationship S1 between the vGPU instance and the vGPU instance is established, and this process is repeated n times to obtain a set of mapping relationships S = {S1, S2, ..., S...}. n}, where n ranges from 20 to 100, preferably 50; Table 1 below illustrates each subtask as an example. The vGPU instance assigned: Table 1 (4) Obtain each mapping relation S in the mapping relation set S obtained in step (3). x Total execution time of the corresponding workflow Workflow completion time deviation penalty and vGPU resource pool utilization The total execution time of the workflow corresponding to all mapping relationships, the workflow completion time deviation penalty, and the vGPU resource pool utilization constitute the evaluation vector set. where x∈[1,n]; Specifically, the total execution time of the workflow in this step It is calculated through the following steps: (4-1) Based on each mapping relation S in the set S obtained in step (3) x Workflow for obtaining the u-th user Subtask set Each subtask in Execution time on the corresponding vGPU instance ; Specifically, this step uses the following formula: ; in, Represents the mapping relationship S j The subtask reflected The sequence number of the assigned vGPU instance among all vGPU instances in the scheduling platform. Subtasks The computational cost (FLOPs). This represents the computational performance (FLOPS) of the k-th vGPU instance.
[0027] (4-2) Based on each mapping relation S in the set S obtained in step (3) x Workflow for obtaining the u-th user Subtask set Each subtask in Precursor tasks in the subtask set The assigned vGPU instance, and the predecessor task obtained based on that vGPU instance. To subtask Data transmission time ; Specifically, this step includes the following sub-steps: (4-2-1) Based on each mapping relation S in the set S obtained in step (3) j Workflow for obtaining the u-th user Subtask set Each subtask in Precursor mission The assigned vGPU instance, and the determination of subtasks. The assigned vGPU instance and its predecessor task If the assigned vGPU instance belongs to the same server, proceed to step (4-2-2); otherwise proceed to step (4-2-3). (4-2-2) Set up the predecessor task To subtask Data transmission time Then the process ends; (4-2-3) Based on the precursor mission To subtask Output data volume and the precursor mission sub-tasks The network bandwidth of the server worker Acquire Precursor Mission To subtask Data transmission time ; Specifically, this step uses the following formula: ; (4-3) Based on the precursor task obtained in step (4-2) To subtask Data transmission time Get subtasks start time ; Specifically, this step uses the following formula: ; in, For subtasks The set of predecessor tasks constitutes all predecessor tasks in the subtask set. Workflow for the u-th user Precursor mission Completion time, This indicates taking the maximum value.
[0028] (4-4) Subtasks obtained from step (4-3) start time The subtask obtained in step (4-1) Execution time on the corresponding vGPU instance Get the subtask Completion time ; Specifically, this step uses the following formula: ; (4-5) Subtasks obtained from step (4-4) Completion time Get the total execution time of the workflow ; This step includes the following sub-steps: (4-5-1) Subtasks obtained from step (4-4) Completion time Workflow for obtaining the u-th user Completion time ; Specifically, this step uses the following formula: (4-5-2) Based on the workflow of the u-th user obtained in step (4-5-1) Get the total execution time of the workflow from the completion time. ; Specifically, this step uses the following formula: Workflow completion time deviation penalty in step (4) It is calculated using the following formula: ; in Let represent the penalty time for the u-th user, and we have: ; in The penalty weight ranges from 0.1 to 10, with 1 being the preferred value. vGPU resource pool utilization in step (4) It is calculated using the following formula: ; in This is a binary variable indicating whether task i is assigned to the k-th vGPU instance. Indicates that it has been assigned. (This indicates that it has not been assigned). This represents the number of cores consumed when task i is assigned to the k-th vGPU instance. This represents the amount of memory consumed by task i when it is allocated the kth vGPU instance. It is a set consisting of all vGPU instances in the scheduling platform.
[0029] The advantage of the above sub-steps (4-1) to (4-5) is that a complete and accurate multi-dimensional evaluation index calculation system has been constructed. From execution time and transmission time to total time, from time deviation penalty to resource utilization, each calculation step is supported by reliable logic and data, providing a high-quality evaluation basis for subsequent genetic algorithm iterative optimization.
[0030] (5) Set the number of iterations for the genetic algorithm to index=0; (6) Determine whether the number of iterations of the genetic algorithm is greater than or equal to the preset iteration threshold. If it is, proceed to step (12); otherwise, proceed to step (7). In this embodiment, the iteration threshold value depends on the size of the subtask set. When the number of subtasks in the subtask set is less than or equal to 100, the iteration threshold is equal to 300. When the number of subtasks in the subtask set is greater than 100, the iteration threshold is equal to 400.
[0031] (7) Select multiple elements from the mapping set S obtained in step (3) using the Matching Selection algorithm, and process all selected elements successively using the Simulated Binary Crossover algorithm and the Variation algorithm to obtain a new mapping set Q; (8) Obtain each mapping relation Q in the new mapping relation set Q obtained in step (7). y Total execution time of the corresponding workflow Workflow completion time deviation penalty and vGPU resource pool utilization All mapping relationships correspond to the total execution time of the workflow, the workflow completion time deviation penalty, and the vGPU resource pool utilization, which together form the sub-generation evaluation vector set. ,in ; The calculation method in this step is exactly the same as that in step (4), and will not be repeated here.
[0032] (9) Merge the set of offspring evaluation vectors obtained in step (8) with the set of evaluation vectors obtained in step (4) to obtain a mixed set of evaluation vectors. = ; (10) Select n elements from the mixed evaluation vector set U obtained in step (9) through the environment selection strategy, and replace all elements in the mapping relationship set S with the selected n elements to obtain the updated mapping relationship set S.
[0033] Specifically, the environment selection strategy in this step can be, for example, a Pareto-based hierarchical screening strategy based on crowding distance. This strategy first divides all elements in the mixed evaluation vector set U into Pareto ranks, prioritizing the retention of elements with higher ranks (i.e., those at the earlier Pareto fronts); when the number of elements at the same rank exceeds the screening requirements, the crowding distance is calculated to measure the dispersion of elements in the target space, and the elements with the largest crowding distance are selected in order.
[0034] (11) Set index = index + 1 and return to step (6); (12) Obtain the set of mixed evaluation vectors The Pareto optimal frontier is used as the optimal scheduling scheme set to schedule the workflow tasks of all users in the scheduling platform. The advantage of this step (12) is that by outputting the Pareto optimal frontier, the optimal solution for the cooperation of the three is selected, which solves the problem of imbalance of multi-objective weights and lack of cooperation mechanism.
[0035] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A multi-user workflow task scheduling method based on vGPU, characterized in that, Includes the following steps: (1) Obtain the resource purchase request and workflow task request of the u-th user from the scheduling platform, parse the resource purchase request to obtain the resource requirement metadata of the u-th user, including the number of vGPU cores. and memory quantity Where u∈[1, the total number of users in the scheduling platform]; (2) Parse the workflow task request of the u-th user obtained in step (1) to obtain the task dependency relationship, and construct the workflow of the u-th user in the form of a directed acyclic graph (DAG) based on the task dependency relationship. ,in Workflow for the u-th user The set of subtasks , Represents the set of subtasks of the u-th customer. There are subtasks, i∈[1, ... ... ]; Let be the set of dependencies between subtasks of the u-th user, and have . Directed edge This represents the p-th subtask of the u-th user. For the s-th subtask of the u-th user The preceding task, i.e., the subtask Need to be in subtask Execute upon completion; For workflow Deadline constraints, i.e. Requirements must be met by the deadline. Complete execution before the deadline; (3) is the workflow of the u-th user obtained in step (2). Subtask set Each subtask in Randomly assign vGPU instances to obtain each subtask. The mapping relationship S1 between the vGPU instance and the vGPU instance is established, and this process is repeated n times to obtain a set of mapping relationships S = {S1, S2, ..., S...}. n }, where n ranges from 20 to 100, preferably 50; (4) Obtain each mapping relation S in the mapping relation set S obtained in step (3). x Total execution time of the corresponding workflow Workflow completion time deviation penalty and vGPU resource pool utilization The total execution time of the workflow corresponding to all mapping relationships, the workflow completion time deviation penalty, and the vGPU resource pool utilization constitute the evaluation vector set. where x∈[1,n]; (5) Set the number of iterations for the genetic algorithm to index=0; (6) Determine whether the number of iterations of the genetic algorithm is greater than or equal to the preset iteration threshold. If it is, proceed to step (12); otherwise, proceed to step (7). (7) Select multiple elements from the mapping relationship set S obtained in step (3) using the matching selection algorithm, and process all selected elements using the simulated binary crossover algorithm and the mutation algorithm in turn to obtain a new mapping relationship set Q; (8) Obtain each mapping relation Q in the new mapping relation set Q obtained in step (7). y Total execution time of the corresponding workflow Workflow completion time deviation penalty and vGPU resource pool utilization All mapping relationships correspond to the total execution time of the workflow, the workflow completion time deviation penalty, and the vGPU resource pool utilization, which together form the sub-generation evaluation vector set. ,in ; (9) Merge the set of offspring evaluation vectors obtained in step (8) with the set of evaluation vectors obtained in step (4) to obtain a mixed set of evaluation vectors. = ; (10) Select n elements from the mixed evaluation vector set U obtained in step (9) through the environment selection strategy, and replace all elements in the mapping relationship set S with the selected n elements to obtain the updated mapping relationship set S; (11) Set index = index + 1 and return to step (6); (12) Obtain the set of mixed evaluation vectors The Pareto optimal frontier is used as the optimal scheduling scheme set to schedule the workflow tasks of all users in the scheduling platform.
2. The multi-user workflow task scheduling method based on vGPU according to claim 1, characterized in that, Total execution time of the workflow in step (4) It is calculated through the following steps: (4-1) Based on each mapping relation S in the set S obtained in step (3) x Workflow for obtaining the u-th user Subtask set Each subtask in Execution time on the corresponding vGPU instance ; Specifically, this step uses the following formula: ; in, Represents the mapping relationship S j The subtask reflected The sequence number of the assigned vGPU instance among all vGPU instances in the scheduling platform. Subtasks The computational load, This represents the computational performance of the k-th vGPU instance; (4-2) Based on each mapping relation S in the set S obtained in step (3) x Workflow for obtaining the u-th user Subtask set Each subtask in Precursor tasks in the subtask set The assigned vGPU instance, and the predecessor task obtained based on that vGPU instance. To subtask Data transmission time ; (4-3) Based on the precursor task obtained in step (4-2) To subtask Data transmission time Get subtasks start time ; Specifically, this step uses the following formula: ; in, For subtasks The set of predecessor tasks constitutes all predecessor tasks in the subtask set. Workflow for the u-th user Precursor mission Completion time, This indicates taking the maximum value; (4-4) Subtasks obtained from step (4-3) start time The subtask obtained in step (4-1) Execution time on the corresponding vGPU instance Get the subtask Completion time ; Specifically, this step uses the following formula: ; (4-5) Subtasks obtained from step (4-4) Completion time Get the total execution time of the workflow .
3. The multi-user workflow task scheduling method based on vGPU according to claim 2, characterized in that, Step (4-2) includes the following sub-steps: (4-2-1) Based on each mapping relation S in the set S obtained in step (3) j Workflow for obtaining the u-th user Subtask set Each subtask in Precursor mission The assigned vGPU instance, and the determination of subtasks. The assigned vGPU instance and its predecessor task If the assigned vGPU instance belongs to the same server, proceed to step (4-2-2); otherwise proceed to step (4-2-3). (4-2-2) Set up the predecessor task To subtask Data transmission time Then the process ends; (4-2-3) Based on the precursor mission To subtask Output data volume and the precursor mission sub-tasks The network bandwidth of the server worker Acquire Precursor Mission To subtask Data transmission time ; Specifically, this step uses the following formula: 。 4. The multi-user workflow task scheduling method based on vGPU according to claim 3, characterized in that, Steps (4-5) include the following sub-steps: (4-5-1) Subtasks obtained from step (4-4) Completion time Workflow for obtaining the u-th user Completion time ; Specifically, this step uses the following formula: ; (4-5-2) Based on the workflow of the u-th user obtained in step (4-5-1) Get the total execution time of the workflow from the completion time. ; Specifically, this step uses the following formula: 。 5. The multi-user workflow task scheduling method based on vGPU according to claim 4, characterized in that, Workflow completion time deviation penalty It is calculated using the following formula: ; in Let represent the penalty time for the u-th user, and we have: ; in The penalty weight ranges from 0.1 to 10, with 1 being the preferred value.
6. The multi-user workflow task scheduling method based on vGPU according to claim 5, characterized in that, vGPU resource pool utilization It is calculated using the following formula: , in This is a binary variable indicating whether task i is assigned to the k-th vGPU instance. Indicates that it has been assigned. (This indicates that it has not been assigned). This represents the number of cores consumed when task i is assigned to the k-th vGPU instance; This represents the amount of memory consumed by task i when it is allocated to the k-th vGPU instance. It is a set consisting of all vGPU instances in the scheduling platform.
7. The multi-user workflow task scheduling method based on vGPU according to claim 6, characterized in that, The environment selection strategy in step (10) is a Pareto-level screening strategy based on congestion distance.
8. A multi-user workflow task scheduling system based on vGPU, characterized in that, include: The first module is used to obtain the resource purchase request and workflow task request of the u-th user from the scheduling platform, parse the resource purchase request to obtain the resource requirement metadata of the u-th user, including the number of vGPU cores. and memory quantity Where u∈[1, the total number of users in the scheduling platform]; The second module parses the workflow task request of the u-th user obtained from the first module to obtain the task dependencies, and constructs the workflow of the u-th user in the form of a directed acyclic graph (DAG) based on the task dependencies. ,in Workflow for the u-th user The set of subtasks , Represents the set of subtasks of the u-th customer. There are subtasks, i∈[1, ... ... ]; Let be the set of dependencies between subtasks of the u-th user, and have . Directed edge This represents the p-th subtask of the u-th user. For the s-th subtask of the u-th user The preceding task, i.e., the subtask Need to be in subtask Execute upon completion; For workflow Deadline constraints, i.e. Requirements must be met by the deadline. Complete execution before the deadline; The third module is used to process the workflow of the u-th user obtained from the second module. Subtask set Each subtask in Randomly assign vGPU instances to obtain each subtask. The mapping relationship S1 between the vGPU instance and the vGPU instance is established, and this process is repeated n times to obtain a set of mapping relationships S = {S1, S2, ..., S...}. n }, where n ranges from 20 to 100, preferably 50; The fourth module is used to obtain each mapping relationship S in the mapping relationship set S obtained by the third module. x Total execution time of the corresponding workflow Workflow completion time deviation penalty and vGPU resource pool utilization The total execution time of the workflow corresponding to all mapping relationships, the workflow completion time deviation penalty, and the vGPU resource pool utilization constitute the evaluation vector set. where x∈[1,n]; The fifth module is used to set the number of iterations for the genetic algorithm to index=0; The sixth module is used to determine whether the number of iterations of the genetic algorithm, index, is greater than or equal to the preset iteration threshold. If it is, proceed to the twelfth module; otherwise, proceed to the seventh module. The seventh module is used to select multiple elements from the mapping set S obtained in the third module using a matching selection algorithm, and then process all selected elements using a simulated binary crossover algorithm and a mutation algorithm to obtain a new mapping set Q. The eighth module is used to obtain each mapping relationship Q from the new mapping relationship set Q obtained in the seventh module. y Total execution time of the corresponding workflow Workflow completion time deviation penalty and vGPU resource pool utilization All mapping relationships correspond to the total execution time of the workflow, the workflow completion time deviation penalty, and the vGPU resource pool utilization, which together form the sub-generation evaluation vector set. ,in ; The ninth module is used to merge the set of offspring evaluation vectors obtained from the eighth module with the set of evaluation vectors obtained from the fourth module to obtain a hybrid evaluation vector set. = ; The tenth module is used to select n elements from the mixed evaluation vector set U obtained from the ninth module through an environment selection strategy, and replace all elements in the mapping relationship set S with the selected n elements to obtain the updated mapping relationship set S. The eleventh module is used to set index = index + 1 and return to the sixth module; The twelfth module is used to obtain the set of mixed evaluation vectors. The Pareto optimal frontier is used as the optimal scheduling scheme set to schedule the workflow tasks of all users in the scheduling platform.