WO2025152195A1 - Dag作业调度方法及系统 - Google Patents
Dag作业调度方法及系统Info
- Publication number
- WO2025152195A1 WO2025152195A1 PCT/CN2024/073551 CN2024073551W WO2025152195A1 WO 2025152195 A1 WO2025152195 A1 WO 2025152195A1 CN 2024073551 W CN2024073551 W CN 2024073551W WO 2025152195 A1 WO2025152195 A1 WO 2025152195A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- job
- task
- feature vector
- scheduling
- candidate
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5061—Partitioning or combining of resources
- G06F9/5077—Logical partitioning of resources; Management or configuration of virtualized resources
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/5038—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5061—Partitioning or combining of resources
- G06F9/5066—Algorithms for mapping a plurality of inter-dependent sub-tasks onto a plurality of physical CPUs
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/042—Knowledge-based neural networks; Logical representations of neural networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/0464—Convolutional networks [CNN, ConvNet]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/082—Learning methods modifying the architecture, e.g. adding, deleting or silencing nodes or connections
Definitions
- the present invention relates to the field of cloud computing, and in particular to a DAG job scheduling technology based on Kubernetes in a cloud native environment.
- a DAG job scheduling method when the progress status of a job is updated, performs the following steps:
- a first extraction network generates a task embedding feature vector of the candidate task based on the job native feature vector and the task native feature vector of the candidate task and the task embedding feature vector of the child task of the candidate task;
- the specific steps of selecting an allocation node for a candidate task include:
- the scheduling strategy includes at least one scheduling action, and the scheduling action is used to indicate the tasks and nodes to be scheduled;
- the accumulated reward is used to update the graph convolutional neural network and the first prediction network.
- tk represents the global time when the kth scheduling action is triggered
- t k-1 represents the global time when the k-1th scheduling action is triggered
- J k is the set of unfinished tasks in the time period [t k-1 ,t k );
- ⁇ (J k ) is the set of parent tasks of all tasks in J k ;
- J k is the number of elements in J k ;
- a DAG job scheduling method comprising:
- the monitoring module is used to obtain and transmit the native feature data of each job when the progress status of the job is updated;
- the native feature data includes a job native feature vector and a task native feature vector corresponding to each task one by one;
- the job native feature vector includes node allocation information of the job
- the task native feature vector includes the node allocation information and the resource occupancy information of the corresponding task; the agent module is used to generate a corresponding scheduling strategy based on the native feature data;
- the proxy module includes:
- a feature extraction unit is used to extract an embedded feature vector from the native feature data based on a graph convolutional neural network, and generate a state feature vector based on the extraction result; the task of each job is recorded as a candidate task, and the state feature vector corresponds to the candidate task one by one;
- a first strategy unit configured to input the state feature vector into a first prediction network, and the first prediction network predicts the probability of each candidate task being scheduled, so as to obtain a scheduling priority of each candidate task;
- the present invention can extract the embedded feature vector of the native feature data through a graph convolutional neural network when the progress of job completion in the system is updated, so as to obtain the state feature vector of each task, determine the task scheduled in the current round based on the state feature vector, and select a suitable node for the task based on the state feature vector. Since the state feature vector contains resource occupancy information and node allocation information, it can reflect the data location of tasks with dependencies, so as to guide the generation of a scheduling strategy that can reduce the data transmission overhead between tasks with dependencies.
- FIG1 is a schematic diagram of a DAG operation
- FIG2 is a schematic diagram of the life cycle of each task in the DAG job shown in FIG1 ;
- FIG3 is a flow chart of a DAG job scheduling method according to the present invention.
- FIG. 4 is a schematic diagram of the structure of a DAG job scheduling system of the present invention.
- a cluster consists of several virtual machine nodes (VM nodes), which are referred to as nodes in the following text.
- resource categories can be determined according to actual needs, such as CPU, memory, network bandwidth, hard disk capacity, etc., and nodes can be heterogeneous, that is, they have completely different initial resource quantities.
- a job consists of a series of tasks that have interdependent relationships, such as segmentation, transcoding, merging, etc.
- the scheduling method proposed in the present invention is applicable to genetic computing jobs and video transcoding jobs.
- the user When submitting a job, the user will specify the dependencies of each task in the job and the amount of resources requested by each task in the YAML file.
- a job can be modeled as a directed acyclic graph (DAG).
- DAG can have multiple input tasks and multiple output tasks according to actual conditions.
- Input task It is necessary to pull a data set from the Object Storage Service (OBS) as input.
- OBS Object Storage Service
- the process of pulling data sets consumes bandwidth and is an important part of the job completion time.
- (Multiple) input tasks of the same job may pull different data sets or the same data set. If these input tasks are scheduled to the same virtual machine node and the required data set is the same, then it only needs to be pulled from OBS to the virtual machine node once. After the input task is processed, the processing results will be sent to its own subtasks.
- Remaining tasks only need to process data from the parent task, regardless of the data set stored in OBS. Similarly, each task needs to send the processing results to the child task it points to. If the task is an outbound task, the processing results need to be sent back to OBS. The process of sending back the data set processing results consumes bandwidth and is an important part of the job completion time.
- Scheduling refers to placing a task of a job on a virtual machine node at a certain moment.
- a task can be placed on a node if and only if the VM node satisfies the resource request of the task.
- the number of unfinished jobs in the system changes dynamically in real time, and the resource margin of each node in the cluster also changes in real time.
- n 1 to n 4 represent tasks. After the job is submitted, the first task n 1 is the incoming task. There is no previous task to wait for, so it will be immediately placed in the waiting queue to wait for execution. The reasons for waiting include that there is no node that meets the corresponding resource requirements and there are other tasks with higher priority (tasks of other jobs) in the current scheduling cycle. Therefore, the status of n 1 is marked as pending. After waiting, the corresponding node p(n 1 ) is assigned to task n 1 , that is, task n 1 is scheduled.
- Figure 2 shows the scheduling time and completion time of each task of the job shown in Figure 1, as well as the cache size and time period of the data on the bound node of each task.
- a task Before being executed, a task will go through two states: pending and scheduling. Tasks in the pending state cannot be scheduled. Tasks in the scheduling state can be scheduled. According to the functions registered in Kubernetes, they will perform actions such as enqueue, allocate, preempt, reclaim, backfill, etc. in sequence, and then be bound to a suitable node.
- the execution process of a task is: read the required data into memory, process it, and output the data to the buffer (or hard disk). These three steps can be performed simultaneously, that is, read and process (and output) at the same time.
- the output data of the task will be cached on the hard disk mounted on the node to which it is scheduled, and the resources occupied by the task (corresponding pod) will be released, and the pod itself will be destroyed.
- the child task can enter the schedulable state.
- n 1 its output data volume is s 12 , s 13 , s 14 (the total is ), which are the inputs of n 2 to n 4 respectively.
- the child task often reads all the cached data output by the parent task, and then determines the part it really needs based on the execution content. Therefore, the cache duration of the parent task output data is the difference between the "slowest child task completion time" and "its own completion time". As shown in Figure 2, the cache occupation of s 12 and s 13 will not be released until n 4 is destroyed.
- the cache overhead of the intermediate data of the job shown in Figure 1 can be calculated by multiplying the cache amount of each intermediate data by the sum of the corresponding cache existence time , where ⁇ t i represents the difference between the completion time of the slowest subtask of task n i and the completion time of n i itself.
- the completion time of a job refers to the completion time of the last completed task of the job.
- multiple jobs may be submitted at the initial moment, and new jobs may be submitted at any time during the execution of the job. Therefore, the optimization goal is to try to advance the completion time of the last completed job.
- the output data of the parent task may need to be temporarily cached locally, and the local cache needs to occupy the hard disk resources of the virtual machine node. Even if a pair of dependent tasks are scheduled to the same virtual machine node, the data may still be cached (depending on the waiting time of the parent task), but the time overhead of its data transmission is 0 at this time.
- the optimization goal is to minimize the occupation of the hard disk resources in the cluster by the intermediate data.
- Embodiment 1 A DAG job scheduling method, when the progress status of a job is updated, performs the following steps:
- the native feature data includes a job native feature vector and a task native feature vector corresponding to each task one by one;
- the job native feature vector includes node allocation information of the job
- the task native feature vector includes the node allocation information and resource occupancy information of the corresponding task
- the job-native feature vector corresponding to the i-th job is recorded as x i
- the task-native feature vector corresponding to the v-th task in the i-th job is recorded as
- the node allocation information includes the number of different nodes that have been allocated to the job (integer type variable), and whether the first node in the node queue to be allocated has been allocated to a task of the job (boolean type variable);
- This embodiment can extract the embedded feature vector of the native feature data through a graph convolutional neural network when the progress of job completion is updated in the system, so as to obtain the state feature vector of each task, determine the task scheduled in the current round based on the state feature vector, and select a suitable node for the task based on the state feature vector. Since the state feature vector contains resource occupancy information and node allocation information, it can reflect the data location of tasks with dependencies, so as to guide the generation of a scheduling strategy that can reduce the data transmission overhead between tasks with dependencies.
- step S200 includes:
- the state feature vector includes the global feature vector, and also includes a task feature vector and an operation feature vector corresponding to the candidate task.
- the embedded feature vector is essentially a compressed perception of the original features and the structural information of the graph, so that the unstructured features are preserved in a numerical way.
- This embodiment uses a graph convolutional neural network to extract the embedded feature vector;
- the task embedding feature vector is extracted by the following formula:
- ⁇ v represents the set of all subtasks of the vth task n v ; represents the embedded feature vector corresponding to the u-th task of the i-th job, which is a subtask of task n v ;
- the task embedding feature vector of a task is the result of nonlinear transformation of the task embedding feature vectors of all its subtasks and adding its own task native feature vector.
- a second extraction network generating a job embedding feature vector of the job based on the job native feature vector of the job and the task embedding feature vector corresponding to the job;
- the extraction of the task embedding feature vector is performed by the following formula:
- Mi represents the i-th job
- xi represents the job-native feature vector of the ith job
- Both f 2 and g 2 represent a nonlinear mapping function, and both adopt a fully connected neural network containing three hidden layers, that is, the second extraction network includes a third fully connected neural network for implementing f 2 nonlinear mapping and a fourth fully connected neural network for implementing g 2 nonlinear mapping.
- the job embedding feature vector of a job is the result of nonlinear transformation of the task embedding feature vectors of all its tasks and adding its own job native feature vector.
- the third extraction network generates the global embedding feature vector based on the embedding feature vectors of each job.
- the global embedding feature vector z is extracted by the following formula:
- Mi represents the i-th job
- Both f 3 and g 3 represent a nonlinear mapping function, and both adopt a fully connected neural network containing three hidden layers, that is, the third extraction network includes a fifth fully connected neural network for implementing f 3 nonlinear mapping and a sixth fully connected neural network for implementing g 3 nonlinear mapping.
- q is a fully connected neural network with three hidden layers.
- the first prediction network includes a first feature transformation network and a first output network
- the input of the first feature network is all state feature vectors, and the first feature network is the fully connected neural network q mentioned above;
- the input of the first output network is the output of the first feature network, and the output is the probability of each candidate task being selected.
- the first output network is a SoftMax layer.
- nodes that meet the resource request amount of the target task are selected as candidate nodes.
- the Actor-Critic algorithm is used to update the parameters of the above 8 fully connected neural networks.
- ⁇ represent all the parameters of the agent (including all the weights and biases of the eight fully connected neural networks), sk represent the state input from the environment that triggers the kth scheduling action (i.e., the input of the first prediction network), and ak represent the kth scheduling action that is legal under the current state.
- the parameter update formula corresponding to all ( sk , ak , rk , sk+1 ) quadruplets is:
- the training of the graph convolutional neural network, the first prediction network, and the second prediction network is performed in a simulation environment, and parameters are updated based on the Actor-Critic algorithm, which is the same as the above content, so it will not be repeated in this manual.
- the progress status of a job is updated when:
- the native feature data includes a job native feature vector and a task native feature vector corresponding to each task one by one;
- a first strategy unit configured to input the state feature vector into a first prediction network, and the first prediction network predicts the probability of each candidate task being scheduled, so as to obtain a scheduling priority of each candidate task;
- the Kubernetes platform is used to generate a corresponding RPC request when the progress status of a job is updated, and the RPC request is the native feature data of each job;
- the monitoring module is used to receive the RPC request and obtain the native feature data
- the second policy unit is further used to generate a corresponding RPC response based on the scheduling policy, and feed the RPC response back to the Kubernetes platform.
- Embodiment 3 A computer-readable storage medium stores a computer program, which implements the steps of the method described in Embodiment 1 when executed by a processor.
- embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
- computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
- These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce computer-implemented processing, so that the instructions executed on the computer or other programmable terminal device provide steps for implementing the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Computational Linguistics (AREA)
- Biophysics (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Biomedical Technology (AREA)
- Artificial Intelligence (AREA)
- Mathematical Physics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Health & Medical Sciences (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
本发明公开一种DAG作业调度方法及系统,其中方法为,当作业的进度状态发生更新时,进行以下步骤:获取各作业的原生特征数据;基于图卷积神经网络对所述原生特征数据进行嵌入特征向量的提取,基于提取结果生成状态特征向量;将所述状态特征向量输入第一预测网络,由所述第一预测网络预测各候选任务被调度的概率,获得各候选任务的调度优先度;按照所述调度优先度从大到小的顺序,基于状态特征向量依次为候选任务选择分配节点,基于选择结果生成调度策略。本发明所提出的调度策略能够在全局上提高效率,还能降低作业执行过程中中间数据的缓存开销。
Description
本发明涉及云计算领域,尤其涉及一种云原生环境下基于Kubernetes的DAG作业调度技术。
近年来,云原生逐渐成为云计算2.0时代的标准范式。云原生采用开源堆栈对工作负载进行容器化,基于微服务架构提高灵活性和可维护性,借助敏捷方法、DevOps支持持续迭代和运维自动化,利用云平台设施实现弹性伸缩、动态调度、优化资源利用率。
Kubernetes,是一种开源的容器集群管理系统,提供应用部署、维护、扩展机制等功能,在Kubernetes上提交作业需要上传一份按照指定格式清晰定义各个组件执行内容和资源需求的yaml文件(一种配置文件),随后Kubernetes将开始对该作业中各组件按照调度策略和规则进行调度并执行。
然而,Kubernetes目前对形如“有向无环图(Directed Acyclic Graph,简称DAG)”结构的计算任务的调度能力有待提高。
发明内容
本发明针对现有技术中的Kubernetes对待DAG作业的调度能力差的缺点,提供了一种基于策略搜索和图卷积网络的DAG作业调度技术。
为了解决上述技术问题,本发明通过下述技术方案得以解决:
一种DAG作业调度方法,当作业的进度状态发生更新时,进行以下步骤:
获取各作业的原生特征数据;
所述原生特征数据包括作业原生特征向量及与任务一一对应的任务原生特征向量;
所述作业原生特征向量包含所述作业的节点分配信息;
所述任务原生特征向量包含所述节点分配信息,还包含对应任务的资源占用信息;
基于图卷积神经网络对所述原生特征数据进行嵌入特征向量的提取,基于提取结果生成状态特征向量;
将各作业的任务记为候选任务,所述状态特征向量与所述候选任务一一对应;
将所述状态特征向量输入第一预测网络,由所述第一预测网络预测各候选任务被调度的概率,获得各候选任务的调度优先度;
按照所述调度优先度从大到小的顺序,基于状态特征向量依次为候选任务选择分配节点,基于选择结果生成调度策略。
作为一种可实施方式:
所述提取结果包括:
与所述候选任务一一对应的任务嵌入特征向量;
与所述作业一一对应的作业嵌入特征向量;
一全局嵌入特征向量;
所述状态特征向量包含所述全局特征向量,还包含与所述候选任务相对应的任务特征向量和作业特征向量。
作为一种可实施方式:
所述图卷积神经网络包括:
第一提取网络,基于候选任务的作业原生特征向量和任务原生特征向量,以及所述候选任务的孩子任务的任务嵌入特征向量,生成所述候选任务的任务嵌入特征向量;
第二提取网络,基于作业的作业原生特征向量,以及与所述作业相对应的任务嵌入特征向量,生成所述作业的作业嵌入特征向量;
第三提取网络,基于各作业嵌入特征向量,生成所述全局嵌入特征向量。
作为一种可实施方式,为候选任务选择分配节点的具体步骤包括:
将当前待分配节点的候选任务作为目标任务;
筛选满足所述目标任务执行的节点,获得候选节点;
获取各候选节点的节点特征向量,所述节点特征向量包含对应节点的资源利用数据;
基于所述节点特征向量和所述目标任务的状态特征向量,计算各候选节点的分配优先度,将分配优先度最大的候选节点作为目标任务的目标节点。
作为一种可实施方式:
由第二预测网络基于所述节点特征向量和所述目标任务的状态特征向量预测各候选节点被分配的概率,获得各候选节点的分配优先度。
作为一种可实施方式,所述调度策略包括至少一个调度动作,所述调度动作用于指示执行调度的任务和节点;
生成所述调度策略后,基于预设的优化目标计算各调度动作所对应的奖励,并统计获得累计奖励;
所述预设的优化目标为提前最后一个作业的完工时间,并降低中间数据在集群内占用的缓存开销。
所述累计奖励用于更新所述图卷积神经网络和所述第一预测网络。
作为一种可实施方式,第k-1个调度动作的奖励rk-1的计算公式为:rk-1=-(tk-tk-1)(|Jk|+|ξ(Jk)|);
其中:
tk表示第k个调度动作触发时的全局时间;
tk-1表示第k-1个调度动作触发时的全局时间;
Jk是时间段[tk-1,tk)内未完成的任务的集合;
ξ(Jk)是Jk中所有任务的父任务的集合;
|Jk|是Jk内元素的数量;
|ξ(Jk)|是ξ(Jk)内元素的数量。
一种DAG作业调度方法,包括:
监控模块,用于当作业的进度状态发生更新时,获取并传输各作业的原生特征数据;
所述原生特征数据包括作业原生特征向量及与任务一一对应的任务原生特征向量;
所述作业原生特征向量包含所述作业的节点分配信息;
所述任务原生特征向量包含所述节点分配信息,还包含对应任务的资源占用信息;代理模块,用于基于所述原生特征数据生成相应的调度策略;
所述代理模块包括:
特征提取单元,用于基于图卷积神经网络对所述原生特征数据进行嵌入特征向量的提取,基于提取结果生成状态特征向量;将各作业的任务记为候选任务,所述状态特征向量与所述候选任务一一对应;
第一策略单元,用于将所述状态特征向量输入第一预测网络,由所述第一预测网络预测各候选任务被调度的概率,获得各候选任务的调度优先度;
第二策略单元,用于按照所述调度优先度从大到小的顺序,依次为候选任务选择分配节点,基于选择结果生成调度策略。
作为一种可实施方式,还包括Kubernetes平台;
所述Kubernetes平台用于当作业的进度状态发生更新时生成相应的RPC请求,所述RPC请求各作业的原生特征数据;
所述监控模块,用于接收所述RPC请求,获取所述原生特征数据;
所述第二策略单元,还用于基于所述调度策略生成相应的RPC响应,并将所述RPC响应反馈至所述Kubernetes平台。
一种计算机可读存储介质,其上存储有计算机程序,所述程序被处理器执行时实现上述任一所述方法的步骤。
本发明由于采用了以上技术方案,具有显著的技术效果:
本发明能够在系统中作业完成进度出现更新时,通过图卷积神经网络对所述原生特征数据进行嵌入特征向量的提取,以获取各任务的状态特征向量,基于状态特征向量确定当前轮次被调度的任务,并基于状态特征向量为该任务选择合适的节点,由于状态特征向量包含资源占用信息和节点分配信息,能够体现具有依赖关系的任务的数据位置,以指导生成能够降低具有依赖关系的任务之间的数据传输开销的调度策略。
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是一种DAG作业示意图;
图2是图1所示DAG作业中各任务生命周期示意图;
图3是本发明一种DAG作业调度方法的流程示意图;
图4是本发明一种DAG作业调度系统的结构示意图。
下面结合实施例对本发明做进一步的详细说明,以下实施例是对本发明的解释而本发明并不局限于以下实施例。
说明:
(1)、虚拟机节点与集群:集群由若干个虚拟机节点(VM node)组成,下文将虚拟机节点简称为节点;
本说明书中通过表示集群,其中ci表示第i个节点。所有虚拟机节点相互均可通信,它们组成了一个全连接图。在任意时刻,可知任意一个节点各类资源的剩余量其中表示节点ci第q类资源的剩余量,是所有资源类别的集合;
在实际使用中可根据实际需要确定资源列别,如CPU、内存、网络带宽、硬盘容量等,且节点可以是异构的,即具备截然不同的资源初始量。
(1)、作业与任务:
一个作业(job)由一系列存在相互依赖关系的任务(task)所组成,例如分割、转码、合并等,本发明所提出的调度方法适用于基因计算作业和视频转码作业。
用户会在一个作业提交时的yaml文件中将指明作业内各个任务的依赖关系以及各个任务对各类资源的请求量。
一个作业可被建模为一个有向无环图(DAG)。DAG可根据实际情况具有多个入任务和多个出任务。
对于单个作业,我们将其任务分为入任务和剩余任务:
入任务:需要拉取来自对象存储服务(Object Storage Service,简称OBS)的数据集作为输入。数据集拉取过程消耗带宽,是作业完成时间的重要组成部分。同一个作业的(多个)入任务拉取的可能是不同的数据集,也有可能是相同的数据集。如果这些入任务被调度到了同一个虚拟机节点上,且所需的数据集是同一个,那么仅需从OBS拉取到该虚拟机节点一次。入任务处理完毕后,会将处理结果发送给自己的子任务。
剩余任务:仅需处理来自父任务的数据,与OBS内存放的数据集无关。同样地,每个任务需要将处理结果发送给自身所指向的子任务。如果该任务是出任务,那么需要将处理结果回传给OBS。数据集处理结果回传过程消耗带宽,是作业完成时间的重要组成部分。
(3)调度策略:
调度指在某一时刻将某个作业的某个任务放置到某个虚拟机节点上。
一个任务可以被放置到某个节点上,当且仅当该虚拟机节点满足该任务的资源请求。
在任意时刻,系统内尚未完成的作业是实时动态变化的,集群内各个节点的资源余量也是实时变化的。
(4)、作业的生命周期分析:
以图1所示的DAG类型的作业为例,进行以下说明:
图1中n1至n4表示任务,该作业提交后,第一个任务n1作为入任务,没有前序任务需要等待,因此将被立即放置到待调度队列中等待执行,等待的原因包括当前没有满足相应资源要求的节点、当前调度周期内存在优先级更高的其他任务(其他作业的任务),故此时n1的状态标记为pending(等待)。经过等待之后,为任务n1分配相应的的节点p(n1),即任务n1被调度。
图2给出了图1所示的作业的各个任务的调度时刻、完成时刻,以及各个任务在所绑定的节点上数据的缓存大小及时段。任务在被执行前,会经历等待(pending)和调度(scheduling)两个状态。处于pending状态的任务是不可被调度的。处于scheduling状态的任务是可被调度的,根据在Kubernetes中注册的函数,它们会依次执行enqueue(入列)、allocate(优选)、preempt(优先级调度)、reclaim(队列权重资源回收)、backfill(最大化调度)等动作,然后被绑定到一个合适的节点上。
任务的执行过程为:将所需要的数据读入内存、进行处理、输出数据到buffer(或者硬盘)。这三个步骤可以同时进行,即一边读取、一边处理(并输出)。完成执行后,任务的输出数据会缓存在被调度到的节点的所挂载的硬盘上,而该任务(对应的pod)占用的资源将会被释放,pod本身被销毁。随着父任务的完成,子任务才进入可被调度状态。
以n1为例,它的输出数据量为s12、s13、s14(总和为),分别是n2至n4的输入。子任务往往会读取父任务输出的全部缓存数据,再根据执行内容判定自己真正需要的部分,故父任务输出数据的缓存时长为“最慢的子任务的完成时间和“自身的完成时间”二者之间的差值,参照图2,直到n4销毁时s12和s13的缓存占用才会被释放。
因此,图1所示作业的中间数据的缓存开销可通过各中间数据的缓存量乘以对应的缓存存在时间之和体现,其中Δti表示任务ni的最慢的子任务的完成时间和ni自身的完成时间之间的差值。
(5)、本发明所提出的调度方法的优化目标:
提前最后一个作业的完工时间:
一个作业的完工时间是指该作业最后一个完成的任务的完成时间。在Kubernetes运行过程中,在初始时刻可能会有多个作业被提交,在作业执行的中途任意时刻,也有可能会有新的作业被提交,故,本优化目标指尽量提前最后一个完成的作业的完工时间。
降低中间数据在集群内占用的缓存开销:
由上可知,父任务的输出数据可能会需要暂时在本地缓存,本地缓存需要占用所在虚拟机节点的硬盘资源。即使一对具有依赖关系的任务被调度到了同一个虚拟机节点上,数据仍有可能会被缓存(取决于父任务的等待时间),但是此时其数据传输的时间开销为0。本优化目标是指尽量降低中间数据对集群内的硬盘资源的占用。
实施例1、一种DAG作业调度方法,当作业的进度状态发生更新时,进行以下步骤:
S100、获取各作业的原生特征数据;
所述原生特征数据包括作业原生特征向量及与任务一一对应的任务原生特征向量;
所述作业原生特征向量包含所述作业的节点分配信息;
所述任务原生特征向量包含所述节点分配信息,还包含对应任务的资源占用信息;
本实施例中:
将第i个作业对应的作业原生特征向量记为xi,将第i个作业中第v个任务对应的任务原生特征向量记为
所述节点分配信息包括已分配给该作业的不同的节点的个数(integer类型变量)、当前待分配的节点队列中的第一个节点是否曾经分配给该作业的某个任务过(boolean类型变量);
所述资源占用信息包括对应任务的输入数据量(float类型变量)、输出数据量(float类型变量)、(预估)剩余执行时间(float类型变量),各个输出数据的缓存时间(float类型变量)其中ξi表示任务ni的所有子任务的集合。
注:所述作业指待完成作业。
S200、基于图卷积神经网络对所述原生特征数据进行嵌入特征向量的提取,基于提取结果生成状态特征向量;
将各作业的任务记为候选任务,所述状态特征向量与所述候选任务一一对应;
S300、将所述状态特征向量输入第一预测网络,由所述第一预测网络预测各候选任务被调度的概率,获得各候选任务的调度优先度;
S400、按照所述调度优先度从大到小的顺序,基于状态特征向量依次为候选任务选择分配节点,基于选择结果生成调度策略。
本实施例能够在系统中作业完成进度出现更新时,通过图卷积神经网络对所述原生特征数据进行嵌入特征向量的提取,以获取各任务的状态特征向量,基于状态特征向量确定当前轮次被调度的任务,并基于状态特征向量为该任务选择合适的节点,由于状态特征向量包含资源占用信息和节点分配信息,能够体现具有依赖关系的任务的数据位置,以指导生成能够降低具有依赖关系的任务之间的数据传输开销的调度策略。
进一步地,步骤S200中所述的提取结果包括:
与所述候选任务一一对应的任务嵌入特征向量;
与所述作业一一对应的作业嵌入特征向量;
一全局嵌入特征向量;
所述状态特征向量包含所述全局特征向量,还包含与所述候选任务相对应的任务特征向量和作业特征向量。
嵌入特征向量本质上对原始特征和图的结构信息的一种压缩感知,使得非结构化的特征通过数值的方式被保存,本实施例采用图卷积神经网络获得进行嵌入特征向量的提取;
参照图3,本实施例中所述图卷积神经网络包括:
第一提取网络:
基于候选任务的作业原生特征向量和任务原生特征向量,以及所述候选任务的孩子任务的任务嵌入特征向量,生成所述候选任务的任务嵌入特征向量;
本实施例中任务嵌入特征向量的提取通过如下公式进行:
其中:
表示第i个作业的第v个任务所对应的任务嵌入特征向量;
ξv表示第v个任务nv的所有子任务的集合;表示第i个作业的第u个任务所对应的嵌入特征向量,该任务为任务nv的子任务;
表示第i个作业的第v个任务的任务原生特征向量;
f1和g1均表示一个非线性映射函数,均采取含有三个隐藏层的全连接神经网络,即,第一提取网络包含用于实现f1非线性映射的第一全连接神经网络和用于实现g1非线性映射的第二全连接神经网络,此处的两个全连接神经网络被所有作业的所有任务的特征提取所共享。
由上可知,一个任务的任务嵌入特征向量是由其所有子任务的任务嵌入特征向量经过非线性变换并加上自己任务原生特征向量的结果。
第二提取网络,基于作业的作业原生特征向量,以及与所述作业相对应的任务嵌入特征向量,生成所述作业的作业嵌入特征向量;
本实施例中作业嵌入特征向量的提取通过如下公式进行:
其中:
yi表示第i个作业所对应的作业嵌入特征向量;
mi表示第i个作业;
表示第i个作业的第v个任务所对应的任务嵌入特征向量;
xi表示第i个作业的作业原生特征向量;
f2和g2均表示一个非线性映射函数,均采取含有三个隐藏层的全连接神经网络,即,第二提取网络包含用于实现f2非线性映射的第三全连接神经网络和用于实现g2非线性映射的第四全连接神经网络。
由上可知,一个作业的作业嵌入特征向量是由其所有任务的任务嵌入特征向量经过非线性变换并加上自己的作业原生特征向量的结果。
第三提取网络,基于各作业嵌入特征向量,生成所述全局嵌入特征向量。
本实施例中全局嵌入特征向量z的提取通过如下公式进行:
其中:
mi表示第i个作业;
yi表示第i个作业所对应的作业嵌入特征向量;
f3和g3均表示一个非线性映射函数,均采取含有三个隐藏层的全连接神经网络,即,第三提取网络包含用于实现f3非线性映射的第五全连接神经网络和用于实现g3非线性映射的第六全连接神经网络。
本实施例中图卷积神经网络包含6个全连接神经网络每个神经网络包含三个隐藏层,三层隐藏层的神经元个数依次设置为16、32、16。
图卷积神经网络输出的提取结果为
对于任意一个候选任务,基于其关联的任务嵌入特征向量作业嵌入特征向量yi和全局嵌入特征向量z构成状态特征向量。
参照图3,本实施例中将所述状态特征向量输入第一预测网络,由所述第一预测网络预测各候选任务被调度的概率的具体实现方式如下:
首先将候选任务(第i个作业的第v个任务)的状态特征向量输入一个非线性映射q得到输出
其中q是一个含有三个隐藏层的全连接神经网络。
然后将所有的一起被输入进SoftMax层,该层返回所有任务被选中的概率。
即,本实施例中第一预测网络包括第一特征变换网络和第一输出网络;
所述第一特征网络的输入是所有状态特征向量,第一特征网络即上述全连接神经网络q;
所述第一输出网络的输入是所述第一特征网络的输出,输出是各候选任务被选中的概率,第一输出网络为SoftMax层。
注意,如果一个任务是不可被调度的,那么对应的掩码变量会直接将该任务的选中概率置为0。
本实施例中为候选任务选择分配节点的具体步骤包括:
S410、将当前待分配节点的候选任务作为目标任务;
S420、筛选满足所述目标任务执行的节点,获得候选节点;
即,筛选满足目标任务的资源请求量的节点作为候选节点。
S430、获取各候选节点的节点特征向量,所述节点特征向量包含对应节点的资源利用数据;
资源利用数据包括该虚拟节点到OBS的链路带宽大小、该虚拟机节点的CPU主频等特征。
S440、基于所述节点特征向量和所述目标任务的状态特征向量,计算各候选节点的分配优先度,将分配优先度最大的候选节点作为目标任务的目标节点。
即,由第二预测网络基于所述节点特征向量和所述目标任务的状态特征向量预测各候选节点被分配的概率,获得各候选节点的分配优先度。
参照图3,具体实现方式为:
将所述节点特征向量和所述目标任务的状态特征向量进行非线性映射;
其中:
wl表示目标任务对应的第l个候选节点的非线性映射结果;
hl表示目标任务对应的第l个候选节点的节点特征向量;
w是一个含有三个隐藏层的全连接神经网络。
同样地,所有的一起被输入进SoftMax层,该层返回所有候选虚拟机节点被选中的概率。
即,本实施例中第二预测网络包括第二特征变换网络和第二输出网络;
所述第二特征网络的输入是目标任务对应的和所有候选节点的节点特征向量和,第一特征网络即上述全连接神经网络q;
所述第一输出网络的输入是所述第一特征网络的输出,输出是各候选任务被选中的概率,第一输出网络为SoftMax层。
本实施例中所述调度策略包括至少一个调度动作,所述调度动作用于指示执行调度的任务和节点,即,通过上述步骤获得的一对目标任务和目标节点形成一调度动作。
生成所述调度策略后,还基于预设的优化目标计算各调度动作所对应的奖励,并统计获得累计奖励;
所述预设的优化目标为提前最后一个作业的完工时间,并降低中间数据在集群内占用的缓存开销。
所述累计奖励用于更新所述图卷积神经网络、所述第一预测网络和所述第二预测网络,即,更新上述8个全连接神经网络的参数。
第k-1个调度动作的奖励rk-1的计算公式为:rk-1=-(tk-tk-1)(|Jk|+|ξ(Jk)|);
其中:
tk表示第k个调度动作触发时的全局时间;
tk-1表示第k-1个调度动作触发时的全局时间;
Jk是时间段[tk-1,tk)内未完成的任务的集合;
ξ(Jk)是Jk中所有任务的父任务的集合;
|Jk|是Jk内元素的数量;
|ξ(Jk)|是ξ(Jk)内元素的数量。
上述公式中第一项惩罚项用于惩罚完工时间,第二项惩罚项用于惩罚已完成的父任务因为子任务未完成导致其输出数据占用的缓存空间无法被释放的情况。考虑到无法探测中间数据的输入和输出量,此外,任务的输出数据量也是不可优化的(不会随着调度算法的性能的变化而发生变化),因此我们仅基于“数量”维度进行惩罚。
本实施例中采用Actor-Critic算法更新上述8个全连接神经网络的参数。
用θ表示代理的全部参数(包含8个全连接神经网络的全部权重和偏置),用sk表示触发第k个调度动作的、来自环境的状态输入(即第一预测网络的输入),用ak表示当前状态下合法的第k种调度动作,则所有的(sk,ak,rk,sk+1)四元组所对应的参数更新公式为:
[根据细则91更正 06.02.2024]
其中πθ(sk,ak)表示状态为sk时选择的调度动作为ak的概率,也就是图3中的P(task)·P(VM node);γ是参数更新的速率;当前步到算法终止为止的的累积奖;赏bk是第k轮的基线函数值,其存在的意义时降低过大的(sk,ak,rk,sk+1)四元组方差对训练效率的影响。
其中πθ(sk,ak)表示状态为sk时选择的调度动作为ak的概率,也就是图3中的P(task)·P(VM node);γ是参数更新的速率;当前步到算法终止为止的的累积奖;赏bk是第k轮的基线函数值,其存在的意义时降低过大的(sk,ak,rk,sk+1)四元组方差对训练效率的影响。
注:图卷积神经网络、第一预测网络和第二预测网络的训练即在仿真环境下,基于Actor-Critic算法进行参数更新,与上述内容相同,故不再本说明书中进行重复说明。
本实施例中作业的进度状态发生更新指:
任意一个作业完成,此时分配给它的所有节点的被占用资源得以释放;
任意一个任务完成,此时它的一个或多个子任务可进入可被调度状态;
一个新的作业被提交。
本发明综合任务依赖关系、数据位置等实现任务容器到虚拟机节点的最优调度,在最小化作业完成时间的同时降低前后有依赖关系的任务之间的数据传输开销,还通过建立任务和数据之间的亲和关系,优化可被调度任务和候选虚拟机节点的优先级,从而实现作业的最佳启动。
实施例2、一种DAG作业调度系统,包括代理端,所述代理端包括:
监控模块,用于当作业的进度状态发生更新时,获取并传输各作业的原生特征数据;
所述原生特征数据包括作业原生特征向量及与任务一一对应的任务原生特征向量;
所述作业原生特征向量包含所述作业的节点分配信息;
所述任务原生特征向量包含所述节点分配信息,还包含对应任务的资源占用信息;
代理模块,用于基于所述原生特征数据生成相应的调度策略;
所述代理模块包括:
特征提取单元,用于基于图卷积神经网络对所述原生特征数据进行嵌入特征向量的提取,基于提取结果生成状态特征向量;将各作业的任务记为候选任务,所述状态特征向量与所述候选任务一一对应;
第一策略单元,用于将所述状态特征向量输入第一预测网络,由所述第一预测网络预测各候选任务被调度的概率,获得各候选任务的调度优先度;
第二策略单元,用于按照所述调度优先度从大到小的顺序,依次为候选任务选择分配节点,基于选择结果生成调度策略。
进一步地,还包括Kubernetes平台;
参照图4,所述Kubernetes平台用于当作业的进度状态发生更新时生成相应的RPC请求,所述RPC请求各作业的原生特征数据;
所述监控模块,用于接收所述RPC请求,获取所述原生特征数据;
所述第二策略单元,还用于基于所述调度策略生成相应的RPC响应,并将所述RPC响应反馈至所述Kubernetes平台。
实施例3、一种计算机可读存储介质,其上存储有计算机程序,所述程序被处理器执行时实现如实施例1所述方法的步骤。
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。
本领域内的技术人员应明白,本发明的实施例可提供为方法、装置、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明的方法、终端设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理终端设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理终端设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理终端设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理终端设备上,使得在计算机或其他可编程终端设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程终端设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
需要说明的是:
说明书中提到的“一个实施例”或“实施例”意指结合实施例描述的特定特征、结构或特性包括在本发明的至少一个实施例中。因此,说明书通篇各个地方出现的短语“一个实施例”或“实施例”并不一定均指同一个实施例。
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。
此外,需要说明的是,本说明书中所描述的具体实施例,其零、部件的形状、所取名称等可以不同。凡依本发明专利构思所述的构造、特征及原理所做的等效或简单变化,均包括于本发明专利的保护范围内。本发明所属技术领域的技术人员可以对所描述的具体实施例做各种各样的修改或补充或采用类似的方式替代,只要不偏离本发明的结构或者超越本权利要求书所定义的范围,均应属于本发明的保护范围。
Claims (10)
- 一种DAG作业调度方法,其特征在于,当作业的进度状态发生更新时,进行以下步骤:获取各作业的原生特征数据;所述原生特征数据包括作业原生特征向量及与任务一一对应的任务原生特征向量;所述作业原生特征向量包含所述作业的节点分配信息;所述任务原生特征向量包含所述节点分配信息,还包含对应任务的资源占用信息;基于图卷积神经网络对所述原生特征数据进行嵌入特征向量的提取,基于提取结果生成状态特征向量;将各作业的任务记为候选任务,所述状态特征向量与所述候选任务一一对应;将所述状态特征向量输入第一预测网络,由所述第一预测网络预测各候选任务被调度的概率,获得各候选任务的调度优先度;按照所述调度优先度从大到小的顺序,基于状态特征向量依次为候选任务选择分配节点,基于选择结果生成调度策略。
- 根据权利要求1所述的DAG作业调度方法,其特征在于:所述提取结果包括:与所述候选任务一一对应的任务嵌入特征向量;与所述作业一一对应的作业嵌入特征向量;一全局嵌入特征向量;所述状态特征向量包含所述全局特征向量,还包含与所述候选任务相对应的任务特征向量和作业特征向量。
- 根据权利要求1所述的DAG作业调度方法,其特征在于:所述图卷积神经网络包括:第一提取网络,基于候选任务的作业原生特征向量和任务原生特征向量,以及所述候选任务的孩子任务的任务嵌入特征向量,生成所述候选任务的任务嵌入特征向量;第二提取网络,基于作业的作业原生特征向量,以及与所述作业相对应的任务嵌入特征向量,生成所述作业的作业嵌入特征向量;第三提取网络,基于各作业嵌入特征向量,生成所述全局嵌入特征向量。
- 根据权利要求1所述的DAG作业调度方法,其特征在于,为候选任务选择分配节点的具体步骤包括:将当前待分配节点的候选任务作为目标任务;筛选满足所述目标任务执行的节点,获得候选节点;获取各候选节点的节点特征向量,所述节点特征向量包含对应节点的资源利用数据;基于所述节点特征向量和所述目标任务的状态特征向量,计算各候选节点的分配优先度,将分配优先度最大的候选节点作为目标任务的目标节点。
- 根据权利要求4所述的DAG作业调度方法,其特征在于:由第二预测网络基于所述节点特征向量和所述目标任务的状态特征向量预测各候选节点被分配的概率,获得各候选节点的分配优先度。
- 根据权利要求1所述的DAG作业调度方法,其特征在于,所述调度策略包括至少一个调度动作,所述调度动作用于指示执行调度的任务和节点;生成所述调度策略后,基于预设的优化目标计算各调度动作所对应的奖励,并统计获得累计奖励;所述预设的优化目标为提前最后一个作业的完工时间,并降低中间数据在集群内占用的缓存开销;所述累计奖励用于更新所述图卷积神经网络和所述第一预测网络。
- 根据权利要求6所述的DAG作业调度方法,其特征在于,第k-1个调度动作的奖励rk-1的计算公式为:
rk-1=-(tk-tk-1)(|Jk|+|ξ(Jk)|);其中:tk表示第k个调度动作触发时的全局时间;tk-1表示第k-1个调度动作触发时的全局时间;Jk是时间段[tk-1,tk)内未完成的任务的集合;ξ(Jk)是Jk中所有任务的父任务的集合;|Jk|是Jk内元素的数量;|ξ(Jk)|是ξ(Jk)内元素的数量。 - 一种DAG作业调度方法,其特征在于,包括:监控模块,用于当作业的进度状态发生更新时,获取并传输各作业的原生特征数据;所述原生特征数据包括作业原生特征向量及与任务一一对应的任务原生特征向量;所述作业原生特征向量包含所述作业的节点分配信息;所述任务原生特征向量包含所述节点分配信息,还包含对应任务的资源占用信息;代理模块,用于基于所述原生特征数据生成相应的调度策略;所述代理模块包括:特征提取单元,用于基于图卷积神经网络对所述原生特征数据进行嵌入特征向量的提取,基于提取结果生成状态特征向量;将各作业的任务记为候选任务,所述状态特征向量与所述候选任务一一对应;第一策略单元,用于将所述状态特征向量输入第一预测网络,由所述第一预测网络预测各候选任务被调度的概率,获得各候选任务的调度优先度;第二策略单元,用于按照所述调度优先度从大到小的顺序,依次为候选任务选择分配节点,基于选择结果生成调度策略。
- 根据权利要求8所述的DAG作业调度方法,其特征在于,还包括Kubernetes平台;所述Kubernetes平台用于当作业的进度状态发生更新时生成相应的RPC请求,所述RPC请求各作业的原生特征数据;所述监控模块,用于接收所述RPC请求,获取所述原生特征数据;所述第二策略单元,还用于基于所述调度策略生成相应的RPC响应,并将所述RPC响应反馈至所述Kubernetes平台。
- 一种计算机可读存储介质,其上存储有计算机程序,所述程序被处理器执行时实现如权利要求1~7任一所述方法的步骤。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US19/016,731 US20250231798A1 (en) | 2024-01-15 | 2025-01-10 | Dag job scheduling method and system |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410054049.9 | 2024-01-15 | ||
| CN202410054049.9A CN117827461A (zh) | 2024-01-15 | 2024-01-15 | Dag作业调度方法及系统 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US19/016,731 Continuation US20250231798A1 (en) | 2024-01-15 | 2025-01-10 | Dag job scheduling method and system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2025152195A1 true WO2025152195A1 (zh) | 2025-07-24 |
Family
ID=90524140
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2024/073551 Pending WO2025152195A1 (zh) | 2024-01-15 | 2024-01-23 | Dag作业调度方法及系统 |
Country Status (3)
| Country | Link |
|---|---|
| US (1) | US20250231798A1 (zh) |
| CN (1) | CN117827461A (zh) |
| WO (1) | WO2025152195A1 (zh) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US12639138B1 (en) * | 2025-08-04 | 2026-05-26 | Next Silicon Ltd. | Method and system for aggregating event occurrence indications |
| CN120972743B (zh) * | 2025-10-15 | 2025-12-23 | 四川圣诺油气工程技术服务有限公司 | 一种用于远程带压作业的智能运行控制方法及系统 |
| CN121833052B (zh) * | 2026-03-11 | 2026-06-12 | 华中科技大学 | 面向simd架构的神经网络处理器核内调度方法及系统 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20200057675A1 (en) * | 2018-08-16 | 2020-02-20 | EMC IP Holding Company LLC | Workflow optimization |
| CN111756653A (zh) * | 2020-06-04 | 2020-10-09 | 北京理工大学 | 基于图神经网络深度强化学习的多coflow调度方法 |
| CN112711475A (zh) * | 2021-01-20 | 2021-04-27 | 上海交通大学 | 一种基于图卷积神经网络的工作流调度方法及系统 |
| CN114756358A (zh) * | 2022-06-15 | 2022-07-15 | 苏州浪潮智能科技有限公司 | 一种dag任务调度方法、装置、设备及存储介质 |
| CN114860398A (zh) * | 2022-04-21 | 2022-08-05 | 郑州大学 | 一种智能的云平台的任务调度方法、装置及设备 |
| CN116069473A (zh) * | 2023-02-22 | 2023-05-05 | 华东师范大学 | 一种基于深度强化学习的Yarn集群工作流调度方法 |
-
2024
- 2024-01-15 CN CN202410054049.9A patent/CN117827461A/zh active Pending
- 2024-01-23 WO PCT/CN2024/073551 patent/WO2025152195A1/zh active Pending
-
2025
- 2025-01-10 US US19/016,731 patent/US20250231798A1/en active Pending
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20200057675A1 (en) * | 2018-08-16 | 2020-02-20 | EMC IP Holding Company LLC | Workflow optimization |
| CN111756653A (zh) * | 2020-06-04 | 2020-10-09 | 北京理工大学 | 基于图神经网络深度强化学习的多coflow调度方法 |
| CN112711475A (zh) * | 2021-01-20 | 2021-04-27 | 上海交通大学 | 一种基于图卷积神经网络的工作流调度方法及系统 |
| CN114860398A (zh) * | 2022-04-21 | 2022-08-05 | 郑州大学 | 一种智能的云平台的任务调度方法、装置及设备 |
| CN114756358A (zh) * | 2022-06-15 | 2022-07-15 | 苏州浪潮智能科技有限公司 | 一种dag任务调度方法、装置、设备及存储介质 |
| CN116069473A (zh) * | 2023-02-22 | 2023-05-05 | 华东师范大学 | 一种基于深度强化学习的Yarn集群工作流调度方法 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN117827461A (zh) | 2024-04-05 |
| US20250231798A1 (en) | 2025-07-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN119512748B (zh) | 推理系统的负载感知调度方法和推理系统 | |
| US20250231798A1 (en) | Dag job scheduling method and system | |
| CN119149252B (zh) | 推理系统的负载感知调度方法和推理系统 | |
| CN110737529A (zh) | 一种面向短时多变大数据作业集群调度自适应性配置方法 | |
| CN110018817A (zh) | 数据的分布式运行方法及装置、存储介质及处理器 | |
| CN117349026B (zh) | 一种用于aigc模型训练的分布式算力调度系统 | |
| Wang et al. | Optimizing HPC scheduling: a hierarchical reinforcement learning approach for intelligent job selection and allocation: L. Wang et al. | |
| CN119248525B (zh) | 推理系统的内存管理方法和装置 | |
| CN113867907A (zh) | 一种基于cpu资源在工程领域调度系统及优化算法 | |
| CN120011093B (zh) | 面向加速器的多任务处理方法以及相关装置 | |
| CN115129477B (zh) | 资源高效与服务质量感知的推理服务系统自适应调度方法 | |
| WO2025161109A1 (zh) | 资源分配方法及系统 | |
| CN119718594B (zh) | 大语言模型服务中请求重调度的方法、装置、设备及介质 | |
| Li et al. | Performance optimization of computing task scheduling based on the Hadoop big data platform | |
| CN118733204A (zh) | 一种计算资源调度方案的确定方法及装置 | |
| CN112114951A (zh) | 一种自下而上的分布式调度系统及方法 | |
| CN121722544A (zh) | 基于多gpgpu的神经网络大模型高效推理方法 | |
| CN121579206A (zh) | 一种面向混合精度训练的异构算力协同调度系统和方法 | |
| CN120234144A (zh) | 基于时空约束近端策略优化的时变任务调度方法及系统 | |
| CN120849049A (zh) | 模型训练方法、装置、电子设备、存储介质及程序产品 | |
| CN119645630A (zh) | 基于粒子群算法gpu集群nlp任务并行化系统及方法 | |
| CN121233344B (zh) | 推理请求任务处理方法、装置、设备、介质、产品及异构系统 | |
| CN119248522B (zh) | 推理系统的内存管理方法和装置 | |
| CN116974747A (zh) | 一种资源分配方法、装置、设备、介质及程序产品 | |
| CN121257715A (zh) | 多模态模型推理方法、框架、设备及介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 24917816 Country of ref document: EP Kind code of ref document: A1 |