CN106506594A - Parallel computing resource allocation method and device - Google Patents

Parallel computing resource allocation method and device Download PDF

Info

Publication number
CN106506594A
CN106506594A CN201610875024.0A CN201610875024A CN106506594A CN 106506594 A CN106506594 A CN 106506594A CN 201610875024 A CN201610875024 A CN 201610875024A CN 106506594 A CN106506594 A CN 106506594A
Authority
CN
China
Prior art keywords
resource
cost
clustered node
resource allocation
node
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.)
Granted
Application number
CN201610875024.0A
Other languages
Chinese (zh)
Other versions
CN106506594B (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.)
iFlytek Co Ltd
Original Assignee
iFlytek 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 iFlytek Co Ltd filed Critical iFlytek Co Ltd
Priority to CN201610875024.0A priority Critical patent/CN106506594B/en
Publication of CN106506594A publication Critical patent/CN106506594A/en
Application granted granted Critical
Publication of CN106506594B publication Critical patent/CN106506594B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a parallel computing resource allocation method and a device, wherein the method comprises the following steps: receiving a current resource allocation request, and acquiring the total number of resources of the current resource allocation request; acquiring resource related information contained in each cluster node in a parallel computing cluster; calculating the resource allocation cost of each cluster node according to the resource related information of each cluster node; and performing resource allocation on the request task corresponding to the current resource allocation request according to the resource allocation cost of each cluster node and the total number of resources of the current resource allocation request.

Description

A kind of concurrent computation resource distribution method and device
Technical field
The present invention relates to cluster resource management and parallel computation field, more particularly to a kind of concurrent computation resource distribution side Method and device.
Background technology
In recent years, parallel computing trunking is more and more applied to speech recognition, image recognition, natural language understanding et al. Work intelligence association area so that the task disposal ability in the field is obviously improved, especially the deep learning in the field The disposal ability of task is got a promotion significantly;And the increase with data processing amount, single resource cannot often carry complicated Calculating task, is so accomplished by parallel computing trunking increasing resource and executes corresponding task, to meet practical application need Ask, such as the depth that a GPU cluster executes mass data is constituted using multiple GPU (Graphic Processing Unit, GPU) Calculating demand in degree learning tasks, this is accomplished by efficiently distributing cluster resource, to give full play to its parallel computation Ability.
Existing parallel computing trunking resource allocation methods are usually using resource in cluster as outside CPU, internal memory, hard disk A kind of attached resource simply distributed, when clustered node carries out resource allocation, typically using mutual exclusion, exclusive by the way of to collection In group, resource is allocated, i.e. when in clustered node, idling-resource meets mission requirements, be then allocated, allocated resource Exclusive resource resource will be discharged after the completion of task always, however, when this resource allocation methods can cause task to wait Between longer, cluster parallel processing capability decline and resource utilization relatively low the problems such as.
Content of the invention
For overcoming the shortcomings of that above-mentioned prior art is present, the purpose of the present invention is to provide a kind of concurrent computation resource distribution Method and device, to improve the utilization rate of cluster resource.
It is that the present invention proposes a kind of concurrent computation resource distribution method, comprises the steps up to above-mentioned purpose:
Step one, receives Current resource distribution request, obtains the total number resource of the current resource allocation request;
Step 2, obtains the resource related information that each clustered node includes in parallel computing trunking;
Step 3, according to the resource related information of each clustered node, calculates the resource allocation cost of each clustered node;
Step 4, according to the resource allocation cost of each clustered node and the total number resource to the current resource allocation request pair The request task that answers carries out resource allocation.
Further, step 3 is further included:
Resource related information according to each clustered node calculates the transition cost produced during each clustered node resource allocation, There is, when being and splitting resource group in clustered node every time, the cost that energy level transition is produced in the transition cost;
Resource related information according to each clustered node is calculated The remaining cost of node;
Transition cost and remaining cost according to each clustered node calculates resource allocation during each clustered node distribution resource Cost.
Further, the transition cost is obtained as follows:
Split, when calculating each clustered node resource allocation, the fractionation cost that resource group is produced;
Fractionation cost according to resource group is split calculates transition cost during each clustered node resource allocation.
Further, the number of resources that the fractionation cost is included by surplus resources number in current cluster node and resource group Calculate and obtain, or directly set acquisition.
Further, the remaining cost is obtained by surplus resources number in clustered node.
Further, the resource related information include each resource group includes in current cluster node number of resources, when All total number resources in front clustered node, using total number resource and surplus resources sum.
Further, the resource related information is obtained by the heartbeat signal that each clustered node sends.
Further, in step 4, selecting the clustered node of resource allocation Least-cost to distribute mutually should total number resource Resource give the request task.
For reaching above-mentioned purpose, the present invention also provides a kind of concurrent computation resource distributor, including:
Resource allocation request receiver module, for receiving Current resource distribution request, obtains Current resource distribution request Total number resource;
Resource information acquisition module, for obtaining the resource correlation letter that each clustered node includes in parallel computing trunking Breath;
Resource allocation cost computing module, according to the resource related information of each clustered node, calculates the money of each clustered node Distribute cost in source;
Resource distribution module, according to the resource of the resource allocation cost and the current resource allocation request of each clustered node Sum carries out resource allocation to the corresponding request task of the current resource allocation request.
Further, the resource allocation cost computing module includes:
Transition cost calculating unit, for calculating each clustered node resource point according to the resource related information of each clustered node , there is energy level transition when the transition cost is for splitting resource group in clustered node every time and produce in the transition cost that timing is produced Cost;
Remaining cost calculating unit, divides in each clustered node for being calculated according to the resource related information of each clustered node Remaining cost with each clustered node after resource release;
Distribution cost calculating unit, the transition cost and remaining cost according to each clustered node calculate each clustered node distribution Resource allocation cost during resource.
Further, when the transition cost calculating unit calculates each clustered node resource allocation first, resource group is split The fractionation cost of generation, calculates transition cost during each clustered node resource allocation further according to the fractionation cost for splitting resource group.
Further, the number of resources that the fractionation cost is included by surplus resources number in current cluster node and resource group Calculate and obtain, or directly set acquisition.
Further, the remaining cost is obtained by surplus resources number in clustered node.
Compared with prior art, a kind of concurrent computation resource distribution method of the invention and device are by carrying out resource allocation Before according to the resource related information included in each clustered node, when calculating each clustered node distribution respective numbers resource Distribution cost, so that ensure that the clustered node for selecting generation fragment less carries out resource allocation, effectively during request resource every time Improve the utilization rate of whole cluster resource.
Description of the drawings
The step of Fig. 1 is a kind of concurrent computation resource distribution method of first embodiment of the invention flow chart;
Fig. 2 is the thin portion flow chart of step 103 in first embodiment of the invention
The energy level transition schematic diagram that Fig. 3 is produced when being and splitting resource group in clustered node in the specific embodiment of the invention;
Fig. 4 is a kind of structural representation of concurrent computation resource distributor of second embodiment of the invention
Fig. 5 is the detail structure chart of resource allocation cost computing module in second embodiment of the invention.
Specific embodiment
Below by way of specific instantiation and embodiments of the present invention are described with reference to the drawings, those skilled in the art can The further advantage and effect that the present invention is understood easily by content disclosed in the present specification.The present invention also can be different by other Instantiation implemented or applied, the every details in this specification can also be based on different viewpoints and application, without departing substantially from Various modifications and change is carried out under the spirit of the present invention.
The step of Fig. 1 is a kind of concurrent computation resource distribution method of first embodiment of the invention flow chart.As shown in figure 1, A kind of concurrent computation resource distribution method of the present invention, comprises the steps:
Step 101, receives Current resource distribution request, obtains the total number resource of Current resource distribution request.
The number of resources that the total number resource of the Current resource distribution request is needed when generally executing new task;The resource Refer to that each clustered node, in the task of execution, distributes least resource unit during resource, such as in parallel computing trunking node Parallel computation is carried out using multiple GPU, then when single GPU is clustered node execution task, the least resource unit of distribution.This In invention, during parallel computation, in cluster, include multiple clustered nodes, each clustered node includes one or more resource groups, each Resource comprising fixed qty in resource group.
Step 102, obtains the resource related information that each clustered node includes in parallel computing trunking.The resource is related Information includes all total number resources, use in the number of resources that each resource group includes in current cluster node, current cluster node Total number resource and surplus resources are total in embodiments of the present invention, the heartbeat that resource related information can be sent by each clustered node Signal is obtained, that is to say, that each clustered node regularly can send heartbeat signal to distributor, to prove oneself to be still active in collection In group, the heartbeat signal includes No. ID of each clustered node itself and corresponding resource related information, but is not limited.
Step 103, according to the resource related information of each clustered node, calculates the resource allocation cost of each clustered node.
In the present invention, resource allocation cost is made up of two parts:During each clustered node resource allocation, resource group is split The remaining cost that has distributed after resource is released in the energy level transition cost of generation and each clustered node.Fig. 2 is the present invention the The thin portion flow chart of step 103 in one embodiment.As shown in Fig. 2 step 203 further includes following steps:
Step S1, the resource related information according to each clustered node calculate the jump produced during each clustered node resource allocation Move cost.Energy level transition that the transition cost occurs when referring to and every time splitting resource group in clustered node and the cost that produces.Receive It is limited to hardware, in distribution clustered node during resource, if necessary to split resource group, the cost of cost is often higher, that is, splits generation Valency is higher;If set of resources need not be split with resource, the cost of cost is often relatively low, and well below fractionation resource group When the fractionation cost that spends, be negligible, therefore, the calculating process of transition cost is as follows:
1) the fractionation cost that resource group is produced is split during resource allocation first in computing cluster node
Split cost only can just produce during resource group in clustered node is split, split in cost and current cluster node The number of resources that surplus resources number and resource group include is related, and which can pass through surplus resources number and resource group bag in current cluster node The number of resources for containing is calculated and is obtained, in the specific embodiment of the invention, specific formula for calculation such as following formula (1):
Wherein, k is represented and is split the fractionation cost produced during resource group in clustered node;R is represented in current cluster node and is remained Remaining number of resources, g are the number of resources that resource group includes in clustered node, and for splitting cost regulation parameter, value is more than or equal to 1 to j Integer, concrete value can determine according to application demand or experimental result which act as ensureing that value of k is 0 or 1, i.e., when tearing open When dividing resource group, value is 1, and when not splitting resource group, value is 0;
Explanation is needed, above-mentioned formula (1) is merely illustrative computational methods, it is of course also possible to not using tearing open that above formula is provided Divide cost computational methods, clustered node is directly set when resource is distributed, split the fractionation cost of resource group every time, as directly set Fractionation cost during the fixed resource group of fractionation every time is 1, and when not splitting resource group, it is 0 to split cost, and the present invention is not limited.
2) transition cost during each clustered node resource allocation is calculated according to the fractionation cost for splitting resource group
When there are multiple resource groups in clustered node, cluster can be all caused being split when resource group carries out resource allocation every time The transition of node energy level, produces transition cost, the energy level transition does not split resource group in cluster when referring to resource allocation when, energy level Do not change, after resource group is split, energy level reduces, energy level occurs transition, and then produces transition cost.
Transition cost during each clustered node resource allocation is produced when being all fractionation resource groups in each clustered node Cost sum is split, and the energy level transition that such as Fig. 3 is produced when being and resource group in clustered node is split in the specific embodiment of the invention is shown It is intended to, wherein, the clustered node includes 8 resources altogether, and 2 resource groups, each resource group fixed packet work as cluster containing 4 resources Middle resource drops to 4 or when 4 drop to 0 by 8, and energy level occurs transition, produces transition cost, and the transition cost is by such as following formula (2) calculate and obtain:
Wherein, TR-aTransition cost after expression clustered node distribution resource from after R resource allocation a resource, a are represented Request number of resources, kiFractionation cost during clustered node distribution resource is represented, only when i-th resource is distributed, money has been split Source group, kiValue is 1, and otherwise, value is 0.
The calculating process of each clustered node transition cost is described below by way of an instantiation.It is assumed that request number of resources For including two clustered nodes node1 and node2, the relevant information such as following table of each clustered node in 2, and parallel computing trunking Shown in 1:
Table 1
Wherein, g represents that the number of resources that resource group includes in each clustered node, a represent that request number of resources, Total are represented The total number resource that each clustered node includes, Used represent the number of resources that each clustered node has been allocated, R1、R2Difference table Show clustered node surplus resources number after distribution resource;The calculating of the transition cost of each clustered node in the specific embodiment of the invention Process is as follows:
1) the transition cost of node1 nodes is calculated
Fractionation cost node1 node distribution two resources after is first calculated, as remaining 5 resources of node1 nodes can use, Each resource group includes 4 resources, when the 1st resource of node distribution, does not split resource group, when the 2nd money of node distribution During source, need to split a resource group, therefore, it is 1 that can calculate fractionation cost according to formula (1);Due to node1 node distributions 2 A resource group is split during individual resource altogether;Therefore, transition cost when node1 nodes are reduced to 3 resources by 5 resources is institute There are fractionation cost sum, i.e., 1;
2) the transition cost of node2 nodes is calculated
Fractionation cost node2 node distribution two resources after is equally first calculated, due to node2 nodes 3 resources of residue Available, each resource group includes 4 resources, after node distribution complete two resources, does not split resource group, and it is 0 to split cost; Therefore, after 2 resources of node2 node distributions, the transition cost for being reduced to 1 resource by 3 resources is 0.
Step S2, the resource related information according to each clustered node are calculated after distributed in each clustered node resource release The remaining cost of each clustered node.
Due to actually used when, it is ensured that the integrality of resource in each clustered node, can will be whole for resource in clustered node Body distributes to the larger prior task of resource consumption, with higher value, therefore, only lacks a money in clustered node During source, the potential value having is higher, because only needing to discharge the integrality that a resource ensures that the clustered node, When carrying out resource allocation, directly give resource consumption bigger task resource allocation in whole clustered node.For this purpose, the present invention exists Calculate each clustered node resource allocation cost when, it is also contemplated that in each clustered node, allocated resource collects upon discharge The remaining cost of group node, the remaining cost refer to as clustered node is when resource is distributed, do not consider to divide in clustered node Cause the impaired produced cost of potential value with the integrality of clustered node can be kept after node release, concrete residue generation The computational methods of valency are as follows:
The remaining cost of the clustered node is related to surplus resources number in clustered node, can pass through remaining in clustered node Number of resources is obtained, when in clustered node, surplus resources are more, surplus resources are distributed to request resource task when, loss latent Bigger being worth, so that the remaining cost of clustered node is bigger;Therefore, the remaining cost of the clustered node and clustered node In remaining number of resources be inversely proportional to, remaining cost can adopt as following formula (3) calculate obtain:
Wherein, LRRemaining cost during R resource remaining for clustered node, R are the residue before clustered node distributes resource Number of resources;
Step S3, when calculating each clustered node distribution resource according to the transition cost of each clustered node and remaining cost Distribution cost.
In the specific embodiment of the invention, the distribution cost be transition cost after each clustered node distribution resource with Remaining cost sum, obtains using such as following formula (4):
CR-a=TR-a+LR(4)
Wherein, CR-aFor the distribution cost that distributes after a resource during remaining R resource in clustered node.Here should be noted It is that formula (4) is merely illustrative, it is also possible to after being weighted process to transition cost with remaining cost, calculate distribution generation Valency, the present invention are not limited.
The calculating process for distributing cost is described below by way of an instantiation:For example current request number of resources is 2 The resource related information of clustered node node1 and node2 is as shown in table 2 below, and in table, design parameter implication is identical with table 1, wherein C Distribute distribution cost during resource for each clustered node, other parameters implication is identical with table 1, clustered node node1 and node2 Distribution cost C calculating process as described below:
Table 2
Transition cost each clustered node distribution resource after is first calculated, due to 2 moneys of node1 and node2 node distributions Resource group is not split behind source, and it is all 0 therefore to split cost and transition cost;
Calculate the remaining cost of node1 nodes:1-1/7=6/7;
Calculate the remaining cost of node2 nodes:1-1/2=1/2;
Therefore, the distribution cost of node1 node distributions resource be 0+6/7=6/7, the distribution of node2 node distribution resources Cost is 0+1/2=1/2.
Step 104, total to the current resource allocation according to the resource allocation cost and resource request of each clustered node Corresponding request task is asked to carry out resource allocation.In the embodiment of the present invention, at concrete distribution, then distribution Least-cost is selected Clustered node distribute the resource of corresponding requested resource sum to the request task.
As in parallel computing trunking, each clustered node can include one or more resource groups, each resource group includes fixation The resource of quantity, the resource allocation methods of prior art are allocated to resource in cluster only with mutual exclusion, exclusive mode, not The distribution cost produced during consideration resource allocation, but directly demand task is given by the resource allocation for meeting demand, often tear open The set of resources that divides in each clustered node matches somebody with somebody resource.Like this, if surplus resources are less in a resource group, next demand During task requests resource, requirement cannot be often met, so as to produce resource fragmentation, and the fragment for As time goes on producing Can be more and more, when there is larger task to need compared with multiple resource, in clustered node, resource fragmentation cannot meet demand, larger task After needing wait to distribute resource release, the resource of quantity required can be just obtained, thus task waiting time can be caused longer, be collected Group's parallel processing capability declines, and the problems such as resource utilization is relatively low, the present invention not only considers each clustered node in resource allocation Transition cost after distribution request number of resources resource, while consider the clustered node that each clustered node has distributed after resource discharges Remaining cost, resource point is carried out according to the resource allocation cost of each clustered node and resource request sum to request task Match somebody with somebody, prior art can be solved the problems, such as well.
Fig. 4 is a kind of structural representation of concurrent computation resource distributor of second embodiment of the invention.As shown in figure 4, A kind of concurrent computation resource distributor of the present invention, including:Resource allocation request receiver module 10, resource information acquisition module 11st, resource allocation cost computing module 12 and resource distribution module 13.
Wherein, resource allocation request receiver module 10, for receiving Current resource distribution request, obtains Current resource distribution The total number resource of request.The number of resources that the total number resource of the Current resource distribution request is needed when generally executing new task; The resource refers to that each clustered node, in the task of execution, distributes least resource unit during resource, such as parallel computing trunking section Used in point, multiple GPU carry out parallel computation, then when single GPU is clustered node execution task, the least resource list of distribution Position.In the present invention, during parallel computation, in cluster, include multiple clustered nodes, each clustered node includes one or more resource groups, Resource comprising fixed qty in each resource group.
Resource information acquisition module 11, for obtaining the resource correlation letter that each clustered node includes in parallel computing trunking Breath.The resource related information includes institute in the number of resources that each resource group includes in current cluster node, current cluster node There is total number resource, use total number resource and surplus resources sum.In the specific embodiment of the invention, resource related information can pass through The heartbeat signal that each clustered node sends is obtained, that is to say, that each clustered node regularly can send heartbeat signal to distributor, To prove oneself to be still active in cluster, the heartbeat signal includes No. ID of each clustered node itself and corresponding resource phase Pass information.
Resource allocation cost computing module 12, according to the resource related information of each clustered node, calculates each clustered node Resource allocation cost.
In the present invention, resource allocation cost is made up of two parts:During each clustered node resource allocation, resource group is split The remaining cost that has distributed after resource is released in the energy level transition cost of generation and each clustered node.Fig. 5 is the present invention the The detail structure chart of resource allocation cost computing module in two embodiments.As shown in figure 5, resource allocation cost computing module 12 enters One step includes:Transition cost calculating unit 120, remaining cost calculating unit 121, distribution cost calculating unit 122.
Transition cost calculating unit 120, for calculating each clustered node according to the resource related information of each clustered node The transition cost produced during resource allocation.The energy level jump that the transition cost occurs when referring to and splitting resource group in clustered node every time The cost that moves and produce.Hardware is limited to, in distribution clustered node during resource, if necessary to split resource group, the cost of cost Often higher, that is, split cost higher;If set of resources need not be split with resource, the cost of cost is often relatively low, and Well below the fractionation cost spent when splitting resource group, it is negligible, therefore, the meter of transition cost calculating unit 120 Calculation process is as follows:
1) when first calculating resource allocation in each clustered node, the fractionation cost that resource group is produced is split
The fractionation cost only can be just produced during resource group in clustered node is split, the fractionation cost and currently collection In group node, surplus resources number and resource group are related comprising number of resources, and which can pass through surplus resources number and money in current cluster node The number of resources that source group includes is calculated and is obtained, and in the specific embodiment of the invention, circular is obtained using following formula:
Wherein, k is represented and is split the fractionation cost produced during resource group in clustered node;R is represented in current cluster node and is remained Remaining number of resources, g are that resource group includes number of resources in clustered node, and j, for splitting cost regulation parameter, is the integer more than or equal to 1, Concrete value can determine according to application demand or experimental result which act as ensureing that the value of k is 0 or 1, i.e., when fractionation resource group When, value is 1, and when not splitting resource group, value is 0;
Explanation is needed, above formula is merely illustrative computational methods, it is of course also possible to fractionation cost meter not provided using above formula Calculation method, directly sets clustered node when resource is distributed, splits the fractionation cost of resource group every time, and such as directly setting is torn open every time Fractionation cost when dividing resource group is 1, and when not splitting resource group, it is 0 to split cost;The present invention is not limited.
2) transition cost when being distributed according to the fractionation cost computing cluster node resource for splitting resource group
When there are multiple resource groups in clustered node, cluster can be all caused being split when resource group carries out resource allocation every time The transition of node energy level, produces transition cost, the energy level transition does not split resource group in cluster when referring to resource allocation when, energy level Do not change, after resource group is split, energy level reduces, energy level occurs transition, and then produces transition cost.
What transition cost during clustered node resource allocation was produced when being all fractionation resource groups in each clustered node tears open Divide cost sum.The transition cost can be obtained using following formula:
Wherein, TR-aTransition cost after expression clustered node distribution resource from after R resource allocation a resource, a are represented Request number of resources, kiFractionation cost during clustered node distribution resource is represented, only when i-th resource is distributed, money has been split Source group, kiValue is 1, and otherwise, value is 0.
Remaining cost calculating unit 121, for calculating each clustered node according to the resource related information of each clustered node In distributed resource release after each clustered node remaining cost.
Due to actually used when, it is ensured that the integrality of resource in each clustered node, can will be whole for resource in clustered node Body distributes to the larger prior task of resource consumption, with higher value, therefore, only lacks a money in clustered node During source, the potential value having is higher, because only needing to discharge the integrality that a resource ensures that the clustered node, When carrying out resource allocation, directly give resource consumption bigger task resource allocation in whole clustered node.For this purpose, the present invention exists Calculate each clustered node resource allocation cost when, it is also contemplated that in each clustered node, allocated resource collects upon discharge The remaining cost of group node, the remaining cost refer to as clustered node is when resource is distributed, do not consider to divide in clustered node Cause the impaired produced cost of potential value with the integrality of clustered node can be kept after node release, concrete residue generation The calculating process of valency is as follows:
The remaining cost of the clustered node is related to surplus resources number in clustered node, can pass through remaining in clustered node Number of resources is obtained, when in clustered node, surplus resources are more, surplus resources are distributed to request resource task when, loss latent Bigger being worth, so that the remaining cost of clustered node is bigger;Therefore, the remaining cost of the clustered node and clustered node In remaining number of resources be inversely proportional to, the computational methods of the remaining cost are shown below:
Wherein, LRRemaining cost during R resource remaining for clustered node, R are the residue before clustered node distributes resource Number of resources;
Distribution cost calculating unit 122, calculates each collection for the transition cost according to each clustered node and remaining cost Distribution cost during group node distribution resource.
In embodiments of the present invention, the distribution cost be transition cost after each clustered node distribution resource with remaining Cost sum, obtains using following formula:
CR-a=TR-a+LR
Wherein, CR-aFor the distribution cost that distributes after a resource during remaining R resource in clustered node.
Resource distribution module 13, total to request task according to the resource allocation cost and resource request of each clustered node Carry out resource allocation.In the embodiment of the present invention, at concrete distribution, then select the clustered node distribution of distribution Least-cost corresponding The resource of resource request sum is to request task.
In sum, a kind of concurrent computation resource distribution method of the invention and device pass through root before resource allocation is carried out According to the resource related information included in each clustered node, distribution generation during each clustered node distribution respective numbers resource is calculated Valency, so that ensure that the clustered node for selecting generation fragment less carries out resource allocation, effectively improves during request resource every time The utilization rate of whole cluster resource.
Any those skilled in the art can be repaiied to above-described embodiment under the spirit and the scope without prejudice to the present invention Decorations and change.Therefore, the scope of the present invention, should be as listed by claims.

Claims (13)

1. a kind of concurrent computation resource distribution method, comprises the steps:
Step one, receives Current resource distribution request, obtains the total number resource of the current resource allocation request;
Step 2, obtains the resource related information that each clustered node includes in parallel computing trunking;
Step 3, according to the resource related information of each clustered node, calculates the resource allocation cost of each clustered node;
Step 4, corresponding to the current resource allocation request according to the resource allocation cost of each clustered node and the total number resource Request task carries out resource allocation.
2. a kind of concurrent computation resource distribution method as claimed in claim 1, it is characterised in that step 3 is further included:
Resource related information according to each clustered node calculates the transition cost produced during each clustered node resource allocation, described There is, when being and splitting resource group in clustered node every time, the cost that energy level transition is produced in transition cost;
Resource related information according to each clustered node is calculated Remaining cost;
Transition cost and remaining cost according to each clustered node calculates resource allocation cost during each clustered node distribution resource.
3. a kind of concurrent computation resource distribution method as claimed in claim 2, it is characterised in that the transition cost is by such as Lower step is obtained:
Split, when calculating each clustered node resource allocation, the fractionation cost that resource group is produced;
Fractionation cost according to resource group is split calculates transition cost during each clustered node resource allocation.
4. a kind of concurrent computation resource distribution method as claimed in claim 3, it is characterised in that:The fractionation cost is by working as The number of resources that surplus resources number and resource group include in front clustered node is calculated and is obtained, or directly sets acquisition.
5. a kind of concurrent computation resource distribution method as claimed in claim 2, it is characterised in that:The remaining cost is by collection In group node, surplus resources number is obtained.
6. a kind of concurrent computation resource distribution method as claimed in claim 1, it is characterised in that:The resource related information bag Include all total number resources in the number of resources, current cluster node that each resource group includes in current cluster node, use resource total Number and surplus resources sum.
7. a kind of concurrent computation resource distribution method as claimed in claim 6, it is characterised in that:The resource related information leads to Cross the heartbeat signal acquisition that each clustered node sends.
8. a kind of concurrent computation resource distribution method as claimed in claim 1, it is characterised in that:In step 4, money is selected The clustered node distribution of source distribution Least-cost mutually should the resource of total number resource give the request task.
9. a kind of concurrent computation resource distributor, including:
Resource allocation request receiver module, for receiving Current resource distribution request, obtains the resource of Current resource distribution request Sum;
Resource information acquisition module, for obtaining the resource related information that each clustered node includes in parallel computing trunking;
Resource allocation cost computing module, according to the resource related information of each clustered node, calculates the resource of each clustered node Distribution cost;
Resource distribution module, according to the total number resource of the resource allocation cost and the current resource allocation request of each clustered node Resource allocation is carried out to the corresponding request task of the current resource allocation request.
10. concurrent computation resource distributor as claimed in claim 9, it is characterised in that the resource allocation cost is calculated Module includes:
Transition cost calculating unit, during for calculating each clustered node resource allocation according to the resource related information of each clustered node There is, when being and splitting resource group in clustered node every time, the generation that energy level transition is produced in the transition cost of generation, the transition cost Valency;
Remaining cost calculating unit, has distributed money for calculating in each clustered node according to the resource related information of each clustered node The remaining cost of each clustered node after the release of source;
Distribution cost calculating unit, the transition cost and remaining cost according to each clustered node calculate each clustered node and distribute resource When resource allocation cost.
11. concurrent computation resource distributors as claimed in claim 10, it is characterised in that the transition cost calculating unit Split, when calculating each clustered node resource allocation first, the fractionation cost that resource group is produced, further according to the fractionation for splitting resource group Cost calculates transition cost during each clustered node resource allocation.
12. concurrent computation resource distributors as claimed in claim 11, it is characterised in that:The fractionation cost is by current The number of resources that surplus resources number and resource group include in clustered node is calculated and is obtained, or directly sets acquisition.
13. concurrent computation resource distributors as claimed in claim 10, it is characterised in that:The remaining cost passes through cluster In node, surplus resources number is obtained.
CN201610875024.0A 2016-09-30 2016-09-30 Parallel computing resource allocation method and device Active CN106506594B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610875024.0A CN106506594B (en) 2016-09-30 2016-09-30 Parallel computing resource allocation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610875024.0A CN106506594B (en) 2016-09-30 2016-09-30 Parallel computing resource allocation method and device

Publications (2)

Publication Number Publication Date
CN106506594A true CN106506594A (en) 2017-03-15
CN106506594B CN106506594B (en) 2019-09-03

Family

ID=58293625

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610875024.0A Active CN106506594B (en) 2016-09-30 2016-09-30 Parallel computing resource allocation method and device

Country Status (1)

Country Link
CN (1) CN106506594B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107577534A (en) * 2017-08-31 2018-01-12 郑州云海信息技术有限公司 A kind of resource regulating method and device
CN109034381A (en) * 2017-06-09 2018-12-18 宏达国际电子股份有限公司 Training mission optimization system, method and its non-transient computer readable media

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102185713A (en) * 2011-05-04 2011-09-14 浙江大学 Global optimization method of internet service resource distribution
CN102193811A (en) * 2010-12-08 2011-09-21 上海交通大学 Compiling device for eliminating memory access conflict and realizing method thereof
CN103218233A (en) * 2013-05-09 2013-07-24 福州大学 Data allocation strategy in hadoop heterogeneous cluster
CN104536804A (en) * 2014-12-23 2015-04-22 西安电子科技大学 Virtual resource dispatching system for related task requests and dispatching and distributing method for related task requests
CN104881322A (en) * 2015-05-18 2015-09-02 中国科学院计算技术研究所 Method and device for dispatching cluster resource based on packing model

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102193811A (en) * 2010-12-08 2011-09-21 上海交通大学 Compiling device for eliminating memory access conflict and realizing method thereof
CN102185713A (en) * 2011-05-04 2011-09-14 浙江大学 Global optimization method of internet service resource distribution
CN103218233A (en) * 2013-05-09 2013-07-24 福州大学 Data allocation strategy in hadoop heterogeneous cluster
CN104536804A (en) * 2014-12-23 2015-04-22 西安电子科技大学 Virtual resource dispatching system for related task requests and dispatching and distributing method for related task requests
CN104881322A (en) * 2015-05-18 2015-09-02 中国科学院计算技术研究所 Method and device for dispatching cluster resource based on packing model

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109034381A (en) * 2017-06-09 2018-12-18 宏达国际电子股份有限公司 Training mission optimization system, method and its non-transient computer readable media
CN109034381B (en) * 2017-06-09 2022-01-28 宏达国际电子股份有限公司 Training task optimization system, method and non-transitory computer readable medium thereof
CN107577534A (en) * 2017-08-31 2018-01-12 郑州云海信息技术有限公司 A kind of resource regulating method and device

Also Published As

Publication number Publication date
CN106506594B (en) 2019-09-03

Similar Documents

Publication Publication Date Title
Levin et al. DP-FAIR: A simple model for understanding optimal multiprocessor scheduling
CN108876702A (en) A kind of training method and device accelerating distributed deep neural network
CN107659433B (en) Cloud resource scheduling method and equipment
CN102281290B (en) Emulation system and method for a PaaS (Platform-as-a-service) cloud platform
Myerson et al. Population uncertainty in contests
CN103853618B (en) Resource allocation method with minimized cloud system cost based on expiration date drive
CN103810047B (en) Dynamic improves the memory affinity of logical partition
CN103561055B (en) Web application automatic elastic extended method under conversation-based cloud computing environment
CN111079921A (en) Efficient neural network training and scheduling method based on heterogeneous distributed system
CN108845874A (en) The dynamic allocation method and server of resource
CN105740085B (en) Fault-tolerance processing method and device
CN104063265A (en) Method for comprehensively evaluating virtual resources
CN104461748A (en) Optimal localized task scheduling method based on MapReduce
CN106257893A (en) Storage server task response method, client, server and system
CN104820616B (en) A kind of method and device of task scheduling
CN110502323A (en) A kind of cloud computing task real-time scheduling method
CN112870726A (en) Resource allocation method, device and storage medium for graphic processor
CN106506594A (en) Parallel computing resource allocation method and device
CN103825946B (en) Virtual machine placement method based on network perception
CN100498735C (en) Resource using method in automatic testing process
CN105045906B (en) The predictor method and device of impression information clicking rate
CN110457555A (en) Collecting method, device and computer equipment, storage medium based on Docker
CN103002067A (en) Acquiring method of internet protocol (IP) addresses of virtual machine
CN109460851A (en) Order allocation method, device and electronic equipment
CN109284190A (en) A kind of task processing method and device

Legal Events

Date Code Title Description
C06 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