Task consolidation based power consumption minimization in cloud computing environment

Cloud Computing is playing a huge role in future technology. Further, with the explosive growth of the Internet and cloud computing, several service providers, such as Amazon, Microsoft, IBM, and Google, have expanded their data centers and rapidly deployed data centers in different places around the world to deliver various cloud computing services. However, several challenges are raised with the wide spread use of cloud environment such as power consumption, load balance, reliability, scalability, and security. This paper tackles the power consumption problem and presents an efficient algorithm, called Task Consolidation based Power Minimization (TCPM), to efficiently schedule tasks onto available resources of the cloud environment so as to minimize power consumption. In proposed TCPM algorithm, several benefits of the existing algorithms are enhanced and incorporated into the TCPM algorithm, where the best-fit procedure is used to achieve the best possible resource utilization and avoid wasting energy. The results of the proposed TCPM algorithm are compared with other recent algorithms such as FCFS, WWO, and MCT algorithms using the CloudSim toolkit.


Introduction
Cloud computing is a type of distributed system that relies on virtualized resources to manage applications. Such system is viewed as a form of Internet-based computing in which different services such as data centers, storage, and applications are handed via the Internet [27].The numerous components in terms of databases, software capabilities, applications, and so on that are created to use the power of cloud resources to handle business challenges are referred to as cloud architecture. The entire cloud architecture is designed to provide users with high bandwidth, allowing them to access data and applications without interruption, an on-demand dynamic network with the ability to move rapidly and effectively between servers or even platforms, and, most significantly, network security.
Different cloud-based services have their specific cloud architectures [25]: & Software as a Service (SaaS) refers to software that is hosted and updated through the internet. Users do not need to install applications locally when using SaaS. & Platform as a Service (PaaS) is a type of middleware service that provides users with application platforms and databases. & Infrastructure as a Service (IaaS) makes cloud-based infrastructure and hardware including servers, networks, and storage devices available to users on a pay-per-use basis.
With the explosive growth of the internet, several network operators (such as Amazon, Microsoft, IBM, and Google) have expanded their network infrastructure and greater power data centers in different places around the world to produce cloud computing services. However, many issues concerning cloud computing need to be handled, including power consumption, scalability, reliability, cost, and security. This paper tackles the power consumption problem.
Cloud vendors are using a considerable number of servers in their network infrastructure. These in turn make data centers to consume an excessive amount of energy and increase carbon footprints inside the environment [2]. As to a study published in [13], if current technical and management growth continues, data center power consumption will explode, resulting in a massive increase in energy consumption. As a consequence, the focus of the present cloud research is on how to minimize energy consumption and carbon emissions through resource management and usage.
This paper presents an efficient algorithm; called Task Consolidation based Power Minimization (TCPM), to efficiently schedule tasks onto available resources of the cloud environment and apply task consolidation strategy to minimize power consumption in data centers. In proposed TCPM algorithm, several benefits of the existing algorithms are enhanced and incorporated into the TCPM algorithm, where the best-fit procedure is used to achieve the best possible resource utilization and avoid wasting energy. The TCPM algorithm is evaluated considering different condition and results are compared with the most recent algorithms such as FCFS, WWO, and MCT algorithms using the CloudSim toolkit.
The main contributions of our suggested TCPM algorithm, which combines various advantages of earlier algorithms, like the following: firstly, Use the best-fit strategy to maximize resource efficiency while reducing energy waste. Secondary combines Task Consolidation and Task Scheduling, both of which are incorporated into the TCPM algorithm to reduce power consumption, then schedule Tasks into virtual machines which Idle VM Empty. Subsequently, it works to achieve the best use of power consumption which improves reliability, throughput, and power consumption while lowering the failure rate.
The remainder of this paper is organized as follows. Section 2 presents power consumption scenarios and energy models in a cloud environment. Section 3 introduces the idea of task scheduling and task consolidation in cloud environment. Section 4 introduces a series of stateof-the-art of algorithms for minimizing energy consumption. Section 5 presents the proposed TCPM algorithm in details while Section 6 describes the proposed TCPM algorithm by illustration example. Section 7 presents the experimental results. Finally, the concluding remarks are listed in section 8.
2 Power consumption and energy models Figure 1 shows the data center energy consumption scenarios 2016:2030 [13]. Data center electricity expectations will expand from 286 TWh in 2016 to around 321 TWh in 2030. The authors in [13] illustrate a forecasting model of datacenter energy  [13] requirements explaining and knowledge consumption growth and imply that this rapid expansion isn't fully compensated by cost savings of data center technological advancements.
To handle power consumption, two forms of energy models are applied in algorithms to enhance resource utilization simultaneously with minimizing power consumption. The energy models may be used to build mathematical models of resource utilization.
A. Energy Model 1 The first energy model computes resource utilization using the following formula [7,11,14]: The total utilization of a virtual machinei is the sum of utilization of all tasks scheduled onto that virtual machine. The energy consumption may be calculated using the following formula: Where, P max is the power consumption at the peak load (or 100% utilization) and P min is the minimum power consumption of the active mode.

B. Energy Model 2
The second energy model estimates the energy using the amount of energy consumed by Idle and Non-Idle Virtual machines [6,21,22], as follows.
Where, U is the virtual machine utilization, E(IVM i ) is the energy consumption that consumed by idle virtual machine resources, and E(NVM i (U)) is the energy consumption that consumed by non-idle virtual machine resources.

Scheduling and task consolidation
Scheduling is the process of distributing a set T of n tasks to a set R of m cloud computing resources (virtual machines) [18]. There are two levels of scheduling in the cloud data centers: a series of rules for deploying VMs in a server at the server level and a series of rules for assigning tasks to VMs [12] at the VM level, as shown in Fig. 3. This study focuses on task scheduling algorithms at the VM level. The scheduling methodology is the strategy for identifying resources to implement tasks to reduce waiting and execution time [23]. Task consolidation is an efficient strategy for reducing power consumption. It employs virtualization technologies to consolidate tasks. The goal of the task consolidation technique is to maximize the utility of available resources in data centers. Simultaneously, eliminating resource dependency that is the main reason behind wasting a considerable amount of energy is inefficient resource utilization and overload of Communication [24].

Related work
Power consumption minimization has become a popular research issue throughout time. Many studies have focused on optimizing energy use through scheduling while others focused on combining task consolidation and scheduling to reduce power consumption. This section concentrates on the most successful strategies to minimize power consumption in cloud computing environments through using task consolidation and task scheduling techniques. The authors introduced the FCFS (First Come First Serve) algorithm to scheduling and organizing processes Execution based on their arrival time [8]. The Primarily Attributable of the FCFS is fulfillment first task or resource demand, followed by the following resource demand on the list when the previous one is finished. The Essential feature of FCFS Algorithm is employs the First-In, First-Out (FIFO) algorithm where automatically schedule tasks [8]. In a summary, it's an abstracted method of distributing resources to tasks throughout time as the current task is completed and the new task starts.

B. Energy-Aware Task Consolidation
Hsu et al. [9] proposed the ETC (Energy-Aware Task Consolidation) algorithm to minimize virtual machine power consumption. According to the authors, the system's resources limited to the CPU. To consolidate tasks on a virtual machine for a cloud system, they recommend a 70% utilization threshold [9] for CPU utilization resources on a virtual machine where it employs a best-fit migration approach for transferring jobs to whatever VM is available. When a cluster reaches its usage threshold (more than 70%) the task will be migrated to next cluster. If more than one virtual machine is suitable for consolidating the task, their technique will assess the power consumption for each one and compare them to see which one has the lowest power consumption before consolidating the task.

C. Energy-Efficient Task Scheduling Algorithm
Sanjaya K. Panda and Prasanta K. Jana [20] proposed an Energy-Efficient Task Scheduling Algorithm (ETSA) to minimize virtual machine power consumption. They combined task consolidation and scheduling to enhance the technique and make it stand out from the competition. The ETSA algorithm assumes heterogeneous resources and therefore does not enforce a fixed start or finish time of tasks [20]. Further, neither task has the same execution time nor resource utilization on virtual machines. That is both execution time and resource utilization for each task is distinct on a specified virtual machine as well as other virtual machines. Both the completion time and total utilization are estimated by using the ETSA algorithm. The ETSA algorithm employs the same energy model of the ECTC and MaxUtil algorithm.

D. Minimum Completion Time
R. F. Freund et al. [8] proposed a Minimum Completion Time (MCT) Algorithm to reduce virtual machine power consumption [8]. Tasks should be arranged in the MCT based on their minimal completion time [17] and projected execution time, with the task with the lowest ECT being assigned to the identified virtual machine. Some tasks are scheduled without consideration for a minimum execution time on virtual machines or resources. The MCT method assigns each task to the resource with the best chance of completing it in the shortest amount of time. The task's completion time is calculated as [19]: Where, the ready time of a resource is the time it takes to complete all of its tasks. As a result of this method, some tasks are assigned to resources with longer execution times. The MCT algorithm has an O(n) time complexity [1].

E. Minimum Execution Time
R. F. Freund et al. [8] introduced the Minimum Execution Time (MET) Algorithm to reduce virtual machine power consumption. The fundamental idea of MET is to assign a task to a virtual machine or resource based on the quickest delivery execution time, which could result in significant data redundancy [15]. The MET algorithm locates the task that takes the least amount of time to complete and assigns it to the most appropriate resource. The allocation technique is based on FCFS and determined by resource availability. IT could result in data redundancy among resources. The MET method takes O (n) time To finish a task [1]. The MET is not suitable for high computation environment due to data redundancy among machines. The Most Basic feature of this method is that it takes the shortest expected execution time and distributes it across the available resources.

F. Water Wave Optimization
Zheng Yu-Jun in [3] proposed a WWO (Water Wave Optimization Algorithm) to minimize virtual machine power consumption. The WWO algorithm's methodology is a modern nature-inspired optimal control algorithm that uses shallow water wave theory to simulate wave motion to improve the system performance [3]. The waves consider three basic procedures to achieve an efficient optimization solution: propagation, refraction, and breaking [5,16,26,[28][29][30][31]. The most important characteristic of the WWO algorithm is that it employed shallow water wave theory to handle optimization issues by simulating wave motion.

G. Energy and Performance-Efficient Task Scheduling Algorithm
The authors in [10] proposed an Energy and Performance-Efficient Task Scheduling (EPETS) algorithm to achieve better quality and decrease total energy consumption within the time constraints of the deadline. They managed the algorithm in a virtualized cloud as a heterogeneous. There are two stages to it. The first stage involves initial scheduling to minimize processing time and fulfill task deadlines while ignoring energy consumption. The second stage involves task reassignment scheduling. It finds the best execution destination and transfers tasks within the deadline threshold while consuming less energy. Furthermore, reach a good compromise between task scheduling and energy efficiency.

H. Elite learning Harris hawks optimizer
Dina A. Amer et al. presented an Elite Learning Harris Hawks Optimizer (ELHHO) algorithm to improve the quality of the exploration phase of the traditional HHO algorithm [4]. The modifications are employing a scientific intelligent method entitled elite opposition-based learning. ELHHO is an improved Harris Hawks optimizer (HHO) to prevent local optimality and fulfill the quality of service. In addition to minimizing schedule length, the minimal completion time method is employed as an initial phase to establish a specified initial solution rather than a random solution at each running time. ELHHO combines two scientifically intelligent methods: elite opposition-based learning (EOBL) and minimum completion time (MCT).

I. Energy-Saving Task Consolidation
Sanjaya K. Panda and Prasanta K. Jana in [21] proposed an ESTC (Energy-Saving Task Consolidation) algorithm to minimize power consumption on distributed cloud computing systems. The authors found that idle resource utilization consumes a significant amount of energy [21] compared to other resources. As a result, they developed the ESTC technique, which increases the employment of idle resources. It distributes tasks within all virtual machine resources first 'no idle virtual machines empty'. then broadcasts the remaining others. The next stage in this technique is to estimate the power consumption using an energy model. The authors used the same energy model for all virtual machines in the ESTC algorithm as the STC method.

J. Dynamic Threshold-based Task Consolidation
Priyanka et al. proposed the DTTC (Dynamic Threshold-based Task Consolidation) algorithm to minimize power consumption by restricting virtual machines according to pre-defined usage levels [22]. Instead of using the SLA like in the SLA, the DTTC uses a threshold to assign tasks. Furthermore, unlike the STC algorithm, the authors employed distinct energy models for different virtual machines instead of utilizing the same energy model for all virtual machines. The first VM, for example, has the energy model. On the other hand, the energy model for the second VM was built by multiplying each value of the energy model 1 by 5. After then, the energy model is multiplied by 5, and so on (Table 1). Priyanka et al. [22] proposed a STC (SLA-based Task Consolidation) algorithm that employs the SLA (Service Level Agreements) to reduce power consumption. The userspecified SLA level and matching utilization are compared to the usage of available VMs when a task is entered into the system. According to Table 2, the STC technique uses the same energy model [22] for all virtual machines and assumes three different virtual machine use levels. Each VM has its own threshold, such as virtual machine1's threshold of 40%, virtual machine2's threshold of 70%, and virtual machine3's threshold of 100%. The SLA scheduling is the same as FCFS Scheduling. However, the FCFS has one identified Threshold of 100%, whereas the SLA Scheduling has several Thresholds 'SLA' as indicated in Table 2.

Proposed algorithm
This section presents a new efficient Task Consolidation based Power Minimization (TCPM) algorithm to reduce energy consumption. The proposed TCPM algorithm combines Task Consolidation with Task Scheduling to achieve maximum resource efficiency while decreasing energy waste. Tasks are distributed across all virtual machines using a best-fit technique to enhance resource efficiency while reducing energy waste. By focusing on tasks consolidated into a single task, parallel time and parallel resources have been integrated into the TCPM approach, resulting in lower power consumption and improve reliability.
In the proposed TCPM algorithm, the virtual machines are assumed to be homogeneous use the same form of the energy model for all the virtual machines, Energy Model 2 shown in Table 1   The TCPM consolidation first consolidates tasks that have an arrival time greater than the 'TFt' of the second task and achieve VM utilization < Threshold (70%). Then, update the Consolidation List (CL) with new arrival time, processing time, and 'TFt' values of tasks. It finally, sorts the CL. Fig. 4 shows the flowchart of TCPM consolidation.
In the TCPM Consolidation, Sorting CL SCHEDULING sorts the consolidation list by descending order of "TFt", as shown in Fig. 5. If two tasks or more have the same TFt value, apply the priority for the tasks arrive first which is to have the minimum

B. TCPM Scheduling
In the proposed TCPM algorithm, the TCPM scheduling methodology, shown in Fig. 6, generally limits the number of idle resources by distributing a task to a virtual machine that is already idle. Unless No device is idle, go into the remaining tasks and implements the FCFS algorithm when utilization of a VM became after adding utilization for the existing task that need to schedule as in the following way.

C. Power Consumption
The power consumption procedure is employed to evaluate Power Consumption. We implemented Energy Model 2 and Output2 represents the power consumption. Fig. 7 shows the flowchart of power consumption.  The proposed TCPM algorithm The overall procedure of the proposed TCPM algorithm is listed in the following table. Fig. 8 shows the flowchart of the proposed TCPM algorithm. Algorithm: TCPM Algorithm.   1 10 s 20 s 30% t 2 12 s 35 s 40% t 3 15 s 15 s 30% t 4 20 s 30 s 60% t 5 30 s 25 s 30%

Illustration example
The following example illustrates the application of the proposed TCPM approach. The Task List (TL), shown in Table 3, has four tuples: Task-Id is the task identifying number, At is the arrival time, Pt is the processing time, and U is the Resources utilization in percentage. Further, there are three virtual machines in this example and we assume that an idle resource is often used 20% of the virtual machines utilization and requires 78.5 watts, as shown in Table 1 'energy model'.

A. TCPM Consolidation
Create Consolidation List (CL), shown in Table 4, by adding extra column 'TFt' into the TL. Where, TFt = At + Pt.
In the illustration example, only one task, t 5 , has At equals 30 that less than other TFt tasks with the minimum TFt of 30. Thus, t 5 achieves the conditions requirements.
At x≥TFt y&U x ð Þ þ U y ð Þ≤Threshold; Hence, t 5 can be consolidated with t 1 or t 3 becausethey have the same TFt'30' but t 1 has the minimum At time of them. To avoid wasting time, the best-fit strategy is used, and t 5 will be consolidated with t 1 . As a result, Consolidated Task 'CT 1 ' for t 1 and t 5 have At new = 10, and TFt new = 55 (as shown in Table 5). The CL is sorted by descending order of TFt. If two tasks have the same TFt, ex. t 0 and t 4, so first allocated the tasks that arrive first, here t 0. Table 6 shows the sorting process.
B. TCPM Scheduling  The TCPM scheduling creates an Allocation List (AL) by first adding an extra column into the CL list called "Machine-Id" and update Temporary Finish Time "TFt" With Actual Finish Time "AFt", as shown in Table 7. Then,schedule tasks by FIFO "No Idle VM Empty". Where, every virtual machine must take task then scheduling remaining tasks to VMs by applying the condition: Where, U new (VM) = U old (VM) + U Existing (Task).
TCPM algorithm the tasks in the TCPM algorithm are allocated to virtual machines, as shown in Fig. 9.

C. Power Consumption Calculation
To evaluate virtual machine energy consumption, from the Energy Model 2, Table 1, and Fig. 2, the mathematical methodology of energy consumption is   FCFS algorithm The tasks in the FCFS algorithm are allocated to virtual machines, as shown in Fig. 10. The total energy consumption by the FCFS algorithm is E = 60,127.5 W.
MCT algorithm The tasks in the MCT algorithm are allocated to virtual machines, as shown in Fig. 11.
The total energy consumption by the MCT algorithm is E = 59,212.5 W.
ETC algorithm The tasks in the ETC algorithm are allocated to virtual machines, as shown in Fig. 12.
The total energy consumption by the ETC algorithm is E = 50,092.5 W. The final results from the above Illustration Example clearly show that our proposed TCPM algorithm reduced the energy consumption compared with recent algorithms FCFS, MCT, and ETC algorithms.

C. Experimental Results
To evaluate the performance of the proposed TCPM algorithm, it first implemented in the CloudSim and used to schedule tasks of a given dataset onto the available VMs. Then, the results are compared with the most recent existing algorithms, such as FCFS, MCT, WWO, and ELHHO considering several simulation parameters as Power Consumption, Reliability, Throughput, and Failure rate.

Power consumption
Power consumption is the amount of energy used by the cloud system. In this evaluation the power consumption is computed by Energy Model 2 as illustrated previously. Fig. 13 shows the power consumption when applying the proposed TCPM algorithm to distribute different tasks onto VMs.
Comparative study between the power consumption by the proposed TCPM algorithm and the existing FCFS, MCT, WWO, and ELHHO algorithms considering five different datasets is shown in Fig. 14. From the figure, it is clear that the proposed TCPM successfully saved the power consumption. The TCPM algorithm achieves the minimum value compared with the others algorithms for the five datasets.

Reliability
Reliability is the quality of the algorithm in which experiments run without error. Figure 15 shows the Reliability when applying the proposed TCPM algorithm to distribute different tasks onto VMs.
Comparative study between Reliability by the proposed TCPM algorithm and the existing FCFS, MCT, WWO, and ELHHO algorithms considering five different datasets is shown in Fig. 16. From the figure, it is clear that the proposed TCPM successfully distribute different tasks onto VMs with more reliability. The TCPM algorithm achieves the maximum reliability value compared with the others algorithms for the five datasets. Throughput is the maximum number of tasks that complete its processing in a specific amount of time.
Comparative study between throughput of the proposed TCPM algorithm and the existing FCFS, MCT, WWO, and ELHHO algorithms considering five different datasets is shown in Fig. 17. From the figure, it is clear that the proposed TCPM successfully distribute different tasks onto VMs with more throughputs. The TCPM algorithm achieves the maximum throughput value compared with the others algorithms for the five datasets.  The failure rate is the estimated amount of times an algorithm will fail in a specific amount of time.
Comparative study between failure rate of the proposed TCPM algorithm and the existing FCFS, MCT, WWO, and ELHHO algorithms considering five different datasets is shown in Fig. 18. From the figure, it is clear that the proposed TCPM successfully distribute different tasks onto VMs with minimum failure rate. The TCPM algorithm achieves the minimum failure rate value compared with the others algorithms for the five dataset.

Conclusion
An efficient algorithm called Task Consolidation based Power Minimization (TCPM) is developed in this paper. The main purpose is to schedule tasks onto available resources of the cloud environment efficiently with minimize power consumption. The proposed TCPM algorithm combines many benefits of the existing algorithms. The best-fit procedure is used to achieve the best possible resource utilization and avoid wasting energy. Task consolidation is incorporated into the TCPM algorithm to minimize power consumption. Further, tasks are scheduled into all virtual machine first (No Idle VM Resources) and the remaining tasks are  sorted by descending order of TFt to achieve the best use of power consumption for idle VM Resources until 20% of Resources consumes became take the highest processing time. The proposed TCPM algorithm is evaluated considering 5 different datasets. The results of the proposed TCPM algorithm are compared with more recent algorithms such as FCFS, MCT, WWO, and ELHHO algorithms using the CloudSim toolkit.
In the future work, the TCPM algorithm may enhance by identifying more than one thresholds (ex. 70%, 85%, either). Compute their power consumption. Then, compare the results and select the threshold that achieves the enhanced power consumption.

Declarations
Conflict of interest The authors declare that they have no conflict of interest.
The DA statement The Dataset are generated randomly to cloudsim simulation. The length of the tasks is from 1000 to 10,000 Million instructions. The data center Specifications are given in Table 8 and the host Specifications are given in Table 9 while the VMs Specifications are given in Table 10.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.