CN117707790A - Load balancing method and load balancer - Google Patents

Load balancing method and load balancer Download PDF

Info

Publication number
CN117707790A
CN117707790A CN202410073454.5A CN202410073454A CN117707790A CN 117707790 A CN117707790 A CN 117707790A CN 202410073454 A CN202410073454 A CN 202410073454A CN 117707790 A CN117707790 A CN 117707790A
Authority
CN
China
Prior art keywords
job
resource
resource unit
load
representing
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.)
Pending
Application number
CN202410073454.5A
Other languages
Chinese (zh)
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.)
Hainan Research Institute Of Zhejiang University
Zhejiang University ZJU
Original Assignee
Hainan Research Institute Of Zhejiang University
Zhejiang University ZJU
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 Hainan Research Institute Of Zhejiang University, Zhejiang University ZJU filed Critical Hainan Research Institute Of Zhejiang University
Priority to CN202410073454.5A priority Critical patent/CN117707790A/en
Publication of CN117707790A publication Critical patent/CN117707790A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Multi Processors (AREA)

Abstract

The invention discloses a load balancing method and a load balancer, which are used for distributing resources for online operation with expiration date; the step of allocating resources for the target job includes the steps of: acquiring the workload, the job arrival time and the job deadline of a target job; screening and obtaining candidate resource units from the resource units of the cluster based on the job arrival time and the job deadline, wherein the resource units are respectively mapped with a time period and a resource node; obtaining the maximum load which can be born by each candidate resource unit for processing the target operation; and determining a resource unit to be allocated and a corresponding resource allocation amount based on the workload and the maximum load, and generating a corresponding resource allocation strategy. By designing the resource unit and considering the scheme of resource allocation based on two dimensions of time and space, compared with the prior first-in first-out scheme, the invention can generate a proper resource allocation strategy for the job with the expiration date.

Description

Load balancing method and load balancer
Technical Field
The invention relates to the field of computer application, in particular to a load balancing technology.
Background
Aiming at the problems of complicated virtual machine configuration and the like in cloud computing, the experience quality of an end user is improved, and a computing paradigm called no-service computing is presented nowadays, which can reduce the heavy burden of cloud service through management operation on a virtual system. The implementation of the load balancer is one of important technological bases for the development of no-service computing.
The most basic problem that the load balancer needs to solve at present is to design on-line workload scheduling and resource allocation decisions, and the solution to the above problems has the following drawbacks:
lack of performance guarantees, lack of methods of performance guarantees (mainly average response time) for online load balancing policies implemented on non-service architecture in industry; while long-term performance guarantees exist for the online load balancing strategies disclosed in academic research, their performance guarantees are almost always built on sufficient assumptions and are hardly satisfied in practical systems; also, performance guarantees are more difficult to achieve if heterogeneous service rates, service locality, strict deadlines, and many other realistic constraints are considered.
Non-deadline sensitive jobs are currently running in a first come first served approach, but in an online environment, this strategy makes it difficult to choose correctly between more valuable but soon to stop jobs and more urgent jobs because the arrival and deadlines of jobs are unpredictable.
Disclosure of Invention
Aiming at the operation defect that the load balancing method disclosed in the prior art is not applicable to sensitive term, the invention provides a load balancing technology realized by considering time and space factors simultaneously.
In order to solve the technical problems, the invention is solved by the following technical scheme:
a load balancing method for distributing resources for online jobs with expiration dates;
the step of allocating resources for the target job includes the steps of:
acquiring the workload, the job arrival time and the job deadline of a target job;
screening and obtaining candidate resource units from the resource units of the cluster based on the job arrival time and the job deadline, wherein the resource units are respectively mapped with a time period and a resource node;
obtaining the maximum load which can be born by each candidate resource unit for processing the target operation;
and determining a resource unit to be allocated and a corresponding resource allocation amount based on the workload and the maximum load, and generating a corresponding resource allocation strategy.
As one possible implementation:
acquiring utility functions corresponding to the target operation on each candidate resource unit;
obtaining a profit function;
based on constraint conditions, utility functions and benefit functions, determining resource units to be allocated and corresponding resource allocation amounts with the aim of maximizing overall benefits;
the constraint condition includes that the sum of the resource allocation amounts is less than or equal to the workload, and the resource allocation amount is less than or equal to the corresponding maximum load.
As one possible implementation:
establishing an overall benefit maximization problem according to the constraint condition, the benefit function and the benefit function;
and solving the overall benefit maximization problem based on the Lagrangian multiplier method and KKT conditions to obtain the resource units to be allocated and the corresponding resource allocation amount.
As one possible implementation, the overall benefit maximization problem is:
the nth job is marked as job n, and the r resource unit is marked as resource unit r;
in the above formula:
n represents a collection of jobs;
n represents the nth job, i.e., job n;
representing the total benefit of operation n;
representing a set of candidate resource units corresponding to the job n;
r represents the r-th resource unit, i.e. resource unit r;
x nr indicating the size of the workload allocated for job n in resource unit r;
representing the workload of job n;
representing the maximum load that the resource unit r can bear to process the job n;
calculating the total benefit of operation nThe benefit function of (2) is:
wherein:
f n (x n ) Representing the overall utility of job n;
indicating the resource usage degree of the resource unit r before the job n;
φ r a non-decreasing estimation function representing a marginal cost of the workload of the resource unit r processing unit;
g nr (x nr ) Indicating the benefit corresponding to the resource unit r processing the job n.
As one possible implementation:
total utility f of job n n (x n ) The expression of (2) is:
wherein:
f nr (x nr ) Representing the utility function corresponding to the job n on the resource unit r.
As one possible implementation:
benefit function g nr (x nr ) The expression of (2) is:
wherein:
β nr representing the profit price of job n on resource unit r;
C r representing the maximum available load corresponding to the resource unit r;
indicating the ratio of the work load already occupied by job n in resource unit r to its maximum occupiable load.
As one possible implementation:
constraints also include:
as one possible implementation:
aiming at the problem of maximizing the overall benefit, a Lagrangian multiplier of the target operation on each candidate resource unit is obtained based on a Lagrangian multiplier method;
solving and obtaining a resource unit to be allocated and corresponding resource allocation amount based on the Lagrangian multiplier and the KKT condition equation set;
the KKT condition equation set is:
wherein:
on the resource unit r, aiming at the job n, the corresponding Lagrangian multiplier;
β nr representing the profit price of job n on resource unit r;
C r indicating the maximum available load for the resource unit r.
A load balancer for performing resource allocation on an online job having an expiration date;
comprising the following steps:
the acquisition module is used for acquiring the workload, the job arrival time and the job deadline of the target job;
the screening module is used for screening and obtaining candidate resource units from the resource units of the cluster based on the job arrival time and the job deadline, and the resource units are respectively mapped with the time period and the resource nodes;
the extraction module is used for obtaining the maximum load born by each candidate resource unit for processing the target operation;
and the calculation module is used for determining the resource units to be allocated and the corresponding resource allocation amount based on the workload and the maximum load and generating a corresponding resource allocation strategy.
A job processing system, comprising: load balancer for performing a load balancing method according to any of the preceding claims.
The invention has the remarkable technical effects due to the adoption of the technical scheme:
by designing the resource unit and considering the scheme of resource allocation based on two dimensions of time and space, compared with the prior first-in first-out scheme, the invention can generate a proper resource allocation strategy for the job with the expiration date.
The invention aims at maximizing the overall benefit, namely, trying to maximize the utility of the operation and the income of the platform at the same time, and the scheme can effectively balance the calculation load and make the task allocation more reasonable, thereby avoiding the waste of resources and the generation of performance bottlenecks.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is an exemplary diagram of a resource unit of the present invention;
FIG. 2 is a diagram of an exemplary workflow of the load balancing method of the present invention;
FIG. 3 is a diagram showing an example of the structure of the job processing system of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the following examples, which are illustrative of the present invention and are not intended to limit the present invention thereto.
Description:
1.1 Job and job queue):
the invention serves a series of jobs (Job) of different service rates arriving in sequence.
Symbols are used in the specificationRepresents a set of jobs, where n represents the nth job, counting from 1, with +.>To represent the workload size of the nth job, using a n Representing the arrival time of the nth job, using d n Indicating the deadline of the nth job.
In order to maximize the utility of the server-less function user and the revenue of the platform from a long term perspective, the design time frame isI.e. the earliest arrival time of all jobs and the latest deadline of all jobs, this time range is in this specification divided evenly into several time segments of length τ and the corresponding time segments are indicated by time slots, in this specification by the symbol->Representing a set of time slots, wherein t represents the t-th time slot, counting from 1, wherein the time length tau is a preset fixed parameter,and the person skilled in the art can set the device according to the actual needs.
These jobs that arrive in order at the load balancer are all placed in a job queue to ensure that they arrive in order at the corresponding out-of-service platform.
1.2 Clusters and resource pools):
a cluster is a collection of virtual machines whose resource occupancy updates are all performed on the resource pool of the cluster when a job arrives for the resource to be allocated, and the resource pool is a collection of computing resources (i.e., nodes). For computing resources, symbols are used in this specificationRepresenting a set of computing resources, wherein k represents a kth computing resource, counting from 1;
as shown in fig. 1, in order to process in both the temporal and spatial dimensionsBy computing resources in the present specificationRepresents a set of resource units, wherein r represents an r-th resource unit, and each resource unit r can process a load upper limit of C r (for all jobs), C r The preset fixed parameters can be set by a person skilled in the art according to actual needs.
Meanwhile, we use the symbol x nr To indicate the size of the workload allocated for job n in resource unit r, useIndicating the maximum load that can be sustained on processing job n.
For the followingThe person skilled in the art can set the device based on the actual situation of the cluster, and in the actual application, the device can be used according to the working situationAdjustments are made, for example, when connection errors occur, the load balancer handles some unpredictable errors such as heavy service, etc., the value of the maximum load may be reduced so that it handles fewer computing tasks.
Referring to fig. 1, the present invention implements a space-time resource network that considers resource allocation from two dimensions of time and space, and in practical application, the resource occupation condition of each job is different, and the workload carried by each resource unit is also different.
1.3 Utility function): setting utility functions in this specification(wherein->) Whereby user satisfaction with job n is measured, the function being a non-decreasing and continuously differentiable convex function;
different utility functions can be provided for different jobs, and the expressions of the same job on different resource units can also be different, so that a person skilled in the art can set a targeted utility function on each resource unit for each job according to actual needs and specific business targets to be optimized, namely, different jobsIt has utility functions of different forms. The detailed description thereof will not be presented in detail in this specification;
for each jobIts utility is the sum of the sub-utilities realized by each available resource unit, and the utility function is specifically expressed as follows:
wherein the method comprises the steps ofFor a given job n, f nr In different resource units->The upper expressions are also different
1.4 Revenue function):
because no service calculation uses a pay-per-value billing model, its revenue is proportional to actual resource consumption. In particular, we define allocation resourcesThe specific expression is as follows:
wherein:
representing the ratio of the existing workload of job n to its maximum occupiable load on resource unit r;
β nr representing the profit price of job n on resource unit r.
1.4 Overall benefit): the overall benefit described in this specification consists of the total utility of the user and the total benefit of the resource.
The embodiment 1 of a load balancing method is used for distributing resources for online jobs with expiration dates based on an out-of-service computing scene;
referring to fig. 2, the jobs that arrive at the load balancer in order are sequentially targeted jobs, and resource allocation is performed according to the following steps:
s100, acquiring the workload of the target jobJob arrival time a n And job deadline d n
S200, based on the job arrival time a n And job deadline d n Screening and obtaining candidate resource units from the resource units of the cluster;
the resource units are respectively mapped with the time periods and the resource nodes;
the construction mode of the resource unit is as follows:
acquiring earliest reaching time of all jobs and latest deadline of all jobs, and acquiring execution time range
Acquiring a preset unit time length tau;
the execution time range is set based on a preset unit time length tauDividing to obtain a plurality of time periods by +.>A representation;
each resource node k is mapped with a respective time period to form a corresponding resource unit, i.e., as described aboveWherein->Representing a set of resource nodes k.
In the present embodiment, byTo represent the use of the resource units of the corresponding job;
wherein,
r kt representing candidate resource units.
S300, obtaining the maximum load which can be born by each candidate resource unit for processing the target operation
S400, based on the workloadAnd said maximum load->And determining the resource units to be allocated and the corresponding resource allocation amount, and generating a corresponding resource allocation strategy.
In this embodiment, by designing the resource unit, the scheme of considering the resource allocation based on two dimensions of time and space can generate a suitable resource allocation policy for the job with the expiration date compared with the existing first-in first-out service scheme.
Further:
determining a resource unit to be allocated and a corresponding resource allocation amount by taking the overall benefit maximization as a target based on constraint conditions, the benefit function and the benefit function;
the constraint condition comprises that the sum of the resource allocation amount is smaller than or equal to the workload, and the resource allocation amount is smaller than or equal to the corresponding maximum load;
the utility function corresponds to the target job and also corresponds to the candidate resource units one by one.
The embodiment aims at maximizing the overall benefit, namely, trying to maximize the utility of the operation and the income of the platform at the same time, and the scheme can effectively balance the calculation load and make the task allocation more reasonable, so that the waste of resources and the generation of performance bottlenecks are avoided.
Specifically:
s410, establishing an overall benefit maximization problem according to the constraint condition, the benefit function and the benefit function;
the overall benefit maximization problem is:
the nth job is marked as job n, and the r resource unit is marked as resource unit r;
in the above formula:
n represents a collection of jobs;
n represents the nth job, i.e., job n;
representing the total benefit of operation n;
representing a set of candidate resource units corresponding to the job n;
r represents the r-th resource unit, i.e. resource unit r;
x nr indicating the size of the workload allocated for job n in resource unit r;
representing the workload of job n;
representing the maximum load that the resource unit r can bear to process the job n;
the constraint (1) above represents that the sum of the computing resources allocated to each service in the cluster of systems needs to be smaller than the workload of its service; based on the consideration of performance optimization, the embodiment ensures that the amount of the computing resources allocated to the service is smaller than the workload of the service through the design of the constraint condition (1), thereby avoiding the competition and the contention of the computing resources in the cluster so as to keep the response speed and the performance of the system stable; when the constraint condition (1) is not satisfied, resources in the cluster are contended, so that the total response time of the REST interface of the whole system is increased, and the user experience is affected.
Constraint condition (2) indicates that the distributed resources of the resource units in the cluster cannot exceed the maximum load of the resource units, and the constraint condition (2) ensures the performance, stability, reliability and safety of the cluster, and ensures that each resource unit can operate in a safe and controllable range, so that the stability and availability of the whole cluster are maintained.
The design of constraint (3) is directed to locality and counteraffinity of service;
for service locality, when the cluster uses a network scheduling mode to access acquired data, the speed is much slower than that of directly setting a special server locally to perform the task, and for this case, specific services are processed by setting some special virtual machines to increase the processing speed, and other virtual machines which do not relate to the task do not need to allocate corresponding resources for the specific services naturally.
For the anti-affinity of the service, there are cases that some cluster virtual machine nodes do not want to be scheduled and allocated by some services, and the virtual machine nodes are marked with a label that "scheduling is not allowed" by a system manager, so that when resources are allocated for a new job service, the virtual machine nodes are not considered to provide on computing resources.
Calculating the total benefit of operation nThe benefit function of (2) is:
wherein:
f n (x n ) Representing the overall utility of job n;
indicating the resource usage degree of the resource unit r before the job n;
φ r non-decreasing estimation function, phi, of marginal cost representing resource unit r processing unit workload r The value of the independent variable is [0, C r ]When the value of the independent variable is larger than C r When define phi r The value of (2) is ++ infinity a. The invention relates to a method for producing a fibre-reinforced plastic composite. The method comprises the steps of carrying out a first treatment on the surface of the
g nr (x nr ) Indicating the benefit corresponding to the resource unit r processing the job n.
The benefit function is a convex function, so that the Lagrange multiplier method can be adopted to calculate the corresponding maximum value, and the occupation condition of each resource can be dynamically updated.
According to the embodiment, through designing the marginal cost estimation function, the resource use condition of the resource unit R epsilon R is considered in real time, so that the benefit function can be considered based on an online scene, and the optimal solution of the benefit function is theoretically the optimal solution approaching to and maximizing the overall benefit.
S410, solving the overall benefit maximization problem based on the Lagrangian multiplier method and the KKT condition, and obtaining the resource units to be allocated and the corresponding resource allocation amount.
The specific solving steps are as follows:
s411, aiming at the problem of maximizing the overall benefit, obtaining Lagrangian multipliers of the target operation on each candidate resource unit based on a Lagrangian multiplier method;
aiming at the problem of maximizing the overall benefit and the use of constraint conditions thereofLagrange multiplier method, on resource unit r, for operation n, obtaining corresponding Lagrange multiplier
On the premise of knowing the objective function and the specific constraint condition corresponding to the overall benefit maximization problem, a person skilled in the art can calculate and obtain the corresponding multiplier according to the Lagrangian multiplier method, so that the specific calculation step is not described in detail in the specification.
S412, solving and obtaining a resource unit to be allocated and a corresponding resource allocation amount based on the Lagrangian multiplier and the KKT condition equation set;
the KKT condition equation set is:
wherein:
on the resource unit r, aiming at the job n, the corresponding Lagrangian multiplier;
β nr representing the profit price of job n on resource unit r;
C r indicating the maximum available load for the resource unit r.
Solving and obtaining the resource quantity required to be updated and allocated for the job n based on the KKT condition equation set
The workflow of the load balancing method in this embodiment is shown in the following table:
TABLE 1
The method comprises the following steps:
2.1 Initializing the resource occupation condition of the resource pool at the beginning, and initializing the resource occupation condition of all resource units to zero.
In this embodiment, the corresponding service-free platform is set up as an initial point, and no job arrives at this point;
2.2 When the operation n reaches the load balancer, acquiring the related information of the operation n, and acquiring the benefit function g corresponding to each resource unit on the time-space resource pool at the moment nr Upper load limit C r
The related information of the job n is a four-tuple describing the job
Representing the workload of job n;
representing a set of corresponding candidate resource units for job n;
a set representing the maximum load corresponding to the job n;
f n representing a set of utility functions corresponding to job n.
2.3 Based on Lagrange multiplier method and KTT condition, solving the overall benefit maximization problem to obtain corresponding resource allocation amount
2.4 Based on the calculated amount of resources allocated for the job n updateThereafter, it is allocated to each resource unit of the clusterAnd (3) performing operation, updating the resource occupation condition of the job and the service condition of the resource nodes in the cluster in real time, and waiting for a new job to arrive.
2.5 When there is a new job at a later time, the steps 2.2-2.4 are repeatedly performed.
In summary, the invention provides an online load balancing method based on an overall benefit maximization strategy in a non-service computing environment. The resource units which simultaneously consider time and space factors are designed, the overall load balancing degree of the system is optimized by means of the overall benefit maximization method, and the problems that the calculation performance cannot be guaranteed in the traditional load balancing method, the traditional scheme in the actual industry cannot be well realized in a landing mode and the like are solved. The method considers the utility of the maximized operation and the income of the server platform, so that the platform under the no-service calculation can better realize the aim of on-line load balancing.
Embodiment 2, a load balancer for performing resource allocation for online jobs with expiration dates;
comprising the following steps:
the acquisition module is used for acquiring the workload, the job arrival time and the job deadline of the target job;
the screening module is used for screening and obtaining candidate resource units from the resource units of the cluster based on the job arrival time and the job deadline, and the resource units are respectively mapped with the time period and the resource nodes;
the extraction module is used for obtaining the maximum load born by each candidate resource unit for processing the target operation;
and the calculation module is used for determining the resource units to be allocated and the corresponding resource allocation amount based on the workload and the maximum load and generating a corresponding resource allocation strategy.
Embodiment 3, a job processing system, comprising: a load balancer for executing the load balancing method as in embodiment 1.
Referring to FIG. 3, the job processing system further includes a REST interface, a Kafka (distributed publish/subscribe mode based message queue), a cluster and a database;
the REST interface is used for receiving the operation and calling the load equalizer, so that the load equalizer reads related information from the database to generate a load balancing strategy of the corresponding operation;
the Kafka is used for transmitting the load balancing strategy to a cluster;
the cluster is used for updating the resource occupation condition based on the resource allocation strategy and writing the updating result into the database;
the database is a log record database.
The out-of-service calculation is based on FaaS (function as a service). Therefore, when a new function (i.e. job, service) arrives, the REST interface calls its load balancer to make it call the corresponding scheduling policy (i.e. the above load balancing method);
generating a corresponding resource allocation strategy based on the load balancing method according to the property of the new job, transmitting the resource allocation strategy to a corresponding cluster by using Kafka, and updating the corresponding resource occupation condition in the cluster;
after updating, the resource updating condition is updated to the corresponding database, and the updating information is notified to the whole platform.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
It will be apparent to those skilled in the art that embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that:
reference in the specification to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the invention. Thus, the appearances of the phrase "one embodiment" or "an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
In addition, the specific embodiments described in the present specification may differ in terms of parts, shapes of components, names, and the like. All equivalent or simple changes of the structure, characteristics and principle according to the inventive concept are included in the protection scope of the present invention. Those skilled in the art may make various modifications or additions to the described embodiments or substitutions in a similar manner without departing from the scope of the invention as defined in the accompanying claims.

Claims (10)

1. A load balancing method, which is characterized by being used for distributing resources for online jobs with expiration dates;
the step of allocating resources for the target job includes the steps of:
acquiring the workload, the job arrival time and the job deadline of a target job;
screening and obtaining candidate resource units from the resource units of the cluster based on the job arrival time and the job deadline, wherein the resource units are respectively mapped with a time period and a resource node;
obtaining the maximum load which can be born by each candidate resource unit for processing the target operation;
and determining a resource unit to be allocated and a corresponding resource allocation amount based on the workload and the maximum load, and generating a corresponding resource allocation strategy.
2. The load balancing method according to claim 1, wherein:
acquiring utility functions corresponding to the target operation on each candidate resource unit;
obtaining a profit function;
based on constraint conditions, utility functions and benefit functions, determining resource units to be allocated and corresponding resource allocation amounts with the aim of maximizing overall benefits;
the constraint condition includes that the sum of the resource allocation amounts is less than or equal to the workload, and the resource allocation amount is less than or equal to the corresponding maximum load.
3. The load balancing method according to claim 2, wherein:
establishing an overall benefit maximization problem according to the constraint condition, the benefit function and the benefit function;
and solving the overall benefit maximization problem based on the Lagrangian multiplier method and KKT conditions to obtain the resource units to be allocated and the corresponding resource allocation amount.
4. The load balancing method according to claim 3, wherein the overall benefit maximization problem is:
the nth job is marked as job n, and the r resource unit is marked as resource unit r;
in the above formula:
n represents a collection of jobs;
n represents the nth job, i.e., job n;
representing the total benefit of operation n;
representing a set of candidate resource units corresponding to the job n;
r represents the r-th resource unit, i.e. resource unit r;
x nr indicating the size of the workload allocated for job n in resource unit r;
representing the workload of job n;
representing the maximum load that the resource unit r can bear to process the job n;
calculating the total benefit of operation nThe benefit function of (2) is:
wherein:
f n (x n ) Representing the overall utility of job n;
indicating the resource usage degree of the resource unit r before the job n;
a non-decreasing estimation function representing a marginal cost of the workload of the resource unit r processing unit;
g nr (x nr ) Indicating the benefit corresponding to the resource unit r processing the job n.
5. The load balancing method according to claim 4, wherein:
total utility f of job n n (x n ) The expression of (2) is:
wherein:
f nr (x nr ) Representing the utility function corresponding to the job n on the resource unit r.
6. The load balancing method according to claim 4, wherein:
benefit function g nr (x nr ) The expression of (2) is:
wherein:
β nr representing the profit price of job n on resource unit r;
C r representing the maximum available load corresponding to the resource unit r;
indicating the ratio of the work load already occupied by job n in resource unit r to its maximum occupiable load.
7. The load balancing method according to claim 4, wherein:
constraints also include:
8. the load balancing method of claim 7, wherein:
aiming at the problem of maximizing the overall benefit, a Lagrangian multiplier of the target operation on each candidate resource unit is obtained based on a Lagrangian multiplier method;
solving and obtaining a resource unit to be allocated and corresponding resource allocation amount based on the Lagrangian multiplier and the KKT condition equation set;
the KKT condition equation set is:
wherein:
on the resource unit r, aiming at the job n, the corresponding Lagrangian multiplier;
β nr representing the profit price of job n on resource unit r;
C r indicating the maximum available load for the resource unit r.
9. A load balancer for allocating resources to an online job having an expiration date;
comprising the following steps:
the acquisition module is used for acquiring the workload, the job arrival time and the job deadline of the target job;
the screening module is used for screening and obtaining candidate resource units from the resource units of the cluster based on the job arrival time and the job deadline, and the resource units are respectively mapped with the time period and the resource nodes;
the extraction module is used for obtaining the maximum load born by each candidate resource unit for processing the target operation;
and the calculation module is used for determining the resource units to be allocated and the corresponding resource allocation amount based on the workload and the maximum load and generating a corresponding resource allocation strategy.
10. A job processing system, comprising: load balancer for performing a load balancing method according to any of claims 1 to 8.
CN202410073454.5A 2024-01-18 2024-01-18 Load balancing method and load balancer Pending CN117707790A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410073454.5A CN117707790A (en) 2024-01-18 2024-01-18 Load balancing method and load balancer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410073454.5A CN117707790A (en) 2024-01-18 2024-01-18 Load balancing method and load balancer

Publications (1)

Publication Number Publication Date
CN117707790A true CN117707790A (en) 2024-03-15

Family

ID=90146368

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410073454.5A Pending CN117707790A (en) 2024-01-18 2024-01-18 Load balancing method and load balancer

Country Status (1)

Country Link
CN (1) CN117707790A (en)

Similar Documents

Publication Publication Date Title
Salot A survey of various scheduling algorithm in cloud computing environment
US10474504B2 (en) Distributed node intra-group task scheduling method and system
Huang et al. An optimistic job scheduling strategy based on QoS for cloud computing
US8762997B2 (en) Constraint-conscious optimal scheduling for cloud infrastructures
CN111756812A (en) Energy consumption perception edge cloud cooperation dynamic unloading scheduling method
CN112955870A (en) Promise aware scheduler
CN103838621B (en) Method and system for scheduling routine work and scheduling nodes
CN103092683A (en) Scheduling used for analyzing data and based on elicitation method
CN112000388B (en) Concurrent task scheduling method and device based on multi-edge cluster cooperation
CN103927229A (en) Scheduling Mapreduce Jobs In A Cluster Of Dynamically Available Servers
CN106557471A (en) Method for scheduling task and device
CN109861850B (en) SLA-based stateless cloud workflow load balancing scheduling method
CN114610474B (en) Multi-strategy job scheduling method and system under heterogeneous supercomputing environment
CN112685153A (en) Micro-service scheduling method and device and electronic equipment
CN115134371A (en) Scheduling method, system, equipment and medium containing edge network computing resources
CN115292016A (en) Task scheduling method based on artificial intelligence and related equipment
CN106407007B (en) Cloud resource configuration optimization method for elastic analysis process
Li et al. Endpoint-flexible coflow scheduling across geo-distributed datacenters
Ullah et al. LSTPD: least slack time-based preemptive deadline constraint scheduler for Hadoop clusters
CN109976873B (en) Scheduling scheme obtaining method and scheduling method of containerized distributed computing framework
CN109783236B (en) Method and apparatus for outputting information
Singh et al. A comparative study of various scheduling algorithms in cloud computing
CN113190342A (en) Method and system architecture for multi-application fine-grained unloading of cloud-edge cooperative network
CN111913800B (en) Resource allocation method for optimizing cost of micro-service in cloud based on L-ACO
WO2008000775A1 (en) Decentralized dynamic allocation of data-processing resources in a utility platform

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