Cloud Computing Task Scheduling Model Based on Improved Whale Optimization Algorithm
The efficiency of task scheduling under cloud computing is related to the effectiveness of users. Aiming at the problems of long scheduling time, high cost consumption, and large virtual machine load in cloud computing task scheduling, an improved scheduling efficiency algorithm (called the improved whale optimization algorithm, referred to as IWC) is proposed. Firstly, a cloud computing task scheduling and distribution model with time, cost, and virtual machines as the main factors is constructed. Secondly, a feasible plan for each whale individual corresponding to cloud computing task scheduling is to find the best whale individual, which is the best feasible plan; in order to better find the optimal individual, we use the inertial weight strategy for the whale optimization algorithm to improve the local search ability and effectively prevent the algorithm from reaching premature convergence; we use the add operator and delete operator to screen individuals after each iteration which is completed and updated to improve the quality of understanding. In the simulation experiment, IWC was compared with the ant colony algorithm, particle swarm algorithm, and whale optimization algorithm under a different number of tasks. The results showed that the IWC algorithm has good results in terms of task scheduling time, scheduling cost, and virtual machine. The application is in cloud computing task scheduling.
The allocation of resources between users and enterprises is currently a concern of people from all walks of life. Task scheduling is a key technology in cloud computing to control resources and improve system stability, which directly affects user experience. So far, the design of many task scheduling algorithms has become a hot topic. Effective combination in the existing task scheduling algorithm can save the task completion time, meet the user’s service quality requirements, and improve the load balance of the system. Cloud computing follows the principle of on-demand allocation [1, 2], by establishing a huge resource pool, and then selecting the most appropriate resource for the user according to the user’s needs. It uses virtualization technology to centralize various resources and then uses specialized software to automatically manage the resources, so that users do not have to worry about other problems besides tasks. In this mode, the relationship between user task processing time and cost will be inseparable. Cloud computing often has to deal with a huge number of tasks, and resource scheduling has become a core issue. In scheduling, issues like cost, load balancing, and service quality are all unavoidable factors .
The whale optimization algorithm (WOA) is one of the relatively new metaheuristic algorithms. It can provide good global search capabilities and can be widely used in various engineering problems. In this article, we try to use the whale optimization algorithm to solve the task scheduling in cloud computing. The experimental results show that the algorithm has a better scheduling effect under different number of tasks. Literature  merges Min–Min and Max–Min into a genetic algorithm and uses this algorithm for cloud computing task scheduling. In cloud computing scheduling, a given task optimizes the task execution time, load, and cost price of cloud computing; maps the task scheduling scheme to the whale algorithm model; and obtains the optimal solution by using WOA. We propose an advanced method called IWC (improved whale optimization algorithm), which is mainly used to improve the search ability of the best solution of the WOA algorithm. The contributions of this paper are as follows: (1) in order to improve the efficiency of cloud computing task scheduling, a multiobjective optimization model for task scheduling is proposed, and WOA is used to solve the entire problem; (2) an IWC algorithm is proposed, which improves the convergence and accuracy of the WOA-based method which improves the efficiency of task scheduling; (3) describes the implementation process of the IWC algorithm and compares it with the ACO, PSO, and WOA algorithms. The experimental results show that the algorithm works under different task quantity conditions. Down has a better scheduling effect.
The rest of this article is organized as follows. The second section introduces the related work. The third section describes our scheduling system model. The fourth section introduces IWC; the fifth section proposes the implementation details of the improved IWC; in the sixth section, we simulated the algorithm and explained the scheduling effect; and the seventh section is the end of this article.
2. Related Work
For task scheduling under cloud computing, many scholars first established cloud computing task scheduling models from different perspectives and then used metaheuristic algorithms to solve the scheduling models and achieved good scheduling results. Due to space limitations, this article only elaborates on commonly used metaheuristics. Literature  uses the Genetic Algorithm to optimize task scheduling with energy consumption as the main goal; Literature  merges Min–Min and Max–Min into the Genetic Algorithm for the cloud computing task scheduling. The above results show that the use of the Genetic Algorithm in cloud computing tasks can reduce task completion time, reduce energy consumption, and improve resource utilization. Literature  used Ant Colony Optimization to handle the node load in the cloud in order to bring users a better user experience; Literature  used Ant Colony Optimization in the green cloud computing. The above results show that cloud computing effectively reduces the completion time, improves the efficiency of the node load, and reduces operating costs. Literature  used Particle Swarm Optimization based on two different inertial weights in cloud computing task scheduling to reduce task completion time; Saleh et al.  used the improved Particle Swarm Optimization for cloud computing task scheduling with the goal of average task length and scheduling success rate. Literature  proposed a binary-based Artificial Bee Colony for grid computing; Literature  used the Artificial Bee Colony to handle the allocation of energy-aware resources under cloud computing. The above results show that using Artificial Bee Colony can effectively reduce energy consumption and save user costs. Literature  proposed the use of a hybrid Shuffled Frog Leaping Algorithm for resource and workflow scheduling in cloud computing; Literature  proposed a cloud computing task scheduling algorithm based on ACO and PSO. Experiments show that this algorithm can help improve the efficiency of cloud computing scheduling. Literature  proposed a cloud computing task scheduling algorithm based on a mixture of ACO and WOA. Simulation experiments show that this algorithm is indeed better than ACO and WOA in cloud computing scheduling. Literature  proposed a QoS-aware scheduling algorithm (QoS-DPSO); experimental results show that QoS-DPSO can effectively improve the performance and obtain the high reliability; Literature  proposed a cloud computing task scheduling algorithm based on game theory. Simulation experiments show that the algorithm has better performance. Literature [17, 18] proposed the Huffman coding method and the whale optimization algorithm used in wireless sensor networks, which provide a new idea for cloud computing resource scheduling.
3. Cloud Computing Task Scheduling Model
In cloud computing, the task scheduling strategy will directly affect the resource utilization efficiency of the underlying system. Therefore, how to allocate tasks has become a key issue in cloud computing scheduling. This article mainly focuses on the performance of different scheduling algorithms. Therefore, assuming that all tasks submitted by users are logically independent of each other, the task scheduling process in the cloud environment can be summarized as the following three steps. First, we input the detailed information of the task and the available computing resources. Secondly, the tasks and resources will be mapped according to certain strategies, and the operation will be performed according to the mapping. The task plan of the control layer will generate an optimized task execution plan to meet certain assigned requirements (that is, the optimization goal). Finally, the optimized plan is delivered to the underlying task processing layer for execution, and the output result is sent to the user. The advantage of adopting this mode is that it can reduce the calculation delay, reduce the calculation cost, and improve the user experience effect. This article takes load balancing, completion cost, and execution time as the reference basis for users to evaluate cloud computing (Quality of Service, QoS) services .
Let the task set be and the resource node collection is , in which . Task scheduling under cloud computing can be represented by the following matrix:
In the matrix , is 1, which means the task is performed on task , or is 0, , . This article defines the attributes of each resource node including processing capacity (that is, processing time), initial memory (that is, the load of response processing), and resource bandwidth (that is, reflecting the cost of processing). Therefore, the three vectors of virtual machine resources are the processing power vector , load capacity vector , and resource bandwidth vector . At the same time, each task corresponds to three matrices, which are the processing power vector , load capacity vector , and resource bandwidth vector ; are the unit prices. Therefore, the time target function , load target function , and cost target function are shown as follows.
In the formula, refers to the value of the task, refers to the value of the virtual machine, refers to the value of the task, refers to the value of the virtual machine, refers to the value of the task, and refers to the value of the virtual machine. For our presentation in the following, we use the notations as listed in Table 1.
Since the results represented in the three matrices of resource nodes and task nodes have different standards, they need to be normalized, so the above three objective functions are expressed as follows:
Therefore, the task function set in this article is
In the formula, , , and are the weight values of , , and , respectively, and . Therefore, is the optimal scheme for cloud computing task scheduling.
3.1. Whale Optimization Algorithm
In 2016, Mirjalil and Lewis  proposed a whale optimization algorithm (WOA) based on the behavior of whales’ preying in the sea. In the WOA algorithm, the humpback whale in the search space is a candidate solution in the optimization problem, also called the “search agent.” The WOA algorithm utilizes a set of search agents to determine the global optimal solution to the optimization problem. The search process for a given problem begins with a set of random solutions, and the candidate solution is updated by the optimization rules until the end condition is met. The whale optimization algorithm is divided into three stages: surrounding preying, bubble attack, and food search.
3.2. Surrounding Prey
In the initial stage of the algorithm, humpback whales do not know where the food is. They find the location of food by group work. Therefore, the whale closest to the food is equivalent to the current local optimal solution, and other individual whales may approach this position and gradually surround the food. So, it can be expressed in the following mathematical model:
where indicates the distance vector from the search agent to the target food, is the current iteration number, and are the coefficient vectors, is the local optimal solution, is the position vector, and and are expressed as follows:
where represents a linear decrement vector from 2 to 0 and is a random number between 0 and 1.
3.3. Bubble Attack
At this stage, it is simulated that the humpback whales carry out a bubble attack, and the behaviors of whales’ preying and bubbling are designed by shrinking the surrounding and spiral position updating to achieve the purpose of local optimization of the whale. (1)Principle of shrinking the surrounding. According to formula (10), the humpback whales are shrinking the surrounding. When , the individual whales are approaching the whale at the current best position; the larger is, the bigger the steps the whales are taking, and vice versa.(2)Spiral position updating. The individual humpback whale firstly calculates the distance from the current optimal whale and then swims in a spiral mode. When the food is being searched, the mathematical model of the spiral swimming is
where indicates the distance vector from the individual whale to the best whale distance, is a constant, and is a random vector between 0 and 1. In order to be able to maintain shrinking the surrounding circle and swim along the spiral path to the food, the following position updating equation is established:
3.4. Food Searching Stage
By controlling the vector, the humpback whales swim to get food. When , the individual humpback whales are approaching the position of the reference humpback whale and they swim towards the updated position of the humpback whale randomly selected, which ensures that the individual humpback whales can perform a global search to obtain a global optimal solution, and its mathematical model is expressed as follows:
where is a position vector of the randomly selected reference humpback whale.
4. Task Scheduling in Cloud Computing Based on Improved Whale Optimization Algorithm
Compared with other advanced algorithms, the WOA algorithm has the advantages of simple operation and few parameters, but it has the problems of slow convergence, easily falling into the local optimum, and low convergence precision. Therefore, it was improved from two aspects of local search and global search in this dissertation.
4.1. Introduce Inertial Weight to Improve Local Search Ability
In Ref. , the inertial weight adopted in the PSO algorithm was beneficial to the local development of the algorithm and accelerated the convergence speed. Therefore, the inertial weight had an important influence on the convergence speed and local optimum. The inertial weight had a great influence on the WOA algorithm. Generally speaking, the WOA algorithm was to introduce the inertial weight, which decreased linearly with the increase of the number of iterations. This method satisfied that the algorithm required a large inertial weight in the early iteration but a small weight in the later period. However, if the global optimal value appeared in the early iteration of the algorithm and the inertial weight could not be efficiently and quickly reduced, then it might affect the tracking speed and accuracy of the algorithm; if it only depended on the inertial weight, of which the number of iterations was linearly decreasing, then it was difficult to effectively jump out of the local optimum for the local convergence of the algorithm. In order to make the inertial weight effectively adjusted, an adaptive inertial weight was proposed, which not only could depend on the change of the iteration number but also needs to consider the influence of the concentration of humpback whales, so as to achieve the purpose of improving the convergence speed and the optimal solution accuracy.
In the adaptive WOA algorithm, an iteration number factor and a humpback whale clustering factor are introduced. indicates the relationship between the current iteration and the total number of iterations. The formula for calculating the iteration factor is as follows:
where indicates the number of current iterations, is the maximum number of iterations, and is a constant greater than 1. Obviously, the curve of this iterative factor is a decreasing function related to , and a larger weight can be obtained in the early iteration of the algorithm but a smaller weight in the later iteration. However, when the iterative period reaches the optimal value of the problem to be optimized, the inertial weight cannot be effectively reduced. In this paper, is used to adjust the aggregation degree of humpback whales, and the fitness function is used to represent the value of . Although the average cost of the IWC algorithm is lower than the other three algorithms, overall, the difference between the four algorithms is very small. When is relatively larger, it means that a large inertial weight is needed. On the contrary, it means that a smaller weight is needed. Therefore, the calculation formula is as follows:
In (18)–(20), is the average value of the adaptive value, indicates the adaptive value of the humpback whale , is the variance of the adaptive function value, and is the total number of humpback whales.
Therefore, in the adaptive adjustment process of inertial weight in the WOA algorithm, it should be fully considered for the influence of iteration factor and humpback whale clustering on inertial weight, so that the whale group can quickly converge to the global optimal position by adjusting the inertial weight with and to improve the accuracy of the algorithm. So, the adaptive weight formula is as follows:
where and indicate maximum and minimum values of the adaptive weights, respectively. In this dissertation, was selected as 0.9 and as 0.2. Therefore, formula (17) in the whale optimization algorithm is improved to obtain the following formula:
4.2. Add Operator and Delete Operator
After each iteration of IWC, there is a lack of screening of individuals, which affects the effect of the next individual iteration, thus affecting the performance of the algorithm as a whole. Therefore, this paper uses the addition and deletion of operators to update the individuals after each iteration, so as to select individuals with better quality. This paper uses the trigger rules in literature  for the use of the operator. The rules are as follows.
Rule 1: if the optimal individual is continuously updated in the generation 2GP, and , then the delete operator is executed to delete individuals;
Rule 2: if the optimal individual is not continuously updated in the generation GP, and , then the delete operator is executed to delete individuals;
Rule 3: if the optimal individual is not continuously updated in the generation GP, and , then the increase operator is executed to add individuals
where is the initial clustering scale, is the largest clustering scale, and is the growth cycle.
4.2.1. Design of Increased Operator
By adding operators to increase new individuals in the clustering, new information about current optimal individuals can be shared so as to avoid excessive greed and thus reduce the diversity of the clustering as follows: (1)Determine the number of individuals to increase:
where indicates the individuals of current clustering. (2)Generation of parent individual set: the current clustering is divided into classes according to Algorithm 1, and the optimal individuals of all groups are selected to form an set.
According to Algorithm 2, generate individuals to form .
Select the value between 0 and 1: ,
where , in which is the optimal individual in the current cluster; individuals are generated to make up .
We generate the parent individual set .
(3) Generation of new individuals: randomly selected two individuals and from according to the following method
Therefore, according to the above description, the individual set was generated by Algorithm 1 in this dissertation, which avoided the excessive greed caused by directly selecting the individuals with the highest fitness and accordingly protected the diversity of the cluster. Then, the individual set generated by Algorithm 2 could be more evenly distributed in the search area than the individuals randomly generated by obeying the uniform part, so that the areas not randomly developed could be better searched. The individual set focused on learning of the optimal individual. By adding new individuals around the optimal one, the accuracy of the current optimal solution could be improved and the effectiveness of the algorithm could be protected. Therefore, by increasing the operator, the diversity of the cluster could be improved and the overall development capability of the algorithm was enhanced.
4.3. Design of Delete Operator
When the cluster is evolving, some individuals may be redundant inevitably. In order to further improve the efficiency of the algorithm, the delete factor should be designed to delete some redundant individuals. The design steps are as follows: (1)Determine the number of individuals to be deleted(2)Divide the cluster into classes according to Algorithm 1, and delete the worst individuals in each class. In this way, the deleted individuals are evenly distributed in the cluster, which is beneficial to preserve the diversity of the cluster
Therefore, when the cluster has not fully evolved during the evolution process and its size reaches the upper limit, it indicates that the cluster may fall into the local optimum, and if the size reaches the upper limit, it is impossible to add new individuals to improve the diversity. Then, the delete operator should be performed to remove the individuals with the least fitness and reserve a space for new individuals produced.
4.4. Algorithm Flow
The algorithm flow is shown in Figure 1.
5. Algorithm Complexity Analysis
Time complexity refers to the computational workload required in the execution of the algorithm, which mainly depends on the number of repeated executions of the problem. In the basic whale optimization algorithm, the time complexity is mainly influenced by the population size , the number of iterations , and the search dimension , and the time complexity of the basic WOA is . On the basis of the WOA, the complexity of the IWOA proposed in this paper has been increased as follows. The improved inertial weight to improve local search ability the complexity of .The addition operators and deletion operators increase the complexity of . Therefore, the total complexity of the IWOA is . The overall time complexity is higher than that of the WOA.
6. Experimental Simulation
In order to further verify the task scheduling effect of the algorithm in cloud computing, the algorithm IWC is compared with ACO, PSO, and WOA algorithms. The parameters required by the algorithm are shown in Table 1. Select CPU as Core i3, memory is 4 G DDR3, hard disk capacity is 1000 G, operating system is Windows 7, and software is MATLAB 2012. The experiment is divided into small-scale tasks and large-scale task cloud computing tasks. The comparison indicators are cost value, time value, and memory load value. In order to explain the effect of better scheduling, this paper sets the number of small-scale tasks to [0, 1000] and sets the number of large-scale tasks to [1000, 10000].
In order to further illustrate the efficiency of the algorithm in cloud computing task scheduling, the ant colony algorithm (ACO), Particle Swarm Optimization (PSO) algorithm, and whale optimization algorithm(WOA) were selected from the classical algorithms and compared with the algorithm proposed herein for task scheduling in cloud computing. Then, the cloud computing environment was simulated on the CloudSim simulation platform. The main parameters required by the algorithm here are shown in Table 2. Combined with the characteristics of the tasks in cloud computing, the tasks were divided into small-scale tasks and large-scale tasks, which were compared from time and cost in the QoS indicators, respectively. (1)Time comparison. In this paper, 7 test functions from CEC2017 (shown in Table 3) are selected to evaluate the performance of the proposed algorithm. These test functions have both high dimensions (30, 50, 100) and low dimensions (2, 5, 10) that can be compared with the ACO, PSO, WOA in all aspects at time comparison (shown in Table 4).
Table 4 show a comparison of the usage times of the 4 algorithms in different dimensions under the 7 test functions. It is found that the usage time of this algorithm is longer than those of ACO, PSO, and WOA in all dimensions. This shows that the algorithm in this paper has good performance. (2)Cloud task scheduling normalization index. Figures 2–4 show the comparison of the four algorithms for normalized cost values, normalized time values, and normalized load values. Figure 2 shows the normalized cost of the four algorithms. The normalized value of the ACO algorithm is much larger than the other three algorithms, and the cost normalized values between the PSO, WOA, and IWC algorithms are not much different. When the number of tasks is between [0, 65], the normalized result of the IWC algorithm is lower than the WOA algorithm which is higher than the PSO algorithm, and when the task exceeds 65, the normalized result of the IWC algorithm is lower than the PSO and WOA algorithms. From the overall effect, the cost normalization values of the four algorithms tend to be stable. Compared with the ACO algorithm, the PSO algorithm, and the WOA algorithm, the IWC algorithm is reduced by 31.32%, 13.48%, and 9.57%, respectively. This shows that the IWC algorithm can effectively reduce the task scheduling cost under cloud computing. Figure 3 shows the normalized time comparison of the four algorithms. The normalized time result of the ACO algorithm is much larger than the other three algorithms. When the number of tasks is between [0, 65], the normalization result of the IWC algorithm is lower than the WOA algorithm which is higher than the PSO algorithm. When the number of tasks exceeds 65, the normalization result of the IWC algorithm is lower than that of the PSO algorithm and the WOA algorithm. From the overall effect, the normalization time of the four algorithms tends to be stable. Compared with the ACO algorithm, the PSO algorithm, and the WOA algorithm, the IWC algorithm is reduced by 18.29%, 4.88%, and 3.05%, respectively. Figure 4 shows the normalized load values for the four algorithms. After the number of tasks is greater than 60, the ACO algorithm tends to a fixed value. After the number of tasks is greater than 18, the PSO algorithm tends to a fixed value. After the number of tasks is greater than 20, the algorithm curve tends to a fixed value. The IWC algorithm tends to a fixed value after the number of tasks is greater than 70. Overall, the load value of the IWC algorithm is lower than 15.99%, 0.44%, and 0.14%, respectively, compared to the ACO algorithm, PSO algorithm, and WOA algorithm.(3)Comparison of the number of small-scale tasks. Figures 5–7 show the cost, time consumption, and load comparison of the four algorithms for small-scale tasks. The cost consumption of the four algorithms is illustrated in Figure 5. The curves of four algorithms are gradually increasing with the increase in the number of tasks, but the curve of the IWC algorithm is relatively flat, although the average cost is numerically lower than the other three algorithms, but the overall difference between the four algorithms is small. Figure 6 shows the completion time of the four algorithms. It is found from the figure that as the number of tasks increases, the time consumption of the four algorithms becomes larger, but the overall four algorithms are not much different. However, the IWC algorithm has certain advantages in terms of time. Figure 7 shows the comparison of the load values of the four algorithms. From the curve in the figure, the load value curves of the four algorithms are basically consistent. This shows that the four algorithms have similar effects on the load.(4)Comparison of the number of large-scaled tasks. Figures 8–10 show the cost, time consumption, and load comparison of the four algorithms for large-scale tasks. Figure 8 shows the cost of the four algorithms. Along with the increasing number of tasks, the curves of the four algorithms are gradually increasing, and the cost of ACO, PSO, and WOA algorithms is not much different. The cost curve of the IWC algorithm is obviously better than that of the other three algorithms. IWC is reduced by 52.94%, 47.06%, and 45.88% compared with ACO, PSO, and WOA, respectively, which shows that the IWC algorithm can effectively reduce the task cost. Figure 9 shows the completion time of the four algorithms. It is found from the figure that as the number of tasks increases, the time consumption of the four algorithms becomes larger, and IWC is better than ACO, PSO, and WOA. And the time spent was reduced by 39.29%, 32.14%, and 30%, respectively. This shows that there is a certain advantage in terms of time completion. Figure 10 shows the comparison of the load values of the four algorithms. From the figure, the load values of the four algorithms will be slightly different with the increasing number of tasks, but the overall difference is not large.
From the comparison of the above three experiments, the IWC algorithm proposed in this paper has obvious advantages in task cost and completion time and is more suitable for task scheduling under cloud computing. However, the effect on the memory load value is not very obvious, which shows that the IWC algorithm has more room for server memory optimization.
This article introduces a WOA-based task scheduling method in cloud computing task scheduling, mainly to improve the effect of task scheduling under cloud computing. In order to further improve the scheduling performance based on the WOA algorithm, on the basis of the WOA algorithm, two optimization strategies of the IWC algorithm are proposed. The experimental results show that compared with some commonly used metaheuristic algorithms, it can be used in system load and system resource utilization. In terms of cost, the efficiency of cloud computing systems is greatly improved. In future work, in order to obtain better convergence speed and accuracy in task scheduling, we will consider proposing more advanced strategies to further improve the balance between exploration and development in the IWC method. At the same time, to reduce the scheduling cost and time of this method in the face of a large number of virtual machine workloads, we will use some more advanced features to extend the proposed performance model and method. Our long-term goal is to develop a cloud computing efficient scheduling system suitable for various task workloads.
Regarding the data, you can directly Email to me.
Conflicts of Interest
The authors declare no conflict of interest.
P. Kumar and A. Verma, “Scheduling using improved genetic algorithm in cloud computing for independent tasks,” in Proceedings of the International Conference on Advances in Computing, Communications and Informatics - ICACCI '12, pp. 137–142, ACM New York, 2012.View at: Google Scholar
K. Nishant, P. Sharma, V. Krishna, C. Gupta, K. P. Singh, and R. Rastogi, “Load balancing of nodes in cloud using ant colony optimization,” in 2012 UKSim 14th international conference on computer modelling and simulation, pp. 3–8, Cambridge, UK, 2012.View at: Google Scholar
A. A. A. Ari, I. Damakoa, C. Titouna, N. Labraoui, and A. Gueroui, “Efficient and scalable ACO-based task scheduling for green cloud computing environment,” in 2017 IEEE International Conference on Smart Cloud (SmartCloud), pp. 66–71, New York, NY, USA, 2017.View at: Google Scholar
N. Kumar and S. K. Sharma, “Inertia weight controlled PSO for task scheduling in cloud computing,” in 2018 International Conference on Computing, Power and Communication Technologies (GUCON), pp. 155–160, IEEE, Greater Noida, India, 2018.View at: Google Scholar
M. S. Sanaj and P. M. J. Prathap, “An efficient approach to the map-reduce framework and genetic algorithm based whale optimization algorithm for task scheduling in cloud computing environment,” Materials Today: Proceedings, vol. 37, pp. 3199–3208, 2021.View at: Google Scholar
W. Jing, C. Zhao, Q. Miao, H. Song, and G. Chen, “QoS-DPSO: QoS-aware task scheduling for cloud computing system,” Journal of Network and Systems Management, vol. 29, no. 1, pp. 1–29, 2021.View at: Google Scholar