CN107656799B - Workflow scheduling method considering communication and computing cost under multi-cloud environment - Google Patents

Workflow scheduling method considering communication and computing cost under multi-cloud environment Download PDF

Info

Publication number
CN107656799B
CN107656799B CN201711077227.6A CN201711077227A CN107656799B CN 107656799 B CN107656799 B CN 107656799B CN 201711077227 A CN201711077227 A CN 201711077227A CN 107656799 B CN107656799 B CN 107656799B
Authority
CN
China
Prior art keywords
particle
workflow
execution
cost
total
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
CN201711077227.6A
Other languages
Chinese (zh)
Other versions
CN107656799A (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.)
Fujian Normal University
Original Assignee
Fujian Normal University
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 Fujian Normal University filed Critical Fujian Normal University
Priority to CN201711077227.6A priority Critical patent/CN107656799B/en
Publication of CN107656799A publication Critical patent/CN107656799A/en
Application granted granted Critical
Publication of CN107656799B publication Critical patent/CN107656799B/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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to a workflow scheduling method considering communication and computing cost in a multi-cloud environment. The method is based on the self structure and the execution characteristics of the workflow, the related factors of the current cloud resource environment communication and execution cost, and the thought of random two-point cross operation and random single-point variation operation based on the genetic algorithm, so that the diversity in the population evolution process is improved, the virtualized resources are integrated, the data communication cost and the task calculation cost are considered, the resource utilization rate is optimized, and the execution cost is reduced on the premise of meeting the workflow deadline. The method has good performance in terms of meeting the workflow deadline and controlling the execution cost under the condition of existence of fluctuation factors, and reduces the execution cost on the premise of meeting the workflow deadline as much as possible.

Description

Workflow scheduling method considering communication and computing cost under multi-cloud environment
Technical Field
The invention belongs to a workflow scheduling method in the field of parallel and distributed high-performance computing, and particularly relates to a workflow scheduling method considering communication and computing cost in a multi-cloud environment.
Background
With the continuous development of cloud computing technology, a 'multi-public cloud' situation in which a plurality of cloud service providers coexist appears in the current cloud market. The nature of cloud computing to flexibly provision virtual resources and pay as needed facilitates the processing of large-scale scientific workflows (hereinafter referred to as 'workflows'). However, task scheduling in a cloud heterogeneous environment is an NP-hard problem, complex time dependency and data dependency relationship exist between subtasks of a workflow itself, and a plurality of differences (such as asking price mechanism, instance type, communication bandwidth, etc.) exist between a plurality of cloud Service providers, so that an appropriate scheduling method is needed to reduce the execution cost of the workflow on the premise of satisfying the Quality of Service (QoS) of the workflow as much as possible. Most of the workflow scheduling methods in the current cloud environment are improved on the basis of workflow scheduling algorithms in the traditional distributed computing environment (such as grids), and the characteristics of the cloud environment are not considered. Or some scheduling methods only consider in a static single cloud environment, and simply pursue the objective of minimizing the execution time, and do not research the problem of optimizing and scheduling the cost of the workflow with constraints (such as due date).
In recent years, workflow scheduling in a conventional distributed environment has been widely studied. The workflow scheduling scheme in the grid environment generally achieves the purpose of optimizing the execution time of the workflow and meeting the QoS requirement through a heuristic or meta-heuristic scheduling algorithm. Improving the resource utilization rate in the grid environment, and the like. However, cloud computing environments and grid environments have a large difference in resource provisioning and resource pricing mechanisms. Since the motivation, the scheme for deployment, and the services provided by the two are different, the workflow scheduling method in the grid environment cannot be simply applied to the cloud computing environment. Cost-driven workflow scheduling algorithm with preparation time and deadline constraints in a cloud environment is partially researched and designed, however, mostly only one virtual machine type is considered, and the cloud environment is not in accordance with the reality. In addition, related research works propose a single workflow scheduling scheme based on a PSO algorithm, which respectively develop research on a cost optimization problem of deadline constraints and an execution time optimization problem of budget constraints. But the type and the number of the virtual machines for working are fixed, and the property of cloud environment elastic supply is not met. At present, a single cloud service provider is considered in workflow scheduling work in a cloud environment, and research is not carried out on a multi-cloud environment.
Regarding the cost-driven scheduling problem of the workflow with deadline constraint in the cloud environment, no relevant research work exists at home and abroad at present. Among them, the most relevant research work is workflow scheduling research based on deadline constraints with fluctuating factors about single cloud environments, which deals with global workflow subtask scheduling schemes using traditional PSO scheduling methods. However, in the current research work, a scientific workflow scheduling method with deadline constraint for considering communication and calculation cost under a multi-public cloud environment is not yet involved.
Disclosure of Invention
The invention aims to provide a workflow scheduling method considering communication and calculation cost in a multi-cloud environment, which has good performance in the aspects of meeting workflow deadline date and controlling execution cost under the condition of existence of fluctuation factors, and reduces the execution cost on the premise of meeting the workflow deadline date as far as possible.
In order to achieve the purpose, the technical scheme of the invention is as follows: a workflow scheduling method considering communication and computing costs in a multi-cloud environment is based on the structure and execution characteristics of a workflow and relevant factors of communication and execution costs of a current cloud resource environment, and based on the idea of random two-point cross operation and random single-point variation operation of a genetic algorithm, diversity in a population evolution process is improved, virtualized resources are integrated, data communication costs and task computing costs are considered, resource utilization rate is optimized, and the execution costs are reduced on the premise that the deadline of the workflow is met.
In an embodiment of the present invention, the workflow scheduling method is specifically implemented as follows,
defining the workflow scheduling method as S ═ Re, Map, Ttotal,Ctotal) Where Re represents a set of virtual machine resources Re ═ { vm) that need to be enabled1,vm2,...,vmr},Map={(ti,vmj)|ti∈V,vmjE.g. Re represents the mapping relation of the subtask corresponding to the virtual machine resource Re in the workflow, TtotalRepresents the execution completion time of the workflow, and CtotalThen the total workflow execution cost is represented; the workflow is represented by a directed acyclic graph G (V, E), where V represents a set of vertices { t } containing n tasks1,t2,...,tnE represents the data dependency relationship between tasks E12,e13,...,eij}; each data dependent edge eij=(ti,tj) Representing a subtask tiAnd subtask tjThere is a data dependency relationship between, where the subtask tiIs a subtask tjOf the direct predecessor node, and sub-task tjThen it is the subtask tiThe direct successor node of (1);
each virtual machine has a corresponding virtual machine type spiAnd corresponding switch-on times Tls (vm)i) And a closing time Tle (vm)i) (ii) a When the subtasks are scheduled to be completed, there is a corresponding set of actual execution start times AST (t)i) And actual execution completion time AET (t)i) And no more data will be generated and communicated upon tasking; thus, the workflow execution completion time TtotalAnd a corresponding total execution cost CtotalAs shown in the following equations, respectively:
Figure BDA0001457813160000021
Figure BDA0001457813160000022
the first half of the formula (2) represents the execution cost of the virtual machine, and the second half represents the data communication cost; lambda [ alpha ]pThe cloud service provider p sets specific asking price unit time and subtask t for the service provided by the cloud service provider pkIs a subtask tjP (t) ofj) And p (t)k) Respectively represent execution tjAnd tkThe service provider of (2); when t isjAnd tkWhen executed by the same cloud service provider, sjkIs 0, i.e. no inter-cloud data communication is generated, otherwise sjkIs 1;
based on the related definitions, the workflow scheduling problem with the deadline constraint in the multi-cloud environment can be formally expressed as a formula (3), and the core idea is to pursue the execution cost CtotalAt the lowest, make the execution time TtotalLess than or equal to workflow expiration date D (w);
Figure BDA0001457813160000031
then, the following algorithm is executed to achieve the execution cost CtotalAt the lowest, make the execution time TtotalWorkflow expiration date D (w) or less:
s1: the initialization related parameters are as follows: population size 100, maximum iteration number 1000, inertia weight factor w and cognition factor parameter c1_start=0.9,c1_end=0.2,c2_start=0.4,c20.9, generating an initial population;
s2: calculating the fitness values of the particles under different conditions according to a particle mapping strategy and fitness functions of the particles, namely formulas (4), (5) and (6), selecting the particle with the minimum fitness value as a population global optimal particle, and setting each particle in the first generation as a self historical optimal particle;
Figure BDA0001457813160000032
Figure BDA0001457813160000038
Figure BDA0001457813160000039
wherein, formula (4) represents the fitness function of the particle when one particle is a feasible solution and the other particle is an infeasible solution, formula (5) represents the fitness function of the particle when both particles are feasible solutions, and formula (6) represents the fitness function of the particle when both particles are infeasible solutions;
s3: updating the particles according to the particle updating formulas (7) to (10);
Figure BDA0001457813160000033
Figure BDA0001457813160000034
Figure BDA0001457813160000035
Figure BDA0001457813160000036
wherein, formula (7) represents the update mode of the particle i at time t, Mu() Denotes mutation operation, Cg() And Cp() It is indicated that the cross-over operation,
Figure BDA0001457813160000037
and gBesttRespectively obtaining the self historical optimal position of the particle i and the historical optimal position of the whole population after t iterations; equation (8) represents the update mode of the inertial part, r1Is a random number between 0 and 1; equations (9) and (10) represent the update methods of the individual recognition and social recognition parts, respectively, and r2And r3Is a random number between 0 and 1;
s4: recalculating the fitness value of each particle, and if the fitness value of the current particle is smaller than the historical optimal value of the current particle, updating the new particle into the historical optimal particle of the current particle;
s5: if the fitness value of the current particle is smaller than that of the population global optimal particle, updating the particle into the population global optimal particle;
s6: checking whether an algorithm termination condition is met, and if so, terminating the algorithm; otherwise, go to S3.
Compared with the prior art, the invention has the following beneficial effects: the method has good performance in terms of meeting the workflow deadline and controlling the execution cost under the condition of existence of fluctuation factors, and reduces the execution cost on the premise of meeting the workflow deadline as much as possible.
Drawings
FIG. 1 is a workflow scheduling framework diagram.
FIG. 2 is a particle code pattern.
FIG. 3 is a diagram of the operation of the mutation operator in the inertial portion.
FIG. 4 is a diagram of the operation of crossover operators in the human (social) cognitive segment.
Fig. 5 is an algorithmic flow chart of a scheduling method.
Detailed Description
The technical scheme of the invention is specifically explained below with reference to the accompanying drawings.
The workflow scheduling method considering communication and computing costs in a multi-cloud environment improves diversity in a population evolution process, integrates virtualized resources, considers data communication costs and task computing costs, optimizes resource utilization rate and reduces the execution costs on the premise of meeting workflow deadline date, based on the self structure and execution characteristics of the workflow and relevant factors of the communication and execution costs of the current cloud resource environment and based on the ideas of random two-point cross operation and random single-point variation operation of a genetic algorithm; the concrete implementation is as follows,
defining the workflow scheduling method as S ═ Re, Map, Ttotal,Ctotal) Where Re represents a set of virtual machine resources Re ═ { vm) that need to be enabled1,vm2,...,vmr},Map={(ti,vmj)|ti∈V,vmjE.g. Re represents the mapping relation of the subtask corresponding to the virtual machine resource Re in the workflow, TtotalRepresenting execution of a workflowCompletion time, and CtotalThen the total workflow execution cost is represented; the workflow is represented by a directed acyclic graph G (V, E), where V represents a set of vertices { t } containing n tasks1,t2,...,tnE represents the data dependency relationship between tasks E12,e13,...,eij}; each data dependent edge eij=(ti,tj) Representing a subtask tiAnd subtask tjThere is a data dependency relationship between, where the subtask tiIs a subtask tjOf the direct predecessor node, and sub-task tjThen it is the subtask tiThe direct successor node of (1);
each virtual machine has a corresponding virtual machine type spiAnd corresponding switch-on times Tls (vm)i) And a closing time Tle (vm)i) (ii) a When the subtasks are scheduled to be completed, there is a corresponding set of actual execution start times AST (t)i) And actual execution completion time AET (t)i) And no more data will be generated and communicated upon tasking; thus, the workflow execution completion time TtotalAnd a corresponding total execution cost CtotalAs shown in the following equations, respectively:
Figure BDA0001457813160000051
Figure BDA0001457813160000052
the first half of the formula (2) represents the execution cost of the virtual machine, and the second half represents the data communication cost; lambda [ alpha ]pThe cloud service provider p sets specific asking price unit time and subtask t for the service provided by the cloud service provider pkIs a subtask tjP (t) ofj) And p (t)k) Respectively represent execution tjAnd tkThe service provider of (2); when t isjAnd tkWhen executed by the same cloud service provider, sjkIs 0, i.e. no inter-cloud data communication is generated, otherwise sjkIs 1;
based on the related definitions, the workflow scheduling problem with the deadline constraint in the multi-cloud environment can be formally expressed as a formula (3), and the core idea is to pursue the execution cost CtotalAt the lowest, make the execution time TtotalLess than or equal to workflow expiration date D (w);
Figure BDA0001457813160000053
then, the following algorithm is executed to achieve the execution cost CtotalAt the lowest, make the execution time TtotalWorkflow expiration date D (w) or less:
s1: the initialization related parameters are as follows: population size 100, maximum iteration number 1000, inertia weight factor w and cognition factor parameter c1_start=0.9,c1_end=0.2,c2_start=0.4,c20.9, generating an initial population;
s2: calculating the fitness values of the particles under different conditions according to a particle mapping strategy and fitness functions of the particles, namely formulas (4), (5) and (6), selecting the particle with the minimum fitness value as a population global optimal particle, and setting each particle in the first generation as a self historical optimal particle;
Figure BDA0001457813160000054
Figure BDA0001457813160000055
Figure BDA0001457813160000056
wherein, formula (4) represents the fitness function of the particle when one particle is a feasible solution and the other particle is an infeasible solution, formula (5) represents the fitness function of the particle when both particles are feasible solutions, and formula (6) represents the fitness function of the particle when both particles are infeasible solutions;
s3: updating the particles according to the particle updating formulas (7) to (10);
Figure BDA0001457813160000061
Figure BDA0001457813160000062
Figure BDA0001457813160000063
Figure BDA0001457813160000064
wherein, formula (7) represents the update mode of the particle i at time t, Mu() Denotes mutation operation, Cg() And Cp() It is indicated that the cross-over operation,
Figure BDA0001457813160000065
and gBesttRespectively obtaining the self historical optimal position of the particle i and the historical optimal position of the whole population after t iterations; equation (8) represents the update mode of the inertial part, r1Is a random number between 0 and 1; equations (9) and (10) represent the update methods of the individual recognition and social recognition parts, respectively, and r2And r3Is a random number between 0 and 1;
s4: recalculating the fitness value of each particle, and if the fitness value of the current particle is smaller than the historical optimal value of the current particle, updating the new particle into the historical optimal particle of the current particle;
s5: if the fitness value of the current particle is smaller than that of the population global optimal particle, updating the particle into the population global optimal particle;
s6: checking whether an algorithm termination condition is met, and if so, terminating the algorithm; otherwise, go to S3.
FIG. 1 is a diagram of a workflow scheduling framework defined by the present invention. It mainly includes workflows, a cloudy environment, and a cost driven scheduler.
The workflow w is represented by a directed acyclic graph G (V, E), where V represents a set of vertices { t } containing n tasks1,t2,...,tnE represents the data dependency relationship between tasks E12,e13,...,eij}. Each data dependent edge eij=(ti,tj) Representative task tiAnd task tjThere is a data dependency relationship between them, where the task tiIs task tjIs directly preceding (parent) node, and task tjThen it is task tiIs directly succeeding (child) node. In the workflow scheduling process, a task must be executed after all the predecessor nodes of the task are executed. In a given directed acyclic graph representing a workflow, a task without a predecessor node is referred to as an 'in task', and similarly, a task without a successor node is referred to as an 'out task'. Each workflow w has a corresponding expiration date d (w), and a scheduling method is said to be a feasible solution if it can be executed before the corresponding expiration date.
In a multi-cloud environment, a plurality of cloud service providers P ═ { P, q.. multidata, r }, exist, and the service providers P provide a plurality of virtual machine instance types Sp={sp1,sp2,...,spk}. Each type of virtual machine instance has its specific computing and storage capabilities, and the present invention assumes that the virtual machine has sufficient storage space to store the transfer data during the execution of the subtasks, and therefore the present document focuses primarily on the virtual machine computing capabilities (i.e., the number of CPUs). Subtask tiIn virtual machine vmpijThe estimated execution time of (c) is Exe _ T (T)i,vmpij) The performance cost of a given task on different types of virtual machines is different.
When the virtual machine is started for the first time, a certain initial starting time T is neededboot(vmpij) To perform an initialization configuration. In the workflowIn the scheduling process, such virtual machine initialization time should be considered as important influence on the formation of the workflow scheduling scheme. Similarly, when all the subtasks on the virtual machine are executed, the corresponding virtual machine is not immediately closed, but the corresponding virtual machine waits until all the subtasks on the virtual machine completely communicate the output data of the corresponding subtasks to the virtual machine corresponding to the next generation task. In a cloud environment, a cloud service provider p sets a specific asking price unit time λ for a service provided by the cloud service provider ppEach virtual machine type spiAll have corresponding unit time prices cpi
The infrastructure of the same cloud service provider is typically concentrated in a smaller area, while the infrastructure of different cloud service providers are far apart, thus assuming that the intra-cloud bandwidth of a single cloud is faster than the inter-cloud bandwidth between different clouds. Within the cloud service provider p, data is driven from subtasks tiTransfer to subtask tjHas an intra-cloud communication time of Tintra(eijP) and the communication time of the data between the cloud service providers p and q is Tinter(eijP, q) as shown in the following formula.
Figure BDA0001457813160000071
Figure BDA0001457813160000072
Subtask tiTransfer to subtask tjThe Data size of (a) is Data (e)ij),Bintra(p) is the intra-cloud bandwidth of cloud p, and Binter(p, q) is the inter-cloud bandwidth between cloud p and cloud q. Assuming infinite bandwidth on a single virtual machine, T is therefore assigned to the same virtual machine when two subtasks are executedintra(eijP) has a value of 0.
The cost of data communication between different clouds will affect the final scheduling decision, cp,qRepresenting the unit price required to communicate 1GB of data from cloud p to cloud q. The present invention does not discloseThe costs generated by services such as resource monitoring, data storage and load balancing are considered, because the low costs are negligible compared with the calculation cost or the data communication cost.
The purpose of the scheduler is to minimize workflow execution costs, including computation costs for the virtual machines and data communication costs between subtasks, while satisfying deadline constraints. The definition of the entire scheduling scheme is S ═ (Re, Map, T)total,Ctotal) Where Re represents a set of virtual machine resources Re ═ { vm) that need to be enabled1,vm2,...,vmr},Map={(ti,vmj)|ti∈V,vmjE.g. Re represents the mapping relation of the subtask corresponding to the virtual machine resource Re in the workflow, TtotalRepresents the execution completion time of the workflow, and CtotalThe total workflow execution cost is indicated. Each virtual machine has a corresponding virtual machine type spiAnd corresponding switch-on times Tls (vm)i) And a closing time Tle (vm)i). When the subtasks are scheduled to be completed, there is a corresponding set of actual execution start times AST (t)i) And actual execution completion time AET (t)i) And the outbound task no longer generates and communicates data. Thus, the workflow execution completion time TtotalAnd a corresponding total execution cost CtotalAs shown in the following equations, respectively.
Figure BDA0001457813160000081
Figure BDA0001457813160000082
The first half of equation (4) represents the execution cost of the virtual machine, and the second half represents the data communication cost. Lambda [ alpha ]pThe cloud service provider p sets specific asking price unit time and subtask t for the service provided by the cloud service provider pkIs a subtask tjP (t) ofj) And p (t)k) Respectively represent execution tjAnd tkThe service provider of (1). When t isjAnd tkWhen executed by the same cloud service provider, sjkIs 0 (i.e. no inter-cloud data communication is generated), otherwise sjkIs 1.
Based on the related definitions, the workflow scheduling problem with the deadline constraint in the multi-cloud environment can be formally expressed as a formula (5), and the core idea is to pursue the execution cost CtotalAt the lowest, make the execution time TtotalLess than or equal to workflow deadline D (w).
Figure BDA0001457813160000083
The PSO algorithm is an animal evolutionary computing technology based on social behavior of a bird flock, and is proposed by Eberhart and Kennedy in 1995. Particles are particularly important in PSO algorithms, where each particle represents a candidate solution to the optimization problem, and they can move throughout the problem space. Each particle moves with a speed that is influenced by the conditions of the particle itself, the optimal historical position of the particle itself, and the historical optimal position of the entire population. In order to determine the superiority and inferiority of the solution generated by each particle at different positions in the problem space, a fitness function is introduced to evaluate the solution quality of each particle. Each particle is determined by its own position and velocity, which are iteratively updated and adjusted in the problem search space based on surrounding particles and its own experience. Wherein the velocity is updated according to equation (6) and the position is updated according to equation (7).
Figure BDA0001457813160000084
Figure BDA0001457813160000085
Where, t represents the current number of iterations,
Figure BDA0001457813160000086
and
Figure BDA0001457813160000087
respectively representing the velocity and position of the ith particle at the t-th iteration, it is usually necessary to define a maximum velocity VmaxTo limit the particle velocity so that the search results are within the problem solution space.
Figure BDA0001457813160000088
And gBesttThe self-history optimal position of the particle i and the history optimal position of the whole population are respectively obtained after t iterations. w is an inertia weight which determines the influence of the previous iteration speed on the current speed and is important for the convergence of the algorithm. c. C1And c2The cognition factors represent the cognition learning ability of the current particles to the self historical optimal value and the population global historical optimal value. r is1And r2Are two random variables ranging from 0 to 1 to enhance randomness during the iterative search process.
The method provided by the invention is mainly used in the scheduler of fig. 1. The method mainly comprises the parts of problem coding, resource pool initialization, fitness function, particle updating strategy, particle to scheduling result mapping, parameter setting and the like, and is specifically discussed through the following contents.
Problem coding
Improving the algorithm search efficiency and performance requires a good coding scheme. The evaluation criterion of the coding strategy mainly considers three basic principles of soundness, completeness and non-redundancy. The workflow scheduling problem is coded in a nesting mode of cloud providers, instance types and specific instances. One particle represents one scheduling scheme of workflow in multi-cloud environment, and the position of the particle i at the time t
Figure BDA0001457813160000095
As shown in equation (8).
Figure BDA0001457813160000091
Figure BDA0001457813160000092
Wherein
Figure BDA0001457813160000093
Indicates the distribution position of the kth subtask at time t, as shown in equation (9). (p, s)pj,vmpjr) The type of the instance representing that the subtask is allocated to the cloud p is spjOn the r-th concrete example. Each node bit on the particle is nested and divided into 3 decimal bits, which respectively represent the cloud service provider, the instance type and the specific instance, so that the size of the coding space is 3 times of the number of the subtasks. When initializing the seed group, the node decimal places of the particles are respectively initialized randomly to an integer value between 0 and the corresponding maximum value. Fig. 2 is a particle encoding diagram showing a scheduling of a particle encoding policy including 8 subtask workflows, assuming that a multi-cloud environment includes 3 cloud service providers, and each cloud service provider provides 8 instance types. Thus, the p coordinate value is from 0 to 2, spjThe coordinate values are from 0 to 7. As can be seen from FIG. 2, the subtask t1Type s assigned to cloud 000Vm of a virtual machine000
Initializing a resource pool
And due to the flexible supply mode of the resources in the cloud environment, the initial resource set cannot be obtained by the algorithm. For the PSO algorithm, the size of the initialization resource pool will determine the scope of the search space, playing a key role in algorithm complexity and workflow execution performance. When the initialized resource pool is too small, a workflow may occur that could have been completed by the expiration date, and cannot be completed in time due to lack of resources. When the initialization resource pool is too large, the potential solution of the PSO code is too large, so that the algorithm cannot be converged in time. A simple and feasible initialization resource allocation scheme is that one virtual machine of all categories in a multi-cloud environment is allocated to each subtask, so that diversity and integrity of a search space can be guaranteed. However, the initialized resource pool R for this schemeintialIs n × Numtype(vm)The search space is large, and the algorithm complexity is increased.
Figure BDA0001457813160000094
Where n is the number of subtasks in the workflow w, Numtype(vm)The sum of the number of instance types for all cloud service providers is defined as formula (10). Numvm(p)Number of instance types provided for cloud service provider p.
To further compress the search space while preserving the diversity of the original potential solutions, the present invention designs an initialization resource pool RintialIs of size | Spar(w)|*Numtype(vm)In which S ispar(w)Is the largest set of parallelizable subtasks in the workflow w. Due to addition of Spar(w)The other subtasks are all equal to Spar(w)The subtasks in the method have direct and indirect dependency relations, so the initialization resource strategy can ensure that each subtask has the opportunity of selecting one type of instance, thereby ensuring the diversity of potential solutions and reducing the search space.
Fitness function
The fitness function of a particle is used to evaluate the superiority or inferiority of two compared particles, with a smaller fitness function value generally corresponding to a better particle. Since the previous particle coding strategy does not satisfy the integrity principle, that is, the execution time of the workflow exceeds the corresponding deadline, it is necessary to define the fitness function of the feasible solution and the infeasible solution exceeding the deadline. The fitness function for judging the quality of two particles is defined in three different conditions.
Case 1 one particle is a feasible solution and the other particle is an infeasible solution. The feasible solution is chosen without any controversy, and its fitness function is defined as shown in equation (11).
Figure BDA0001457813160000101
Case 2 both particles are feasible solutions. Selecting the particles with lower execution cost, wherein the fitness function is defined as follows:
Figure BDA0001457813160000103
case 3 both particles are not feasible solutions. Particles with smaller execution times are selected because the particles are more likely to become viable solutions after evolution. The fitness function is defined as shown in formula (13).
Figure BDA0001457813160000104
Particle update strategy
As shown in equation (6), the PSO includes three core components: an inertial component, an individual cognitive component, and a social cognitive component. In order to overcome the defect of premature convergence of the traditional PSO algorithm, the ADPSOGA algorithm introduces mutation and cross operation of a genetic algorithm and updates corresponding parts in the formula (6). The particle i is updated at time t in the manner shown in equation (14), where Mu() Denotes mutation operation, Cg() And Cp() Indicating a crossover operation.
Figure BDA0001457813160000102
The inertia part in the formula (6) is combined with the variation operation idea in the genetic algorithm, and the updating mode of the inertia part is shown as a formula (15), wherein r1Is a random number between 0 and 1. Mu() Randomly selecting a fraction of the particles, irregularly changing the fraction value, and the new values must all be within the corresponding threshold values. Fig. 3 shows the variation operation on the encoded particle of fig. 2, a quantile mp1 is randomly selected, and the value at the position mp1 is updated from (0,1,2) to (1,2,0), and the variation meets the scheduling criteria.
Figure BDA0001457813160000111
The individual cognition and social cognition parts in the formula (6) are combined with the genetic algorithm cross-operation idea, and the updating results are respectively shown in formulas (16) and (17). r is2And r3Is a random number between 0 and 1, Cp() (or C)g() Two bins of the particle are randomly selected, and the values between the bins are interleaved with the values between the corresponding pBest (or gBest) bins. Fig. 4 shows the crossover operation of the cognitive part of the individual (or society), randomly generating two crossover positions (i.e. cp1 and cp2), replacing the value between the positions of the particles cp1 and cp2 with the value of pBest (or gBest) in this interval.
Figure BDA0001457813160000112
Figure BDA0001457813160000113
Mapping of particles to scheduling results
Pseudo code is designed that maps from the encoded particles to the workflow scheduling process. The algorithm inputs include workflow w, initialization resource pool RintialAnd a coded particle X. First, for scheduling S ═ Re, Map, Ttotal,Ctotal) Initializing four elements. After initialization, the estimated execution time matrix Exe _ T [ | w | × | R for each subtask corresponding to different types of instances is calculatedintial|]Element Exe _ T [ i ] in the matrix][j]Representing a subtask tiIn virtual machine mvjTo the estimated execution time. Computing estimated communication time, T, between single and multiple clouds of data volume between subtasksintra[i][j]Representing a single cloud sub-task tiThe amount of data generated is communicated to the subtask tjEstimated time required, Tinter[i][j][p][q]Representing a subtask tiSubtask t for communicating generated data volume from cloud p to cloud qjThe estimated time required.
Through the above operations, all information to obtain a candidate solution from the encoded particle has been obtained. Progressively scanning each position of particle X to generate pairsSet of Re and Map for response. Based on 'problem coding', the coding bits of the particles correspond to subtasks, and the value of the bit corresponds to instance resources, thereby determining the subtask tiIs assigned to instance rX(i)The above. Requiring a computation subtask tiIs estimated starting time STtiHere, two cases are distinguished:
a) subtask tiIs a true incoming task, i.e. it has no direct predecessor subtasks. When the virtual machine rX(i)When available, the subtask tiStarting execution immediately, it estimates the start time STtiFor a virtual machine rX(i)Rented time LETrX(i). In addition, the virtual machine r needs to be judgedX(i)Whether the virtual machine is started or not, if not, the virtual machine needs to be started, and the rented time LETr of the virtual machineX(i)I.e. the initialization time T of the virtual machineboot(rX(i))。
b) Subtask tiIt is not an inbound task, i.e., it has one or more parent tasks. Subtask tiNot only can be executed when the resources are free, but also all the father tasks of the virtual machine r can be executed, and the generated data is communicated to the virtual machine rX(i)Can be executed. Dispatching operator task tiPseudo code of latency and data communication cost while considering virtual machine rX(i)Whether it has already been activated.
Has calculated the subtask tiIs estimated starting time STtiThe subtask t needs to be calculated according to its estimated execution time and data communication time on the virtual machineiIs estimated to be the end time ETti. For the calculation of data communication time, the calculation is needed according to the descendant subtasks tcWhether or not to cooperate with subtask tiThe allocation is determined in the same cloud, and there are three cases:
a)tcand tiIf the virtual machine executes on the same virtual machine, the communication time transfer is 0.
b)tcAnd tiIf the virtual machine is executed in the same cloud but on different virtual machines, the communication time transfer is Tintra[i][c]。
c)tcAnd tiRespectively executing on different clouds (such as cloud p and cloud q), the communication time transfer is Tinter[ip][cq]。
Subtask tiDispatch to virtual machine rX(i)Its start time STtiAnd an end time ETtiAnd adding the mapping relation of the equal four elements into the Map set. Subsequently judging the virtual machine rX(i)Whether it has already been added to the rental resource Re, and if not, the addition is made. Virtual machine rX(i)Is equal to the subtask tiThe estimated completion time of (2). And finally, respectively calculating the total execution time and the total execution cost of the workflow according to the formula (3) and the formula (4). And outputting the scheduling scheme S corresponding to the coded particles.
Designing a calculation subtask tiLatency and communication cost. First, the waiting time T is initializedwaitAnd a data communication cost Ctranfer. Subtask tiThe latency is equal to the maximum data communication time among all its parent tasks. Current subtask tiAnd its parent task tpThe data communication costs are taken into account when assigning to different clouds.
Parameter setting
The inertial weight factor w of equation (6) can determine the convergence and search capability of the PSO algorithm. When w is small, the algorithm has strong local search capability; otherwise, the algorithm has stronger global search capability. In the initial stage of algorithm execution, the diversity of problem space search and the particle global search capability are emphasized more, and as the search is deep, the local search capability is emphasized more in the later stage. Therefore, the weight of the inertia weight factor w should gradually decrease as the number of iterations of the algorithm increases. Equation (18) is a classical inertial weight factor adjustment strategy. Wherein, wmaxAnd wminRespectively, a maximum value and a minimum value set at the time of w initialization, iterscurAnd itersmaxRespectively representing the iteration number of the current algorithm and the maximum iteration number set by initialization.
Figure BDA0001457813160000121
In the above classical inertia weight factor adjustment strategy, the change of w is only related to the number of iterations, and the nonlinear, complex and variable characteristics of the practical problem cannot be well satisfied. The weight value of the inertia weight factor w should be continuously evolved along with the evolution of the population particles, so that an inertia weight factor adjusting strategy which is adaptively adjusted according to the quality of the current population particles is constructed. The strategy adjusts the inertial weight factor size based on the degree of difference between the current particle and the global historical optimal particle, as shown in equation (19). Wherein div (X)t-1,gBestt-1) Represents a particle Xt-1And global history optimal particle gBestt-1The bit number of different quantiles, and T is the number of subtasks in the workflow.
Figure BDA0001457813160000122
When div (X)t-1) When the value is smaller, it represents particle Xt-1And gBestt-1The difference degree is small, so the weight of w should be reduced to ensure that the particles can be better searched in a small range to find an optimal solution; otherwise, the weight of w should be increased to make the search space of the particles larger, so as to find the optimized solution space more quickly. Therefore, the weight calculation formula of the inertia weight factor w is updated as follows:
Figure BDA0001457813160000131
in addition, two cognitive factors c of the algorithm1And c2And setting by adopting a linear increase and decrease strategy. The updating method is shown as formula (21) and formula (22), wherein c1A start and c2Respectively denotes parameter c1And c2Initial value of iteration, c1End and c2_ end represents the parameter c, respectively1And c2The final value of the iteration.
Figure BDA0001457813160000132
Figure BDA0001457813160000133
Fig. 5 is an algorithm flowchart of the scheduling method of the present invention, which specifically comprises the following steps:
step 1: the relevant parameters in the initial scheduling method are as follows: population size 100, maximum iteration number 1000, inertial weight factor, cognition factor and other parameters c1_start=0.9,c1_end=0.2,c2_start=0.4,c2End is 0.9, generating an initial population.
Step 2: calculating the fitness values of the particles under different conditions according to the particle mapping strategy and the formulas (11), (12) and (13), selecting the particle with the minimum fitness value as a population global optimal particle, and setting each particle in the first generation as a history optimal particle.
And step 3: the particles are updated according to the particle update formulas (14) to (17).
And 4, step 4: and recalculating the fitness value of each particle, and if the fitness value of the current particle is smaller than the historical optimal value of the current particle, updating the new particle into the historical optimal particle of the current particle.
And 5: and if the fitness value of the current particle is smaller than that of the population global optimal particle, updating the particle into the population global optimal particle.
Step 6: checking whether an algorithm termination condition is met, and if so, terminating the algorithm; otherwise, go to step 3.
The above are preferred embodiments of the present invention, and all changes made according to the technical scheme of the present invention that produce functional effects do not exceed the scope of the technical scheme of the present invention belong to the protection scope of the present invention.

Claims (1)

1. A workflow scheduling method considering communication and computing cost under a multi-cloud environment is characterized in that: based on the structure and execution characteristics of the workflow and relevant factors of current cloud resource environment communication and execution cost, and based on the idea of random two-point cross operation and random single-point variation operation of a genetic algorithm, the diversity in the population evolution process is improved, virtualized resources are integrated, data communication cost and task calculation cost are considered, the resource utilization rate is optimized, and the execution cost is reduced on the premise of meeting the workflow deadline; the workflow scheduling method is specifically implemented as follows,
defining the workflow scheduling method as S ═ Re, Map, Ttotal,Ctotal) Where Re represents a set of virtual machine resources Re ═ { vm) that need to be enabled1,vm2,...,vmr},Map={(ti,vmj)|ti∈V,vmjE.g. Re represents the mapping relation of the subtask corresponding to the virtual machine resource Re in the workflow, TtotalRepresents the execution completion time of the workflow, and CtotalThen the total workflow execution cost is represented; the workflow is represented by a directed acyclic graph G (V, E), where V represents a set of vertices { t } containing n tasks1,t2,...,tnE represents the data dependency relationship between tasks E12,e13,...,eij}; each data dependent edge eij=(ti,tj) Representing a subtask tiAnd subtask tjThere is a data dependency relationship between, where the subtask tiIs a subtask tjOf the direct predecessor node, and sub-task tjThen it is the subtask tiThe direct successor node of (1);
each virtual machine has a corresponding virtual machine type spiAnd corresponding switch-on times Tls (vm)i) And a closing time Tle (vm)i) (ii) a When the subtasks are scheduled to be completed, there is a corresponding set of actual execution start times AST (t)i) And actual execution completion time AET (t)i) And new communication data cannot be generated after the task is taken out; thus, the workflow execution completion time TtotalAnd a corresponding total execution cost CtotalAs shown in the following equations, respectively:
Figure FDA0003012638160000011
Figure FDA0003012638160000012
the first half of the formula (2) represents the execution cost of the virtual machine, and the second half represents the data communication cost; lambda [ alpha ]pThe cloud service provider p sets specific asking price unit time and subtask t for the service provided by the cloud service provider pkIs a subtask tjP (t) ofj) And p (t)k) Respectively represent execution tjAnd tkThe service provider of (2); when t isjAnd tkWhen executed by the same cloud service provider, sjkIs 0, i.e. no inter-cloud data communication is generated, otherwise sjkIs 1;
based on the related definitions, the workflow scheduling problem with the deadline constraint in the multi-cloud environment can be formally expressed as a formula (3), and the core idea is to pursue the execution cost CtotalAt the lowest, make the execution time TtotalLess than or equal to workflow deadline D (W);
Figure FDA0003012638160000013
then, the following algorithm is executed to achieve the execution cost CtotalAt the lowest, make the execution time TtotalWorkflow deadline D (W):
s1: the initialization related parameters are as follows: population size 100, maximum iteration number 1000, inertia weight factor w and cognition factor parameter c1_start=0.9,c1_end=0.2,c2_start=0.4,c20.9, generating an initial population;
s2: calculating the fitness values of the particles under different conditions according to a particle mapping strategy and fitness functions of the particles, namely formulas (4), (5) and (6), selecting the particle with the minimum fitness value as a population global optimal particle, and setting each particle in the first generation as a self historical optimal particle;
Figure FDA0003012638160000021
Figure FDA0003012638160000027
Figure FDA0003012638160000028
wherein, formula (4) represents the fitness function of the particle when one particle is a feasible solution and the other particle is an infeasible solution, formula (5) represents the fitness function of the particle when both particles are feasible solutions, and formula (6) represents the fitness function of the particle when both particles are infeasible solutions;
s3: updating the particles according to the particle updating formulas (7) to (10);
Figure FDA0003012638160000022
Figure FDA0003012638160000023
Figure FDA0003012638160000024
Figure FDA0003012638160000025
wherein, formula (7) represents the update mode of the particle i at time t, Mu() To representMutation operation, Cg() And Cp() It is indicated that the cross-over operation,
Figure FDA0003012638160000026
and gBestt-1Respectively obtaining the self historical optimal position of the particle i and the historical optimal position of the whole population after t-1 iterations; equation (8) represents the update mode of the inertial part, r1Is a random number between 0 and 1; equations (9) and (10) represent the update methods of the individual recognition and social recognition parts, respectively, and r2And r3Is a random number between 0 and 1;
s4: recalculating the fitness value of each particle, and if the fitness value of the current particle is smaller than the historical optimal value of the current particle, updating the new particle into the historical optimal particle of the current particle;
s5: if the fitness value of the current particle is smaller than that of the population global optimal particle, updating the particle into the population global optimal particle;
s6: checking whether an algorithm termination condition is met, and if so, terminating the algorithm; otherwise, go to S3.
CN201711077227.6A 2017-11-06 2017-11-06 Workflow scheduling method considering communication and computing cost under multi-cloud environment Active CN107656799B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711077227.6A CN107656799B (en) 2017-11-06 2017-11-06 Workflow scheduling method considering communication and computing cost under multi-cloud environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711077227.6A CN107656799B (en) 2017-11-06 2017-11-06 Workflow scheduling method considering communication and computing cost under multi-cloud environment

Publications (2)

Publication Number Publication Date
CN107656799A CN107656799A (en) 2018-02-02
CN107656799B true CN107656799B (en) 2021-06-25

Family

ID=61119821

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711077227.6A Active CN107656799B (en) 2017-11-06 2017-11-06 Workflow scheduling method considering communication and computing cost under multi-cloud environment

Country Status (1)

Country Link
CN (1) CN107656799B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108647771A (en) * 2018-05-07 2018-10-12 福建师范大学 The layout method of research-on-research flow data under a kind of mixing cloud environment
CN110519317B (en) * 2018-05-21 2021-02-12 华为技术有限公司 Data transmission method and equipment
CN110033076B (en) * 2019-04-19 2022-08-05 福州大学 Workflow data layout method for cost optimization in mixed cloud environment
CN110264097A (en) * 2019-06-26 2019-09-20 哈尔滨理工大学 More scientific workflows based on cloud environment concurrently execute dispatching method
CN112492032B (en) * 2020-11-30 2022-09-23 杭州电子科技大学 Workflow cooperative scheduling method under mobile edge environment
CN114925935A (en) * 2022-06-21 2022-08-19 福州大学 Multi-workflow scheduling method for time delay constraint in cloud edge environment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104484230A (en) * 2014-12-31 2015-04-01 中国科学院遥感与数字地球研究所 Multiple satellite data centre workflow scheduling algorithm on basis of near data calculation principle
CN105068863A (en) * 2015-07-16 2015-11-18 福州大学 Cost-driven scheduling method for workflow with deadline constraints in cloudy environment
CN106648831A (en) * 2016-12-08 2017-05-10 杭州电子科技大学 Cloud workflow scheduling method based on firefly algorithm and dynamic priority algorithm

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104484230A (en) * 2014-12-31 2015-04-01 中国科学院遥感与数字地球研究所 Multiple satellite data centre workflow scheduling algorithm on basis of near data calculation principle
CN105068863A (en) * 2015-07-16 2015-11-18 福州大学 Cost-driven scheduling method for workflow with deadline constraints in cloudy environment
CN106648831A (en) * 2016-12-08 2017-05-10 杭州电子科技大学 Cloud workflow scheduling method based on firefly algorithm and dynamic priority algorithm

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Cost- and Deadline-Constrained Provisioning for;Maciej Malawski等;《SC12: Proceedings of the International Conference on High Performance Computing, Networking, Storage and Analysis》;20130225;第1-11页 *
Deadline Constrained Load Balancing Level Based Workflow Scheduling for Cost;Sobhan Omranian-Khorasani等;《2017 2nd IEEE International Conference on Computational Intelligence and Applications》;20170911;第113-118页 *
基于遗传算法的网格服务工作流调度的研究;郭文彩;《计算机应用》;20060131;第26卷(第1期);第54-56页 *
多云环境下基于代价驱动的科学工作流调度策略;林兵等;《模式识别与人工智能》;20151031;第28卷(第10期);第865-875页 *

Also Published As

Publication number Publication date
CN107656799A (en) 2018-02-02

Similar Documents

Publication Publication Date Title
CN107656799B (en) Workflow scheduling method considering communication and computing cost under multi-cloud environment
Chen et al. Energy-efficient offloading for DNN-based smart IoT systems in cloud-edge environments
Zhu et al. Task scheduling for multi-cloud computing subject to security and reliability constraints
Lin et al. Fast GA-based project scheduling for computing resources allocation in a cloud manufacturing system
CN110489229B (en) Multi-target task scheduling method and system
Chen et al. A set-based discrete PSO for cloud workflow scheduling with user-defined QoS constraints
Kaur et al. Deep‐Q learning‐based heterogeneous earliest finish time scheduling algorithm for scientific workflows in cloud
Xiao et al. A cooperative coevolution hyper-heuristic framework for workflow scheduling problem
Kamalinia et al. Hybrid task scheduling method for cloud computing by genetic and DE algorithms
CN108320059B (en) Workflow scheduling evolution optimization method and terminal equipment
Kalra et al. Multi‐criteria workflow scheduling on clouds under deadline and budget constraints
CN109634742A (en) A kind of time-constrain scientific workflow optimization method based on ant group algorithm
Pooranian et al. Hybrid metaheuristic algorithm for job scheduling on computational grids
Subramoney et al. Multi-swarm PSO algorithm for static workflow scheduling in cloud-fog environments
Wangsom et al. Multi-objective scientific-workflow scheduling with data movement awareness in cloud
CN109710372A (en) A kind of computation-intensive cloud workflow schedule method based on cat owl searching algorithm
Ye et al. SHWS: Stochastic hybrid workflows dynamic scheduling in cloud container services
Peng et al. Genetic algorithm-based task scheduling in cloud computing using mapreduce framework
Keivani et al. A review of recent methods of task scheduling in cloud computing
Yang et al. A fully hybrid algorithm for deadline constrained workflow scheduling in clouds
Srinadh et al. Implementation of dynamic resource allocation using adaptive fuzzy multi-objective genetic algorithm for iot based cloud system
Amini Motlagh et al. A new reliability‐based task scheduling algorithm in cloud computing
Agarwal et al. An Adaptive Genetic Algorithm-Based Load Balancing-Aware Task Scheduling Technique for Cloud Computing.
CN110297704B (en) Particle swarm optimization method and system integrating reverse learning and heuristic perception
Masdari et al. Energy-aware computation offloading in mobile edge computing using quantum-based arithmetic optimization algorithm

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