LPSO: Another Algorithm for Workflow Scheduling in the Cloud

: Although workflow scheduling problem has been discussed by many researchers, a few efficient solutions have been introduced for Cloud computing. In this article, we present LPSO, a novel algorithm for workflow scheduling. Based on the Particle Swarm Optimization method, our proposed algorithm not only ensures the fast convergence but also avoid being trapped on local extrema. Our simulation experiments using CloudSim testing real scenarios reveal that LPSO is superior to formerly proposed algorithms. Moreover, the deviation between the solution found by LPSO and the optimal solution is negligible.


Introduction
Cloud computing emerged with the promise of securing on-demand and convenient access to shared computing resources such as storage, servers and networks. Scheduling is one of the challenges that are encountered when processing workflow tasks over geographically distributed servers. An effective solution for that problem requires a reasonably efficient scheduling algorithm in order to minimize the completion time (called makespan) of tasks. The rest of the article is structured as follow. Section 2 surveys some of the related research germane to workflow scheduling algorithms. Section 3 describes the communication and computation model on which Cloud tasks operate. Based on this model, section 4 presents our proposed scheduling algorithm Local-search PSO (LPSO). Section 5 describes the simulation experiments we ran using the CloudSim platform (Ullman, 1975) in order to evaluate our algorithm. Section 6 concludes the article by giving pointers to potential future work.

Workflow Scheduling: Problems and Approaches
A workflow is a sequence of connected tasks. Scheduling tasks in the Cloud is challenge because each task needs to be mapped to an suitable server in order to satisfy some performance constraints. In general, this scheduling problem has been proved to be NP-complete (Ullman, 1975). Hence, past works mainly banked on heuristic-based solutions for scheduling workflows.
For example, Parsa and Maleki (2009) presented a Grid-based solution that minimizes the makespan of workflows. Agarwal and Jain (2014) managed to assign a suitable priority sequence number to a task using a greedy algorithm. Huang (2014) suggested a scheduling solution for workflows that is based on genetic algorithms. Pandey et al. (2010) proposed an effective scheduling solution (PSO_H) that reduced the execution cost. In this work, we use the simulation kit, CloudSim (Buyya et al., 2009) to simulate the execution of the tasks with different scheduling policy.
Using Hybrid Genetic Algorithms, Guo-Ning and Ting-Lei (2010) presented an optimized algorithm for task scheduling. The authors investigated several QoS requirements such as cost, distance, bandwidth, completion time, reliability of various types of tasks. Guo et al. (2012) introduced a scheduling solution in the Cloud that minimizes the overall execution and transmission time. Based on small position value rule, he proposed the PSO algorithm. Rajkumar and Mala (2012) proposed an hierarchical scheduling algorithm which helps satisfy different levels of service agreements with prompt response from the service providers. Xue and Wu (2012) proposed the hybrid PSO algorithm to minimize the execution cost of the workflow. The PSO algorithm relies on crossover and mutation of genetic algorithms in order to improve the global search. In (Liu et al., 2013), the researchers presented an intelligent scheduling system for jobs that are processed in the Cloud. Kennedy and Eberhart (1995) introduced an evolutionary optimization technique called Particle Swarm Optimization (PSO). For updating the position vector, they proposed the following formula:

The Particle Swarm Optimization Method
Where: v i k , v i k+1 = Velocity of particle i at iteration k and k+1 x i k , x i k+1 = Position of particle i at iteration k and k+1 ω = Inertia weight; c 1 , c 2 : Acceleration coefficients rand 1 , rand 2 = Random number between 0 and 1 pbest i = Best position of particle i; gbest: position of best particle in a population The goal of PSO is find the position that minimizes the fitness function, denoted by:

Topological Neighborhood for the PSO
In the original version of the PSO algorithm, all particles are directly connected to each other so there are no neighborhood relationships between them. The new position of an particle is determined based on the global best position among all the particles (gbest) and on its personal best position (pbest). However, various personal relationships, such as parent-child relationships, in real world do exist. This compelled some researchers (Zavala, 2013) to propose topological neighborhood between particles in PSO's. Researches have applied various topological neighborhoods such as the Ring neighborhood, Von Neuman neighbourhood etc (Calheiros et al., 2011) where each particle shares its local best position with other particles in the topological space. For this reason each particle is affected by the local best (lbest) in its local neighborhood instead of pbest. In PSOs that use a local best position, the formula for updating the position vector is: where, lbest i is the local best position of particle i with the best fitness value among its neighbors. As shown in Fig. 1, the neighborhood relationships are determined based on each topology. For example, in the Ring topology, each particle has k neighbors. In this study we set k = 2 so each particle x i connects directly to its left-neighbor (Left(x i )) and its right-neighbor (Right(x i )). Based on the Ring topology, we build a searching function described as follow: xwhere

Problem Formulation
A workflow can be denoted as a Directed Acyclic Graph (DAG) represented by G = (V, E), where: • V is set of vertex, each vertex represents a task • T = {T 1 , T 2 ,…,T M } is the set of tasks, M is the number of tasks • E represents the data dependencies between these tasks. The edge (T i , T j ) ∈ E denotes that task T i is the parent of the task T j and that the data spawned by T i are consumed by task T j The workload of each task T i should be fully executed by any server S j ∈S • The computation of taskT i denoted by W i (flopfloating point operations) • P(S i ) denotes the computational power of server S i (MI/s: million instructions/second) • The function B(S i ,S j ) represents the directed bandwidth from server S i to server S j represents where function B(): S×S → R + . We assume that B(S i ,S i ) = ∞ and B(S i ,S j ) = B(S j ,S i ) • D ij denotes data produced by task T i and consumed by task T j The function f(): T→S represents a scheduling plan where f(T i ) is the server that processes task T i The above assumptions lead to: • The execution time of task T i is: • The communication time between task T i and task T j is: where, makespan is the time elapsed between a task's start and finish times.

Escaping Local Extremum
As PSO algorithms progress, they may get trapped in a local extremum. We here propose the following method for escaping such local extrema: When the swarm gets stuck in an area around a local extremum, we combine the PSOs having topological neighborhood with a neighborhood searching function (Liu et al., 2007) to move particles to the new area.

Variable Neighborhood Searching Function
In order to help the swarm escape from the area around the local extrema, we designed 2 operators named Exchange and RotateRight, as illustrated in the 9. end while End.
Note: If the function cannot find a better position than the current position (x i ) within the Max_Iteration limit, x i is returned.

The LPSO Algorithm
The LPSO algorithm can be described as follows:  At each iteration, the LPSO updates the position vectors of particles based on gbest and lbest using formulas (2) and (3). If the deviation of gbest less than ε during K continuous generations, this means that the swarm is stuck in a local extremum and hence the function Variable_Neighbourhood_Searching() should be called. This function moves (migrates) the swarm to a new area and produces a new generation.
If gbest is not improved significantly, i.e., the deviation of gbest is less than ε after K continuous migrations upon calling the function Variable_Neighbourhood_Searching(), LPSO halts. In our experiments, we set K = 30, ε = 0.21. In the best case, LPSO can find the absolute position upon calling the function Variable Neighbourhood Searching()K times.
In the case of LPSO fall into a trap of the local extremum, LPSO will escape from the area around the extremum by calling the function Variable_Neighbourhood_Searching( ).

Results and Discussion
We conducted some experiments in order to compare the performance of the LPSO algorithm with others, namely the PSO_H (Pandey et al., 2010) and Random (Mitzenmacher and Upfal, 2005). Our experimental setup consists of a computer with RAM 4GB, Intel Core i5 2.2 GHz and Windows 7 Ultimate. We used Java, the simulation tool CloudSim and the library Jswarm (Calheiros et al., 2011) to conduct our simulation experiments.

Problem Instances
We use both random and real world instances in our experiments using the following data sets: • The computation power of the servers and the bandwidth of connections between servers are collected from Cloud providers such as Amazon (Vliet and Paganelli, 2011) and their web site (exp. http://aws.amazon.com/ec2/pricing) The ratio of the number of edges to the number of vertexes of graph Gcan be formulated as follows:

Configuration Parameters
The Cloud's configuration parameters are chosen as follows: • Server's computation power: From 1 to 250 (million instructions/s) • Connection bandwidth B: From 10 to 100 (Megabit/s) • Communication data D: From 1 to 10000 (Megabit) • ω = 0.729; c 1 = c 2 = 1.49445; K = 30, Deviation ε = 0.21 • Number of particles NoP = 25 ; ε = 0.21 ; α: from 0.2 to 0.7 • Our default threshold for number of generations is 300. Once the algorithm exceeds this threshold, the execution is terminated. Both of LPSO and PSO_H are executed with the number of generations is 300, after that their best results are recorded and listed in the Table 1 Results Each problem instance was executed 30 times continuously. The results described in Table 1 show that the mean value (listed in column Mean) and standard deviation value (listed in column STD) of LPSO are better than those of PSO_H (Pandey et al., 2010) and Random (Mitzenmacher and Upfal, 2005)  [t] = 3.8 then T t gets assigned to server S 4 . Inevitably, this introduces some sort of randomness in the assignment of servers in the PSO_Halgorithm (Pandey et al., 2010) and hence it cannot maintain the diversification of swarm. For this reason, PSO_H often gets trapped in local extrema.
Alternatively, we introducea new method. The left hand side x i k+1 will be assigned to the server whose computation power is the closest to ( In other words, the new position of a particle is the one that makes a task get assigned to a server whose computation power is the closest to the real value computed from the position vector. The results described in Table 1 shows that the mean (under the Mean column) and standard deviation (under the STD column) of LPSO are better than those of PSO_H (Pandey et al., 2010) and Random (Mitzenmacher and Upfal, 2005) in most of the cases. The solutions of LPSO are smaller than the solutions of PSO_H with a value difference varying from 1 to 12%. The LPSO's standard deviations are smaller than the PSO_H's with a value difference varying from 53 to 84%. These results show that LPSO is stable and better than both the PSO_H (Pandey et al., 2010) and Random (Mitzenmacher and Upfal, 2005).   Figure 3-8 depict the performance of the three algorithms: Proposed algorithm LPSO, PSO_H (Pandey et al., 2010) and Random (Mitzenmacher and Upfal, 2005) where the vertical axis represents the makespan (seconds) of the schedule. For each instance, we evaluate the mean value (column MEAN), standard deviation value (column STD) and the best position vector (listed in column BEST), At the first instance, LPSO even found the optimal solution.

Conclusion
Minimizing the makespan is the ultimate objective of any scheduling algorithm. In addition to that objective, our proposed algorithm also avoid being trapped on local extrema. The contributions of our paper are: • Building a novel approach, represented by the function Variable_Neighbourhood_Searching, to help optimization algorithms escape from a local extremum • Proposing a novel scheduling algorithm called LPSO by augmenting the PSO strategy with the Variable Neighbourhood Searching function The simulation results suggest that LPSO is superior to its predecessor especially when LPSO operates in a larger Cloud with respect to the number of tasks and servers are larger. As a future work, we plan to enhance the LPSO algorithm in order to process bigger instances in a reasonable makespan.