Abstract

We propose a cloud service scheduling model that is referred to as the Task Scheduling System (TSS). In the user module, the process time of each task is in accordance with a general distribution. In the task scheduling module, we take a weighted sum of makespan and flowtime as the objective function and use an Ant Colony Optimization (ACO) and a Genetic Algorithm (GA) to solve the problem of cloud task scheduling. Simulation results show that the convergence speed and output performance of our Genetic Algorithm-Chaos Ant Colony Optimization (GA-CACO) are optimal.

1. Introduction

Cloud service is a service that users obtain through the network, which features instant response and scalability. Nowadays, there are mainly three service modules for cloud computing [1]: IaaS, SaaS, and PaaS. Infrastructure as a Service (IaaS) enables customers to acquire services from updated and powerful computer infrastructures via the internet. Software as a Service (SaaS) is a software mode also provided through internet. Users can lease a web-based application to meet their business-level requirements without permanently buying the whole software package. Platform as a Service (PaaS) provides a platform allowing customers to develop, run, and manage applications without the complexity of building and maintaining the infrastructure typically associated with developing and launching an application. And to efficiently complete various tasks submitted by clients, a task scheduling method is absolutely needed. Some works have been done in this area like adaptive scheduling strategies [2], and the cloud task scheduling method introduced in this paper is an application of PaaS.

Owing to the features [3] like on-demand resource allocation and varieties of flexible and high-quality services, cloud computing is widely used for processing large-scale tasks. How to schedule large quantities of tasks reasonably is thus of vital importance for allocating resources on the cloud, necessitating research into cloud computing task scheduling strategy.

As cloud computing services have grown in popularity, the amount of data and tasks to be dealt with have also sharply increased, requiring a lot of system resources and sometimes resulting in severe resource waste. We therefore aim to schedule these data and tasks more efficiently. In order to analyze the problem at a somewhat detailed level, we have built a module for cloud task scheduling, as shown in Figure 1. The Task Scheduling System (TSS) consists of three modules. One is a user module, which provides an interface for users to submit requests that will be pushed into a Queue of Tasks (QOT) later.

In order to facilitate analysis of request processing, we assume that requests sent by users are arriving in a Poisson distribution [4]. The second module is a data center [5] (DC), which is an infrastructure-level service provided by the cloud provider. It encapsulates a series of hosts whose resources are allocated at the same time. These in turn host a series of virtual machines which form the Virtual Cloud Network (VCN); each virtual machine is called a Virtual Cloud Network node, with properties including accessible memory, processors, and storage capacity that are mainly responsible for task processing. Finally, the third module is a task scheduling module, the core of TSS. TSS moves tasks from QOT into memory, allocating the necessary resources from the scheduler module based on a certain job scheduling algorithm in order to meet customer’s requirements.

The rest of the paper is organized as follows: Section 2 explains our objective function and describes our assumptions. In Section 3, we will talk about three algorithms, namely, the GA, CAO, and GA-CACO, in detail and describe how to use them to solve the cloud task scheduling issue in TSS. Section 4 presents and analyzes the simulation results to test our algorithms. Finally, we will conclude our work in Section 5.

2. Problem Formulation

The goal of cloud scheduling is to optimize the process of tasks and VCN. An excellent task scheduling algorithm leads to better system performance. We can consider our task scheduling problem as an NP problem. A lot of algorithms have been suggested to tackle the NP problem [69]. For example, Genetic Algorithms and Ant Colony Algorithms, as well as some other heuristic algorithms, are characterized by fast convergence and robustness. Previous studies on cloud scheduling mostly focus on a single scheduling algorithm [1012]. [13] solves the task scheduling problem using the Genetic Algorithm (GA) and [14] adopts Ant Colony Optimization (ACO). The search performance of the Genetic Algorithm is fast globally, but the efficiency of searching decreases when searching scale increases because of the redundant iterations at the start of the algorithm. Besides, due to its poor stability, it is difficult for the algorithm to converge to a stable solution. The Ant Colony Algorithm, on the other hand, is less likely to be able to solve problems as it is unware of the whole picture at the beginning phase, resulting in its slow convergence. However, as the pheromone grows during the process, the capability of searching using the Ant Colony Algorithm has also been enhanced thanks to the positive feedback mechanism. Some research like [15, 16] has also proposed Chaos Ant Colony Optimization (CACO) to overcome the slow convergence of ACO, but these still have local optimum defects. In this paper, we propose the Genetic Algorithm-Chaos Ant Colony Optimization (GA-CACO) Algorithm, which inherits the chaotic motion characteristics of CACO to overcome the deficiency of pheromone in early phase and also utilizes the crossover as well as mutation feature of the Genetic Algorithm to deal with the problem of local optimum in ACO.

In this paper, we will take makespan and flowtime as the criteria of algorithm’s performance in cloud task scheduling. Makespan represents the time when TSS finishes the latest task. Flowtime equals the sum of execution time of all tasks [17]. We propose GA, ACO, and GA-CACO algorithms to study the cloud task scheduling problem and compare their performance later in the paper.

2.1. Assumptions

In order to perform a quantitative analysis of the TSS system modules, we will make some assumptions as follows.(1)Tasks can be expressed within the range of code instruction length, which also is the size of the task.(2)The arrival of tasks follows the Poisson distribution and the length of the queue is unbounded.(3)Each node is independent of all others and each node can only execute one task at a time.(4)When nodes fail, they do so independently of one another.

2.2. Objective Function

As previously mentioned, tasks are stored in QOT and then scheduled by TSS. TSS’s task processing can be divided into three phases [16]: waiting, scheduling and execution, and feedback. We do not discuss feedback as it is not relevant to this research.

First, we assumed that tasks follow a M/G/S queuing model [17]: specifically, tasks reach TSS following a Poisson distribution and service times have a general distribution. Suppose that the arrival rate of task is , where is the number of tasks and the service rate is . According to Atencia and Moreno [18], we derive the average waiting time for a task:where stands for residual service time and represents system utilization.where is the number of network nodes.

During the TSS operation, QOT pops tasks, the th task is denoted as , and submits them to VCN (as shown in Figure 2) to be executed. We can then get a task execution time matrix [19], PTM: where represents the time consumed by node to process task . We acquire the total time of task by

Thus

We try to minimize the makespan and flowtime, so the objective function can be expressed aswhere and are weight coefficients, with and and . Here, we want to consider makespan and flowtime to be equally important; thus we assign , and this objective function will be seen as the criteria for computing individual fitness in the later section.

3. Algorithm Application

3.1. Genetic Algorithm (GA)

For an optimization problem, a number of candidate solutions that are called individuals and whose abstract representations are named chromosomes, are improved in each iteration and eventually evolve to the optimum solution. The Genetic Algorithm (GA) uses a selection operation to determine the survival for each individual. That is, the fitness of the whole population is evaluated. Multiple individuals are chosen randomly from the current population based on their fitness, and individuals with high fitness are inherited in the next generation with a higher probability; on the contrary, for low fitness individuals, the probability of being inherited in the next generation is smaller. For each generation, a new population is generated according to the natural selection process described above and mutation.

3.1.1. Selection Operation

The roulette selection [20, 21] method is the most commonly used method for selecting individuals in the natural selection process just outlined above. As shown in Figure 3, the basic idea of a selection operator, also known as proportional selection, is to set the probability of an individual being selected in proportion to its fitness function value. If we imagine that the population size is and the fitness of an individual is , then probability that will be selected by our operator is

Assuming that every individual’s chromosome represents a small sector on a wheel and its size is proportional to the fitness of the chromosome, then individuals with better adaptability are more likely to be chosen.

3.1.2. Genetic Operations

In order to promote evolution of populations and speed up convergence towards the optimal solutions, as well as to increase the diversity of the population, we need to perform genetic operations such as crossover and mutation on the individuals selected according to the roulette selection discussed previously.(a)Crossover operationTwo chromosomes interchange part of their genes with each other based on the crossover probability, forming two new individuals.Before crossover:After crossover:(b)Mutation operationMutation changes the code string of a chromosome of an individual to a new value of certain gene. The mutation operation is a good method to maintain population diversity.Before mutation:After mutation

3.1.3. GA Algorithm Framework for Cloud Task Scheduling

See Algorithm  1.

Step  1. Initialization (configure parameters, initialize VCN)
Step  2. While iteration t < maximum iterations do:
    Calculate fitness value of every individual;
    Select individuals using roulette rotation method;
    Crossover and mutate individuals which has been selected to produce new individuals;
Step  3. End while
Step  4. Return best solution
3.2. Ant Colony Optimization (ACO)

An Ant Colony Optimization algorithm is a random probability model made to search for an optimal path, which is inspired by how ants discover a path to food. Ants will release a certain amount of pheromones as they explore. Gradually, the pheromone concentration on the shortest path becomes higher and attracts more ants, thus forming a positive feedback which leads to the discovery of the best path. Initially, the amount of pheromone on edges is assumed to be a small positive constant ; in this paper, we set . For each iteration of ACO, each ant gradually establishes a path to the “food.” When an ant arrives at a certain node, it will make a decision on the next one it is going to visit. Imagine an ant is located at node ; then the probability that the ant will be at node one step later is where are the adjacent nodes of node . is a factor used to amplify the impact of pheromone concentration. If is too large, it will overpower the impact of the pheromone, leading the algorithm to converge to a suboptimal path. From experience, we assign . Finally, we assume that the amount of pheromones released by ants walking along a path is : where represents the fitness value of the VCN node path that the ant is at iteration . When it is in the iteration, the pheromone concentration for each path becomes where is the number of ants and is the pheromone evaporation parameter.

3.2.1. CAO Algorithm Framework for Cloud Task Scheduling

See Algorithm  2.

Step  1. Initialization (configure parameters, initialize QOT, VCN, and initialize the initial position of
     all ants)
Step  2. While iteration t < maximum iterations do:
Calculate the next position of ants according to the equation (8).
     Calculate the fitness value of every candidate solution.
Update pheromone matrix according to equation (10).
Step  3. End while
Step  4. Select the optimal solution and return.
3.3. Genetic Algorithm-Chaos Ant Colony Optimization (GA-CACO)

When the ant colony system initializes, the pheromones of all paths take the same value, so the selecting probability of all the paths is the same. It is difficult to find an optimal path under this condition, resulting in slow convergence time for Ant Colony Optimization. To overcome this problem, some researchers have proposed the Chaotic Ant Colony Algorithm (CACO) [22], which combines the chaotic behavior of a single ant and the intelligent organization actions of an ant colony. CACO introduces an organization variable which is used to control self-organization process of the ant colony. Initially, the influence of the organization variable on the behavior of a single ant is small. As the organizational variable changes, its impact on the behavior of a single ant grows stronger. When the effect is large enough, the chaotic behavior of ants will disappear. Then, ants can move in a more regular way. Through the whole process, every ant exchanges information with its neighbors. However, the behavior is partial: a Chaotic Ant Colony Algorithm may easily fall into a local minimum, although this scenario is less likely to occur than for an ACO. In this paper, GA-CACO is proposed, merging GA and CACO. Due to the global search of GA, CACO can effectively avoid local minimum values.

Here we will introduce the mathematical model of CACO. Formula (11) describes the changes of organizational variables:

The position of ants depends on the following: where represents the organizational variable in the iteration time for the ant . is the organization factor, which affects the convergence speed of the optimization process. Generally, and . is the position of ant in -dimensional space, with in our case. decides the attractive factor of ants’ chaotic dynamical behavior in phase space. is a constant adjusting search scope of . is the best position that ant and its neighbors found within steps; and are two positive constants which can be selected as and .

3.3.1. GA-CACO Framework for Cloud Task Scheduling

See Algorithm  3.

Step  1. Initialization, configure parameters.
Step  2. While iteration t < maximum iterations do:
     Calculate the distance between one ant and others, choose its neighbors and store its position and
     object value;
      Update organization factor and position of ants according to formulas (11), (12);
     Based on GA, modify genes of population, producing new individuals.
Step  3. End while
Step  4. Select the optimal solution and return.

4. Simulation Results

In this section, we will show that simulation results verify the usefulness of the algorithm. In this experiment, we have compared the results of three options: GA, CAO, and GA-CACO. The GA-CACO algorithm indeed has the best performance. The experiment is performed under the hardware environment with “Intel Core-i3-2310 CPU-2.10 Ghz” processor and 10 G RAM. More details about resource allocation are shown in Table 1.

Figure 4 shows the results of GA-CACO, ACO, and GA algorithm execution under different task sizes. The “Cost Value” is objective function; lower value is expected. The figure shows that GA-CACO algorithm is more efficient than other two algorithms when task amount is large. Specific values are shown in Table 2. Figure 5 compares the convergence rate of GA-CACO and ACO; the figure shows that GA-CACO and ACO algorithms are stable, while GA-CACO converges faster than ACO.

5. Conclusion

In this paper, we present a cloud service task scheduling model TSS, which consists of three modules: a user module, a data center module, and a task scheduling module. In the user module, we assume that the tasks model is a Poisson process. In the task scheduling module, because of the deficiencies of GA and ACO, we have proposed a GA-CACO algorithm, which merges GA and CACO. And finally, we compared GA-CACO, GA, and ACO for several different task sizes. The results indicate that GA-CACO algorithm is optimal for the optimization of the objective function and also has acceptable convergence speed.

Competing Interests

The authors declare that they have no competing interests.

Acknowledgments

This work was supported by the Project 61201153 supported by National Natural Science Foundation of China, the Research Project of CCF-Qimingxingchen Hongyan (CCF-VenustechRP2016004), and the National 973 Program of China under Grant 2012CB315805.