CN106790332B - Resource scheduling method, system and main node - Google Patents

Resource scheduling method, system and main node Download PDF

Info

Publication number
CN106790332B
CN106790332B CN201510822793.XA CN201510822793A CN106790332B CN 106790332 B CN106790332 B CN 106790332B CN 201510822793 A CN201510822793 A CN 201510822793A CN 106790332 B CN106790332 B CN 106790332B
Authority
CN
China
Prior art keywords
resource
slave node
subset
information
node information
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.)
Active
Application number
CN201510822793.XA
Other languages
Chinese (zh)
Other versions
CN106790332A (en
Inventor
马轶慧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
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 China Mobile Communications Group Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201510822793.XA priority Critical patent/CN106790332B/en
Publication of CN106790332A publication Critical patent/CN106790332A/en
Application granted granted Critical
Publication of CN106790332B publication Critical patent/CN106790332B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Abstract

The embodiment of the invention discloses a resource scheduling method, a resource scheduling system and a main node. The method comprises the following steps: the master node obtains the residual resource amount of all the slave nodes, and divides the corresponding slave node information into corresponding resource subsets based on the residual resource amount; the preset resource set comprises a plurality of resource subsets, and the resource subsets correspond to preset resource amount ranges; the resource quantity ranges of two adjacent resource subsets are distributed continuously; receiving resource demand information of a first computing Framework (Framework), and obtaining a Kth resource subset meeting the resource demand information in the resource set based on the resource demand information; k is a positive integer; when determining that the Kth resource subset contains slave node information, selecting first slave node information meeting preset conditions from the Kth resource subset by a resource scheduler of the Kth resource subset; and obtaining the first slave node information, and allocating the resources of the first slave node to the first Framework based on the first slave node information.

Description

Resource scheduling method, system and main node
Technical Field
The invention relates to a scheduling technology, in particular to a resource scheduling method, a resource scheduling system and a main node.
Background
The Mesos is an open source distributed resource management framework under the Apache, and can realize unified cluster management and scheduling of various computing frameworks. The aim is to integrate data center resources, perform virtual pooling, open basic resources such as Central Processing Units (CPUs), memory and input/output (I/O) to applications, and place processor resources and memory resources into a resource pool similar to an operating system, so that it can coordinate allocation and release resources for different processes.
The Mesos adopts a Master/Slave structure, and FIG. 1 is a schematic diagram of the Mesos architecture in the prior art; as shown in fig. 1, the mess architecture includes a Master node (mess Master), a Slave node (mess Slave), a computation Framework (Framework), and an Executor (Executor). Wherein the master node coordinates all slave nodes and determines the available resources of each slave node, aggregates reports of all available resources across the nodes, and then issues resource offers to a computing Framework (Framework) registered to the master node. The computation Framework (Framework) refers to an external computation Framework such as Hadoop, MPI, etc. shown in fig. 1. Selecting to accept or reject a resource offer from the master node by a computing Framework (Framework) according to task requirements; if the computing Framework (Framework) accepts the offer, the master node is responsible for coordinating the computing Framework (Framework) and the slave nodes for task scheduling. At present, a scheduling mechanism used in a mess is called "Resource offer", and a scheduling mechanism based on a Resource amount is adopted, in a mess architecture, a slave node directly reports the Resource amount (such as a CPU and a memory) to a master node, and the master node allocates the Resource amount to a Framework by adopting mechanisms such as drf (dominant Resource) and the like, so that Resource allocation is relatively fair and not biased to any user, and each user (Framework) is guaranteed to acquire dominant resources in the same proportion, for example: when the Framework a obtains 2/3 memory resources and the Framework B obtains 2/3 CPU resources, the resource scheduling process flow is as follows:
1. the Slave1 reports the free resources of the 4CPU and the 8GB memory to the Master, and the Master calls the allocation module to notify all available free resources of the Framework A;
2. the Master sends the description information (Resource Offer) of the current idle Resource to the Framework A;
3. the scheduler of the Framework A replies a Master and runs two tasks (tasks) on a Slave1, wherein the first task uses a 2CPU and a 1GB memory, and the second task uses a 2CPU and a 2GB memory;
4. the Master sends the task description information to the Slave1, the Slave1 allocates proper resources to the executor of the Framework, and then the executor of the Framework loads the two tasks. After executing the task, the residual resources of the Slave1 are 0CPU and 5GB memory.
Resource scheduling of the Mesos Framework is mainly used for resource allocation from the perspective of meeting Framework requirements, on one hand, residual resources may exist after certain Slave nodes run specified tasks, but the residual resources are not enough to be allocated to other tasks; on the other hand, because of the filtering condition set by the Framework itself, for example, the Framework is allowed to receive only the "Slave with the residual resource amount greater than L", the Slave allocated to the Framework by this filtering condition has residual resources, which are not enough to be allocated to other tasks to run, so that a large amount of resource fragments are generated. In addition, the Mesos architecture mainly depends on the host node pushing available resources to the Framework and then performing resource negotiation, and the negotiation process needs a certain time and has poor instantaneity.
Disclosure of Invention
In order to solve the existing technical problem, embodiments of the present invention provide a resource scheduling method, system and master node, which can reduce the generation of resource fragments and improve the resource utilization rate.
In order to achieve the above purpose, the technical solution of the embodiment of the present invention is realized as follows:
the embodiment of the invention provides a resource scheduling method, which comprises the following steps:
the master node obtains the residual resource amount of all the slave nodes, and divides the corresponding slave node information into corresponding resource subsets based on the residual resource amount; the preset resource set comprises a plurality of resource subsets, and the resource subsets correspond to preset resource amount ranges; the resource quantity ranges of two adjacent resource subsets are distributed continuously;
the main node receives resource demand information of a first computing Framework (Framework), and a Kth resource subset meeting the resource demand information is obtained in the resource set based on the resource demand information; k is a positive integer;
when determining that the Kth resource subset contains slave node information, selecting first slave node information meeting preset conditions from the Kth resource subset by a resource scheduler of the Kth resource subset;
the master node obtains the first slave node information, and allocates resources of the first slave node to the first Framework based on the first slave node information.
In the above scheme, a plurality of resource subsets in the resource set are ordered from small to large according to the resource amount range;
when the kth resource subset does not contain slave node information, the method includes: the master node searches and matches from the K +1 th resource subset to the Nth resource subset of the resource set to obtain the Lth resource subset containing slave node information; wherein N and L are positive integers, and L is more than K +1 and less than or equal to N;
the resource scheduler of the Lth resource subset selects second slave node information meeting preset conditions from the Lth resource subset;
and the master node acquires the second slave node information and allocates the resource of the second slave node to the first Framework based on the second slave node information.
In the above solution, when the search matching is performed from the K +1 th resource subset to the nth resource subset, and all resource subsets do not include slave node information, the method further includes:
the master node starts to search and match from the Mth resource subset of the resource set to obtain the Pth resource subset containing slave node information; wherein the resource amount range of the Mth resource subset in the resource set is maximum; p is a positive integer, and P is less than or equal to M;
the resource scheduler of the P resource subset selects third slave node information meeting preset conditions from the P resource subset;
the master node obtains the third slave node information, and allocates resources of the third slave node to the first Framework based on the third slave node information.
In the foregoing solution, the meeting the preset condition includes:
and the slave node with the smallest difference between the residual resource amount of the slave node in the resource subset and the resource requirement information confirms that the preset condition is met.
In the foregoing solution, the allocating, based on the first slave node information, the resource of the first slave node to the first Framework includes:
the main node generates idle resource information from the residual resource amount of the first slave node and sends the idle resource information to the first Framework, so that the first Framework runs a task on the first slave node based on the residual resource amount.
An embodiment of the present invention further provides a master node, where the master node includes: a communication unit and a resource management unit; wherein the content of the first and second substances,
the communication unit is used for obtaining the residual resource amount of all the slave nodes and sending the residual resource amount to the resource management unit; the resource management unit is also used for receiving resource demand information of a first computing Framework, and sending the resource demand information to the resource management unit; further configured to obtain the first slave node information from a resource scheduler of the kth resource subset, and allocate resources of the first slave node to the first Framework based on the first slave node information;
the resource management unit is used for dividing the corresponding slave node information into corresponding resource subsets based on the residual resource amount; the preset resource set comprises a plurality of resource subsets, and the resource subsets correspond to preset resource amount ranges; the resource quantity ranges of two adjacent resource subsets are distributed continuously; the resource demand information is used for acquiring a resource demand information of a resource set; k is a positive integer; enabling a resource scheduler of the Kth resource subset when determining that the Kth resource subset contains slave node information.
In the above scheme, a plurality of resource subsets in the resource set are ordered from small to large according to the resource amount range;
the resource management unit is further configured to, when it is determined that the kth resource subset does not include slave node information, perform search matching from the kth +1 resource subset to the nth resource subset of the resource set, and obtain an lth resource subset including slave node information; wherein N and L are positive integers, and L is more than K +1 and less than or equal to N; a resource scheduler that enables the Lth subset of resources;
the communication unit is further configured to obtain the second slave node information from the resource scheduler of the lth resource subset, and allocate the resources of the second slave node to the first Framework based on the second slave node information.
In the above scheme, the resource management unit is further configured to perform search matching from the K +1 th resource subset to the nth resource subset, and when none of the resource subsets includes slave node information, perform search matching from the mth resource subset of the resource set to obtain a pth resource subset including slave node information; wherein the largest P of the resource quantity range of the Mth resource subset in the resource set is a positive integer, and P is less than or equal to M; (ii) a A resource scheduler that enables the pth subset of resources;
the communication unit is further configured to obtain the third slave node information from the resource scheduler of the pth resource subset, and allocate the resource of the third slave node to the first frame based on the third slave node information.
In the foregoing solution, the meeting the preset condition includes:
and the slave node with the smallest difference between the residual resource amount of the slave node in the resource subset and the resource requirement information confirms that the preset condition is met.
In the foregoing scheme, the communication unit is configured to generate idle resource information from the remaining resource amount of the first slave node, and send the idle resource information to the first Framework, so that the first Framework runs a task at the first slave node based on the remaining resource amount.
The embodiment of the invention also provides a resource scheduling system, which comprises: the system comprises a main node, at least one computing Framework and a resource collection platform; the resource collection platform comprises a plurality of resource subsets, and the resource subsets correspond to a preset resource amount range; the resource quantity ranges of two adjacent resource subsets are distributed continuously; each resource subset corresponds to a resource scheduler;
the master node is used for obtaining the residual resource amount of all the slave nodes and dividing the corresponding slave node information into resource subsets corresponding to the resource collection platform based on the residual resource amount; the resource demand information of the first computing Framework is also received, and a Kth resource subset meeting the resource demand information is obtained in the resource set based on the resource demand information; k is a positive integer; wherein the first Framework is any one of the at least one Framework; the first frame is also used for obtaining the first slave node information, and the resources of the first slave node are allocated to the first frame based on the first slave node information;
the resource aggregation platform is configured to, when determining that the kth resource subset includes slave node information by the resource scheduler of the kth resource subset, select first slave node information that meets a preset condition from the kth resource subset, and send the first slave node information to the master node.
In the above scheme, the plurality of resource subsets in the resource collection platform are ordered from small to large according to the resource amount range;
the master node is further configured to, when the resource scheduler of the kth resource subset determines that the slave node information is not included, perform search matching from the kth +1 resource subset to the nth resource subset of the resource aggregation platform to obtain an lth resource subset including slave node information; wherein N and L are positive integers, and L is more than K +1 and less than or equal to N; the second frame is also used for obtaining the second slave node information, and the resources of the second slave node are allocated to the first frame based on the second slave node information;
the resource aggregation platform is further configured to select second slave node information that meets a preset condition from the lth resource subset when the resource scheduler of the lth resource subset determines that the lth resource subset contains slave node information, and send the second slave node information to the master node.
In the above scheme, the master node is further configured to search and match from the K +1 th resource subset to the nth resource subset, and when none of the resource subsets includes slave node information, search and match are performed from the mth resource subset of the resource set to obtain the pth resource subset including the slave node information; wherein the resource amount range of the Mth resource subset in the resource set is maximum; p is a positive integer, and P is less than or equal to M; further configured to obtain the third slave node information, and allocate resources of the third slave node to the first Framework based on the third slave node information;
the resource collection platform is further configured to select third slave node information meeting a preset condition from the pth resource subset and send the third slave node information to the master node when the resource scheduler of the pth resource subset determines that the pth resource subset includes slave node information.
The embodiment of the invention provides a resource scheduling method, a system and a main node, wherein the method comprises the following steps: the master node obtains the residual resource amount of all the slave nodes, and divides the corresponding slave node information into corresponding resource subsets based on the residual resource amount; the preset resource set comprises a plurality of resource subsets, and the resource subsets correspond to preset resource amount ranges; the resource quantity ranges of two adjacent resource subsets are distributed continuously; the main node receives resource demand information of a first computing Framework, and acquires a Kth resource subset meeting the resource demand information in the resource set based on the resource demand information; k is a positive integer; when determining that the Kth resource subset contains slave node information, selecting first slave node information meeting preset conditions from the Kth resource subset by a resource scheduler of the Kth resource subset; the master node obtains the first slave node information, and allocates resources of the first slave node to the first Framework based on the first slave node information. Therefore, by adopting the technical scheme of the embodiment of the invention, the gradient division mechanism of the resource subsets in the resource set is adopted, and when the slave node is selected, the slave node with the residual resource amount closest to the resource demand amount is selected, so that after the slave node executes a task, the residual resource amount is minimum, namely, the minimum resource fragment is ensured, and the resource utilization rate is improved.
Drawings
FIG. 1 is a diagram of a prior art Mesos architecture;
FIG. 2 is a schematic diagram of an application of a resource scheduling system according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a resource scheduling method according to a first embodiment of the present invention;
fig. 4 is a flowchart illustrating a resource scheduling method according to a second embodiment of the present invention;
fig. 5 is a flowchart illustrating a resource scheduling method according to a third embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a resource scheduling platform according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a master node according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
FIG. 2 is a schematic diagram of an application of a resource scheduling system according to an embodiment of the present invention; as shown in fig. 2, the present application is shown on the basis of fig. 1, and further includes a resource set, where the resource set includes at least one resource subset, each resource subset corresponds to a preset resource amount range, and the resource amount ranges of two adjacent resource subsets are continuously distributed. For example, the resource amount range of the first resource subset is l to l + n, the resource amount range of the adjacent second resource subset is l + n to l +2n, and so on; wherein l and n are positive integers; each resource subset corresponds to a resource scheduler. The resource collection may be provided in a master node or in a resource collection platform, where the master node is configured to maintain and manage each resource subset in the resource collection. In each embodiment of the present invention, the Master nodes are mess masters, and the Slave nodes are mess Slave, which are the same below.
Of course, fig. 2 is only an application illustration of the embodiment of the present invention, and is not limited to the above illustration.
Example one
The embodiment of the invention provides a resource scheduling method. Fig. 3 is a flowchart illustrating a resource scheduling method according to a first embodiment of the present invention; as shown in fig. 3, the method includes:
step 201: the master node obtains the residual resource amount of all the slave nodes, and divides the corresponding slave node information into corresponding resource subsets based on the residual resource amount; the preset resource set comprises a plurality of resource subsets, and the resource subsets correspond to preset resource amount ranges; the resource quantity ranges of two adjacent resource subsets are distributed continuously.
In this embodiment, a resource set is preset, and the resource set may be set in a master node or in a resource set platform, and the master node maintains and manages the resource set. Specifically, the resource set includes a plurality of resource subsets, each resource subset corresponds to a preset resource amount range, and the resource amount ranges of two adjacent resource subsets are continuously distributed. For example, the resource amount range of the first resource subset is l to l + n, the resource amount range of the adjacent second resource subset is l + n to l +2n, and so on; wherein l and n are both positive integers. In this illustration, the range spans of the resource amounts corresponding to each resource subset are equal to each other, which are n, in other embodiments, the range spans of the resource amounts corresponding to each resource subset may also be unequal, or the range spans of the resource amounts corresponding to some resource subsets are equal, which is not described in detail in this embodiment. The resource amount corresponding to the resource subset is a single resource amount, such as a CPU resource amount or a memory resource amount, but is not limited to the foregoing resource amount.
Further, the master node obtains the remaining resource amount of all the slave nodes associated with the master node periodically or aperiodically, and divides the corresponding slave nodes into corresponding resource subsets according to the remaining resource amount; for example, when the remaining resource amount of a certain slave node is a, and a is determined to fall within the resource amount range of l + n to l +2n, the slave node is divided into a second resource subset.
Step 202: the main node receives resource demand information of a first Framework, and a Kth resource subset meeting the resource demand information is obtained in the resource set based on the resource demand information; k is a positive integer.
Here, the first Framework is any one of at least one Framework already registered on the primary node. As an implementation manner, the resource requirement information is resource requirement information sent by the first Framework to the master node, and the resource requirement information is minimum resource requirement information that meets a preset filtering condition in the first Framework. For example, if the preset filtering condition in the first Framework is "a slave node whose remaining resource amount is greater than X", the minimum resource amount included in the resource demand information is X, that is, the remaining resource amount of the selected slave node is greater than or equal to X; wherein X is a positive integer.
Further, after receiving the resource demand information of the first Framework, the master node obtains the resource demand carried in the resource demand information, and obtains a kth resource subset meeting the resource demand in the resource set according to the resource demand; wherein the resource demand is in the resource amount range of the Kth resource subset.
Step 203: and when determining that the Kth resource subset contains slave node information, selecting first slave node information meeting preset conditions from the Kth resource subset by the resource scheduler of the Kth resource subset.
In this embodiment, at least one resource subset in the resource set may include at least one slave node information, and certainly, may not include the slave node information, that is, the corresponding resource subset is empty. After obtaining the kth resource subset satisfying the resource demand information, the master node first determines whether the kth resource subset is non-empty, determines that the kth resource subset is not empty, that is, after the kth resource subset includes at least one piece of slave node information, instructs a resource scheduler of the kth resource subset to select a slave node in the kth resource subset, and selects first slave node information satisfying a preset condition, where the first slave node is a slave node allocated to the first Framework.
Specifically, the meeting of the preset condition includes: and the slave node with the smallest difference between the residual resource amount of the slave node in the resource subset and the resource requirement information confirms that the preset condition is met. And if the Kth resource subset comprises at least two slave node information, respectively calculating the difference value between the residual resource amount of the two slave nodes and the resource demand amount in the resource demand information, and selecting the slave node information with the minimum difference value as the first slave node information meeting the preset condition. Further, the first slave node information is sent to the master node.
Step 204: the master node obtains the first slave node information, and allocates resources of the first slave node to the first Framework based on the first slave node information.
Here, after the master node obtains the first slave node information, the method further includes: the main node generates idle resource information from the residual resource amount of the first slave node and sends the idle resource information to the first Framework, so that the first Framework runs a task on the first slave node based on the residual resource amount. Specifically, after obtaining the first slave node information, the master node performs scheduling according to an existing scheduling mechanism "Resource Offer", that is, generates "Resource Offer" including the remaining Resource information of the first slave node and sends the "Resource Offer" to the first Framework, and the scheduler of the first Framework replies to the master node and runs a task based on the remaining Resource of the first slave node; on the other hand, the master node sends task description information to the first slave node to indicate the first slave node to run a task with the resource demand of the first Framework being X; after receiving the task description information, the first slave node allocates a corresponding resource to an Executor (Executor) of the first Framework, and then the Executor (Executor) of the first Framework executes a task.
By adopting the technical scheme of the embodiment of the invention, on one hand, a gradient division mechanism of resource subsets in a resource set is adopted, and when the slave node is selected, the slave node with the residual resource amount closest to the resource demand amount is selected, so that after the slave node executes a task, the residual resource amount is minimum, namely, the minimum resource fragment is ensured, and the resource utilization rate is improved; on the other hand, after the slave node is selected, the resource is allocated to the Framework through the original resource scheduling mechanism (such as the DRF mechanism), so that the resource allocation is relatively fair, and the requirement of the Framework is met.
Example two
The embodiment of the invention also provides a resource scheduling method, and fig. 4 is a flow diagram of the resource scheduling method of the second embodiment of the invention; as shown in fig. 4, on the basis of the resource scheduling method of the first embodiment, the present embodiment further includes:
step 205: when the Kth resource subset is determined not to contain the slave node information, the master node searches for matching from the Kth +1 resource subset to the Nth resource subset of the resource set to obtain an Lth resource subset containing the slave node information; wherein N and L are positive integers, and L is greater than K +1 and less than or equal to N.
In this embodiment, when the kth resource subset does not include slave node information, that is, the kth resource subset is empty, that is, there is no slave node information for selection in the kth resource subset, the master node needs to determine other resource subsets. Specifically, the resource subsets in the resource set are sorted from small to large according to the resource amount range, that is, the resource amount range of the first resource subset is l to l + n, the resource amount range of the adjacent second resource subset is l + n to l +2n, and so on. Then the Kth resource subset does not contain slave node information, and in order to meet the resource requirement of the first Framework, the resource subset with a larger resource amount range needs to be selected; the master node searches for matching from the K +1 th resource subset to the Nth resource subset to obtain the Lth resource subset containing slave node information. Specifically, the master node searches the K +1 th resource subset first, and when determining that the K +1 th resource subset includes slave node information, enables the resource scheduler of the K +1 th resource subset to select slave node information that meets a preset condition; correspondingly, when the K +1 th resource subset is determined not to contain the slave node information, the K +2 th resource subset is further searched until the Nth resource subset is searched, and the resource subset containing the slave node information is obtained. In this embodiment, the value of N is preset, and when the resource subset including the slave node information is not obtained after the nth resource subset is found, the master node quickly changes the search policy, thereby avoiding poor user experience caused by too many search matching times. Further, the master node instructs the resource scheduler of the lth resource subset to select a slave node in the lth resource subset.
Step 206: the resource scheduler of the lth resource subset selects second slave node information satisfying a preset condition from the lth resource subset.
Specifically, the meeting of the preset condition includes: and the slave node with the smallest difference between the residual resource amount of the slave node in the resource subset and the resource requirement information confirms that the preset condition is met. If the L-th resource subset comprises at least two slave node information, respectively calculating the difference value between the residual resource amount of the two slave nodes and the resource demand amount in the resource demand information, and selecting the slave node information with the minimum difference value as second slave node information meeting preset conditions. Further, the second slave node information is sent to the master node.
Step 207: and the master node acquires the second slave node information and allocates the resource of the second slave node to the first Framework based on the second slave node information.
Here, after the master node obtains the second slave node information, the method further includes: and the master node generates idle resource information from the residual resource amount of the second slave node and sends the idle resource information to the first Framework, so that the first Framework runs a task at the second slave node based on the residual resource amount. Specifically, after obtaining the second slave node information, the master node performs scheduling according to an existing scheduling mechanism "Resource Offer", that is, generates "Resource Offer" including remaining Resource information of the second slave node and sends the "Resource Offer" to the first Framework, and the scheduler of the first Framework replies to the master node and runs a task based on the remaining Resource of the second slave node; on the other hand, the master node sends task description information to the second slave node to indicate the second slave node to run a task with the resource demand of the first Framework being X; after receiving the task description information, the first slave node allocates a corresponding resource to an Executor (Executor) of the first Framework, and then the Executor (Executor) of the first Framework executes a task.
By adopting the technical scheme of the embodiment of the invention, on one hand, a gradient division mechanism of resource subsets in a resource set is adopted, and when the slave node is selected, the slave node with the residual resource amount closest to the resource demand amount is selected, so that after the slave node executes a task, the residual resource amount is minimum, namely, the minimum resource fragment is ensured, and the resource utilization rate is improved; on the other hand, after the slave node is selected, the resource is allocated to the Framework through the original resource scheduling mechanism (such as the DRF mechanism), so that the resource allocation is relatively fair, and the requirement of the Framework is met.
EXAMPLE III
The embodiment of the invention also provides a resource scheduling method, and fig. 5 is a flow diagram of the resource scheduling method in the third embodiment of the invention; as shown in fig. 5, on the basis of the resource scheduling method of the second embodiment, the present embodiment further includes:
step 208: searching and matching from the K +1 th resource subset to the Nth resource subset, and when all the resource subsets do not contain slave node information, the master node searches and matches from the Mth resource subset of the resource sets to obtain the P-th resource subset containing the slave node information; wherein the resource amount range of the Mth resource subset in the resource set is maximum; p is a positive integer, and P is less than or equal to M.
In this embodiment, the master node needs to determine the other resource subsets when no slave node information is included from the K +1 th resource subset to the nth resource subset, that is, the K +1 th resource subset is empty from the K +1 th resource subset to the nth resource subset, that is, no slave node information is provided from the K +1 th resource subset to the nth resource subset for selection. In this embodiment, the master node further performs searching and matching on the resource subset with the largest resource amount range from large to small according to the resource amount range, so as to obtain the pth resource subset including the slave node information. Further, the master node instructs the resource scheduler of the pth resource subset to select a slave node in the pth resource subset.
Step 209: and the resource scheduler of the P-th resource subset selects third slave node information meeting preset conditions from the P-th resource subset.
Specifically, the meeting of the preset condition includes: and the slave node with the smallest difference between the residual resource amount of the slave node in the resource subset and the resource requirement information confirms that the preset condition is met. If the Pth resource subset comprises at least two slave node information, respectively calculating the difference value between the residual resource amount of the two slave nodes and the resource demand amount in the resource demand information, and selecting the slave node information with the minimum difference value as second slave node information meeting preset conditions. Further, the second slave node information is sent to the master node.
Step 210: the master node obtains the third slave node information, and allocates resources of the third slave node to the first Framework based on the third slave node information.
Here, after the master node obtains the third slave node information, the method further includes: and the master node generates idle resource information from the residual resource amount of the third slave node and sends the idle resource information to the first Framework, so that the first Framework runs a task at the third slave node based on the residual resource amount. Specifically, after obtaining the information of the third slave node, the master node performs scheduling according to an existing scheduling mechanism "Resource Offer", that is, generates "Resource Offer" including the information of the remaining Resource of the third slave node and sends the "Resource Offer" to the first Framework, and the scheduler of the first Framework replies to the master node and runs a task based on the remaining Resource of the third slave node; on the other hand, the master node sends task description information to the third slave node to indicate the third slave node to run a task with the resource demand of the first Framework being X; after receiving the task description information, the third slave node allocates a corresponding resource to the Executor (Executor) of the first Framework, and then the Executor (Executor) of the first Framework executes a task.
By adopting the technical scheme of the embodiment of the invention, on one hand, a gradient division mechanism of resource subsets in a resource set is adopted, when the slave node is selected, the slave node is firstly searched and matched according to the resource quantity range from small to large, and the slave node with the residual resource quantity closest to the resource demand quantity is selected, so that after the slave node executes a task, the residual resource quantity is minimum, namely, the minimum resource fragment is ensured; when a proper slave node is not found, searching and matching are carried out according to the resource quantity range from large to small, and the slave node with the largest residual resource quantity is selected, so that after the slave node executes a task, the residual resource quantity is the largest, and other tasks can be continuously executed; thereby improving the resource utilization rate; on the other hand, after the slave node is selected, the resource is allocated to the Framework through the original resource scheduling mechanism (such as the DRF mechanism), so that the resource allocation is relatively fair, and the requirement of the Framework is met.
In the first to third embodiments of the present invention, the resource set is a resource set representing a resource amount, such as a CPU resource amount or a memory resource amount, but is not limited to the above resource amount. When the master node needs to schedule at least two resource amounts simultaneously, it may be understood that at least two resource sets are preset, and each resource set represents one resource amount, for example, a first resource set corresponds to a CPU resource amount, a second resource set corresponds to a memory resource amount, and the like. When the master node receives resource requirement information of a Framework, a dominant resource (or a dominant resource) is first determined, wherein the dominant resource (or the dominant resource) is a resource which is more scarce or more needed by the Framework compared with other resources. Further, the master node refers to the resource scheduling method of the embodiment of the present invention to perform resource allocation based on the dominant resource (or dominant resource), and updates resource set information corresponding to other resources except the dominant resource (or dominant resource) after the resource allocation is completed.
Example four
An embodiment of the present invention further provides a resource scheduling system, where a structure of the resource scheduling system is shown in fig. 2, and the system includes: a main node 11, at least one Framework13 and a resource aggregation platform 12; the resource collection platform 12 includes a plurality of resource subsets, and the resource subsets correspond to a preset resource amount range; the resource quantity ranges of two adjacent resource subsets are distributed continuously; each resource subset corresponds to a resource scheduler;
the master node 11 is configured to obtain remaining resource amounts of all slave nodes, and divide corresponding slave node information into resource subsets corresponding to the resource aggregation platform 12 based on the remaining resource amounts; the resource demand information of the first Framework13 is further received, and a Kth resource subset meeting the resource demand information is obtained in the resource set based on the resource demand information; k is a positive integer; wherein the first Framework13 is any one Framework13 in the at least one Framework 13; further configured to obtain the first slave node information, and allocate resources of the first slave node to the first Framework13 based on the first slave node information;
the resource aggregation platform 12 is configured to, when the resource scheduler of the kth resource subset determines that the kth resource subset includes slave node information, select first slave node information that meets a preset condition from the kth resource subset, and send the first slave node information to the master node 11.
In this embodiment, the resource aggregation platform 12 may be disposed in the master node 11, or the resource aggregation platform 12 may be disposed independently, and the master node 11 maintains and manages the resource aggregation platform 12. Specifically, the resource collection platform 12 includes a plurality of resource subsets, each resource subset corresponds to a preset resource amount range, and the resource amount ranges of two adjacent resource subsets are continuously distributed. For example, the resource amount range of the first resource subset is l to l + n, the resource amount range of the adjacent second resource subset is l + n to l +2n, and so on; wherein l and n are both positive integers. In this illustration, the range spans of the resource amounts corresponding to each resource subset are equal to each other, which are n, in other embodiments, the range spans of the resource amounts corresponding to each resource subset may also be unequal, or the range spans of the resource amounts corresponding to some resource subsets are equal, which is not described in detail in this embodiment. The resource amount corresponding to the resource subset is a single resource amount, such as a CPU resource amount or a memory resource amount, but is not limited to the foregoing resource amount.
The master node 11 obtains the remaining resource amount of all the slave nodes associated therewith periodically or aperiodically, and divides the corresponding slave nodes into corresponding resource subsets according to the remaining resource amount; for example, when the remaining resource amount of a certain slave node is a, and a is determined to fall within the resource amount range of l + n to l +2n, the slave node is divided into a second resource subset.
In this embodiment, here, the first Framework is any one of at least one Framework already registered on the master node 11. As an implementation manner, the resource requirement information is resource requirement information sent by the first Framework to the host node 11, where the resource requirement information is minimum resource requirement information that meets a preset filtering condition in the first Framework. For example, if the preset filtering condition in the first Framework is "a slave node whose remaining resource amount is greater than X", the minimum resource amount included in the resource demand information is X, that is, the remaining resource amount of the selected slave node is greater than or equal to X; wherein X is a positive integer. Further, after receiving the resource demand information of the first Framework, the master node 11 obtains the resource demand carried therein, and obtains a kth resource subset satisfying the resource demand in the resource aggregation platform 12 according to the resource demand; wherein the resource demand is in the resource amount range of the Kth resource subset.
In this embodiment, at least one resource subset in the resource collection platform 12 may include at least one slave node information, and certainly, may not include the slave node information, that is, the corresponding resource subset is empty. After obtaining the kth resource subset satisfying the resource demand information, the master node 11 first determines whether the kth resource subset is non-empty, determines that the kth resource subset is not empty, that is, after the kth resource subset includes at least one piece of slave node information, instructs a resource scheduler of the kth resource subset to select a slave node in the kth resource subset, and selects a piece of first slave node information satisfying a preset condition, where the first slave node is a slave node allocated to the first Framework.
Specifically, the meeting of the preset condition includes: and the slave node with the smallest difference between the residual resource amount of the slave node in the resource subset and the resource requirement information confirms that the preset condition is met. And if the Kth resource subset comprises at least two slave node information, respectively calculating the difference value between the residual resource amount of the two slave nodes and the resource demand amount in the resource demand information, and selecting the slave node information with the minimum difference value as the first slave node information meeting the preset condition. Further, the first slave node information is transmitted to the master node 11.
As an embodiment, the plurality of resource subsets in the resource aggregation platform 12 are ordered from small to large according to the resource amount range;
the master node 11 is further configured to, when the resource scheduler of the kth resource subset determines that the slave node information is not included, perform search matching from the kth +1 resource subset to the nth resource subset of the resource aggregation platform 12 to obtain an lth resource subset including the slave node information; wherein N and L are positive integers, and L is more than K +1 and less than or equal to N; further configured to obtain the second slave node information, and allocate resources of the second slave node to the first Framework13 based on the second slave node information;
the resource aggregation platform 12 is further configured to, when the resource scheduler of the lth resource subset determines that the lth resource subset includes slave node information, select second slave node information that meets a preset condition from the lth resource subset, and send the second slave node information to the master node 11.
In this embodiment, when the kth resource subset does not include slave node information, that is, the kth resource subset is empty, that is, there is no slave node information for selection in the kth resource subset, the master node 11 needs to determine other resource subsets. Specifically, the resource subsets in the resource collection platform 12 are sorted from small to large according to the resource amount range, that is, the resource amount range of the first resource subset is l to l + n, the resource amount range of the adjacent second resource subset is l + n to l +2n, and so on. Then the Kth resource subset does not contain slave node information, and in order to meet the resource requirement of the first Framework, the resource subset with a larger resource amount range needs to be selected; the master node 11 searches for a match from the K +1 th resource subset to the nth resource subset, and obtains an lth resource subset including slave node information. Specifically, the master node 11 searches the K +1 th resource subset first, and when determining that the K +1 th resource subset includes slave node information, enables the resource scheduler of the K +1 th resource subset to select slave node information that meets a preset condition; correspondingly, when the K +1 th resource subset is determined not to contain the slave node information, the K +2 th resource subset is further searched until the Nth resource subset is searched, and the resource subset containing the slave node information is obtained. In this embodiment, the value of N is preset, and when the resource subset including the slave node information is not obtained after the nth resource subset is found, the master node 11 changes the search policy quickly, so as to avoid poor user experience caused by too many search matching times. Further, the master node 11 instructs the resource scheduler of the lth resource subset to select a slave node in the lth resource subset.
As an implementation manner, the master node 11 is further configured to perform search matching from the K +1 th resource subset to the nth resource subset, and when none of the resource subsets includes slave node information, perform search matching from the mth resource subset of the resource set to obtain a pth resource subset including slave node information; wherein the resource amount range of the Mth resource subset in the resource set is maximum; p is a positive integer, and P is less than or equal to M; further configured to obtain the third slave node information, and allocate resources of the third slave node to the first Framework13 based on the third slave node information;
the resource aggregation platform 12 is further configured to, when determining that the pth resource subset includes slave node information by the resource scheduler of the pth resource subset, select third slave node information that meets a preset condition from the pth resource subset, and send the third slave node information to the master node 11.
In this embodiment, the master node 11 needs to determine other resource subsets when none of the resource subsets from the K +1 th resource subset to the nth resource subset includes slave node information, that is, all of the resource subsets from the K +1 th resource subset to the nth resource subset are empty, that is, no slave node information is provided for selection from the K +1 th resource subset to the nth resource subset. In this embodiment, the master node 11 further performs searching and matching according to the resource quantity range from the largest resource subset to the smallest resource subset, to obtain the pth resource subset including the slave node information. Further, the master node 11 instructs the resource scheduler of the pth resource subset to select a slave node in the pth resource subset.
In the above embodiment, after obtaining the slave node information, the master node 11 generates idle resource information from the remaining resource amount of the slave node, and sends the idle resource information to the first Framework, so that the first Framework runs a task on the slave node based on the remaining resource amount. Specifically, after obtaining the slave node information, the master node 11 performs scheduling according to an existing scheduling mechanism "Resource Offer", that is, generates "Resource Offer" including the remaining Resource information of the slave node and sends the "Resource Offer" to the first Framework, and the scheduler of the first Framework replies to the master node 11 and runs a task based on the remaining Resource of the slave node; on the other hand, the master node 11 sends task description information to the slave node to instruct the slave node to run a task with the resource demand of the first Framework being X; after receiving the task description information, the slave node allocates a corresponding resource to an Executor (Executor) of the first Framework, and then the Executor (Executor) of the first Framework executes a task.
In the first to fourth embodiments of the present invention, as an implementation manner, fig. 6 is a schematic structural diagram of a resource scheduling platform according to the first to fourth embodiments of the present invention; as shown in fig. 6, a resource set (or a resource set platform) is configured as a multilayer ring structure, each layer of the ring structure represents a resource subset, the multilayer ring structure is divided according to a preset gradient, and the gradient represents a resource amount range, that is, the multilayer ring structure is divided according to a preset resource amount range; for example, the gradient range (resource amount range) of the ring 1 is l to l + n, and then the ring 1 includes the slave node information with the resource amount range of l to l + n, such as the slave node 3 and the slave node 6 shown in fig. 6; the gradient range (resource amount range) of the ring 2 is l + n to l +2n, and then the ring 2 contains slave node information with resource amount ranging from l + n to l +2n, such as the slave node 1, the slave node 7, the slave node 9 and the slave node 10 shown in fig. 6; by analogy, the gradient range (resource amount range) of the outermost ring (ring M) is l + (M-1) n-l + mn, and then the ring M contains slave node information with resource amount ranging from l + (M-1) n-l + mn, such as slave node 2, slave node 5, slave node 4 and slave node 8 shown in FIG. 6. Wherein each ring (i.e. each resource subset) corresponds to one resource scheduler. For a specific processing flow, reference may be made to the descriptions in the first to third embodiments, and details are not described here.
EXAMPLE five
Based on the fourth embodiment, the embodiment of the invention also provides the master node. Fig. 7 is a schematic structural diagram of a master node according to an embodiment of the present invention, and as shown in fig. 7, the master node includes: a communication unit 31 and a resource management unit 32; wherein the content of the first and second substances,
the communication unit 31 is configured to obtain the remaining resource amount of all slave nodes, and send the remaining resource amount to the resource management unit 32; the resource management unit is further configured to receive resource demand information of a first computing Framework, and send the resource demand information to the resource management unit 32; further configured to obtain the first slave node information from a resource scheduler of the kth resource subset, and allocate resources of the first slave node to the first Framework based on the first slave node information;
the resource management unit 32 is configured to divide the corresponding slave node information into corresponding resource subsets based on the remaining resource amount; the preset resource set comprises a plurality of resource subsets, and the resource subsets correspond to preset resource amount ranges; the resource quantity ranges of two adjacent resource subsets are distributed continuously; the resource demand information is used for acquiring a resource demand information of a resource set; k is a positive integer; enabling a resource scheduler of the Kth resource subset when determining that the Kth resource subset contains slave node information.
Further, the communication unit 31 is configured to generate idle resource information from the remaining resource amount of the first slave node, and send the idle resource information to the first Framework, so that the first Framework runs a task at the first slave node based on the remaining resource amount.
As an embodiment, the plurality of resource subsets in the resource set are sorted from small to large according to the resource amount range;
the resource management unit 32 is further configured to, when it is determined that the kth resource subset does not include slave node information, perform search matching from the K +1 th resource subset to the nth resource subset of the resource set, and obtain an lth resource subset including slave node information; wherein N and L are positive integers, and L is more than K +1 and less than or equal to N; a resource scheduler that enables the Lth subset of resources;
the communication unit 31 is further configured to obtain the second slave node information from the resource scheduler of the lth resource subset, and allocate the resources of the second slave node to the first Framework based on the second slave node information.
As an embodiment, the resource management unit 32 is further configured to perform search matching from the K +1 th resource subset to the nth resource subset, and when none of the resource subsets includes slave node information, perform search matching from the mth resource subset of the resource set to obtain a pth resource subset including slave node information; wherein the largest P of the resource quantity range of the Mth resource subset in the resource set is a positive integer, and P is less than or equal to M; (ii) a A resource scheduler that enables the pth subset of resources;
the communication unit 31 is further configured to obtain the third slave node information from the resource scheduler of the pth resource subset, and allocate the resources of the third slave node to the first frame based on the third slave node information.
In this embodiment, the meeting of the preset condition includes: and the slave node with the smallest difference between the residual resource amount of the slave node in the resource subset and the resource requirement information confirms that the preset condition is met.
It should be understood by those skilled in the art that, the functions of each processing module in the master node according to the embodiment of the present invention may be understood by referring to the description of the foregoing resource scheduling method, and each processing module in the master node according to the embodiment of the present invention may be implemented by an analog circuit that implements the functions described in the embodiment of the present invention, or may be implemented by running software that performs the functions described in the embodiment of the present invention on an intelligent terminal.
In the fifth to eighth embodiments of the present invention, the resource management Unit in the master node may be implemented by a Central Processing Unit (CPU), a Digital Signal Processor (DSP), or a Programmable Gate Array (FPGA) in the master node in practical application; the communication unit in the master node may be implemented by a transceiver antenna or a transceiver in the master node in practical applications.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: a mobile storage device, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (13)

1. A method for scheduling resources, the method comprising:
the master node obtains the residual resource amount of all the slave nodes, and divides the corresponding slave node information into corresponding resource subsets based on the residual resource amount; the preset resource set comprises a plurality of resource subsets, and the resource subsets correspond to preset resource amount ranges; the resource quantity ranges of two adjacent resource subsets are distributed continuously; a plurality of resource subsets in the resource set are sorted from small to large according to the resource amount range;
the main node receives resource demand information of a first computing Framework, and acquires a Kth resource subset meeting the resource demand information in the resource set based on the resource demand information; k is a positive integer;
when determining that the Kth resource subset contains slave node information, selecting first slave node information meeting preset conditions from the Kth resource subset by a resource scheduler of the Kth resource subset;
the master node obtains the first slave node information, and allocates resources of the first slave node to the first Framework based on the first slave node information.
2. The method according to claim 1, wherein when the kth resource subset does not contain slave node information, the method comprises: the master node searches and matches from the K +1 th resource subset to the Nth resource subset of the resource set to obtain the Lth resource subset containing slave node information; wherein N and L are positive integers, and L is more than K +1 and less than or equal to N;
the resource scheduler of the Lth resource subset selects second slave node information meeting preset conditions from the Lth resource subset;
and the master node acquires the second slave node information and allocates the resource of the second slave node to the first Framework based on the second slave node information.
3. The method of claim 2, wherein when the search matching is performed from the K +1 th resource subset to the nth resource subset, and none of the resource subsets contains slave node information, the method further comprises:
the master node searches and matches from the Mth resource subset of the resource set according to the resource quantity range from large to small to obtain the Pth resource subset containing slave node information; wherein the resource amount range of the Mth resource subset in the resource set is maximum; m and P are both positive integers, and P is less than or equal to M;
the resource scheduler of the P resource subset selects third slave node information meeting preset conditions from the P resource subset;
the master node obtains the third slave node information, and allocates resources of the third slave node to the first Framework based on the third slave node information.
4. The method according to any one of claims 1 to 3, wherein the meeting of the preset condition comprises:
and the slave node with the smallest difference between the residual resource amount of the slave node in the resource subset and the resource requirement information confirms that the preset condition is met.
5. The method according to claim 1, wherein the allocating resources of the first slave node to the first Framework based on the first slave node information comprises:
the main node generates idle resource information from the residual resource amount of the first slave node and sends the idle resource information to the first Framework, so that the first Framework runs a task on the first slave node based on the residual resource amount.
6. A host node, comprising: a communication unit and a resource management unit; wherein the content of the first and second substances,
the communication unit is used for obtaining the residual resource amount of all the slave nodes and sending the residual resource amount to the resource management unit; the resource management unit is also used for receiving resource demand information of a first computing Framework and sending the resource demand information to the resource management unit; further configured to obtain first slave node information from a resource scheduler of a kth resource subset, allocate resources of the first slave node to the first Framework based on the first slave node information;
the resource management unit is used for dividing the corresponding slave node information into corresponding resource subsets based on the residual resource amount; the preset resource set comprises a plurality of resource subsets, and the resource subsets correspond to preset resource amount ranges; the resource quantity ranges of two adjacent resource subsets are distributed continuously; a plurality of resource subsets in the resource set are sorted from small to large according to the resource amount range; the resource demand information is used for acquiring a resource demand information of a resource set; k is a positive integer; and when determining that the Kth resource subset contains the slave node information, enabling a resource scheduler of the Kth resource subset to select first slave node information meeting preset conditions from the Kth resource subset.
7. The master node of claim 6,
the resource management unit is further configured to, when it is determined that the kth resource subset does not include slave node information, perform search matching from the kth +1 resource subset to the nth resource subset of the resource set, and obtain an lth resource subset including slave node information; wherein N and L are positive integers, and L is more than K +1 and less than or equal to N; a resource scheduler that enables the Lth subset of resources;
the communication unit is further configured to obtain second slave node information from the resource scheduler of the lth resource subset, and allocate resources of the second slave node to the first Framework based on the second slave node information.
8. The master node according to claim 7, wherein the resource management unit is further configured to perform search matching from the K +1 th resource subset to the nth resource subset, and when none of the resource subsets includes slave node information, perform search matching from the mth resource subset of the resource set according to a resource amount range from large to small, to obtain the pth resource subset including slave node information; wherein the resource amount range of the Mth resource subset in the resource set is maximum; m and P are both positive integers, and P is less than or equal to M; a resource scheduler that enables the pth subset of resources;
the communication unit is further configured to obtain third slave node information from the resource scheduler of the pth resource subset, and allocate resources of the third slave node to the first frame based on the third slave node information.
9. The master node according to any one of claims 6 to 8, wherein the satisfaction of the preset condition comprises:
and the slave node with the smallest difference between the residual resource amount of the slave node in the resource subset and the resource requirement information confirms that the preset condition is met.
10. The master node according to claim 6, wherein the communication unit is configured to generate free resource information from a remaining resource amount of the first slave node, and send the free resource information to the first Framework, so that the first Framework runs a task at the first slave node based on the remaining resource amount.
11. A system for scheduling resources, the system comprising: the system comprises a main node, a slave node, at least one computing Framework and a resource collection platform; the resource collection platform comprises a plurality of resource subsets, and the resource subsets correspond to a preset resource amount range; the resource quantity ranges of two adjacent resource subsets are distributed continuously; each resource subset corresponds to a resource scheduler;
the master node is used for obtaining the residual resource amount of all the slave nodes and dividing the corresponding slave node information into resource subsets corresponding to the resource collection platform based on the residual resource amount; the resource demand information of a first computing Framework is received, and a Kth resource subset meeting the resource demand information is obtained in the resource collection platform based on the resource demand information; k is a positive integer; wherein the first Framework is any one of the at least one Framework; the first frame is also used for obtaining first slave node information, and resources of the first slave node are allocated to the first frame based on the first slave node information;
the resource aggregation platform is configured to, when determining that the kth resource subset includes slave node information by the resource scheduler of the kth resource subset, select first slave node information that meets a preset condition from the kth resource subset, and send the first slave node information to the master node.
12. The system according to claim 11, wherein the plurality of resource subsets in the resource aggregation platform are ordered from small to large in terms of resource amount;
the master node is further configured to, when the resource scheduler of the kth resource subset determines that the slave node information is not included, perform search matching from the kth +1 resource subset to the nth resource subset of the resource aggregation platform to obtain an lth resource subset including slave node information; wherein N and L are positive integers, and L is more than K +1 and less than or equal to N; the first frame is further used for obtaining second slave node information, and resources of the second slave node are allocated to the first frame based on the second slave node information;
the resource aggregation platform is further configured to select second slave node information that meets a preset condition from the lth resource subset when the resource scheduler of the lth resource subset determines that the lth resource subset contains slave node information, and send the second slave node information to the master node.
13. The system of claim 12, wherein the master node is further configured to perform search matching from the K +1 th resource subset to the nth resource subset, and when none of the resource subsets includes slave node information, perform search matching from the mth resource subset of the resource aggregation platform according to the resource amount range from large to small, to obtain a pth resource subset including slave node information; wherein the resource quantity range of the Mth resource subset in the resource collection platform is maximum; m and P are both positive integers, and P is less than or equal to M; further configured to obtain third slave node information, and allocate resources of the third slave node to the first Framework based on the third slave node information;
the resource collection platform is further configured to select third slave node information meeting a preset condition from the pth resource subset and send the third slave node information to the master node when the resource scheduler of the pth resource subset determines that the pth resource subset includes slave node information.
CN201510822793.XA 2015-11-24 2015-11-24 Resource scheduling method, system and main node Active CN106790332B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510822793.XA CN106790332B (en) 2015-11-24 2015-11-24 Resource scheduling method, system and main node

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510822793.XA CN106790332B (en) 2015-11-24 2015-11-24 Resource scheduling method, system and main node

Publications (2)

Publication Number Publication Date
CN106790332A CN106790332A (en) 2017-05-31
CN106790332B true CN106790332B (en) 2020-01-17

Family

ID=58964436

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510822793.XA Active CN106790332B (en) 2015-11-24 2015-11-24 Resource scheduling method, system and main node

Country Status (1)

Country Link
CN (1) CN106790332B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108647093A (en) * 2018-05-09 2018-10-12 厦门南讯软件科技有限公司 A kind of distributed task scheduling processing system and its application method
CN109947565B (en) 2019-03-08 2021-10-15 北京百度网讯科技有限公司 Method and apparatus for distributing computing tasks
CN110058866B (en) * 2019-04-18 2023-07-18 中国联合网络通信集团有限公司 Cluster component installation method and device
CN110275777B (en) * 2019-06-10 2021-10-29 广州市九重天信息科技有限公司 Resource scheduling system
CN113312166B (en) * 2021-07-29 2022-02-01 阿里云计算有限公司 Resource processing method and device
CN117519952A (en) * 2024-01-04 2024-02-06 浙江大华技术股份有限公司 Cloud platform task scheduling method, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1596539A1 (en) * 2003-02-21 2005-11-16 Nippon Telegraph and Telephone Corporation Device and method for correcting a path trouble in a communication network
CN103036800A (en) * 2012-12-14 2013-04-10 北京高森明晨信息科技有限公司 Virtual machine load balancing system, balancing panel points and balancing method
CN103699445A (en) * 2013-12-19 2014-04-02 北京奇艺世纪科技有限公司 Task scheduling method, device and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1596539A1 (en) * 2003-02-21 2005-11-16 Nippon Telegraph and Telephone Corporation Device and method for correcting a path trouble in a communication network
CN103036800A (en) * 2012-12-14 2013-04-10 北京高森明晨信息科技有限公司 Virtual machine load balancing system, balancing panel points and balancing method
CN103699445A (en) * 2013-12-19 2014-04-02 北京奇艺世纪科技有限公司 Task scheduling method, device and system

Also Published As

Publication number Publication date
CN106790332A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
CN106790332B (en) Resource scheduling method, system and main node
CN110032447B (en) Method and apparatus for allocating resources
CN110647394B (en) Resource allocation method, device and equipment
CN108234581B (en) Resource scheduling method and server
US9471390B2 (en) Scheduling mapreduce jobs in a cluster of dynamically available servers
US20170346759A1 (en) Optimizing placement of virtual machines
CN104391918B (en) The implementation method of distributed networks database query priority management based on equity deployment
US11496413B2 (en) Allocating cloud computing resources in a cloud computing environment based on user predictability
US10686728B2 (en) Systems and methods for allocating computing resources in distributed computing
WO2016039963A2 (en) Resource sharing between two resource allocation systems
WO2017166643A1 (en) Method and device for quantifying task resources
US20170155596A1 (en) Method And Electronic Device For Bandwidth Allocation
CN112380020A (en) Computing power resource allocation method, device, equipment and storage medium
US10027596B1 (en) Hierarchical mapping of applications, services and resources for enhanced orchestration in converged infrastructure
WO2016101799A1 (en) Service allocation method and device based on distributed system
CN109947551A (en) A kind of more round method for allocating tasks, edge calculations system and its storage medium
CN103873587B (en) A kind of method and device that scheduling is realized based on cloud platform
CN105791254B (en) Network request processing method and device and terminal
CN110166507B (en) Multi-resource scheduling method and device
US11232009B2 (en) Model-based key performance indicator service for data analytics processing platforms
CN111158909B (en) Cluster resource allocation processing method, device, equipment and storage medium
CN111105006A (en) Deep learning network training system and method
WO2016041446A1 (en) Resource allocation method, apparatus and device
CN105592110A (en) Resource scheduling method and device
CN108509256B (en) Method and device for scheduling running device and running device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant