WO2013117136A1 - 一种基于容量的多任务调度方法、设备及系统 - Google Patents

一种基于容量的多任务调度方法、设备及系统 Download PDF

Info

Publication number
WO2013117136A1
WO2013117136A1 PCT/CN2013/071087 CN2013071087W WO2013117136A1 WO 2013117136 A1 WO2013117136 A1 WO 2013117136A1 CN 2013071087 W CN2013071087 W CN 2013071087W WO 2013117136 A1 WO2013117136 A1 WO 2013117136A1
Authority
WO
WIPO (PCT)
Prior art keywords
task
memory space
task execution
node
scheduling
Prior art date
Application number
PCT/CN2013/071087
Other languages
English (en)
French (fr)
Inventor
徐钊
赵彦荣
郭玮
李均
赵伟
张书彬
洪坤乾
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2013117136A1 publication Critical patent/WO2013117136A1/zh
Priority to US14/189,518 priority Critical patent/US20140181839A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • G06F9/5088Techniques for rebalancing the load in a distributed system involving task migration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation 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/505Allocation 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 load
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5022Workload threshold

Definitions

  • the present invention belongs to the field of data processing technologies, and in particular, to a capacity-based multi-task scheduling method, device, and system. Background technique
  • MapReduce is a distributed parallel programming model or generic framework for processing large data sets.
  • the function of distributed data processing is realized by defining corresponding mapping (Map) and reduction functions.
  • FIG. 1 is a schematic diagram of a conventional task scheduling system based on the MapReduce framework.
  • a scheduling node JobTracker
  • a plurality of task execution nodes TaskTracker
  • the network architecture is shown in Figure 1, where the client is used to submit the user-arranged parallel processing job to the scheduling node, and the scheduling node decomposes the job submitted by the client into multiple processing functions (but the input data may be different).
  • the task execution node When the task execution node does not reach the upper limit of its task execution capability, that is, when the number of currently executed tasks is lower than the number of executable tasks, the task execution node requests a task from the scheduling node, and the scheduling node assigns a task to the task execution from the resolved tasks. node.
  • the hardware configuration of the task execution node when the hardware configuration of the task execution node is low or the tasks running on it have more resources, such as running tasks occupy a large amount of system resources (CPU overload and/or insufficient memory, etc.) If the task execution node has not reached its pre-configured maximum task quota, it will still request the scheduling node to perform a new task. In this case, not only may the new task not perform properly due to insufficient memory, but also Affects the task being executed, and even causes the scheduling node to malfunction. In addition, the hardware configuration of the task execution node is higher or the task running on it has less resources. If the task execution node has reached its pre-configured maximum task quota, it will no longer request the scheduling node to perform a new task, thereby causing The task execution node resources are wasted.
  • the task execution node only requests the task according to the pre-deployed configuration information, which easily causes the task execution node to be overloaded, loaded, and internal. Problems such as insufficient storage affect the efficiency of task scheduling and execution. Summary of the invention
  • the invention provides a multi-task scheduling method, device and system, so as to reduce the problem that the task scheduling system based on the MapReduce framework is likely to cause overload, load and insufficient memory of the task execution node.
  • the present invention is implemented as such, a multi-task scheduling method, the method comprising:
  • the task execution node sends a request for acquiring a task to the scheduling node, where the request carries the current load value of the task execution node and the available memory space;
  • the scheduling node determines whether the load value is less than a threshold, and if so, performs task scheduling for the task execution node according to the current available memory space of the node execution node.
  • a task scheduling device comprising:
  • a request information receiving unit configured to receive a request for acquiring a task sent by the task execution device, where the request carries a current load value of the task execution device and an available memory space;
  • a first determining unit configured to determine whether the load value is less than a threshold
  • a second determining unit configured to determine, when the first determining unit determines that the result is YES, whether there is a task to be allocated whose memory demand is less than or equal to the current available memory space of the task executing device;
  • an allocating unit configured to allocate, when the second determining unit determines that the result is YES, a task whose memory requirement is less than or equal to a current available memory space of the task executing device to the task executing device.
  • a task execution device comprising:
  • a request information sending unit configured to send a request for acquiring a task to the task scheduling device, where the request carries a current load value of the task execution device and an available memory space;
  • a task receiving unit configured to receive a task assigned by the task scheduling device.
  • a multitasking scheduling system includes the task scheduling device provided by the present invention and at least one task execution device provided by the present invention.
  • the present invention performs task scheduling according to the load value reported by the task execution node and the available memory space, and allocates the task to the task execution node with appropriate load and sufficient memory, thereby effectively reducing overload and load of the task execution node. And insufficient memory, etc.
  • FIG. 1 is a schematic diagram of a conventional task scheduling system based on a MapReduce framework
  • FIG. 2 is a structural diagram of a multi-task scheduling system according to Embodiment 1 of the present invention.
  • FIG. 3 is a flowchart of implementing a multi-task scheduling method according to Embodiment 2 of the present invention.
  • FIG. 4 is a structural diagram of a task scheduling apparatus according to Embodiment 3 of the present invention.
  • FIG. 5 is a structural diagram of a task execution device according to Embodiment 4 of the present invention.
  • DETAILED DESCRIPTION OF THE EMBODIMENTS In order to make the objects, technical solutions and advantages of the present invention more comprehensible, the present invention will be further described in detail with reference to the accompanying drawings. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
  • Embodiment 1
  • FIG. 2 is a structural diagram of a multi-task scheduling system according to Embodiment 1 of the present invention, and shows a composition structure of a multi-task scheduling system according to Embodiment 1 of the present invention. For convenience of description, only the embodiment of the present invention is shown. Related parts.
  • the multitasking scheduling system 1 includes a task scheduling device 1 1 and at least one task execution device 12.
  • the multitasking scheduling system is based on the MapReduce architecture.
  • the task scheduling device 11 is connected to the task execution device 12 by wire or wirelessly, and is configured to receive a request for acquiring a task that is sent by the task execution device 12 and carries information such as a current load value and an available memory space, and according to the carried load.
  • the task execution device 12 performs task scheduling based on information such as values, available memory space, and the like.
  • the task execution device 12 is configured to send, to the task scheduling device 11, a request for acquiring an task carrying information such as a current load value, an available memory space, and the like, and receive the task scheduling device. Matching tasks.
  • Embodiment 2 is a diagrammatic representation of Embodiment 1:
  • step S301 the task is performed.
  • the execution node sends a request for acquiring a task to the scheduling node, where the request carries the current load value of the task execution node and the available memory space.
  • the task execution node when the task execution node triggers the sending of the heartbeat message, the task execution node sends a request for acquiring the task to the scheduling node by using the heartbeat message, where the request carries the current load value of the task execution node, the available memory space, and the like.
  • the current load value of the task execution node refers to the current processing performance of the task execution node, for example, the usage rate of the task execution node CPU.
  • step S302 the scheduling node determines whether the load value is less than a threshold. If the determination result is "YES”, step S304 is performed, and if the determination result is "NO”, step S303 is performed.
  • the threshold may be a preset threshold or a dynamic threshold, including but not limited to a system average load value.
  • step S303 when the load value of the task execution node is reflected by the CPU usage rate, it is determined whether the current CPU usage of the task execution node is less than a predetermined threshold (for example, 60%), when less than At step S304, otherwise, step S303 is performed.
  • a predetermined threshold for example, 60%
  • step S303 the assignment of the task to the task execution node is refused.
  • the scheduling node rejects the request of the task execution node that obtains the task whose load value is greater than or equal to a threshold.
  • step S304 task scheduling is performed for the task execution node according to the current available memory space of the task execution node.
  • the task execution node in order to prevent the newly allocated task memory requirement from being too large, the task execution node lacks memory and cannot perform normally, and affects the task being executed, resulting in a failure of the scheduling node.
  • the scheduling node sequentially scans each task to be allocated in the task queue, and determines whether the memory requirement is less than or equal to the task execution node currently available.
  • the task to be allocated with the memory space when present, the scheduling node allocates a task whose memory requirement is less than or equal to the current available memory space of the task execution node to the task execution node; when not present, refuses to execute the node to the task Assignments.
  • determining whether there is a task whose memory requirement is less than or equal to the currently available memory space of the task execution node is specifically: determining the actual memory space in the task execution node - the used memory space - the task execution node system pre- Remaining memory space - allocated task reserved memory space - whether the result of the memory space that is ready to be allocated but not delivered is greater than or equal to zero. If yes, the task execution node has sufficient memory, and the scheduling node can deliver the task; otherwise, the task is indicated. The execution node is out of memory, and the scheduling node refuses to deliver the task to the task execution node until the task execution node re-applies for the task.
  • the task execution node may still request a task from the scheduling node according to the pre-deployed configuration information, but the request carries the current load value of the task execution node and the available memory space, and the scheduling node executes according to the task.
  • the load value of the node and the available memory space determine whether to assign tasks to the task execution node, and select appropriate tasks for allocation when assigning tasks, thereby effectively avoiding problems such as overload of the task execution node, load and insufficient memory, and improving the task. Perform utilization of node resources and efficiency of task scheduling and execution.
  • Embodiment 3 is a diagrammatic representation of Embodiment 3
  • FIG. 4 is a structural diagram of a task scheduling device according to Embodiment 3 of the present invention, and shows a component structure of a task scheduling device according to Embodiment 3 of the present invention. For convenience of description, only relevant embodiments of the present invention are shown. section.
  • the task scheduling device may be a software unit, a hardware unit or a combination of hardware and software running in the multi-task scheduling system, or may be integrated into the multi-task scheduling system as an independent pendant or an application system running in the multi-task scheduling system. in.
  • the task scheduling device 4 includes a request information receiving unit 41, a first determining unit 42, a second determining unit 43, and an allocating unit 44, the specific functions of which are as follows:
  • the request information receiving unit 41 is configured to receive a request for acquiring a task sent by the task execution device, where the request carries a current load value of the task execution device and an available memory space.
  • the first determining unit 42 is configured to determine the load. Whether the value is less than a threshold;
  • the second determining unit 43 is configured to determine, when the first determining unit 42 determines that the result is YES, whether the memory demand is less than or equal to the current available memory of the task executing device. Task to be assigned;
  • the allocating unit 44 is configured to allocate, when the second determining unit 43 determines that the result is YES, a task whose memory demand is less than or equal to the current available memory space of the task executing device to the task executing device.
  • the task scheduling device 4 further includes a rejection allocation unit 45 for When the current load value of the task execution device is greater than or equal to the threshold, or the memory requirement of the task to be allocated is greater than the current available memory space of the task execution device, the task is not assigned to the task execution device.
  • the task scheduling device provided in this embodiment may be used in the foregoing corresponding multi-task scheduling method.
  • the task scheduling device provided in this embodiment may be used in the foregoing corresponding multi-task scheduling method.
  • Embodiment 4 is a diagrammatic representation of Embodiment 4:
  • FIG. 5 is a structural diagram of a task execution device according to Embodiment 4 of the present invention, and shows a composition structure of a task execution device according to Embodiment 4 of the present invention. For convenience of description, only relevant embodiments of the present invention are shown. section.
  • the task execution device may be a software unit, a hardware unit or a combination of software and hardware running in the multi-task scheduling system, or may be integrated into a multi-task scheduling system as an independent pendant or an application system running in the multi-task scheduling system. in.
  • the task execution device 5 includes a request information transmitting unit 51 and a task receiving unit 52, and its specific functions are as follows:
  • the request information sending unit 51 is configured to send a request for acquiring a task to the task scheduling device, where the request carries a current load value of the task execution device and an available memory space;
  • the task receiving unit 52 is configured to receive a task assigned by the task scheduling device.
  • the task execution device provided in this embodiment may be used in the foregoing corresponding multi-task scheduling method.
  • the task execution device provided in this embodiment may be used in the foregoing corresponding multi-task scheduling method.
  • each unit included in the third and fourth devices is divided according to functional logic, but is not limited to the above division, as long as it can be implemented.
  • the corresponding functions may be used; in addition, the specific names of the functional units are only for the purpose of distinguishing from each other, and are not intended to limit the scope of protection of the present invention.
  • the capacity-based task scheduling algorithm of the present invention records the maximum value of the task memory as the basis for whether the task is distributed, and records the load status of each node, the progress of the task execution, and the memory usage of the corresponding task.
  • the status information collected by the node is reported to the task scheduler of the control node when the task is requested.
  • the task scheduler selects the task that meets the requirements from the current executable task queue and sends the task to the computing node according to the state of the computing node, thereby effectively avoiding task execution. Problems such as node overload, load, and insufficient memory improve the utilization of task execution node resources and the efficiency of task scheduling and execution.
  • the invention is simple to implement and has strong practicability.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Multi Processors (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明适用于数据处理技术领域,提供了一种基于容量的多任务调度方法、设备及系统,所述方法包括:任务执行节点向调度节点发送获取任务的请求,该请求中携带有该任务执行节点当前的负载值以及可用内存空间;调度节点判断所述负载值是否小于一阈值,若是,根据所述任务执行节点的当前可用内存空间,为该任务执行节点进行任务调度。通过本发明,可有效避免任务执行节点过载、负载及内存不足等问题,提高任务执行节点资源的利用率以及任务调度和执行的效率。

Description

一种基于容量的多任务调度方法、 设备及系统 技术领域
本发明属于数据处理技术领域, 尤其涉及一种基于容量的多任务调度方 法、 设备及系统。 背景技术
映射化简 (MapReduce )是一种分布式的用于处理大规模数据集的并行 编程模式或者通用框架。 通过定义相应的映射(Map )和化简 (Reduce ) 函 数来实现分布式数据处理的功能。
图 1是现有基于 MapReduce框架的任务调度系统的示意图,如图 1所示, 在现有基于 MapReduce框架的任务调度系统中, 包括调度节点( JobTracker ) 和若干个任务执行节点 ( TaskTracker ) , 其网络架构如图 1所示, 其中, 客 户端用于将用户布置的并行处理作业提交至调度节点, 调度节点将客户端提 交的作业分解为多个具有相同处理功能(但输入数据可能不同)的 Map任务 和多个具有相同处理功能(但处理的数据可能不同)的 Reduce任务, 并将分 解的任务緩存在内存中。 当任务执行节点没有达到其任务执行能力上限时, 即当前执行的任务数低于可执行任务数时, 任务执行节点向调度节点请求任 务, 调度节点从分解出的任务中分配一个任务给任务执行节点。
在现有技术中, 当任务执行节点的硬件配置较低或者其上运行的任务占 用的资源较多, 如正在运行的任务占用了大量的系统资源(CPU负载过重和 / 或内存不足等)时, 如果任务执行节点尚未达到其预先配置的最大任务配额, 其仍然会向调度节点请求执行新任务, 在这种情况下, 不仅可能出现新任务 由于内存不足不能正常执行的情况, 而且还会影响到正在执行的任务, 甚至 会导致调度节点发生故障。 另外, 对于任务执行节点的硬件配置较高或者其 上运行的任务占用资源较少, 如果任务执行节点已经达到其预先配置的最大 任务配额, 其将不再向调度节点请求执行新任务, 从而造成任务执行节点资 源的浪费。
总之, 在现有基于 MapReduce框架的任务调度系统中, 任务执行节点仅 根据预先部署的配置信息请求任务, 容易造成任务执行节点过载、 负载及内 存不足等问题, 影响任务调度和执行的效率。 发明内容
本发明提供一种多任务调度方法、 设备及系统, 以减少现有基于 MapReduce框架的任务调度系统容易造成任务执行节点过载、 负载及内存不 足的问题。
本发明是这样实现的, 一种多任务调度方法, 所述方法包括:
任务执行节点向调度节点发送获取任务的请求, 所述请求中携带有所述 任务执行节点当前的负载值以及可用内存空间;
调度节点判断所述负载值是否小于一阈值, 若是, 根据所述任务执行节 点当前的可用内存空间, 为所述任务执行节点进行任务调度。
一种任务调度设备, 所述设备包括:
请求信息接收单元, 用于接收任务执行设备发送的获取任务的请求, 所 述请求中携带有所述任务执行设备当前的负载值以及可用内存空间;
第一判断单元, 用于判断所述负载值是否小于一阈值;
第二判断单元, 用于在所述第一判断单元判断结果为是时, 判断是否存 在内存需求量小于或者等于所述任务执行设备当前的可用内存空间的待分配 任务;
分配单元, 用于在所述第二判断单元判断结果为是时, 将内存需求量小 于或等于所述任务执行设备当前的可用内存空间的任务分配给所述任务执行 设备。
一种任务执行设备, 所述设备包括:
请求信息发送单元, 用于向任务调度设备发送获取任务的请求, 所述请 求中携带有任务执行设备当前的负载值以及可用内存空间;
任务接收单元, 用于接收所述任务调度设备分配的任务。
一种多任务调度系统, 包括本发明提供的任务调度设备以及至少一个本 发明提供的任务执行设备。
从上述技术方案可以看出, 本发明根据任务执行节点上报的负载值以及 可用内存空间进行任务调度, 将任务分配给负载合适及内存充足的任务执行 节点, 从而可有效减少任务执行节点过载、 负载及内存不足等问题, 提高任 务执行节点资源的利用率以及任务调度和执行的效率。 附图说明 为了更清楚地说明本发明实施例中的技术方案, 下面将对实施例或现有 技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附 图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创 造性劳动性的前提下, 还可以根据这些附图获得其他的附图。
图 1是现有基于 MapReduce框架的任务调度系统的示意图;
图 2是本发明实施例一提供的多任务调度系统的组成结构图。
图 3是本发明实施例二提供的多任务调度方法的实现流程图;
图 4是本发明实施例三提供的任务调度设备的组成结构图;
图 5是本发明实施例四提供的任务执行设备的组成结构图。 具体实施方式 为了使本发明的目的、 技术方案及优点更加清楚明白, 以下对照附图 并结合实施例, 对本发明进行进一步详细说明。 应当理解, 此处所描述的 具体实施例仅仅用以解释本发明, 并不用于限定本发明。
为了说明本发明所述的技术方案, 下面通过具体实施例来进行说明。 实施例一:
图 2是本发明实施例一提供的多任务调度系统的组成结构图, 示出了本 发明实施例一提供的多任务调度系统的组成结构, 为了便于说明, 仅示出 了与本发明实施例相关的部分。
该多任务调度系统 1 包括任务调度设备 1 1 以及至少一个任务执行设 备 12。 该多任务调度系统是基于 MapReduce架构的。
所述任务调度设备 11通过有线或者无线方式与任务执行设备 12连接 通信, 用于接收任务执行设备 12发送的携带有当前负载值、 可用内存空 间等信息的获取任务的请求, 并根据携带的负载值、 可用内存空间等信息 对任务执行设备 12进行任务调度。
所述任务执行设备 12 用于向任务调度设备 11 发送携带有当前负载 值、 可用内存空间等信息的获取任务的请求, 并接收任务调度设备 1 1 分 配的任务。
实施例二:
图 3是本发明实施例二提供的多任务调度方法的实现流程图, 示出了本 发明实施例二提供的多任务调度方法的实现流程, 该方法过程详述如下: 在步骤 S301 中, 任务执行节点向调度节点发送获取任务的请求, 该 请求中携带有该任务执行节点当前的负载值以及可用内存空间。
在本实施例中, 任务执行节点在触发发送心跳消息时, 通过心跳消息 向调度节点发送获取任务的请求, 该请求中携带有该任务执行节点当前的 负载值以及可用内存空间等。
其中, 所述任务执行节点当前的负载值指的是任务执行节点当前的处 理性能, 例如任务执行节点 CPU 的使用率等。 所述任务执行节点当前的 可用内存空间的计算公式为: 可用内存空间=实际内存空间-已使用内存空 间 -任务执行节点系统预留内存空间 -已分配任务预留内存空间。
在步骤 S302 中, 调度节点判断所述负载值是否小于一阈值, 若判断 结果为 "是" , 则执行步骤 S304 , 若判断结果为 "否" , 则执行步骤 S303。
该一阈值可为一预设阈值, 也可以为动态阈值, 包括但不限于系统平 均负载值。
举例说明 (但不以该举例为限), 当任务执行节点的负载值通过 CPU 使用率来反映时, 判断任务执行节点当前的 CPU使用率是否小于一预设 阈值 (例如 60% ) , 当小于时, 执行步骤 S304 , 否则, 执行步骤 S303。
在步骤 S303中, 拒绝向该任务执行节点分配任务。
在本实施例中, 为了避免任务执行节点负载过重, 影响任务的执行效 率, 调度节点拒绝负载值大于或等于一阈值的任务执行节点的获取任务的 请求。
在步骤 S304 中, 根据所述任务执行节点的当前可用内存空间, 为该 任务执行节点进行任务调度。
在本实施例中, 为了避免新分配的任务内存需求量过大, 导致任务执 行节点内存不足不能正常执行, 以及影响正在执行的任务, 导致调度节点 发生故障等情况。 本实施例调度节点在任务队列中依次扫描每个待分配任 务, 判断其中是否存在内存需求量小于或者等于所述任务执行节点当前可 用内存空间的待分配任务, 当存在时, 调度节点将内存需求量小于或等于 所述任务执行节点当前可用内存空间的任务分配给该任务执行节点; 当不 存在时, 拒绝向该任务执行节点分配任务。
在本实施例中, 判断是否存在内存需求量小于或者等于所述任务执行 节点当前可用内存空间的待分配任务具体为: 判断任务执行节点中实际内 存空间 -已使用内存空间 -任务执行节点系统预留内存空间 -已分配任务预 留内存空间 -准备分配但未下发任务的内存空间的结果是否大于等于零,若 是, 则表示任务执行节点内存充足, 调度节点可以下发该任务; 反之则表 示任务执行节点内存不足, 调度节点拒绝向该任务执行节点下发任务, 直 至该任务执行节点重新申请任务。
在本发明实施例中, 任务执行节点仍可根据预先部署的配置信息向调 度节点请求任务, 但在请求中会携带有该任务执行节点当前的负载值以及 可用内存空间, 调度节点根据该任务执行节点的负载值以及可用内存空间 来决定是否向该任务执行节点分配任务, 以及在分配任务时选择合适的任 务进行分配,从而有效避免了任务执行节点过载、负载及内存不足等问题, 提高了任务执行节点资源的利用率以及任务调度和执行的效率。
实施例三:
图 4是本发明实施例三提供的任务调度设备的组成结构图, 示出了本发 明实施例三提供的任务调度设备的组成结构, 为了便于说明, 仅示出了与 本发明实施例相关的部分。
该任务调度设备可以是运行于多任务调度系统内的软件单元、硬件单 元或者软硬件相结合的单元, 也可以作为独立的挂件集成到多任务调度系 统中或者运行于多任务调度系统的应用系统中。
该任务调度设备 4包括请求信息接收单元 41、 第一判断单元 42、 第 二判断单元 43以及分配单元 44 , 其具体功能如下:
请求信息接收单元 41 , 用于接收任务执行设备发送的获取任务的请 求, 所述请求中携带有该任务执行设备当前的负载值以及可用内存空间; 第一判断单元 42 , 用于判断所述负载值是否小于一阈值;
第二判断单元 43 , 用于在所述第一判断单元 42判断结果为是时, 判 断是否存在内存需求量小于或者等于所述任务执行设备当前可用内存空 间的待分配任务;
分配单元 44 , 用于在所述第二判断单元 43判断结果为是时, 将内存 需求量小于或等于所述任务执行设备当前可用内存空间的任务分配给该 任务执行设备。
进一步的, 为避免任务执行节点负载过重或内存不足问题, 提高任务 执行节点资源的利用率以及任务调度和执行的效率, 所述任务调度设备 4 还包括拒绝分配单元 45 ,用于在所述任务执行设备当前的负载值大于或者 等于所述一阈值, 或者待分配任务的内存需求量都大于所述任务执行设备 的当前可用内存空间时, 拒绝向该任务执行设备分配任务。
本实施例提供的任务调度设备可以使用在前述对应的多任务调度方 法中,详情参见上述多任务调度方法实施例二的相关描述,在此不再赘述。
实施例四:
图 5是本发明实施例四提供的任务执行设备的组成结构图, 示出了本发 明实施例四提供的任务执行设备的组成结构, 为了便于说明, 仅示出了与 本发明实施例相关的部分。
该任务执行设备可以是运行于多任务调度系统内的软件单元、硬件单 元或者软硬件相结合的单元, 也可以作为独立的挂件集成到多任务调度系 统中或者运行于多任务调度系统的应用系统中。
该任务执行设备 5包括请求信息发送单元 51和任务接收单元 52 , 其 具体功能如下:
请求信息发送单元 51 , 用于向任务调度设备发送获取任务的请求, 该 请求中携带有任务执行设备当前的负载值以及可用内存空间;
任务接收单元 52 , 用于接收任务调度设备分配的任务。
在本实施例中, 所述任务执行设备当前的可用内存空间的计算公式 为:可用内存空间=实际内存空间-已使用内存空间-任务执行节点系统预留 内存空间-已分配任务预留内存空间。
本实施例提供的任务执行设备可以使用在前述对应的多任务调度方 法中,详情参见上述多任务调度方法实施例二的相关描述,在此不再赘述。
本领域普通技术人员可以理解为实施例三和四设备所包括的各个单 元只是按照功能逻辑进行划分的, 但并不局限于上述的划分, 只要能够实 现相应的功能即可; 另外, 各功能单元的具体名称也只是为了便于相互区 分, 并不用于限制本发明的保护范围。
综上所述, 本发明基于容量的任务调度算法以任务内存设置的最大值 作为任务是否被分发的依据, 通过将各个节点的负载情况、 任务执行进度 以及相应的任务的内存占用进行记录。 节点收集的状态信息在索取任务时 上报给控制节点的任务调度器, 任务调度器根据计算节点的状态从当前可 执行任务队列中选择符合要求的任务下发给计算节点, 从而有效避免了任 务执行节点过载、 负载及内存不足等问题, 提高了任务执行节点资源的利 用率以及任务调度和执行的效率。 本发明实现简单, 实用性强。
本领域普通技术人员还可以理解, 实现上述实施例方法中的全部或部 分步骤是可以通过程序来指令相关的硬件来完成, 所述的程序可以在存储 于一计算机可读取存储介质中, 所述的存储介质, 包括 ROM/RAM、磁盘、 光盘等。
以上所述仅为本发明的较佳实施例而已, 并不用以限制本发明, 凡在 本发明的精神和原则之内所作的任何修改、 等同替换和改进等, 均应包含 在本发明的保护范围之内。

Claims

权 利 要 求 书
1、 一种多任务调度方法, 其特征在于, 包括:
任务执行节点向调度节点发送获取任务的请求, 所述请求中携带有所述 任务执行节点当前的负载值以及可用内存空间;
所述调度节点判断所述负载值是否小于一阈值, 若是, 根据所述任务执 行节点当前的可用内存空间, 为所述任务执行节点进行任务调度。
2、 如权利要求 1所述的方法, 其特征在于, 所述根据所述任务执行节点 当前的可用内存空间, 为所述任务执行节点进行任务调度具体包括:
判断所述调度节点中是否存在内存需求量小于或者等于所述任务执行节 点当前的可用内存空间的待分配任务;
若是, 所述调度节点将内存需求量小于或等于所述任务执行节点当前的 可用内存空间的任务分配给所述任务执行节点;
若否, 拒绝向该任务执行节点分配任务。
3、 如权利要求 1所述的方法, 其特征在于, 还包括:
当调度节点判定所述任务执行节点当前的负载值大于或者等于所述一阈 值时, 拒绝向所述任务执行节点分配任务。
4、 如权利要求 1所述的方法, 其特征在于, 所述任务执行节点当前的可 用内存空间的计算公式为:
可用内存空间 =实际内存空间 -已使用内存空间 -任务执行节点系统预留 内存空间 -已分配任务预留内存空间。
5、 一种任务调度设备, 其特征在于, 包括:
请求信息接收单元, 用于接收任务执行设备发送的获取任务的请求, 所 述请求中携带有所述任务执行设备当前的负载值以及可用内存空间;
第一判断单元, 用于判断所述负载值是否小于一阈值;
第二判断单元, 用于在所述第一判断单元判断结果为是时, 判断是否存 在内存需求量小于或者等于所述任务执行设备当前可用内存空间的待分配任 务;
分配单元, 用于在所述第二判断单元判断结果为是时, 将内存需求量小 于或等于所述任务执行设备当前的可用内存空间的任务分配给所述任务执行 设备。
6、 如权利要求 5所述的设备, 其特征在于, 还包括:
拒绝分配单元, 用于在所述任务执行设备当前的负载值大于或者等于所 述一阈值, 或者待分配任务的内存需求量都大于所述任务执行设备的当前可 用内存空间时, 拒绝向所述任务执行设备分配任务。
7、 一种任务执行设备, 其特征在于, 所述设备包括:
请求信息发送单元, 用于向任务调度设备发送获取任务的请求, 所述请 求中携带有任务执行设备当前的负载值以及可用内存空间;
任务接收单元, 用于接收所述任务调度设备分配的任务。
8、 如权利要求 7所述的设备, 其特征在于, 所述任务执行设备当前的可 用内存空间的计算公式为:
可用内存空间 =实际内存空间 -已使用内存空间 -任务执行节点系统预留 内存空间-已分配任务预留内存空间。
9、 一种多任务调度系统, 其特征在于, 包括如权利要求 5或 6所述的任 务调度设备以及至少一个如权利要求 7或 8所述的任务执行设备。
10、如权利要求 9所述的系统,其特征在于,所述系统是基于 MapReduce 架构的。
PCT/CN2013/071087 2012-02-09 2013-01-29 一种基于容量的多任务调度方法、设备及系统 WO2013117136A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US14/189,518 US20140181839A1 (en) 2012-02-09 2014-02-25 Capacity-based multi-task scheduling method, apparatus and system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210028768.0 2012-02-09
CN2012100287680A CN103246550A (zh) 2012-02-09 2012-02-09 一种基于容量的多任务调度方法及系统

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/189,518 Continuation US20140181839A1 (en) 2012-02-09 2014-02-25 Capacity-based multi-task scheduling method, apparatus and system

Publications (1)

Publication Number Publication Date
WO2013117136A1 true WO2013117136A1 (zh) 2013-08-15

Family

ID=48926081

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/071087 WO2013117136A1 (zh) 2012-02-09 2013-01-29 一种基于容量的多任务调度方法、设备及系统

Country Status (3)

Country Link
US (1) US20140181839A1 (zh)
CN (1) CN103246550A (zh)
WO (1) WO2013117136A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112016812A (zh) * 2020-08-06 2020-12-01 中南大学 多无人机任务调度方法、系统及存储介质

Families Citing this family (31)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
NZ607298A (en) * 2013-02-19 2014-08-29 Allied Telesis Holdings Kk Improvements in and relating to network communications
CN105022662B (zh) * 2014-04-22 2019-04-09 中国银联股份有限公司 一种分布式任务分配方法
CN105471950A (zh) * 2014-09-05 2016-04-06 鸿富锦精密工业(武汉)有限公司 分布式计算方法及系统
CN104317650B (zh) * 2014-10-10 2018-05-01 北京工业大学 一种面向Map/Reduce型海量数据处理平台的作业调度方法
CN105578205A (zh) * 2014-10-27 2016-05-11 深圳国微技术有限公司 一种视频转码方法和系统
CN105808346B (zh) * 2014-12-30 2019-09-20 华为技术有限公司 一种任务调度方法与装置
CN105827418B (zh) * 2015-01-04 2019-07-05 中国移动通信集团山东有限公司 一种通信网络告警关联方法及装置
KR20160105636A (ko) * 2015-02-27 2016-09-07 한국전자통신연구원 멀티 노드 시스템의 서버 가상화 방법 및 그 장치
CN106330834B (zh) * 2015-06-30 2020-02-14 华为技术有限公司 一种虚拟通道连接建立方法及装置
US9667708B1 (en) * 2015-12-30 2017-05-30 International Business Machines Corporation Boost orchestrator for client-server architectures
CN106940656A (zh) * 2016-01-04 2017-07-11 阿里巴巴集团控股有限公司 一种任务调度方法及装置
CN105740077B (zh) * 2016-01-29 2020-02-07 中国联合网络通信集团有限公司 一种适用于云计算的任务分配方法
CN105808331A (zh) * 2016-02-29 2016-07-27 湖南蚁坊软件有限公司 一种基于服务器特征的调度方法
CN108073453B (zh) * 2016-11-11 2022-05-10 阿里巴巴集团控股有限公司 分布式集群中cpu资源的调度方法以及装置
CN107688496B (zh) * 2017-07-24 2020-12-04 深圳壹账通智能科技有限公司 任务分布式处理方法、装置、存储介质和服务器
US20200142746A1 (en) * 2017-12-29 2020-05-07 Virtual Instruments Corporation Methods and system for throttling analytics processing
US11461631B2 (en) * 2018-03-22 2022-10-04 Amazon Technologies, Inc. Scheduling neural network computations based on memory capacity
US11475306B2 (en) 2018-03-22 2022-10-18 Amazon Technologies, Inc. Processing for multiple input data sets
CN110489200B (zh) * 2018-05-14 2022-03-08 郑州芯兰德网络科技有限公司 一种适用于嵌入式容器集群的任务调度方法
CN108763454A (zh) * 2018-05-28 2018-11-06 郑州云海信息技术有限公司 分布式文件系统日志更新方法、系统、装置及存储介质
CN108958942A (zh) * 2018-07-18 2018-12-07 郑州云海信息技术有限公司 一种分布式系统分配任务方法、调度器和计算机设备
CN109408229B (zh) * 2018-09-30 2021-06-04 华为技术有限公司 一种调度方法及装置
CN109343949B (zh) * 2018-10-12 2021-06-15 武汉斗鱼网络科技有限公司 一种容量迁移方法、装置、电子设备及存储介质
CN110069329A (zh) * 2019-04-15 2019-07-30 北京达佳互联信息技术有限公司 一种任务处理方法、装置、服务器及存储介质
CN112527490B (zh) * 2019-09-17 2024-02-09 广州虎牙科技有限公司 节点资源管控方法、装置、电子设备及存储介质
CN111147541B (zh) * 2019-11-18 2022-11-15 广州文远知行科技有限公司 基于参数服务器的节点处理方法、装置、设备及存储介质
CN111459641B (zh) * 2020-04-08 2023-04-28 广州欢聊网络科技有限公司 一种跨机房的任务调度和任务处理的方法及装置
CN112073542B (zh) 2020-11-12 2021-02-05 腾讯科技(深圳)有限公司 雾节点调度方法、装置、计算机设备和存储介质
CN112416596A (zh) * 2020-12-01 2021-02-26 新华三人工智能科技有限公司 一种节点调度方法、装置及设备
CN113760549B (zh) * 2021-08-30 2024-03-15 聚好看科技股份有限公司 一种pod部署方法及装置
CN114579286A (zh) * 2022-05-05 2022-06-03 支付宝(杭州)信息技术有限公司 任务调度系统、方法、设备及存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102004670A (zh) * 2009-12-17 2011-04-06 华中科技大学 一种基于MapReduce的自适应作业调度方法
CN102096602A (zh) * 2009-12-15 2011-06-15 中国移动通信集团公司 一种任务调度方法及其系统和设备
CN102255926A (zh) * 2010-05-17 2011-11-23 中国移动通信集团公司 MapReduce系统中的任务分配方法、系统及装置

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7093004B2 (en) * 2002-02-04 2006-08-15 Datasynapse, Inc. Using execution statistics to select tasks for redundant assignment in a distributed computing platform
US7996458B2 (en) * 2004-01-28 2011-08-09 Apple Inc. Assigning tasks in a distributed system
US7596788B1 (en) * 2004-05-11 2009-09-29 Platform Computing Corporation Support of non-trivial scheduling policies along with topological properties
US20070094270A1 (en) * 2005-10-21 2007-04-26 Callminer, Inc. Method and apparatus for the processing of heterogeneous units of work
US20070250365A1 (en) * 2006-04-21 2007-10-25 Infosys Technologies Ltd. Grid computing systems and methods thereof
CN101013386A (zh) * 2007-02-06 2007-08-08 华中科技大学 基于反馈机制的网格任务调度方法
FR2926146B1 (fr) * 2008-01-04 2009-12-25 Bull Sas Dispositif informatique a memoire reservee pour des applications prioritaires.
US8429666B2 (en) * 2011-01-25 2013-04-23 Google Inc. Computing platform with resource constraint negotiation

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096602A (zh) * 2009-12-15 2011-06-15 中国移动通信集团公司 一种任务调度方法及其系统和设备
CN102004670A (zh) * 2009-12-17 2011-04-06 华中科技大学 一种基于MapReduce的自适应作业调度方法
CN102255926A (zh) * 2010-05-17 2011-11-23 中国移动通信集团公司 MapReduce系统中的任务分配方法、系统及装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112016812A (zh) * 2020-08-06 2020-12-01 中南大学 多无人机任务调度方法、系统及存储介质
CN112016812B (zh) * 2020-08-06 2022-07-12 中南大学 多无人机任务调度方法、系统及存储介质

Also Published As

Publication number Publication date
US20140181839A1 (en) 2014-06-26
CN103246550A (zh) 2013-08-14

Similar Documents

Publication Publication Date Title
WO2013117136A1 (zh) 一种基于容量的多任务调度方法、设备及系统
Aslam et al. Load balancing algorithms in cloud computing: A survey of modern techniques
JP5744909B2 (ja) アクセラレータ・リソースを動的に管理するための方法、情報処理システム、およびコンピュータ・プログラム
US8468246B2 (en) System and method for allocating resources in a distributed computing system
JP6364880B2 (ja) 並列計算機システム,ジョブ管理装置の制御プログラム,及び並列計算機システムの制御方法
WO2015096656A1 (zh) 线程创建方法、业务请求处理方法及相关设备
WO2018113472A1 (zh) 资源的调度方法和服务器
CN109564528B (zh) 分布式计算中计算资源分配的系统和方法
CN112783659B (zh) 一种资源分配方法、装置、计算机设备及存储介质
WO2016011953A1 (en) Scheduling of service resource
JP2015525397A5 (zh)
JP2009169672A (ja) 資源割当てシステム、資源割当て方法及びプログラム
CN108681481B (zh) 业务请求的处理方法及装置
Mishra et al. Time efficient dynamic threshold-based load balancing technique for Cloud Computing
WO2015101091A1 (zh) 一种分布式资源调度方法及装置
JP2018537018A (ja) スケールアウト関連付けの方法および装置、ならびにシステム
Garala et al. A performance analysis of load Balancing algorithms in Cloud environment
CN111338785A (zh) 资源调度方法及装置、电子设备、存储介质
WO2017075796A1 (zh) 网络功能虚拟化nfv网络中分配虚拟资源的方法和装置
US8032658B2 (en) Computer architecture and process for implementing a virtual vertical perimeter framework for an overloaded CPU having multiple network interfaces
Syed HAMM: A hybrid algorithm of Min-Min and Max-Min task scheduling algorithms in cloud computing
Chatterjee et al. A new clustered load balancing approach for distributed systems
CN115640113A (zh) 多平面弹性调度方法
TWI296387B (en) Scheduling method for remote object procedure call and system thereof
CN113010309A (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: 13746723

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC, FORM 1205A DATED 27-01-2015

122 Ep: pct application non-entry in european phase

Ref document number: 13746723

Country of ref document: EP

Kind code of ref document: A1