CN108089918A - A kind of figure computational load equalization methods towards heterogeneous server structure - Google Patents

A kind of figure computational load equalization methods towards heterogeneous server structure Download PDF

Info

Publication number
CN108089918A
CN108089918A CN201711274503.8A CN201711274503A CN108089918A CN 108089918 A CN108089918 A CN 108089918A CN 201711274503 A CN201711274503 A CN 201711274503A CN 108089918 A CN108089918 A CN 108089918A
Authority
CN
China
Prior art keywords
node
vertex
calculate
migration
super
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
CN201711274503.8A
Other languages
Chinese (zh)
Other versions
CN108089918B (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.)
Huazhong University of Science and Technology
Original Assignee
Huazhong University of Science and Technology
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 Huazhong University of Science and Technology filed Critical Huazhong University of Science and Technology
Priority to CN201711274503.8A priority Critical patent/CN108089918B/en
Publication of CN108089918A publication Critical patent/CN108089918A/en
Application granted granted Critical
Publication of CN108089918B publication Critical patent/CN108089918B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • G06F9/4856Task life-cycle, e.g. stopping, restarting, resuming execution resumption being on a different machine, e.g. task migration, virtual machine migration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5072Grid computing

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a kind of figure computational load equalization methods towards heterogeneous server structure:Time used in once super step handling figure computational load according to all calculate nodes, main controlled node calculates the coefficient of variation of all processing times in this super step, if the coefficient of variation in super step is more than default threshold value twice in succession, then judge that the figure computational load of each calculate node operationally is unbalanced, it needs to redistribute the figure computational load in calculate node after this super the end of the step, otherwise all calculate nodes will continue to execute super step next time.The method of the present invention balances the processing time between calculate node in each super step using vertex migration, so as to be effectively reduced the synchronization overhead of all calculate nodes in each super step, shorten the run time of figure calculating task, and improve resource utilization when each calculate node is run.

Description

A kind of figure computational load equalization methods towards heterogeneous server structure
Technical field
The invention belongs to figure computing technique fields, are calculated more particularly, to a kind of figure towards heterogeneous server structure Load-balancing method.
Background technology
Distributed figure computing technique is widely used in social network analysis, natural language processing, webpage information retrieval etc. Various fields, compositional system generally comprise three parts:Nomography, diagram data collection and figure computing system.Most of figures calculate System uses BSP (Bulk Synchronization Barrier) computation model, under this model, figure calculating process usually quilt It is divided into iteration several times, iteration is also known as a super step each time.In each super step, activation vertex surpasses according in last time The information updating vertex numerical value received in grade step, and updated numerical value is sent to corresponding neighbours in form of a message and is pushed up Point.Synchronous obstacle is equipped between adjacent step super twice, to ensure that all activated vertex is complete before next super step starts Numerical value in being walked into current super updates operation.
The considerations of existing figure computing system is for load balancing imports the diagram data collection stage as all meters in calculate node The comparable vertex of operator node quantity allotted.However, current data center or the server architecture of cluster generally use isomery, this So that processing time difference of the calculate node of different disposal ability in each super step, the i.e. strong calculate node of processing capacity The preferential completion local computing of calculate node always weaker than processing capacity in each super step, and waited together at synchronous obstacle Step.In addition, during figure calculating task is handled, the activation number of vertex being distributed in each calculate node can change, because And each calculate node every time it is super in load capacity also can dynamic change.Two above reason causes most of figures to calculate system System is it is difficult to ensure that processing time of each calculate node in each super step is balanced.
During for processing figure calculating task between calculate node the problem of load imbalance, a small number of figure computing systems (such as Mizan and GPS) it proposes using the method for vertex migration come the load in each calculate node in balanced super step every time.However, this A little figure computing systems are usually moved using the parameter (such as vertex receive in once super step message count) of vertex stage to draft Plan is moved, undesirable so as to cause migration effect, being supported between calculate node is still unbalanced after vertex migrates.In addition, this A little more sensitive migration strategies of figure computing system generally use, even if detecting that slight load imbalance can also perform vertex and move It moves, the expense (such as transit time, resource occupation) that vertex migrates is caused to be much larger than the income of load balancing.
The content of the invention
For the disadvantages described above or Improvement requirement of the prior art, the present invention provides a kind of figure towards heterogeneous server structure Computational load equalization methods, during for processing of all calculate nodes in equiblibrium mass distribution formula figure computing system in each super step Between, so as to reduce synchronization overhead of the calculate node in each super step, shorten the run time of figure calculating task, solve existing Existing calculate node load capacity is unbalanced different with processing time during processing figure calculating task under some heterogeneous server structures Step problem.
A kind of figure computational load equalization methods towards heterogeneous server structure proposed by the present invention, including such as next stage:
Detect the unbalanced stage:When figure calculating task is run, each calculate node in each super step of main controlled node monitoring Processing time, and according to the coefficient of variation of all calculate node processing times in this super step and the threshold value of user preset, Judge whether the figure computational load in each calculate node is balanced;The coefficient of variation is the ginseng of one group of data value dispersion degree of reflection Number;For a nomography, if feature when user does not know its operation, i.e., user during operation for activating number of vertices Change unknown, then threshold value is defaulted as 0.10;And for stable nomography, that is, the number on activation vertex is constant when running, then should The setting one is less than 0.10 threshold value;And for unstable nomography, that is, the number that vertex is activated when running persistently changes, A threshold value more than 0.10 should then be set;Default threshold of the present invention can be set to 0.10, for the specific of different nomographys Threshold value is chosen then not in the range of the discussion of the present invention.
Draft the migration plan stage:Each calculate node determines each to need the vertex migrated, and main controlled node determines these tops Point is corresponding to move into node;
Implement migration phase:All nodes of moving out transmit vertex information by the way of deferred migration moves into section to corresponding On point, the location information after the migration of main controlled node more new summit;The deferred migration refers to node of moving out in this super the end of the step The ID of opposite vertexes, numerical value, adjacent side table are migrated afterwards, and larger-size vertex incoming message is being moved out on node originally It is migrated again after ground processing;The location information on vertex refers to the node that vertex is currently located, it is known that the position letter on the vertex Breath, other vertex could send message to it.
Further, the method comprises the following steps:
All calculate nodes of step 1 import nomography and diagram data collection;In general, nomography and diagram data collection constitute Computational load;
All calculate nodes of step 2 perform the once super step of nomography;(nomography is typically that system provides or user It writes, nomography is commonly divided into super several times for the process to the progress information extraction of diagram data collection, extraction information Step);
Step 3 main controlled node judges whether the figure computational load in each calculate node is balanced;
If judging in step 4 step 3, result is load imbalance, into the migration plan stage is drafted, goes to step 5;It is no Then, 7 are gone to step, all calculate nodes enter super step next time;
Each calculate node of step 5 determines each to need the vertex migrated, and main controlled node determines moving into for these vertex correspondences Node;
All calculate nodes of step 6 by the way of deferred migration, move into corresponding on node, main by transmission vertex information Control node updates simultaneously summarize the location information after the migration of vertex;
Step 7 repeats step 2 to step 6, until nomography restrains.
Further, the uneven stage is detected in this step 3 of institute includes following sub-step:
The processing time monitored in this super step is sent to main controlled node (each calculating section by each calculate nodes of step 3-1 Point can monitor the processing time in each super step in the process of running);
Step 3-2 main controlled nodes calculate the coefficient of variation CV of all processing times in this super step:
Wherein u be this super step in all calculate nodes average handling time, N be calculate node total number, ti The processing time monitored for calculate node i in this super step;
If the coefficient of variation CV that gained is calculated in step 3-3 last time and this super step is both greater than the threshold value of user preset CVthr, then main controlled node judge that the figure computational load in each calculate node is unbalanced;Otherwise, the figure meter in each calculate node is assert Load is calculated to be balanced;If for the first time in super step, the CV for calculating gained is more than threshold value, is still migrated without vertex; When having the CV in super step twice in succession only and being both greater than threshold value, vertex migration can be just carried out;
The result of judgement is sent to all calculate nodes by step 3-4 main controlled nodes.
Further, the migration plan stage is drafted in the step 5 includes following sub-step:
Average handling time u in this super step is sent to each calculate node by step 5-1 main controlled nodes;
Each calculate nodes of step 5-2 judge it itself is to move out node i.e. processing time more than flat according to average handling time u Equal processing time still moves into node i.e. processing time less than average handling time;
If moving out node, then the side number E that its needs is moved out is calculatedout, and further according to EoutIt is definite to need what is moved out Vertex;The vertex that the vertex moved out namely is moved into, these vertex are transferred in transition process from a calculate node In another calculate node;
If moving into node, then the side number E that its needs is moved into is calculatedin;EoutAnd EinRespectively describe a calculate node The while number moved into number and most multipotency that most multipotency is moved out;
Step 5-3 calculate nodes will each need the side number i.e. E for moving out or moving intooutOr EinIt is sent to main controlled node;
The side number that step 5-4 main controlled nodes are moved out or moved into according to each calculate node needs, i.e. EoutOr Ein, determine migration Vertex correspondence moves into node;The migration vertex moved out on node has determined that, i.e. the work of step 5-2, current master control section Point is it needs to be determined which node these migration vertex should be transferred on;
The nodal information of moving into for migrating vertex correspondence is sent to corresponding node of moving out by step 5-5 main controlled nodes.
Further, node of respectively moving out in step 5-2 determines each to need to operate during the vertex moved out as follows:
The side number that each calculate node is connected according to vertex, (calculate node is to one for the vertex descending arrangement safeguarded to it A vertex is safeguarded, refers to that calculate node needs to preserve all information on the vertex, and to the top in each super step The numerical value of point is updated operation);After calculate node i receives the average handling time u that main controlled node is sent, this is calculated Its processing time t in super stepiWith the difference DELTA t=t of average handling time ui-u;When Δ t is timing, represent calculate node i's Figure computational load is higher than average load level, and the side number that node needs are moved out is Eout=(ti-μ)*EPSi, wherein EPSiFor meter Operator node i average handled side numbers per second in this super step;Calculate node can count what is handled in each super step Side number, then it is obtained with the EPS in this super step with this side number divided by processing timei
When Δ t is bears, the figure computational load of calculate node i is represented less than average load level, node needs are moved into Side number be Ein=(μ-ti)*EPSi
The side number E that node of moving out needs are moved outoutAfter determining, then the vertex the moved out node that can move out from this is needed to be tieed up It is selected in the vertex of shield according to the side number descending connected, until the side number summation for selecting vertex reaches Eout;(definite moves out Vertex is also to move into vertex, because the information on these vertex can be moved out in transition process, node, which is sent to, moves into node, and Moving on node needs the vertex moved into that need not calculate, because it is exactly the vertex of moving out on other nodes to move into vertex)
Further, main controlled node determines that operation when moving into node of migration vertex correspondence is as follows in the step 5-4:
When main controlled node receives the side number i.e. E that the needs that each calculate node sends move out or move intooutOr EinWhen, according to Corresponding EoutOr EinNumerical value sorts for all calculate nodes;
Main controlled node first by pack heaviest i.e. | Eout| the migration vertex assignment in the calculate node of numerical value maximum is to negative Carry most light i.e. | Ein| the calculate node of numerical value maximum is moved if still there is migration vertex not to be assigned in this heavy duty calculate node The ingress side number that i.e. the heavy duty calculate node is moved out temporarily also is not up to | Eout|, then by these unassigned migration tops Point is assigned to next light load calculate node;And there is extra space (each to move into node when this is gently loaded in calculate node All there are one EinValue represents that its most multipotency accommodates how many sides moved into) i.e. light load meter when accommodating more migration vertex The side number that operator node is moved into temporarily also is not up to | Ein|, then giving the migration vertex assignment in next heavy duty calculate node should Light load calculate node;
For all migrations, vertex assignment is corresponding moves into node according to preceding method for main controlled node;Due to each | Eout| be by Corresponding node of moving out calculates gained, and each | Ein| it is to calculate gained by moving into node accordingly, therefore all | Eout| summation with It is all | Ein| summation may not be equal;When | Eout| summation and | Ein| summation it is unequal when, then remaining not matched EoutOr EinIt will be ignored by main controlled node.
Further, implementing migration phase in the step 6 includes following sub-step:
Step 6-1 respectively move out node send migration vertex information move into node to corresponding;
After the completion of the migration of step 6-2 vertex, node of respectively moving out will migrate the ID on vertex and the location information i.e. migration vertex Node of moving into be sent to main controlled node;
Step 6-3 main controlled nodes summarize the location information after each migration vertex ID and migration in a table structure;The table Structure is created in first time vertex migration, and the content in updating table structure in vertex migration below;It is multiple due to having Node of moving out all migrates the vertex each safeguarded, therefore the location information on all migration vertex is required in master control section Summarized at point;
Location information table after step 6-4 main controlled nodes will summarize is sent to each calculate node;Step 6-2, step 6-3 and Step 6-4 has updated the location information on migration vertex.
Further, move out in the step 6-1 node to move into node migration vertex when with the following method:
Node move out after this super the end of the step, the ID for migrating vertex, numerical value and adjacent side table are transferred to corresponding Move into node, and by change migration vertex position information mode (node of moving out first sends the node of moving on the vertex To main controlled node, main controlled node moves into node broadcasts to all other calculate node after summarizing, then this vertex), make In next time super step the new incoming message, that is, other vertex in the vertex be sent to the message on the vertex and be directed to and move into section Point;And the incoming message that vertex receives in this super step is migrated, by node processing locality in next time super step of moving out, i.e., The message received in this super step, is not immediately sent in transition process, but after node processing of being moved out again It is sent, this is because the size of message is very big, the expense by network transmission message is huge;The new summit number obtained after processing Value is sent to by node of moving out after the completion of next super step and moves into node;The method on this migration vertex causes the incoming of vertex Message is moved out node processing locality, and updated vertex numerical value after the completion of next time super step is sent to and moves into node, Therefore need in total twice in succession super step could complete the migration on a vertex, therefore referred to as deferred migration;In transition process, hair The node on migration vertex is sent to be known as node of moving out, the node for receiving migration vertex is known as moving into node.
All things considered, method proposed by the present invention include three Main Stages, are the detection unbalanced stage respectively, draft and moving It moves planning phase and implements migration phase.The present invention technical concept be:Super step every time is monitored when figure calculating task is run In each calculate node processing time, and according to the coefficient of variation of all calculate node processing times in last time and this super step With the threshold value of user preset, to judge whether the figure computational load in each calculate node balanced;If judging result calculates negative for figure It carries unbalanced, then migrates the vertex of respective numbers between each calculate node by the way of deferred migration, it is super with balanced next time The processing time of each calculate node in step.
The above technical scheme conceived by the present invention compared with prior art, has the following advantages:
Using it is of the invention can be in equiblibrium mass distribution formula figure computing system during processing of all calculate nodes in each super step Between, so as to reduce synchronization overhead of the calculate node in each super step, shorten the run time of figure calculating task.In addition, Heavier figure computational load, therefore each calculating is assigned in the strong calculate node of processing capacity in each super step in the present invention The hardware resource of node is able to fully using to accelerate the convergence of nomography.
Description of the drawings
Fig. 1 is the structural diagram of the present invention;
Fig. 2 is the key step schematic diagram of equilibrium figures computational load of the present invention;
Fig. 3 drafts the schematic diagram for determining to move into node in the migration plan stage for the present invention;
Fig. 4 is the schematic diagram that the present invention implements deferred migration in migration phase.
Specific embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, with reference to the accompanying drawings and embodiments, it is right The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.As long as in addition, technical characteristic involved in the various embodiments of the present invention described below Conflict is not formed each other to can be combined with each other.
Some definition will be used in the embodiment of the present invention, explanation of nouns therein is as follows:
Heterogeneous server structure:The data center be made of the different server of processing capacity or hardware configuration or collection Group.
Main controlled node:In data center or cluster, it is responsible for the node of resource management and task scheduling.
Calculate node:In data center or cluster, it is responsible for the node of processing local task in addition to main controlled node.
Figure calculates:It is a kind of computing model.Object in real world and its relation are abstracted as in graph structure by it respectively Vertex and side, and using corresponding nomography on graph structure, to extract the interested the deep information of user in graph structure.
Diagram data collection:The graph structure being abstracted by the object in real world and its relation.
Nomography:It is write by developer or user with the mining algorithm of extraction figure mid-deep strata information.
Super step:Figure calculating process is typically divided into iteration several times, and an iteration is referred to as a super step.
Synchronous obstacle:It is set between adjacent step super twice there are one synchronous obstacle, is pushed up with being activated in synchronous super step every time The numerical value update of point.
Standard deviation DS:A kind of one group of data { x of measurement1, x2...xNDispersion degree parameter, calculation formula isWherein N is the total number of data item in this group of data.The size of standard deviation is counted simultaneously According to the absolute value of item and the influence of dispersion degree.
Coefficient of variation CV:A kind of one group of data { x of measurement1, x2...xNDispersion degree parameter, calculation formula isWherein u is the average value of this group of data, and N is the total number of data item in this group of data.Become The influence of dimension is eliminated for different coefficient relative standard deviation, size is only influenced by data item dispersion degree, and From the influence of data item absolute value.
It moves out node:In the migration of vertex, the calculate node on migration vertex is sent.
Move into node:In the migration of vertex, receive the calculate node on migration vertex.
Adjacent side table:One vertex is usually connected to one or more side, and adjacent side table has recorded a vertex and connected Each while and these while weights.
First, load-balancing algorithm designing scheme
In figure calculating task operational process, when unevenness occurs in once super step in the figure computational load in calculate node During weighing apparatus, most direct result is exactly the processing time difference of each calculate node.Load imbalance between description calculate node is asked Topic is, it is necessary to which parameter quantifies once the dispersion degree of processing time in super step.Most common parameter is standard deviation, Size is influenced simultaneously by the absolute value and dispersion degree of data item.However, when various nomographys are handled in once super step Between absolute value differ greatly, for processing time length nomography obtained by standard deviation it is also larger.In order to without considering one group The influence of time value absolute size and only consider its dispersion degree, the present invention choose coefficient of variation C as the quantification treatment time from The key parameter for the degree of dissipating.After once super the end of the step, the coefficient of variation of processing time is bigger, then represents this super step Middle processing time dispersion degree is higher, i.e., the figure computational load between calculate node is unbalanced more serious.Once handled in super step The coefficient of variation calculation formula of time is:
Wherein u be this super step in average handling time, N be calculate node total number, tiExist for calculate node i Processing time in this super step.To make the figure computational load in each super step between calculate node balanced, the present invention passes through The mode of vertex migration reduces the coefficient of variation of processing time in each super step.
For some slight load imbalances, the expense that vertex migration is brought is much larger than the income of load balancing.For The vertex of such no income is avoided to migrate, present invention provide that user specifies a threshold value CV before nomography is run for the algorithmthr (acquiescence can be set to 0.10), for judging whether the degree of load imbalance in each super step is acceptable beyond user Scope;If once the counted coefficient of variation is more than the threshold value (CV > CV after super the end of the stepthr), then judge that each calculate node exists Figure computational load during operation is unbalanced, it is necessary to divide again the figure computational load in calculate node after this super the end of the step Match somebody with somebody, otherwise all calculate nodes will continue to execute super step next time.Further, since some nomographys (such as signal source shortest path Algorithm) characteristic, the activation number of vertex variation in operational process in each calculate node is violent, and the coefficient of variation is caused once to surpass Increase suddenly in grade step, and recover relatively low level in super step next time.When this happens, can cause continuously surpassing Identical vertex is migrated back and forth between calculate node in grade step.To reduce the migration overhead in this kind of nomography operational process, this hair Bright regulation only when the coefficient of variation in last time and this super step is both greater than default threshold value, just performs one to calculate node Secondary vertex migration, with the processing time in balanced follow-up super step.
For this purpose, a kind of figure computational load equalization algorithm towards heterogeneous server structure provided by the present invention, main suitable For meeting hypotactic distributed figure computing system.As shown in Figure 1, each calculate node is responsible for storing the information on local vertex And opposite vertexes numerical value is updated operation, and updated vertex value is sent to other nodes in form of a message and is being pushed up Point migration phase concurrently migrates vertex information to other nodes;Main controlled node is responsible for collecting the status information of each calculate node Including the processing time in each super step, draft migration plan and notify migration plan to all calculate nodes, and be responsible for Update and summarize the location information on vertex after migration.The subject logic of load-balancing algorithm is implemented in main controlled node.
As shown in Fig. 2, the present invention is evenly distributed in the figure computational load in heterogeneous server structure, method includes following step Suddenly:
All calculate nodes of step 1 import nomography and diagram data collection;
All calculate nodes of step 2 perform the once super step of nomography;
Step 3 main controlled node judges whether the figure computational load in each calculate node is balanced;
If judging in step 4 step 3, result is load imbalance, into the migration plan stage is drafted, goes to step 5;It is no Then, 7 are gone to step, all calculate nodes enter super step next time;
Each calculate node of step 5 determines each to need the vertex migrated, and main controlled node determines moving into for these vertex correspondences Node;
All calculate nodes of step 6 by the way of deferred migration, move into corresponding on node, main by transmission vertex information Control node updates simultaneously summarize the location information after the migration of vertex;
Step 7 repeats step 2 to step 6, until nomography restrains.
A kind of figure computational load equalization algorithm towards heterogeneous server structure provided by the present invention, independently of user institute The specific nomography and diagram data collection performed, can it is any meet hypotactic distributed figure computing system (such as Giraph, PowerGraph used on).
2nd, the migration plan stage is drafted
When the coefficient of variation obtained by main controlled node calculates in super step twice in succession is both greater than default threshold value, then sentence Figure computational load on devise a stratagem operator node is unbalanced, it is necessary to be migrated to the vertex in calculate node, with balanced next super Processing time in step between calculate node.For this purpose, figure computing system, into the migration plan stage is drafted, which is done main Work is to determine that need the vertex migrated and these vertex correspondences in each calculate node moves into node.
First, the average handling time u that gained is calculated in this super step is sent to each calculate node by main controlled node.When After calculate node i receives the average handling time u that main controlled node is sent, its processing time t in this super step is calculatediWith putting down The difference DELTA t=t of equal processing timei-u;When Δ t is timing, the figure computational load of expression calculate node i is higher than average load water Flat, the side number that node needs are moved out is Eout=(ti-μ)*EPSi, wherein EPSiIt is put down for calculate node i in this super step Handled side number per second;When Δ t is bears, represent the figure computational load of calculate node i less than average load level, the section It is E that point, which needs the side number moved into,in=(μ-ti)*EPSi.The side number E that node of moving out needs are moved outoutAfter determining, then need to move out Vertex can move out from this and selected according to the side number descending connected in vertex that node is safeguarded, until selecting the side on vertex Number summation reaches Eout.Here, using in once super step each second handle side number rather than each second processing number of vertex come The throughput of calculate node is defined, is because the diagram data collection in real world obeys power-law distribution mostly, i.e., a small number of vertex connect Then most of sides in figure.The time on one vertex of processing is different with the side number that it is connected, and handles the time of a line Typically stablize, so the throughput of calculate node is defined used here as the side number of processing each second, to be saved to each calculate The throughput of point does the quantization of fair relatively.
Each calculate node will each need side number (the i.e. E for moving out or moving intooutOr Ein) it is sent to main controlled node, master control section Point is according to EoutOr EinNumerical value be all calculate nodes sequence.As shown in figure 3, node 1 of moving out | Eout| numerical value is maximum, so Its pack heaviest in this super step is, it is necessary to which the vertex number moved out is most;Similarly, node 1 is moved into | Ein| numerical value Maximum, so its most lightly loaded in this super step is, it is necessary to which the vertex number moved into is most.First by the meter of pack heaviest Migration vertex assignment on operator node (node 1 of moving out) to most lightly loaded calculate node (moving into node 1), if heavy duty Still there is migration vertex not to be assigned when moving into node in calculate node, then by these unassigned migration vertex assignments to next A light load calculate node (for example, the vertex for node 1 of moving out, which is assigned to, moves into node 1,2);On the contrary, it ought gently load calculating section When thering is the extra space more to migrate vertex on point, then by the migration vertex assignment in next heavy duty calculate node Give the light load calculate node (such as the vertex for node 2,3 of moving out is assigned to and moves into node 3).Main controlled node is according to this dress Box method moves into node for all migration vertex assignments, when all | Eout| summation with it is all | Ein| summation not wait whens (such as Then remaining not matched EoutOr EinIt will It can be ignored by main controlled node.
Finally, main controlled node will assign the result for moving into node to be sent to corresponding node of moving out, and be moved so as to complete to draft Planning phase is moved, then enters and implements migration phase.
3rd, migration phase is implemented
In migration phase is implemented, figure computing system needs to complete two work, that is, node of moving out migration vertex information arrives It is corresponding to move on node and main controlled node updates and summarizes the location information on vertex after migration.Due to each migration vertex all Have and explicitly move into node, node of moving out can move into node to one or more simultaneously and send vertex information.For most of For nomography, the information on vertex can be divided into two classes:It is size constancy and change in size.ID, numerical value and the adjoining on vertex Side table is typically operationally constant, such as can use an INTEGER representation vertex ID, and number of vertex is represented with a floating type Value.And due to activating the variation of vertex number, the message number that a vertex receives in each super step also changes therewith. In addition, the side number of a vertex connection can be very big, that is to say, that the message number that the vertex receives in once super step can It can be very much.So the incoming message on vertex enormous size for other types of vertex information, vertex message is passed through It is consumption substantial amounts of time and resource that network transmits between calculate node, and will seriously affect the time that nomography is run.
For vertex is avoided to transmit the huge expense of vertex message in migrating, the present invention migrates top by the way of deferred migration Point information.As shown in figure 4, load imbalance occurs in super step 1 for calculate node, main controlled node detects that this is unbalanced and intends Migration plan is determined.In synchronous obstacle 1, node of moving out sends out the relatively small vertex ID of size, vertex message and adjacent side table It gives and moves into node, and relatively large sized incoming message is retained in and moves out on node, at the same time, migrates the position on vertex Confidence breath becomes moving into node (location information is broadcast to other calculate nodes by main controlled node).In super step 2, due to The location information for migrating vertex changes, and the incoming message on all vertex, which is directed to, moves on node, and the vertex is super The incoming message that receives then is moved out node processing locality in step 1, and generates new vertex value.In synchronous obstacle 2, section of moving out The new summit value being calculated is sent to by point moves into node.Super step 3 beginning before, the vertex complete from move out node to Move into the migration of node.Deferred migration causes the incoming message on vertex to be moved out after node processing locality, in super step next time Just be sent to after finishing and move into node, thus need in total twice in succession super step could complete the migration on a vertex.Together When, to ensure the uniformity of vertex numerical value, present invention provide that after the deferred migration on vertex is fully completed there are one only, the vertex is It can be scheduled for next deferred migration.
Location information after the migration of vertex should be updated in a timely manner, and be sent with the incoming message for ensureing the vertex after migrating Onto correct calculate node.To reduce the expense of update vertex position information, present invention provide that main controlled node is updated and summarized The location information on all vertex after migration.It is sent in vertex ID, vertex numerical value and adjacent side table after moving into node, section of moving out Point sends the ID on migration vertex to main controlled node and corresponding moves into node.Main controlled node summarizes each migration in a table structure Location information after the ID on vertex and migration, and all complete on all vertex the table structure to be sent to all calculate after migration and save Point, each calculate node record migration newest location information in vertex.So far, each calculate node completes the migration on vertex.
4th, feature
The present invention provides a kind of figure computational load equalization algorithms towards heterogeneous server structure.Include altogether in the algorithm Three Main Stages:Detect the unbalanced stage, main controlled node is according to the changes of all calculate node processing times in this super step The threshold value of different coefficient and user preset, to judge whether the figure computational load in calculate node is balanced;The migration plan stage is drafted, Each calculate node determines each to need the vertex migrated, and what main controlled node determined these vertex correspondences moves into node;Implement migration Stage, all calculate nodes are concurrently transmitted vertex information by the way of deferred migration and are moved into corresponding on node, master control Node updates simultaneously summarize the location information after the migration of vertex.
Compared with existing similar inventions, the algorithm is negative as quantifying using the coefficient of variation of processing time in once super step Unbalanced key parameter is carried, true point of figure computational load between calculate node can be accurately reflected in heterogeneous server structure Cloth;Vertex migration, Ke Yiyou are just performed when the coefficient of variation of processing time in super step twice in succession is more than default threshold value Effect ground reduces migration overhead when performing some nomographys;Vertex information is migrated between calculate node by the way of deferred migration, The time needed for migration and network bandwidth can greatly be reduced;The position after the migration of vertex is updated and summarizes using main controlled node Information can reduce the expense of more new location information.
Generally speaking, a kind of figure computational load equalization algorithm towards heterogeneous server structure provided by the present invention, energy The processing time of each calculate node in each super step is enough adaptively equalized, and is reduced as much as possible in the transition process of vertex All kinds of expenses, so as to which the run time of figure calculating task be greatly reduced.In addition, in figure computational load provided by the present invention In equalization algorithm, heavier figure computational load is assigned in the strong calculate node of processing capacity in each super step, therefore each The hardware resource of calculate node is fully utilized to accelerate the convergence of nomography.
As it will be easily appreciated by one skilled in the art that the foregoing is merely illustrative of the preferred embodiments of the present invention, not to The limitation present invention, all any modification, equivalent and improvement made within the spirit and principles of the invention etc., should all include Within protection scope of the present invention.

Claims (8)

1. a kind of figure computational load equalization methods towards heterogeneous server structure, which is characterized in that including such as next stage:
Detect the unbalanced stage:When figure calculating task is run, the place of each calculate node in each super step of main controlled node monitoring The time is managed, and according to the coefficient of variation of all calculate node processing times and default threshold value in this super step, judges each meter Whether the figure computational load on operator node is balanced;The coefficient of variation is the parameter of one group of data value dispersion degree of reflection;
Draft the migration plan stage:Each calculate node determines each to need the vertex migrated, and main controlled node determines these vertex pair That answers moves into node;
Implement migration phase:All nodes of moving out transmit vertex information by the way of deferred migration moves into node to corresponding On, the location information after the migration of main controlled node more new summit.
2. the method as described in claim 1, which is characterized in that comprise the following steps:
All calculate nodes of step 1 import nomography and diagram data collection;
All calculate nodes of step 2 perform the once super step of nomography;
Step 3 main controlled node judges whether the figure computational load in each calculate node is balanced;
If judging in step 4 step 3, result is load imbalance, into the migration plan stage is drafted, goes to step 5;Otherwise, turn Step 7, all calculate nodes enter super step next time;
Each calculate node of step 5 determines each to need the vertex migrated, and what main controlled node determined these vertex correspondences moves into node;
All calculate nodes of step 6 are by the way of deferred migration, and transmission vertex information is moved into corresponding on node, master control section Point updates and summarizes the location information after the migration of vertex;
Step 7 repeats step 2 to step 6, until nomography restrains.
3. method as claimed in claim 2, which is characterized in that detect whether that balance stage includes following sub-step in step 3:
The processing time monitored in this super step is sent to main controlled node by each calculate nodes of step 3-1;
Step 3-2 main controlled nodes calculate the coefficient of variation CV of all processing times in this super step:
<mrow> <mi>C</mi> <mi>V</mi> <mo>=</mo> <msqrt> <mrow> <mfrac> <mn>1</mn> <mi>N</mi> </mfrac> <msubsup> <mi>&amp;Sigma;</mi> <mrow> <mi>i</mi> <mo>=</mo> <mn>1</mn> </mrow> <mi>N</mi> </msubsup> <msup> <mrow> <mo>(</mo> <mfrac> <msub> <mi>t</mi> <mi>i</mi> </msub> <mi>u</mi> </mfrac> <mo>-</mo> <mn>1</mn> <mo>)</mo> </mrow> <mn>2</mn> </msup> </mrow> </msqrt> </mrow>
Wherein u be this super step in all calculate nodes average handling time, N be calculate node total number, tiTo calculate The processing time that node i monitors in this super step;
If the coefficient of variation CV that gained is calculated in step 3-3 last time and this super step is both greater than default another threshold value CVthr, Then main controlled node judges that the figure computational load in each calculate node is unbalanced;Otherwise, it is negative to assert that the figure in each calculate node calculates It carries to be balanced;
The result of judgement is sent to all calculate nodes by step 3-4 main controlled nodes.
4. method as claimed in claim 2, which is characterized in that drafted in step 5 the migration plan stage include following sub-step:
Average handling time u in this super step is sent to each calculate node by step 5-1 main controlled nodes;
Each calculate nodes of step 5-2 judge itself to move out node or move into node according to average handling time u
If moving out node, then the side number E that its needs is moved out is calculatedout, and further according to EoutThe definite vertex for needing to move out;
If moving into node, then the side number E that its needs is moved into is calculatedin
Step 5-3 calculate nodes each will need the side number moved out or moved into be sent to main controlled node;
The side number that step 5-4 main controlled nodes are moved out or moved into according to each calculate node needs, determines moving into for migration vertex correspondence Node;
The nodal information of moving into for migrating vertex correspondence is sent to corresponding node of moving out by step 5-5 main controlled nodes.
5. method as claimed in claim 4, which is characterized in that node of respectively moving out in step 5-2 determines each to need what is moved out Operation is as follows during vertex:
The side number that each calculate node is connected according to vertex, the vertex descending arrangement safeguarded to it;When calculate node i is received After the average handling time u that main controlled node is sent, its processing time t in this super step is calculatediWith the difference of average handling time u It is worth Δ t=ti-u;When Δ t is timing, higher than average load level, which needs the figure computational load of expression calculate node i The side number moved out is Eout=(ti-μ)*EPSi, wherein EPSiIt is average per second handled in this super step for calculate node i Side number;
When Δ t is bears, represent the figure computational load of calculate node i less than the side that average load level, node needs are moved into Number is Ein=(μ-ti)*EPSi
The side number E that node of moving out needs are moved outoutAfter determining, then need the vertex moved out that can move out what node was safeguarded from this It is selected in vertex according to the side number descending connected, until the side number summation for selecting vertex reaches Eout
6. method as claimed in claim 4, which is characterized in that main controlled node determines moving for migration vertex correspondence in step 5-4 Operation is as follows during ingress:
When main controlled node receives the side number that the needs that each calculate node sends are moved out or moved into, according to corresponding EoutOr Ein Numerical value sorts for all calculate nodes;
Main controlled node will migrate calculate node of the vertex assignment to most lightly loaded in the calculate node of pack heaviest first, if this Still there is migration vertex not to be assigned in heavy duty calculate node and move into node, then by these unassigned migration vertex assignments To next light load calculate node;And there is extra space more to migrate vertex when this is gently loaded in calculate node When, then give the migration vertex assignment in next heavy duty calculate node to the light load calculate node;
For all migrations, vertex assignment is corresponding moves into node according to preceding method for main controlled node;Due to each | Eout| it is by corresponding Node of moving out calculate gained, it is and each | Ein| it is to calculate gained by moving into node accordingly, therefore all | Eout| summation with it is all |Ein| summation may not be equal;When | Eout| summation and | Ein| summation it is unequal when, then remaining not matched EoutOr EinIt will Ignored by main controlled node.
7. method as claimed in claim 2, which is characterized in that implementing migration phase in step 6 includes following sub-step:
Step 6-1 respectively move out node send migration vertex information move into node to corresponding;
After the completion of the migration of step 6-2 vertex, the ID for migrating vertex and location information are sent to main controlled node by node of respectively moving out;
Step 6-3 main controlled nodes summarize the location information after each migration vertex ID and migration in a table structure;
Location information table after step 6-4 main controlled nodes will summarize is sent to each calculate node.
8. the method for claim 7, which is characterized in that node of moving out in step 6-1 is to when moving into node migration vertex With the following method:
Node move out after this super the end of the step, the ID for migrating vertex, numerical value and adjacent side table are transferred to corresponding move into Node, and by way of changing and migrating vertex position information so that the new incoming message quilt in the vertex in next super step It is oriented to moving into node;And the incoming message that vertex receives in this super step is migrated, by node of moving out in super step next time The new summit numerical value obtained after middle processing locality processing is sent to after the completion of next super step by node of moving out moves into node.
CN201711274503.8A 2017-12-06 2017-12-06 Graph computation load balancing method for heterogeneous server structure Active CN108089918B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711274503.8A CN108089918B (en) 2017-12-06 2017-12-06 Graph computation load balancing method for heterogeneous server structure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711274503.8A CN108089918B (en) 2017-12-06 2017-12-06 Graph computation load balancing method for heterogeneous server structure

Publications (2)

Publication Number Publication Date
CN108089918A true CN108089918A (en) 2018-05-29
CN108089918B CN108089918B (en) 2020-07-14

Family

ID=62174116

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711274503.8A Active CN108089918B (en) 2017-12-06 2017-12-06 Graph computation load balancing method for heterogeneous server structure

Country Status (1)

Country Link
CN (1) CN108089918B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110489229A (en) * 2019-07-17 2019-11-22 长沙学院 A kind of multiple target method for scheduling task and system
CN110515729A (en) * 2019-08-19 2019-11-29 中国人民解放军国防科技大学 Graph computing node vector load balancing method and device based on graph processor
CN110532091A (en) * 2019-08-19 2019-12-03 中国人民解放军国防科技大学 Graph computation edge vector load balancing method and device based on graph processor
CN111459914A (en) * 2020-03-31 2020-07-28 北京金山云网络技术有限公司 Distributed graph database optimization method and device and electronic equipment
CN112925637A (en) * 2019-12-05 2021-06-08 财团法人资讯工业策进会 Load balancing device and method for edge operation network

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102244685A (en) * 2011-08-11 2011-11-16 中国科学院软件研究所 Distributed type dynamic cache expanding method and system supporting load balancing
CN103081416A (en) * 2010-09-08 2013-05-01 瑞典爱立信有限公司 Automated traffic engineering for multi-protocol label switching (MPLS) with link utilization as feedback into the tie-breaking mechanism
CN103546530A (en) * 2013-06-20 2014-01-29 江苏大学 Method and system for balancing loads on peer-to-peer network nodes on basis of group resource management
US20140072117A1 (en) * 2012-09-07 2014-03-13 Vitaly Y. Barinov Method of Distributed Aggregation in a Call Center
CN104270402A (en) * 2014-08-25 2015-01-07 浪潮电子信息产业股份有限公司 Adaptive data loading method for heterogeneous cluster storage
US20150095348A1 (en) * 2013-10-01 2015-04-02 Facebook, Inc. Systems and methods for dynamic mapping for locality and balance

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103081416A (en) * 2010-09-08 2013-05-01 瑞典爱立信有限公司 Automated traffic engineering for multi-protocol label switching (MPLS) with link utilization as feedback into the tie-breaking mechanism
CN102244685A (en) * 2011-08-11 2011-11-16 中国科学院软件研究所 Distributed type dynamic cache expanding method and system supporting load balancing
US20140072117A1 (en) * 2012-09-07 2014-03-13 Vitaly Y. Barinov Method of Distributed Aggregation in a Call Center
CN103546530A (en) * 2013-06-20 2014-01-29 江苏大学 Method and system for balancing loads on peer-to-peer network nodes on basis of group resource management
US20150095348A1 (en) * 2013-10-01 2015-04-02 Facebook, Inc. Systems and methods for dynamic mapping for locality and balance
CN104270402A (en) * 2014-08-25 2015-01-07 浪潮电子信息产业股份有限公司 Adaptive data loading method for heterogeneous cluster storage

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110489229A (en) * 2019-07-17 2019-11-22 长沙学院 A kind of multiple target method for scheduling task and system
CN110489229B (en) * 2019-07-17 2020-06-30 长沙学院 Multi-target task scheduling method and system
CN110515729A (en) * 2019-08-19 2019-11-29 中国人民解放军国防科技大学 Graph computing node vector load balancing method and device based on graph processor
CN110532091A (en) * 2019-08-19 2019-12-03 中国人民解放军国防科技大学 Graph computation edge vector load balancing method and device based on graph processor
CN110532091B (en) * 2019-08-19 2022-02-22 中国人民解放军国防科技大学 Graph computation edge vector load balancing method and device based on graph processor
CN110515729B (en) * 2019-08-19 2022-05-24 中国人民解放军国防科技大学 Graph computing node vector load balancing method and device based on graph processor
CN112925637A (en) * 2019-12-05 2021-06-08 财团法人资讯工业策进会 Load balancing device and method for edge operation network
CN111459914A (en) * 2020-03-31 2020-07-28 北京金山云网络技术有限公司 Distributed graph database optimization method and device and electronic equipment
WO2021197042A1 (en) * 2020-03-31 2021-10-07 北京金山云网络技术有限公司 Method and apparatus for optimizing distributed graph database, and electronic device
CN111459914B (en) * 2020-03-31 2023-09-05 北京金山云网络技术有限公司 Optimization method and device of distributed graph database and electronic equipment

Also Published As

Publication number Publication date
CN108089918B (en) 2020-07-14

Similar Documents

Publication Publication Date Title
CN108089918A (en) A kind of figure computational load equalization methods towards heterogeneous server structure
CN108829494B (en) Container cloud platform intelligent resource optimization method based on load prediction
CN102185779B (en) Method and device for realizing data center resource load balance in proportion to comprehensive allocation capability
CN105550323B (en) Load balance prediction method and prediction analyzer for distributed database
Li et al. Map-Balance-Reduce: An improved parallel programming model for load balancing of MapReduce
CN103338228B (en) Cloud computing load balancing dispatching algorithms based on double weighting Smallest connection algorithms
CN104615498B (en) A kind of group system dynamic load balancing method of task based access control migration
CN103401939A (en) Load balancing method adopting mixing scheduling strategy
CN104375897B (en) Cloud computing resource scheduling method based on the unbalanced degree of minimum relative load
CN106528270A (en) Automatic migration method and system of virtual machine based on OpenStack cloud platform
CN110347498B (en) Load dynamic migration method in container and virtual machine mixed cloud environment
CN110231976A (en) A kind of edge calculations platform container dispositions method and system based on load estimation
CN106027410A (en) Method and device for load balancing of controller
CN104731528B (en) A kind of construction method and system of cloud computing block storage service
CN110417903A (en) A kind of information processing method and system based on cloud computing
CN104216784A (en) Hotspot balance control method and related device
CN101753359B (en) Method and system for dynamically distributing components
CN106572170A (en) Controller and dynamic load balancing method under SDN hierarchical multiple controllers
CN105491150A (en) Load balance processing method based on time sequence and system
CN105227601A (en) Data processing method in stream processing system, device and system
CN109067583A (en) A kind of resource prediction method and system based on edge calculations
CN109062668A (en) A kind of virtual network function moving method of the multipriority based on 5G access network
CN106250233A (en) MapReduce performance optimization system and optimization method
CN105893155B (en) Virtual machine control method for equalizing load and device
CN109976879B (en) Cloud computing virtual machine placement method based on resource usage curve complementation

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