CN111400026B - Distributed load balancing method based on master-slave backup technology - Google Patents

Distributed load balancing method based on master-slave backup technology Download PDF

Info

Publication number
CN111400026B
CN111400026B CN201911119106.2A CN201911119106A CN111400026B CN 111400026 B CN111400026 B CN 111400026B CN 201911119106 A CN201911119106 A CN 201911119106A CN 111400026 B CN111400026 B CN 111400026B
Authority
CN
China
Prior art keywords
task
node
tasks
nodes
master
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911119106.2A
Other languages
Chinese (zh)
Other versions
CN111400026A (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.)
Hohai University HHU
Original Assignee
Hohai University HHU
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 Hohai University HHU filed Critical Hohai University HHU
Priority to CN201911119106.2A priority Critical patent/CN111400026B/en
Publication of CN111400026A publication Critical patent/CN111400026A/en
Application granted granted Critical
Publication of CN111400026B publication Critical patent/CN111400026B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/11Complex mathematical operations for solving equations, e.g. nonlinear equations, general mathematical optimization problems
    • G06F17/12Simultaneous equations, e.g. systems of linear equations

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Mathematical Analysis (AREA)
  • Computational Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Optimization (AREA)
  • Software Systems (AREA)
  • Pure & Applied Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Quality & Reliability (AREA)
  • Operations Research (AREA)
  • Algebra (AREA)
  • Databases & Information Systems (AREA)
  • Multi Processors (AREA)

Abstract

The invention discloses a distributed load balancing method of a master-slave backup technology, which comprises the following steps: s1, dividing a node set; s2, dividing a task set; s3, distributing subtasks; s4, recording the execution time; s5, calculating execution efficiency; s6, solving a distribution scheme; by modeling the task allocation problem as a linear programming problem, and by analyzing the abstract model, the solution of the task allocation feasible domain is realized. Meanwhile, in combination with practical problems, a task allocation and dynamic adjustment method with backup is provided, and the method aims to realize task allocation according to efficiency on a distributed cluster with backup and reduce apparent performance relevance among nodes as much as possible. The method and the device can avoid increasing the extra burden of the backup node as much as possible when the task amount of the main node is increased, and further can relieve the influence of performance difference between the nodes on the whole task running time.

Description

Distributed load balancing method based on master-slave backup technology
Technical Field
The invention belongs to the field of computer communication, and particularly relates to a distributed load balancing method based on a master-slave backup technology.
Background
In distributed systems, the key way to tolerate a process failure is to put multiple identical processes into a group, and when a message is sent to the group itself for processing, all members accept and process it. In this way, if one process in the group fails, some other process may take over for it. Under the condition of needing fault tolerance, a process copying method is usually used, and when a main process crashes, a backup process replaces the task of the current main process; in the case of needing to improve the performance, the main process is usually copied by using copy and cache extension and redundancy coding to form a process group, tasks can be recovered more quickly due to the existence of redundancy (task redundancy part based on MDS codes is recovered quickly), and the communication quantity required by the tasks can be reduced (communication load based on CDC coding is reduced).
In a conventional process backup scheme, a main process running on a main node is completely copied to form a backup process, and the backup process is placed on a backup node. Because the nodes have a full backup relationship, strong consistency needs to be ensured between the main node and the backup nodes, and the task quantity of the main node is increased while the task quantity of the backup nodes is correspondingly increased. When the performance of the master node and the backup node in the group is different, increasing the task load of the master node may cause a non-negligible running time difference between the master node and the backup node, which affects the real-time performance of backup.
Disclosure of Invention
The invention aims to: in order to model the task allocation problem into a linear programming problem, the solution of a task allocation feasible domain is realized through the analysis of an abstract model, and meanwhile, a task allocation and dynamic adjustment method with backup is provided by combining with an actual problem.
The technical scheme is as follows: the invention provides a distributed load balancing method based on a master-slave backup technology, which comprises the following specific steps:
(1) Dividing a node set according to the constructed node distributed cluster;
(2) Running a task for setting a backup level on a cluster, and dividing all tasks in the same batch into task sets;
(3) Distributing tasks contained in the task set to the corresponding node set according to the node set and the task set obtained in the steps (1) and (2);
(4) After all the nodes finish the received tasks, collecting and recording the execution time;
(5) Acquiring the calculation efficiency of each node, and normalizing the calculation execution efficiency;
(6) And establishing an equation set through known constants, converting the deformation into a linear programming problem, and further solving the distribution scheme.
Further, the method for partitioning a node set in step (1) includes:
(1.1) construction of an n-node scoreDistributed cluster is
Figure BDA0002274924800000021
(1.2) arranging and combining n nodes, and taking any r nodes to form a group of subsets
Figure BDA0002274924800000022
All possible combinations
Figure BDA0002274924800000023
Composition set
Figure BDA0002274924800000024
Collection
Figure BDA0002274924800000025
Is provided with
Figure BDA0002274924800000026
The number of the elements is one,
Figure BDA0002274924800000027
initialization
Figure BDA0002274924800000028
Further, the method for dividing the task set in step (2) includes:
(2.1) running F tasks with equal task quantity on the cluster constructed in the step (1), and setting a backup level as r;
(2.2) dividing the whole task set F into small batches, performing task allocation and operation statistics once in each batch, recording the system operation time period as t, and recording the batches as F j Each batch F j The calculated time of (d) is recorded as Δ t; each batch F j Divided into smaller sets of small tasks, denoted
Figure BDA0002274924800000029
Figure BDA00022749248000000210
The size of (A) is recorded as
Figure BDA00022749248000000211
(2.3) all tasks F of the same batch j Division into
Figure BDA00022749248000000212
A set of tasks, at time t, in proportion
Figure BDA00022749248000000213
Batch dividing task F j Is composed of
Figure BDA00022749248000000214
A task set
Figure BDA00022749248000000215
Collection
Figure BDA00022749248000000216
And
Figure BDA00022749248000000217
like, set
Figure BDA00022749248000000218
Also have
Figure BDA00022749248000000219
And (4) each element.
Further, the method for distributing subtasks in step (3) includes:
(3.1) according to the steps (1) and (2), two genes are obtained
Figure BDA00022749248000000220
Set of individual elements
Figure BDA00022749248000000221
And
Figure BDA00022749248000000222
taking elements from two collections at a time
Figure BDA00022749248000000223
And
Figure BDA00022749248000000224
wherein
Figure BDA00022749248000000225
Is a set of tasks that is to be executed,
Figure BDA00022749248000000226
is a set of nodes;
(3.2) sequentially subjecting
Figure BDA00022749248000000227
The contained task is sent to
Figure BDA00022749248000000228
Repeating the above process on the represented nodes until each task set
Figure BDA00022749248000000229
All the tasks in (1) are sent to the corresponding
Figure BDA00022749248000000230
On all nodes in the node; the number of the tasks to be processed existing on each node is the same
Figure BDA00022749248000000231
Each task set is copied and sent to r different nodes.
Further, the step (4) of recording the execution time process further includes:
and (4.1) waiting for all the nodes to complete the received tasks, and executing redundancy check or other tasks. Collecting each node N q Is recorded as Δ t q
(4.2) recording the current time as t, node N q The current computational efficiency of is noted as λ q (t) sectionPoint N q Task set owned by
Figure BDA00022749248000000232
The size of (A) is recorded as
Figure BDA00022749248000000233
And (4.3) calculating by adopting the formula (1).
Figure BDA00022749248000000234
Each node independently calculates the calculation efficiency lambda of the node q (t) and sends it to all other nodes.
Further, the method for calculating the execution efficiency in the step (5) comprises the following steps:
(5.1) obtaining all lambda of each node q (t) using equation (2) for λ q (t) performing normalization;
Figure BDA0002274924800000031
definition of
Figure BDA0002274924800000032
And e (t):
Figure BDA0002274924800000033
e(t)=(e 0 (t),e 1 (t),…,e n-1 (t));
(5.2) recording the distribution matrix as
Figure BDA0002274924800000034
Let A be the coefficient matrix and,
Figure BDA0002274924800000035
as variables, e (t) is a constant term, and a non-homogeneous linear equation system (3) can be obtained.
Figure BDA0002274924800000036
Wherein, the row mark of the distribution matrix represents the node subscript, the column mark represents the task set subscript, and the element a q,i =1 representing node q owning task set i, element a q,i =0 representing node q not owning task set i
Further, the solving of the allocation scheme in the step (6) specifically includes:
(7.1) when the number of rows is equal to the number of columns,
Figure BDA0002274924800000037
the system of equations has a unique solution
Figure BDA0002274924800000038
(7.2) when the number of rows in the system of equations is greater than the number of columns,
Figure BDA0002274924800000039
the equation system has no unique solution and can be transformed into a linear programming problem, and the process is as follows:
(7.2.1) first define the form of matrix A, the left half of which is
Figure BDA00022749248000000310
The right half part is
Figure BDA00022749248000000311
Namely:
Figure BDA00022749248000000312
definition of the same principles
Figure BDA00022749248000000313
The upper half part of (A) is
Figure BDA00022749248000000314
The lower half part is
Figure BDA00022749248000000315
The above equation set is rewritten as (equation 4):
Figure BDA00022749248000000316
solving to obtain:
Figure BDA00022749248000000317
if it is
Figure BDA0002274924800000041
Is greater than 0, is taken
Figure BDA0002274924800000042
As an argument, it is converted into a linear programming problem, as in equation (6), where
Figure BDA0002274924800000043
Is a vector
Figure BDA0002274924800000044
The ith element of (c):
Figure BDA0002274924800000045
Figure BDA0002274924800000046
to obtain a solution
Figure BDA0002274924800000047
(7.2.2) vector
Figure BDA0002274924800000048
Each obtained in ZhongdeAn element
Figure BDA0002274924800000049
Figure BDA00022749248000000410
Corresponding to the ratio of a task set to the total number of tasks, vector
Figure BDA00022749248000000411
The corresponding set of values can be used as a set of allocation schemes. Divide each batch of tasks F by a ratio using the allocation scheme j And (5) letting t = t +1, entering the next time step, executing the step (2), and repeating the task allocation and the performance estimation calculation until all the tasks are executed.
Has the beneficial effects that: compared with the prior art, the invention has the remarkable advantages that: (1) The method can realize task allocation according to efficiency on the backup distributed cluster, and simultaneously reduce apparent performance relevance among nodes as much as possible; (2) The method and the device can avoid increasing the extra burden of the backup node as much as possible when the task amount of the main node is increased, and further can relieve the influence of performance difference between the nodes on the whole task running time.
Drawings
Fig. 1 is a flowchart of a distributed load balancing method based on a master-slave backup technology;
FIG. 2 may be a domain sample.
The specific implementation mode is as follows:
the following description will explain embodiments of the present invention by referring to the drawings.
Example 1 is specifically described as figure 1: setting a distributed cluster with 3 nodes
Figure BDA00022749248000000412
Figure BDA00022749248000000413
If it is to be at
Figure BDA00022749248000000414
The above 4 times of loop calculation are performed, and tasks with 120 equal task quantities are performed at a time (the tasks have no relevance, can be performed out of order and do not influence each other). The number r =2 of redundant backups of each task on the present cluster is set (i.e., each task is to be executed twice at the same time). Embodiments of the method according to the above steps will be described below.
Step 1: arranging and combining the 3 nodes to obtain a combined result
Figure BDA00022749248000000415
Figure BDA00022749248000000416
Initializing per-batch task set size
Figure BDA00022749248000000417
And 2, step: according to the size of each batch of task sets
Figure BDA00022749248000000418
Dividing the tasks in each batch of circulation, and dividing a batch of 120 subtasks into three sets
Figure BDA00022749248000000419
And is
Figure BDA00022749248000000420
And step 3: according to steps 1 and 2, two sets of 3 elements are obtained
Figure BDA00022749248000000421
And
Figure BDA00022749248000000422
taking elements from two collections at a time
Figure BDA0002274924800000051
And
Figure BDA0002274924800000052
wherein
Figure BDA0002274924800000053
Is a set of tasks that is to be executed,
Figure BDA0002274924800000054
is a collection of a set of nodes. In turn will
Figure BDA0002274924800000055
The contained task is sent to
Figure BDA0002274924800000056
On the node of the representation, i.e. each subset
Figure BDA0002274924800000057
All nodes in the network receive the same task set
Figure BDA0002274924800000058
That is to say, the
Figure BDA0002274924800000059
Send to node { N 0 ,N 1 Will be
Figure BDA00022749248000000510
To a node N 0 ,N 2 Will be
Figure BDA00022749248000000511
To a node N 1 ,N 2 }. At this time, the number of the tasks to be processed existing on each node is μ =2 in total, each task set is copied and sent to 2 different nodes, and then the step 4 is performed.
And 4, step 4: and waiting for all the nodes to complete the received tasks. Each node N q And independently recording the computing efficiency of all the subtasks and sending the computing efficiency to all other nodes in the cluster. With node N 0 For example, the total running time is recorded as Δ t 0 At the current moment t, the node N is connected 0 Is provided withTask set of { P } 1 ,P 2 The size of the symbol is recorded as
Figure BDA00022749248000000512
Calculating lambda 0 (t)。
Figure BDA00022749248000000513
And sends λ 0 (t) to the node N 1 ,N 2 . Proceed to step 5.
And 5: at each node N q The following operations are performed: obtaining all λ from other nodes q (t) for λ q (t) normalizing to obtain
Figure BDA00022749248000000514
Definition of
Figure BDA00022749248000000515
And e (t) is of the form:
Figure BDA00022749248000000516
Figure BDA00022749248000000517
e(t)=(e 0 (t),e 1 (t),e 2 (t)). A non-homogeneous system of linear equations can be obtained:
Figure BDA00022749248000000518
wherein:
Figure BDA00022749248000000519
step 6: solving a non-homogeneous system of linear equations
Figure BDA00022749248000000520
And as a task allocation scheme of the next iteration, continuing to execute the step 2 until the iteration of all batches is completed.
Suppose that in an iteration, node N 0 ,N 1 ,N 2 Are respectively delta t 0 =16.7secs,Δt 1 =11.1secs,Δt 2 =14.3secs. The calculation efficiency is obtained as lambda 0 (t)=0.0399,λ 1 (t)=0.0600,λ 2 (t) =0.0466, and after normalization e can be obtained 0 (t)=0.545,e 1 (t)=0.818,e 2 (t) =0.636 the equation representation of the above-described heterogeneous linear system of equations can be written as:
Figure BDA0002274924800000061
it can be solved that:
Figure BDA0002274924800000062
then the next time a task is divided, the size of each of its subtask sets
Figure BDA0002274924800000063
Figure BDA0002274924800000064
The total number of tasks at each node becomes 66,98,76, which can be considered to achieve approximately maximum resource utilization, corresponding to its computed performance estimate of 0.0399,0.0600, 0.0466.
Example 2: setting a distributed cluster with 4 nodes
Figure BDA0002274924800000065
If it is to be at
Figure BDA0002274924800000066
Execute 4 loop calculations, 120 each timeTasks with equal task amount (tasks have no relevance, can be executed out of order and do not influence each other). The number r =2 of redundant backups of each task on the present cluster is set (i.e., each task is to be executed twice at the same time). Embodiments of the method according to the above steps will be described below.
Step 1: 4 nodes are arranged and combined, and the total number is
Figure BDA0002274924800000067
Species combination scheme, denoted D 1 ,D 2 ,…,D 6 。D 1 ={N 1 ,N 2 },D 2 ={N 1 ,N 3 },…,D 6 ={N 3 ,N 4 }. The combined results are recorded as
Figure BDA0002274924800000068
Figure BDA0002274924800000069
Initialization
Figure BDA00022749248000000610
Step 2: according to the size of each batch of task sets
Figure BDA00022749248000000611
Dividing the tasks of each batch of circulation, then a batch of 120 sub-tasks will be divided into 6 sets
Figure BDA00022749248000000612
And is
Figure BDA00022749248000000613
And step 3: according to steps 1 and 2, two sets of 6 elements are obtained
Figure BDA00022749248000000614
And
Figure BDA00022749248000000615
taking elements from two collections at a time
Figure BDA00022749248000000616
And
Figure BDA00022749248000000617
wherein
Figure BDA00022749248000000618
Is a set of tasks that is to be executed,
Figure BDA00022749248000000619
is a collection of nodes. In turn will
Figure BDA00022749248000000620
The contained task is sent to
Figure BDA00022749248000000621
On the node of the representation, i.e. each subset
Figure BDA00022749248000000622
All nodes in the network receive the same task set
Figure BDA00022749248000000623
That is to say that
Figure BDA00022749248000000624
To a node N 0 ,N 1 Will be
Figure BDA00022749248000000625
To a node N 0 ,N 2 Will be
Figure BDA00022749248000000626
Send to node { N 0 ,N 3 And so on. At this time, the number of tasks to be processed existing on each node is μ =3 in total, and each task set is copied and sent to 2 different nodes, and then the process proceeds to step 4.
And 4, step 4: waiting for all nodes to complete their received tasks. Each node N q And independently recording the computing efficiency of all the subtasks and sending the computing efficiency to all other nodes in the cluster. With node N 0 For example, the total operating time is denoted as Δ t 0 When the current time is t, connecting the node N 0 Task set P owned by 1 ,P 2 ,P 3 The size of the symbol is recorded as
Figure BDA0002274924800000071
Calculating lambda 0 (t)。
Figure BDA0002274924800000072
And transmit lambda 0 (t) to node N 1 ,N 2 ,N 3 . Proceed to step 5.
And 5: at each node N q The following operations are performed: obtaining all λ from other nodes q (t), for λ q (t) normalizing to obtain
Figure BDA0002274924800000073
Definition of
Figure BDA0002274924800000074
And e (t) is of the form:
Figure BDA0002274924800000075
e(t)=(e 0 (t),e 1 (t),...,e 5 (t))。
a non-homogeneous system of linear equations can be obtained:
Figure BDA0002274924800000076
wherein:
Figure BDA0002274924800000077
step 6: the sparse matrix of the non-homogeneous linear equation set is not a non-singular matrix, the non-homogeneous linear equation set cannot be solved, and the non-homogeneous linear equation set can be transformed into a linear programming problem, and the process is as follows:
firstly, the matrix A can be written into a form of splicing a square matrix and a common matrix, and the left half part of the matrix A is called A l And the right half is A r Namely:
Figure BDA0002274924800000081
same scale
Figure BDA0002274924800000082
The upper half of (A) is
Figure BDA0002274924800000083
The lower half part is
Figure BDA0002274924800000084
The above equation set can be rewritten as (4):
Figure BDA0002274924800000085
it can be solved that:
Figure BDA0002274924800000086
order to
Figure BDA0002274924800000087
Is greater than 0, is taken
Figure BDA0002274924800000088
As an argument, it can be converted into a linear programming problem, as in equation (6).
Figure BDA0002274924800000089
Figure BDA00022749248000000810
To obtain
Figure BDA00022749248000000811
Then, the formula (6) is substituted to solve
Figure BDA00022749248000000812
To obtain
Figure BDA00022749248000000813
(Vector)
Figure BDA00022749248000000814
Get each element
Figure BDA00022749248000000815
Figure BDA00022749248000000816
Corresponding to the proportion of a task set to the total number of tasks, then vector
Figure BDA00022749248000000817
The corresponding set of values can be used as a set of allocation schemes. Divide each batch of tasks F by a ratio using the allocation scheme j And (3) letting t = t +1, entering the next time step, executing the step 2, and repeating the task allocation and the performance estimation calculation until all the tasks are executed.
Suppose that in an iteration, node N 0 ,N 1 ,N 2 ,N 3 Are respectively delta t 0 =16.7secs,Δt 1 =11.1secs,Δt 2 =14.3secs,Δt 3 =11.1secs. The calculation efficiency can be obtained as follows:
λ 0 (t)=0.0299,λ 1 (t)=0.0450,λ 2 (t)=0.0349,λ 3 (t)=0.0450
after normalization, one can obtain:
e 0 (t)=0.3862,e 1 (t)=0.5814,e 2 (t)=0.4510,e 3 (t)=0.5814
the equation representation of the above-described system of non-homogeneous linear equations can be written as:
Figure BDA0002274924800000091
namely:
Figure BDA0002274924800000092
coefficient matrix:
Figure BDA0002274924800000093
Figure BDA0002274924800000094
inverting it to obtain:
Figure BDA0002274924800000095
to find
Figure BDA0002274924800000096
Obtaining:
Figure BDA0002274924800000097
to find
Figure BDA0002274924800000098
Obtaining:
Figure BDA0002274924800000099
order:
Figure BDA0002274924800000101
the following can be obtained:
Figure BDA0002274924800000102
the constraint has a feasible region in the first quadrant, as shown in FIG. 2.
In the above feasible domain:
Figure BDA0002274924800000103
taking a set of feasible solutions:
Figure BDA0002274924800000104
go on to solve
Figure BDA0002274924800000105
Figure BDA0002274924800000106
Then the next time a task is divided, the size of each of its subtask sets
Figure BDA0002274924800000107
Figure BDA0002274924800000108
Therefore each timeThe total number of tasks on each node becomes 46,70,54,70, which can be considered to achieve approximately maximum resource utilization, corresponding to its computed performance estimate of 0.0299,0.0450,0.039, 0.0450.

Claims (5)

1. A distributed load balancing method based on a master-slave backup technology is characterized by comprising the following steps:
(1) Dividing a node set according to the constructed node distributed cluster;
(2) Running a task for setting a backup level on a cluster, and dividing all tasks in the same batch into task sets;
(3) Distributing tasks contained in the task set to the corresponding node set according to the node set and the task set obtained in the steps (1) and (2);
(4) After all the nodes finish the received tasks, collecting and recording the execution time;
(5) Acquiring the calculation efficiency of each node, and normalizing the calculation execution efficiency;
(6) Establishing an equation set through a known constant, converting deformation into a linear programming problem, and further solving a distribution scheme;
the method for partitioning a node set in step (1) comprises the following steps:
(1.1) constructing a distributed cluster of n nodes as
Figure FDA0003908848000000011
(1.2) arranging and combining n nodes, and taking r nodes to form a group of subsets
Figure FDA0003908848000000012
Figure FDA0003908848000000013
All possible combinations
Figure FDA0003908848000000014
Composition set
Figure FDA0003908848000000015
Collection
Figure FDA0003908848000000016
Is provided with
Figure FDA0003908848000000017
The number of the elements is one,
Figure FDA0003908848000000018
initialization
Figure FDA0003908848000000019
The solving of the allocation scheme in the step (6) specifically comprises:
(6.1) when the number of rows is equal to the number of columns,
Figure FDA00039088480000000110
the system of equations has a unique solution
Figure FDA00039088480000000111
(6.2) when the number of rows in the system of equations is greater than the number of columns,
Figure FDA00039088480000000112
the equation set has no unique solution and can be transformed into a linear programming problem, and the process is as follows:
(6.2.1) defining the form of matrix A, the left half of which is
Figure FDA00039088480000000113
The right half part is
Figure FDA00039088480000000114
Namely:
Figure FDA00039088480000000115
defining vectors in the same way
Figure FDA00039088480000000116
The upper half of (A) is
Figure FDA00039088480000000117
The lower half part is
Figure FDA00039088480000000118
The above equation set is rewritten as (equation 4):
Figure FDA00039088480000000119
solving to obtain:
Figure FDA0003908848000000021
if it is
Figure FDA0003908848000000022
Is greater than 0, is taken
Figure FDA0003908848000000023
As an argument, it is converted into a linear programming problem, as in equation (6), where
Figure FDA0003908848000000024
Is a vector
Figure FDA0003908848000000025
The ith element of (c):
Figure FDA0003908848000000026
Figure FDA0003908848000000027
to obtain a solution
Figure FDA0003908848000000028
(6.2.2) vectors
Figure FDA0003908848000000029
Get each element
Figure FDA00039088480000000210
Figure FDA00039088480000000211
Figure FDA00039088480000000212
Corresponding to the ratio of a task set to the total number of tasks, vector
Figure FDA00039088480000000213
The corresponding set of values can be used as a set of allocation schemes by which to divide the tasks F of each batch in proportion j And (3) enabling t = t +1, entering the next time step, executing the step (2), and repeating task allocation and performance estimation calculation until all tasks are executed.
2. The distributed load balancing method based on the master-slave backup technology as claimed in claim 1, wherein the task set partitioning method in step (2) comprises:
(2.1) running F tasks with equal task quantity on the cluster constructed in the step (1), and setting a backup level as r;
(2.2) dividing the whole task set F into small batches, performing task allocation and operation statistics once in each batch, recording the system operation time period as t, and recording each batchNext task F j The calculated time of (d) is recorded as Δ t; task F for each batch i Divided into smaller sets of small tasks, denoted
Figure FDA00039088480000000214
Figure FDA00039088480000000215
The size of (A) is recorded as
Figure FDA00039088480000000216
(2.3) all tasks F of the same batch j Division into
Figure FDA00039088480000000217
A task set, at time t, in proportion
Figure FDA00039088480000000218
Batch dividing task F j Is composed of
Figure FDA00039088480000000219
A task set
Figure FDA00039088480000000220
Collection
Figure FDA00039088480000000221
And
Figure FDA00039088480000000222
like, set
Figure FDA00039088480000000223
Also have
Figure FDA00039088480000000224
And (4) each element.
3. The distributed load balancing method based on the master-slave backup technology as claimed in claim 2, wherein the method for distributing the subtasks in step (3) comprises:
(3.1) obtaining two
Figure FDA00039088480000000225
Set of individual elements
Figure FDA00039088480000000226
And
Figure FDA00039088480000000227
taking elements from two sets at a time
Figure FDA00039088480000000228
And
Figure FDA00039088480000000229
wherein
Figure FDA00039088480000000230
Is a set of tasks that is to be executed,
Figure FDA00039088480000000231
is a set of nodes;
(3.2) sequentially subjecting
Figure FDA00039088480000000232
The included task is sent to
Figure FDA00039088480000000233
On the nodes of the representation up to each task set
Figure FDA00039088480000000234
All tasks in (1) are sent to corresponding
Figure FDA00039088480000000235
All nodes in the network; the number of the tasks to be processed existing on each node is the same
Figure FDA00039088480000000236
Each task set is copied and sent to r different nodes.
4. The distributed load balancing method based on the master-slave backup technology as claimed in claim 3, wherein the step (4) of recording the execution time further comprises:
(4.1) waiting for all the nodes to complete the tasks received by the nodes, executing redundancy check or other tasks, and collecting each node N q Is recorded as Δ t q
(4.2) recording the current time as t, node N q The current computational efficiency of is noted as λ q (t), node N q Task set owned by
Figure FDA0003908848000000039
The size of (A) is recorded as
Figure FDA0003908848000000031
(4.3) calculating by using the formula (1):
Figure FDA0003908848000000032
each node independently calculates the calculation efficiency lambda of the node q (t) and sends it to all other nodes.
5. The distributed load balancing method based on the master-slave backup technology as claimed in claim 4, wherein the method for calculating the execution efficiency in step (5) comprises:
(5.1) obtaining all lambda of each node q (t) using equation (2) for λ q (t) normalization is carried out;
Figure FDA0003908848000000033
Definition of
Figure FDA0003908848000000034
And e (t):
Figure FDA0003908848000000035
e(t)=(e 0 (t),e 1 (t),…,e n-1 (t));
(5.2) recording the distribution matrix as A,
Figure FDA0003908848000000036
let A be the coefficient matrix and,
Figure FDA0003908848000000037
as variables, e (t) is a constant term, a non-homogeneous linear equation system (3) can be obtained:
Figure FDA0003908848000000038
wherein, the row mark of the distribution matrix represents the node subscript, the column mark represents the task set subscript, and the element a q,i =1 representing node q owning task set i, element a q,i =0 represents that node q does not own task set i.
CN201911119106.2A 2019-11-15 2019-11-15 Distributed load balancing method based on master-slave backup technology Active CN111400026B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911119106.2A CN111400026B (en) 2019-11-15 2019-11-15 Distributed load balancing method based on master-slave backup technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911119106.2A CN111400026B (en) 2019-11-15 2019-11-15 Distributed load balancing method based on master-slave backup technology

Publications (2)

Publication Number Publication Date
CN111400026A CN111400026A (en) 2020-07-10
CN111400026B true CN111400026B (en) 2023-02-28

Family

ID=71433924

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911119106.2A Active CN111400026B (en) 2019-11-15 2019-11-15 Distributed load balancing method based on master-slave backup technology

Country Status (1)

Country Link
CN (1) CN111400026B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111858721B (en) * 2020-08-03 2023-07-21 南京大学 Distributed computing method based on priority coding
CN113505021B (en) * 2021-05-26 2023-07-18 南京大学 Fault tolerance method and system based on multi-master-node master-slave distributed architecture

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103176850A (en) * 2013-04-10 2013-06-26 国家电网公司 Electric system network cluster task allocation method based on load balancing
CN104283948A (en) * 2014-09-26 2015-01-14 东软集团股份有限公司 Server cluster system and load balancing implementation method thereof
CN105302649A (en) * 2015-12-03 2016-02-03 中国联合网络通信集团有限公司 Disaster recovery backup method and system
US20160179642A1 (en) * 2014-12-19 2016-06-23 Futurewei Technologies, Inc. Replicated database distribution for workload balancing after cluster reconfiguration
CN110190991A (en) * 2019-05-21 2019-08-30 华中科技大学 A kind of fault-tolerance approach of distributed stream processing system under more application scenarios

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103176850A (en) * 2013-04-10 2013-06-26 国家电网公司 Electric system network cluster task allocation method based on load balancing
CN104283948A (en) * 2014-09-26 2015-01-14 东软集团股份有限公司 Server cluster system and load balancing implementation method thereof
US20160179642A1 (en) * 2014-12-19 2016-06-23 Futurewei Technologies, Inc. Replicated database distribution for workload balancing after cluster reconfiguration
CN105302649A (en) * 2015-12-03 2016-02-03 中国联合网络通信集团有限公司 Disaster recovery backup method and system
CN110190991A (en) * 2019-05-21 2019-08-30 华中科技大学 A kind of fault-tolerance approach of distributed stream processing system under more application scenarios

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
SDN期末作业;bokerr;《https://www.cnblogs.com/bokers/p/8343502.html》;20180124;第1-8页 *

Also Published As

Publication number Publication date
CN111400026A (en) 2020-07-10

Similar Documents

Publication Publication Date Title
CN111400026B (en) Distributed load balancing method based on master-slave backup technology
CN102567080B (en) Virtual machine position selection system facing load balance in cloud computation environment
CN105740084A (en) Cloud computing system reliability modeling method considering common cause fault
Zhang et al. MrHeter: improving MapReduce performance in heterogeneous environments
Xu et al. A (DP) $^ 2 $2 SGD: Asynchronous Decentralized Parallel Stochastic Gradient Descent With Differential Privacy
CN110362780B (en) Large data tensor canonical decomposition calculation method based on Shenwei many-core processor
CN105373517A (en) Spark-based distributed matrix inversion parallel operation method
Wang et al. Heterogeneity-aware gradient coding for straggler tolerance
CN110929884A (en) Classification method and device for distributed machine learning optimization based on column division
CN114201287B (en) Method for cooperatively processing data based on CPU + GPU heterogeneous platform
CN112948123B (en) Spark-based grid hydrological model distributed computing method
CN111428192A (en) Method and system for optimizing high performance computational architecture sparse matrix vector multiplication
CN115718986B (en) Multi-core parallel time domain simulation method based on distributed memory architecture
CN112612601A (en) Intelligent model training method and system for distributed image recognition
Mercan et al. Computing sequence covering arrays using unified combinatorial interaction testing
CN111258730A (en) Task scheduling method based on competition conditions
CN111722923A (en) Heterogeneous resource calling method and device and computer readable storage medium
CN113342313B (en) Method for asynchronously updating linear classification model parameters in Spark MLlib based on parameter server
CN111858721B (en) Distributed computing method based on priority coding
Umesha et al. Optimal design of truss structures using parallel computing
JPWO2005029352A1 (en) Parallel computing method and apparatus
CN110021339B (en) Cluster parallel computing acceleration method based on protein folding calculation protein structure
Huang et al. Speedup and synchronisation overhead analysis of Gauss-Seidel type algorithms on a Sequent balance machine
Bošanský et al. Parallel Approach To Solve Of The Direct Solution Of Large Sparse Systems Of Linear Equations
Sharadapriyadarshini et al. Formulations and heuristics for scheduling in a buffer-constrained flowshop and flowline-based manufacturing cell with different buffer-space requirements for jobs: Part 2

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