Background

As cloud computing and its applications have come into wide use such as security [1], IoT [2], and vehicular ad hoc networks [3], it is important for cloud users to provide an efficient task scheduling technique since cloud computing is based on the pay as you go pricing model [4]. For a cloud user, it is important to finish the cloud user’s tasks as quickly as possible in cloud computing environments [5].

For instance, suppose there are two cloud task schedulers (schedA and schedB) for cloud users. The cloud task schedulers deploy the tasks of the users according to the specification of their algorithm. If the expected makespan of schedA is 151 s and that of schedB is 130 s, then the user will choose schedB for the tasks deployment since the user will pay more as much as schedA takes longer than schedB (for 21 s) if the user chooses schedB.

Ant colony optimization (ACO) is one of nature-inspired optimization algorithms and is based on the population of the ant movement. It transcribes the cooperative behavior of the ant colony system for solving a particular optimization problem. When ants travel in search of food, the ants secrete a chemical trail called pheromone and the ants like to travel along the trails that have the strongest pheromone scent. For ACO, the role of the trail of pheromone is to share their experience about the journey for solving an optimization problem efficiently.

In this paper, we propose a novel ACO based algorithm called slave ants based ant colony optimization (SACO) that schedules tasks of cloud users to virtual machines (VMs) in cloud computing environments in an efficient manner with optimized parameter mapping. The proposed algorithm solves the global optimization problem with slave ants by avoiding long paths whose pheromones are wrongly accumulated by leading ants.

The rest of this paper is organized as follows. The next section discusses about related work for the ant colony optimization and cloud task scheduling techniques. Then, we present details of system model for SACO and the proposed task scheduling algorithm in “Slave ants based ant colony optimization algorithm for task scheduling”. We give our results highlighting the efficiency of our proposed algorithm with scalable settings in “Performance evaluation”. Finally, we conclude the paper in “Conclusion”.

Preliminaries and related work

Ant colony optimization

Ant colony optimization is an evolutionary computational technique proposed by Dorigo et al. [6]. The ACO is composed of three steps for a cycle:

  • explore() Release ants for finding the destination.

  • pheromoneUpdate() Update pheromones the ants travel across the paths.

  • iteration() Compare paths the ants found and find the best path if a predefined condition is met. Otherwise, iterate the process of finding the destination.

Figure 1 illustrates an example of finding the shortest path of the journey. If an ant encounters three-forked paths, it selects one of the three paths with probability parameters. After these processes iterate, ants will follow the shortcut because pheromones are most accumulated on the shortcut.

Fig. 1
figure 1

An example of finding the shortest path

Related work

There are three categories for task scheduling strategies in cloud computing environments: focusing on performance by improving of cloud task schedulers (Category 1), considering multi-objective (e.g., QoS, energy consumption, financial cost, and SLA) for finding optimal solutions (Category 2), and using nature-inspired optimization algorithms to solve cloud task scheduling problems (Category 3).

Category 1

The total processing time of cloud tasks is one of most important factors for schedulers. To reduce the total processing time, several research studies have been proposed with heuristic algorithms. In [7], the authors divided the scheduling problem into two parts: the diversity detection and improvement detection. Then, it dynamically selects one of the heuristic algorithms to solve the scheduling problem. In [8], the authors considered information of tasks (i.e., task completion time and size of tasks) and the information is used in the self-adaptive scheduling technique to reduce total processing time and average response time. To solve dependency issues of cloud tasks, the scheduling problem can be translated to the directed acyclic graph (DAG) [9]. To address the performance issue, the authors of [10] proposed a prioritizing scheme of the DAG of tasks and the authors of [11] proposed an AREA-Oriented scheduling (AO-scheduling) to compensate the defects of cloud based scheduling problems. The authors of [12] proposed a workflow scheduling based on directed search optimization (DSO) with artificial neural network (ANN) and radial basis function neural network (RBFNN).

Category 2

In cloud computing environments, there are additional factors to be considered for scheduling tasks (e.g., QoS, energy consumption, financial cost, and SLA). To incorporate these influencing factors, a multi-objective optimization method has been proposed with four performance metrics (makespan, cost, deadline violation rate, and resource utilization) [13]. As energy consumption becomes the key issue for the operation and maintenance of cloud datacenters [14], the authors of [15] introduced the concept of skewness to measure the unevenness of servers’ resource utilization.

Category 3

As one of the nature-inspired optimization algorithms, ACO has been widely used for solving cloud task scheduling problems. In [16], the authors employed the concept of lazy ants for finding solutions. However, it introduces additional preprocessing time due to travel iterations. The authors of [17] used ACO to schedule cloud tasks with a random approach. Our slave ants based ant colony optimization algorithm for task scheduling differs from previous work in that we adapt diversification and reinforcement strategies with slave ants and the proposed ACO algorithm solves the global optimization problem with slave ants by avoiding long paths whose pheromones are wrongly accumulated by leading ants.

Although security issues are also of concern for using cloud computing environments, we focus on task scheduling mechanisms to improve the performance and server utilization. Mitigating threats [18] and detecting attacks [19] in cloud computing environments are beyond the scope of this paper. Nonetheless, our approach can be applied in various cloud computing architectures since the scheduling component can be developed and easily integrated to the cloud system without dependency.

Slave ants based ant colony optimization algorithm for task scheduling

System model

Figure 2 shows the architecture framework model for SACO. When a user submits a set of cloud tasks, the task manager accepts the tasks and manages them with the task scheduler. The task scheduler, on which the proposed task scheduling algorithm resides, is responsible for deciding the task allocation to resources. The task scheduler interacts with the resource manager, which is able to monitor the physical/logical resources and the flow of task allocation from the task scheduler.

Fig. 2
figure 2

The system framework model for SACO

The resource manager periodically monitors resources (physical and virtual machines) and stores information about CPU utilization and memory usage. Then, the stored information can be used for the task scheduler. Therefore, the task scheduler maintains up-to-date resource information by collecting and updating the system’s information from the resource manager.

The basic rules for scheduling cloud tasks are as follows: (1) it collects information about cloud tasks and resources from the resource manager, (2) it checks whether the resource VM j meets the requirement of the task T i . Note that the requirement is dependent on the specification of the scheduling algorithm, and (3) the scheduler allocates the task T i to resource VM j with the help of the resource manager.

The proposed task scheduling algorithm

In ACO, there are rules for state transitions and pheromone updates. For the state transition rule, the probability that an ant transits from node i to j is determined by Eq. 1.

$$p_{i,j} = {\tau}_{i,j}^{\upalpha} \cdot\eta_{i,j}^{\upbeta} /\varSigma l \notin S{\tau}_{i,l}^{\upalpha} \cdot\eta_{i,l}^{\upbeta} ,$$
(1)

where α and β are parameters that determine the amount of pheromones and pheromone reinforcement. The symbols used in our ACO based algorithm are listed in Table 1.

Table 1 The list of symbols used in the algorithm

To enhance the performance of the task scheduler in cloud computing environments, we adapt a diversification strategy with slave ants. The basic idea of the diversification strategy is to have different probability parameters for slave ants to solve the task scheduling optimization problem. The probability parameter for slave ants is determined by Eq. 2.

$$s_{n} = q_{0} \times n/k,$$
(2)

where ∀n ∈ {1, 2, …, k}, s n q 0 , and 0 < q 0  < 1.

With Eq. 2, each slave ant of the colony system has a different probability parameter and less dependency with other ants.

To reduce makespan of cloud tasks, an effective pheromone update scheme is essential. For the reinforcement strategy, we employ the acceleration parameter of local pheromones evaporation. The local pheromone update rule used in our algorithm is based on Eq. 3.

$$\tau_{i,j} = \, ( 1- \upphi - d)\tau_{i,j} + \upphi \tau_{0} ,$$
(3)

where ϕ is the parameter for local pheromones evaporation and τ 0 is the initial value of pheromone.

Based on the local pheromone update rule, the proposed global pheromone update rule can be applied with Eq. 4.

$$\tau_{i,j} = \, ( 1- p)\tau_{i,j} + \Delta \tau_{i,j}^{\text{best}} .$$
(4)

Algorithm 1 shows the proposed task scheduling algorithm based on ACO with slave ants. The input of the algorithm is a set of cloud tasks and resources (VMs) and the output is the best mapping information between the tasks and resources. At the initial stage of a cycle, it releases all the ants of the colony system for finding solutions.

The assignment of a task to a resource is dependent on the probability parameter determined by Eq. 1. For an ant group (including a normal ant and its slave ants), makespan information is updated (Line 10). With updated makespan information, one of ants will become a normal ant whose makespan is best for the group. Other ants except the elected normal ant become slave ants and one of slave ants whose make space is worst will be designated as a weak ant (Line 11–12). Then, the local pheromone update procedure is performed (Line 13).

After all the ants of the colony system finish the journey, the makespan information is recoded. Among normal ants, the one that has the best mapping information between cloud tasks and resources will be elected as a queen ant. Next, the global pheromone update procedure is performed. Then, the queen ant’s makespan is better than the existing map (T i , R j ) best , the queen ant’s mapping is assigned to map (T i , R j ) best (Line 17–19). Finally, the algorithm returns map (T i , R j ) best . The next cycle will be performed again when the predefined condition is not met. Otherwise, the cloud scheduler deploys the cloud tasks to the resources with the returned mapping information.

Performance evaluation

In this section, we provide experimental results to show the efficiency of the proposed cloud task scheduling algorithm in terms of makespan. Since cloud computing environments adapt virtualization technology [20], scalability should be considered enabling large-scale distribution [21]. Table 2 shows the experimental settings. To show the scalability of the algorithm in terms of the number of tasks, we vary the number of cloud tasks from 100 to 700 in comparison with default ACO and IACO algorithms [17].

Table 2 Experimental settings

Figure 3 shows the performance results of makespan for ACO, IACO, and SACO. When the number of cloud tasks is 100 and 200, ACO outperforms IACO since IACO relies solely on uncertainty based on probability parameters. In other words, in IACO, the leading ants affect the global optimization and it is very prone to local minima.

Fig. 3
figure 3

Performance results of ACO, IACO, and SACO as the number of cloud tasks increases (makespan)

The performance gaps among the three algorithms increases as the number of cloud tasks increases. When the number of cloud tasks is 200, the difference of the makespan between ACO and SACO is about 15 s, and that between IACO and SACO is about 5 s. However, when the number of cloud tasks is 700, the difference of makespan between ACO and SACO is over 50 s, and that between IACO and SACO is over 20 s. This signifies that SACO is cost-efficient, that is, a cloud user using our proposed task scheduling algorithm will pay less when there are many tasks to submit to cloud computing environments.

Figure 4 shows the performance results for ACO, IACO, and SACO (the preprocessing time + makespan). It is interesting to note that SACO does not outperform ACO and IACO when the number of cloud tasks is 100. The reason why SACO results in longer makespan is that SACO involves the preprocessing time for slave ants. However, this preprocessing overhead is negligible and it incurs once at the initial stage of task scheduling. As the number of cloud tasks increases, the makespan of SACO is always less than ACO and IACO. This shows the efficiency of the proposed task scheduling algorithm and the effectiveness of the pheromone update scheme based on slave ants.

Fig. 4
figure 4

Performance results of ACO, IACO, and SACO as the number of cloud tasks increases (preprocessing time + makespan)

Figure 5 depicts the performance results for ACO, IACO, and SACO with different experiments. ACO shows the worst performance among the three algorithms. The reason why ACO results in the worst performance is that the leading ants affect the global optimization. In other words, if the leading ants travel long paths, it is hard to reach the shortcut among the paths. The performance results of IACO fluctuate with different experiments since it is based on a random approach. Therefore, IACO sometimes outperforms SACO. However, SACO outperforms ACO and IACO on average. The average makespan of SACO is about 180 s, but that of ACO and IACO is about 220 and 200 s, respectively. Overall, the proposed cloud task scheduling algorithm guarantees the globally optimal solution with negligible preprocessing overheads.

Fig. 5
figure 5

Performance results of ACO, IACO, and SACO with different experiments

Conclusions

In this paper, we proposed a novel ACO algorithm called SACO with slave ants for scheduling tasks in cloud computing environments. We adapt diversification and reinforcement strategies with slave ants to avoid long paths whose pheromones are wrongly accumulated by leading ants. The proposed algorithm introduces minimal preprocessing overheads for slave ants and outperforms the existing ACO based cloud tasks scheduling strategies. Experimental results show that SACO solves the NP-hard problem in an efficient way, while maximizing utilization of cloud servers. Our future work is to consider heterogeneous clusters because the cost is determined also by the type of computing instances.