An online distributed task scheduling method considering data locality

By building a bipartite graph model and optimizing the computing node allocation scheme, the scheduling problem of multi-task jobs in heterogeneous computing clusters is solved, the job response time is minimized while preserving data locality, and the scheduling efficiency is improved.

CN118069366BActive Publication Date: 2025-09-26HANGZHOU DIANZI UNIV +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410279579.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-12
Publication Date
2025-09-26
Estimated Expiration
2044-03-12

AI Technical Summary

Technical Problem

When multiple distributed jobs with different numbers of subtasks and input data arrive online, existing technologies find it difficult to optimize the scheduling strategy to minimize the average response time of the jobs while preserving data locality, especially in heterogeneous computing clusters.

Method used

A scheduling strategy based on bipartite graph matching, 0-1 integer programming and job reordering is adopted. By constructing a bipartite graph model and objective function, the allocation scheme of computing nodes is optimized, and job reordering is combined to minimize the completion time of jobs.

Benefits of technology

While preserving data locality, the job scheduling performance in heterogeneous computing clusters is optimized, the average response time of jobs is reduced, and the scheduling efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118069366B_ABST
    Figure CN118069366B_ABST
Patent Text Reader

Abstract

The present invention relates to an online distributed task scheduling method that considers data locality. The method first constructs a distributed computing system composed of computing nodes and a characteristic model of online distributed jobs; then, the online distributed job scheduling problem in the distributed computing system is modeled as a scheduling model with constraints on a bipartite graph; finally, an objective function and constraints for minimizing the completion time of a single job are constructed; and the specific allocation scheme for each task on the corresponding computing node is obtained by solving the constrained optimization problem. The present invention provides a scheduling scheme that preserves data locality in a distributed job execution scenario. Under the premise of preserving data locality, the scheme minimizes the average response time of all jobs in a heterogeneous computing cluster through reasonable problem modeling, compressed solution space, and job rescheduling, thereby improving the scheduling performance of online distributed jobs in heterogeneous scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a job subtask scheduling problem in a distributed computing scenario, and in particular to an online distributed task scheduling method considering data locality. Background Art

[0002] Data locality is an important feature in the field of distributed computing. When a computing job with multiple subtask modules arrives, the scheduler needs to assign appropriate computing nodes (physical nodes or virtual machine nodes in the computing cluster) to each of its subtasks. In order to "avoid the transmission of input data required for subtask execution over the network, and thus choose to schedule it to the node where the data is located", this scheduling strategy is called "preserving data locality" (that is, avoiding the additional time overhead caused by transmitting data between different nodes). For example, when the data required for a subtask is only stored on node A and node B, the scheduler can only assign the subtask to node A or node B for execution.

[0003] However, when multiple distributed jobs with different numbers of subtasks and different input data for each subtask arrive online, there is still a lot of room for performance improvement in the scheduling strategy that retains data locality. Before the job arrives, there is no way to know the data required for each subtask of the job, so it is impossible to know the candidate nodes and prepare for scheduling in advance. In addition, before the job arrives, it is impossible to accurately estimate the task execution time of the job on nodes with different processing speeds, all of which bring significant difficulties to the optimal online scheduling. If, under the premise of retaining data locality, in a heterogeneous computing cluster, the average response time of all (already arrived) jobs (defined as the difference between the completion time and the arrival time of the job) is minimized by designing a suitable scheduling strategy, it is a key problem to be solved by the present invention. Summary of the Invention

[0004] To address these issues, this paper proposes a distributed online optimal scheduling strategy based on bipartite graph matching, 0-1 integer programming, and job reordering. For each incoming job, this scheduling strategy rationally allocates compute nodes to each of its subtasks while maintaining data consistency. In certain scenarios, this scheduling strategy is globally optimal—it can achieve the theoretical minimum average response time.

[0005] A first aspect of the present invention provides an online distributed task scheduling method considering data locality, the method comprising the following steps:

[0006] Step 1: Build a distributed computing system consisting of computing nodes and construct a feature model for online distributed jobs;

[0007] Step 2: Model the online distributed job scheduling problem in the distributed computing system as a scheduling model with constraints on a bipartite graph;

[0008] Step 3: Construct the objective function and constraints for minimizing the completion time of a single job; obtain the specific allocation plan for each task on the corresponding computing node by solving the constrained optimization problem.

[0009] The second aspect of the present invention provides an online distributed task scheduling device that takes data locality into consideration, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the above-mentioned online distributed task scheduling method that takes data locality into consideration is implemented.

[0010] A third aspect of the present invention provides a computer-readable storage medium, characterized in that the storage medium stores a computer program for executing an online distributed task scheduling method considering data locality.

[0011] The above technical solution has the following advantages or beneficial effects:

[0012] This invention provides a data locality-preserving scheduling solution for distributed job execution scenarios. While preserving data locality, this solution minimizes the average response time of all jobs in heterogeneous computing clusters through rational problem modeling, solution space compression, and job rescheduling, thereby improving the scheduling performance of online distributed jobs in heterogeneous scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 is an example of the computational power of the candidate node;

[0014] Figure 2 It is a bipartite graph model;

[0015] Figure 3 Given C g Example of calculation of lower bound;

[0016] Figure 4 The interval Divide into consecutive short intervals. DETAILED DESCRIPTION

[0017] The present invention will be further described below with reference to the accompanying drawings.

[0018] The technical solutions of the embodiments of this application are as follows

[0019] Step 1: Build a distributed computing system consisting of M computing nodes and a feature model of G online distributed jobs;

[0020] Step 2: Model the online distributed job scheduling problem in the distributed computing system as a scheduling model with constraints on a bipartite graph;

[0021] Step 3: Construct the objective function and constraints for minimizing the completion time of a single job; obtain the specific allocation plan for each task on the corresponding computing node by solving the constrained optimization problem

[0022] Furthermore, in some embodiments, step 1 is specifically:

[0023] The distributed computing system is composed of a cluster of M computing nodes (physical machine nodes or virtual machine nodes). Indicates the number of each node. In the time domain considered, there is a set of jobs J1,…,J G Arrive online in sequence (allow G→∞), using Indicates the number of each job; each job J g (g∈[G]) consists of a set of isomorphic computational tasks that have no dependencies on each other and can be executed in parallel. Each computational task executes exactly the same code logic, but requires different data blocks.

[0024] Assuming that the completion time of any computing task is the same (denoted as unit 1), each data block may have copies on multiple nodes. In order to preserve data locality, each computing task (regardless of which job it comes from) can only be assigned to the nodes that have the data blocks required by the computing task. These nodes are called candidate nodes for the computing task. For any job J g ,use Indicates the number of jobs J that node m can execute simultaneously g The number of computing tasks is called is the node m relative to job J g computing power. Figure 1 An example is given, Figure 1 The nodes S1 and S2 in the middle are candidate nodes for all tasks of jobs J1, J2, and J3. The specifications of node S1 are 8G4C and those of node S2 are 12G6C. The upper right corner shows the computing resources required for the computing tasks of each job. It can be found that for m=1 and g=1, The height of the rectangular blocks of different colors represents the time required for the computing task to be executed on the corresponding node (which is unknown).

[0025] Furthermore, in some embodiments, step 2 is specifically as follows:

[0026] In a distributed computing system, suppose that at time t g , Homework J g Arrival. Homework J gThe computational tasks can be divided into K disjoint tasks. g There are sets (called task groups), and the computing tasks contained in each set have the same set of candidate nodes. For any k∈[K g ], using Indicates job J g The kth task group.

[0027] Based on the above assumptions, the online distributed task scheduling problem considering data locality in distributed computing systems can be modeled as a matching problem on a bipartite graph: In this bipartite graph, the left node is K g Task groups, the nodes on the right are available sites, where the kth task group is Task Force The candidate node set for the computing task is

[0028] For ease of description, use Represents the kth task group and the corresponding left node in the graph, using S m Represents a site and its corresponding node on the right side of the graph. If S m It is a task force If there is an available site for the task in , then there exists an edge (k,m).

[0029] For each site S m , this application defines its site service capability CPT (S m )for:

[0030]

[0031] Among them C g is an undetermined integer, and This is for homework J g All computing tasks are performed on node S m Estimated time to complete execution:

[0032]

[0033] in It is in homework J g Homework J that arrived before h Assign to node S m Execute, and at this moment (ie t g ) The number of unfinished computing tasks. The calculation formula can be combined with Figure 2 Understand, will Site S m The queue size is . Accordingly, C gEssentially, homework g Relative to the current time t g The moment of completion - it plays the role of g The role of the upper limit of the completion time of the task at each node. When the queue size of a node itself is too large, it g The site service capacity is 0, thus ensuring that no new computing tasks will be assigned to the node.

[0034] Furthermore, in some embodiments, step 3 is specifically as follows:

[0035] Minimize Job J g The completion time of can be modeled as the following problem:

[0036]

[0037]

[0038]

[0039] In the above constrained optimization problem, For the task force The computing task, on node S m The number of time slices allocated. The length of each time slice is 1.

[0040] The first constraint is that the time slices that each candidate node can allocate must not exceed its own site service capacity. The second constraint is that all tasks in each task group must be fully allocated.

[0041] By solving the above problem - that is, finding the optimal integer C g and You can get homework J g The optimal scheduling strategy of Decode and get the specific allocation plan of each task on the corresponding node.

[0042] This application further includes step 4: analyzing the characteristics of the problem itself, calculating the upper and lower bounds of the search space where the optimal solution lies, and using an optimizer to solve the above optimization problem in the reduced solution space, thereby improving processing performance and reducing the optimizer's runtime, especially for large-scale tasks. Step 4 is specifically as follows:

[0043] Step 4-1: Determine C g The upper and lower bounds of t are used to narrow the exploration space. g +C g It's homework J g The completion time is when all involved nodes process the complete job J1,…,JG The time required. Through analysis, we can find that C g The upper bound of

[0044]

[0045] That is, the job J g All can be assigned to node S m All computing tasks performed on m After going up, S m The time it takes to complete all the tasks for which you are responsible. is the maximum of these values.

[0046] Accordingly, we get C g The lower bound of :

[0047]

[0048] Among them, x k is the smallest positive integer that satisfies the following equation:

[0049]

[0050] Figure 3 A schematic diagram of this is given. The lower bound is obtained as follows: Assume K g It's homework J g The only task group in the queue is assigned to the node with the smaller queue length in the “water filling” manner, which is the result of job J. g The earliest completion time. That is, by “filling water”, all nodes with smaller queue lengths are “leveled”.

[0051] It can be determined that any feasible solution C g Must fall within the range middle.

[0052] Step 4-2: Divide the self-intervals and process them in sequence: Figure 4 As shown, the interval The queue lengths of the candidate nodes involved are divided into a set of continuous short intervals. In each short interval, the site service capacity of all involved nodes will degenerate from a piecewise function to a linear function - either Or it is 0. Thus, the problem formed at the end of the first step is converted from an integer nonlinear programming problem to a set of integer linear programming problems in each interval, which will greatly reduce the time overhead of the solver. This step only needs to traverse from the smallest short interval to the largest short interval in sequence, and use each short interval as the input of the solver. Once a solution is found in the current short interval, the solution is the global optimal solution. This application does not need to determine the subsequent short intervals, so Cg The smaller the better.

[0053] Furthermore, based on the above description, the scheduling strategy of this embodiment can be described as the following pseudo code:

[0054]

[0055] The present application further includes step 5: using a strategy of prioritizing the job with the shortest remaining time to further improve the optimal solution obtained in step 4. Step 5 is specifically as follows:

[0056] In step 4, a single arriving job J is given g However, the technical points described in the above steps are based on the first-come-first-served model, that is, the first-arrived jobs are processed first, and the later-arrived jobs are processed later. g Previously, on a given node, jobs J1,…,J g-1 The calculation task will be completed first.

[0057] This step further improves the above scheme by adopting the strategy of shortest remaining time first. Whenever a new job arrives, the execution order of all unfinished jobs is adjusted to further reduce the average response time of all jobs: Assume that a new job arrives at time t, and Q t Represents an ordered set of reallocated, unfinished jobs, using O t Represents the set of jobs that have not been completed at this moment, then you need to put O in the appropriate order t The jobs in Q are taken out and put into t .

[0058] Assume Q t There are already p sorted jobs in O t \Q t Each job J q , bringing the number of its remaining computing tasks into The calculation formula for its estimated completion time is obtained. Here, assuming that J q In the new order, it is the p+1th one, without considering the others that have not yet been determined and put into Q t Therefore, in the set O t \Q tIn the process, the job with the shortest estimated completion time will be selected as the p+1th job and sent to the new queue (the job with the shortest estimated completion time will be added to the newly constructed queue, and the nodes will execute each job in the order of the jobs in this queue). The above process is repeated until O t \Q t Until the empty set.

[0059] Based on the same technical solution, an embodiment of the present application also discloses an online distributed task scheduling device that takes data locality into consideration, including: a memory, a processor, and a computer program stored on the memory and runnable on the processor, wherein the processor implements the above-mentioned online distributed task scheduling method that takes data locality into consideration when executing the program.

[0060] Based on the same technical solution, an embodiment of the present application also discloses a computer-readable storage medium, which stores a computer program, and the computer program is used to execute the above-mentioned online distributed task scheduling method considering data locality.

[0061] The above is only an implementation method of the job scheduling of the present invention. It should be pointed out that ordinary technicians in this technical field can make several improvements and modifications without departing from the concept of the present invention. These improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. An online distributed task scheduling method considering data locality, characterized by The method comprises the following steps: Step 1: Build a distributed computing system consisting of computing nodes and construct a feature model for online distributed jobs; Step 2: Model the online distributed job scheduling problem in the distributed computing system as a scheduling model with constraints on a bipartite graph; Step 3: Construct the objective function and constraints for minimizing the completion time of a single job; obtain the specific allocation plan for each task on the corresponding computing node by solving the constrained optimization problem; The step 2 is specifically as follows: In the bipartite graph, the left node is K g Task groups, the nodes on the right are available sites, where the kth task group is Task Force The candidate node set for the computing task is use Represents the kth task group and the left node in the corresponding bipartite graph, using S m Represents a site and the right node in the corresponding bipartite graph. If S m It is a task force If there is an available site for the task in , then there exists an edge (k,m); For each site S m , its site service capability CPT (S m )for: Among them C g is an undetermined integer, and This is for homework J g All computing tasks are at site S m An estimate of the time to complete execution; The step 3 is specifically as follows: Minimize Job J g The completion time of is modeled as the following constrained optimization problem: in For the task force The computing task at node S m The number of time slices allocated, C g is an undetermined integer; CPT(S m ) is site S m service capabilities, It is a task force The candidate node set of the computing task, k represents the kth task group, is the node m relative to job J g computing power; By solving the above constrained optimization problem, that is, finding the optimal integer C g and Then get homework J g The optimal scheduling strategy of Decode and obtain the specific allocation plan of each task on the corresponding computing node.

2. The online distributed task scheduling method considering data locality according to claim 1, characterized in that: The step 1 is specifically as follows: The distributed computing system is a cluster consisting of M computing nodes; A set of jobs J1,…,J in the characteristic model of online distributed jobs G Arrive online in sequence, where each job J g It consists of a set of homogeneous computational tasks; Each computing task can only be assigned to a computing node that has the data blocks required by the computing task for execution.

3. The online distributed task scheduling method considering data locality according to claim 1, characterized in that: The method also includes step 4: analyzing the characteristics of the constrained optimization problem itself, calculating the upper and lower bounds of the search space where the optimal solution is located, and using an optimizer to solve the above constrained optimization problem in the reduced solution space.

4. The online distributed task scheduling method considering data locality according to claim 3, characterized in that: The step 4 is specifically as follows: Move the search space up and down Split the queue according to the queue length of the candidate nodes involved to obtain a set of continuous short intervals; Traverse from the smallest short interval to the largest short interval in sequence, and use each short interval as the input of the solver. Once a solution is found in the current short interval, the solution is the global optimal solution.

5. The online distributed task scheduling method considering data locality according to claim 3 or 4, characterized in that: The strategy of prioritizing the task with the shortest remaining completion time is used to improve the optimal solution obtained in step 4. Specifically, Whenever a new job arrives, adjust the execution order of all unfinished jobs to further reduce the average response time of all jobs: Assume that a new job arrives at time t, using Q t Represents the ordered set of reallocated and unfinished jobs, using Q t Represents the set of unfinished jobs at this moment, and puts Q t The jobs in Q are taken out and put into t ; Assume Q t There are already p sorted jobs in Q t \Q t Each job J q , get its estimated completion time; Assumption J q In the new order, it is the p+1th one, without considering other ones that have not yet been determined and put into Q t The backlog of jobs, therefore, in the set Q t \Q t In the , the job with the smallest estimated completion time will be selected as the p+1th job and sent to the new queue; The above process is repeated until Q t \Q t Until the empty set.

6. An online distributed task scheduling device considering data locality, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, an online distributed task scheduling method considering data locality as described in any one of claims 1 to 5 is implemented.

7. A computer-readable storage medium, characterized in that The storage medium stores a computer program, and the computer program is used to execute the online distributed task scheduling method considering data locality as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • A data distribution algorithm of a distributed block storage system

    CN109933284A

  • Cross-domain distributed processing system and scheduling optimization method

    CN116389591A