^{1}

^{2}

^{3}

^{4}

^{1}

^{1}

^{2}

^{3}

^{4}

Energy consumption has been one of the main concerns to support the rapid growth of cloud data centers, as it not only increases the cost of electricity to service providers but also plays an important role in increasing greenhouse gas emissions and thus environmental pollution, and has a negative impact on system reliability and availability. As a result, energy consumption and efficiency metrics have become a vital issue for parallel scheduling applications based on tasks performed at cloud data centers. In this paper, we present a time and energy-aware two-phase scheduling algorithm called best heuristic scheduling (BHS) for directed acyclic graph (DAG) scheduling on cloud data center processors. In the first phase, the algorithm allocates resources to tasks by sorting, based on four heuristic methods and a grasshopper algorithm. It then selects the most appropriate method to perform each task, based on the importance factor determined by the end-user or service provider to achieve a solution designed at the right time. In the second phase, BHS minimizes the makespan and energy consumption according to the importance factor determined by the end-user or service provider and taking into account the start time, setup time, end time, and energy profile of virtual machines. Finally, a test dataset is developed to evaluate the proposed BHS algorithm compared to the multiheuristic resource allocation algorithm (MHRA). The results show that the proposed algorithm facilitates 19.71% more energy storage than the MHRA algorithm. Furthermore, the makespan is reduced by 56.12% in heterogeneous environments.

With the rapid increase in demand for service-oriented computing, in association with the growth of cloud computing technologies, large-scale virtualized data centers have been established worldwide. These huge data centers consume power at a large scale, which results in a high operational cost [

To solve the above problems, this paper makes five main contributions:

Energy-aware run-time scheduler for scheduling of workflow.

Provides a methodology to automatically generate the required power consumption profile.

Selects the best sorting method to perform any task between a heuristic method and grasshopper algorithm to increase productivity.

Offers a model to estimate the energy consumption and makespan of the task.

Evaluates the trade-off between energy saving and makespan for different scenarios.

The article is structured as follows: Section

Today, cloud computing plays an essential role in academia and industry [

Previous studies on energy-aware task scheduling techniques.

Authors | Proposed method | Target |
---|---|---|

Barzegar et al. [ | EATSDCD | Reducing the makespan and energy consumed by the processors to perform the tasks in the DAG |

Juarez et al. [ | MHRA | Minimize the energy consumption and makespan |

Sofia and GaneshKumar [ | NSGA-II | Minimizing the energy consumption and makespan from the cloud service |

Yang et al. [ | EISTS | Balance between optimization of makespan as well as energy consumption |

Ben Alla et al. [ | EATSD | Reduce the energy consumption of the cloud resources and optimize the makespan under the deadlines constraints |

Peng et al. [ | DQN | The framework for trade-off optimization energy consumption and task makespan |

Yao et al. [ | EnMORL | Simultaneously minimize the makespan and energy consumption while meeting the budget constraint |

Singh et al. [ | EEWS | Minimizing makespan and maximizing energy conservation while scheduling workflow |

Belgacem et al. [ | S-MOAL | Minimize both the makespan and the cost of using virtual machines |

Modern computing centers and data centers consume large amounts of energy, which is mainly derived from conventional energy generated from fossil fuels. For example, a medium-sized data center, such as a university data center, consumes about 80,000 kilowatts of electricity.

In this paper, the best heuristic scheduling (BHS) algorithm for allocating resources to the tasks in the queue created by sorting tasks based on heuristic and grasshopper algorithms and selection of the most appropriate method for performing each task based on the importance factor determined by the end-user or service provider is recommended to achieve a suitable solution in a timely and economic manner. The proposed algorithm has a dual-purpose objective function: to reduce energy and makespan consumption according to the importance factor determined by the resource provider or end-user. The symbols used in this paper are summarized in Table

Symbols used in this paper.

Symbol | Description |
---|---|

_{mki} | Core |

_{mki} | Set of schedules for all cloud resources |

_{max} | Makespan |

_{flow} | Energy flow |

Importance factor determined by the end-user or service provider | |

Task | |

time_{init j} | Initial time of the task |

time_{setup j} | Setup time of the task |

time_{end j} | End time of the task |

_{Prej} | A set of prerequisite tasks for the task |

time_{pre j} | Start time of the task |

time_{end pre} | End time of task |

time_{transfe} | Data transfer times required to perform a task that is outside the virtual machine |

time_{exec} | Processing time of a task |

_{taskmki} | Energy consumed by a task |

_{transfer mk} | Energy consumed by the data transfer of the task |

_{vmk} | Energy consumed by the virtual machine |

_{task mk} | Energy consumption by various tasks |

_{nm} | Energy consumption per node |

_{net} | Average data transfer power in cloud infrastructure |

_{cmk} | Power proportional to the use of a specific core in a virtual machine |

_{up}_{Vmk} | Power consumed to up a virtual machine |

_{down Vmk} | Power consumed to turn off the virtual machine |

PUD | Power consumed by support systems |

setup_{vmk} | Virtual machine setup time |

down_{vmk} | Virtual machine shutdown time |

Run_{nm} | Node running time |

_{i} | Location of grasshopper |

_{i} | Social interaction between grasshoppers |

Gravity force on the grasshopper | |

_{i} | Wind movement |

_{ij} | Distance between the grasshopper |

_{ij} | Unique vector from the grasshopper |

Gravity intensity | |

Size of the absorption length | |

Gravitational constant | |

Thrust constant | |

Number of grasshoppers | |

_{bd} | Upper bound on the dimension |

_{bd} | Lower bound on the dimension |

The S-sequence is first considered as a DAG by evaluating the dependencies between parts of the tasks in real-time.

In the case of scheduling, the search process for scheduling tasks is guided by two objectives:

To improve the energy efficiency by looking for the best positions of tasks in resources such that the energy consumed by the implementation of the whole set of tasks is minimized.

To improve executive performance by searching for the allocation of resources that minimize the makespan.

However, a balanced relationship between energy efficiency and makespan provides a solution that minimizes energy consumption and increases makespan. The objective of the proposed scheduling strategy is to reconcile the two objectives. Therefore, we propose a function that combines energy consumption and makespan, with

The objective function is composed of two main terms

To balance the objective function, the adaptive weighted sum method is applied, which introduces a weight factor

The objective function presented in the previous section requires the calculation of the exponential and energy for the solution of a given schedule. Through this scheduling solution, an energy-aware scheduler can extract the following times to estimate the makespan and energy consumption:

Start and end time of tasks performed in each specified core.

Start and end time of the data transfer required for each task.

Start and end time of virtual machine setup and shutdown.

Start and end time for each virtual machine.

Start and end time for each node.

Another critical piece of information for energy calculation is the power profile for different sources. For each source, we must calculate the following values:

Finally, the energy consumed by each parameter can be estimated by multiplying the duration of the different events by the corresponding average amount of power.

To calculate the energy consumed by task

The task

In this case, the start time of the task is expressed by the maximum value of the most significant preceding end time

If this time is more than the preceding maximum end time, the task start time

This equation includes the amount of power consumed to start and shutdown the virtual machine

When the cloud infrastructure allows the node to be shutdown, all nodes running at the same time are equal to the makespan. Accordingly, the makespan of the node is shown as

Once the makespan of the node is estimated, we can estimate the amount of energy consumption per node as follows:

When we calculate the energy required for tasks, virtual machines, and nodes, we must calculate

The energy flow

The best heuristic scheduling (BHS) is to schedule resources and allocate them to tasks and thus generate the solution of the high-quality scheduler in a real period. The BHS algorithm offers a step-by-step solution to achieve the desired goal. The stages of the proposed heuristic algorithm are shown in Figure

The proposed BHS method.

The ideal heuristic scheduling algorithm receives the DAG, which includes the set of tasks to be performed on cloud processors as input. The algorithm automatically analyzes the DAG and implements a set of free tasks that are not required to be performed.

This algorithm automatically analyzes the DAG and a set of free tasks that do not have prerequisites or with prerequisites that have been executed and can be executed in parallel with specifying the implementation. The main algorithm (BHS) then proceeds as follows: first, the tasks are sorted based on the heuristic methods and the grasshopper algorithm. They are placed in the corresponding list of that method. This step generates five list types, before progressing to the next step to allocate resources to the task. In this step, the resources assign necessary tasks by resource allocation cost function algorithm (RACF), according to energy profiles of the tasks based on the amount of memory and the core to perform each task. The resource is allocated, and the amount of objective function for each of the five lists formed in the previous step is calculated based on the importance factor determined by the end-user or service provider. The next step is to estimate the amount of makespan and energy consumed for each of the five lists. In the last step, using a roulette wheel, the amount of the calculated objective function is examined for five types of lists, and for each of the five possible types of lists to be executed, one of them has the amount of the objective function to perform the desired task. More optimal (minimum) value is selected.

The grasshopper belongs to the insect family. Grasshoppers are known as pests because they damage agricultural products. Although they are usually found in nature individually, they can also be found together in one of the largest groups of all creatures. The size of these groups may be enormous and can be a nightmare for farmers. The mathematical model of the grasshopper algorithm mimics the behavior of grasshoppers in nature to solve the optimization problem. The simulation results show that the locust algorithm is able to provide better results compared to known algorithms and recent literature. Simulation results on real problems also proved that the grasshopper algorithm is able to solve real problems with unknown space [

The mathematical model used to simulate the behavior of grasshoppers is presented in the following equation:

The gravitational relation between the grasshoppers is also calculated as

The gravitational constant is

The sum of the relations mentioned above determines the value of

The modified version of this relationship is intended to optimize issues:

To balance the search and increase the optimization, it is necessary to reduce the

In the proposed method, in addition to the grasshopper algorithm, the following heuristic methods are used to sort the tasks:

LPT (longest processing time): the highest priority is given to a task whose processing time is longer than the others.

SPT (shortest processing time): the highest priority is given to a task whose processing time is shorter than the others.

LNS (last number of substantial): the highest priority is given to tasks that have more pretasks.

LSTF (least slack time first): the highest priority is given to a task that has more slack time than the others.

Data analysis is particularly important for the validity of hypotheses for any research. The simulation environment used to evaluate the proposed method is the MATLAB tool. We have installed the MATLAB tool on an Asus notebook with an Intel core i7-A540UP 2.4 GHz CPU with 8 cores and 4 GB memory. In this section, we review the results of implementing the proposed method.

To evaluate the proposed method, four virtual machines from Intel and AMD were used, with characteristics as listed in Table

Virtual machine characteristics.

Parameter | INTEL | AMD |
---|---|---|

Setup time | 175 s | 85 s |

Shutdown time | 3 s | 2 s |

Number of cores | 4 | 4 |

ROM | 4000 MB | 4000 mb |

Hard | 200 MB | 200 mb |

Power core | 9.74 W | 11.2 W |

Setup power | 9.49 W | 18.24 W |

Shutdown power | 9.49 W | 18.24 W |

Unemployment power | 175.76 W | 115.30 W |

Transfer power | 30.04 W | 27.56 W |

Support power | 1.2 W | 1.2 W |

Characteristics of task parameters.

Parameter | Value |
---|---|

Processing time | 80–100 s |

Number of cores | 1–4 |

ROM | 100–1000 MB |

Hard drive rate | 100–1000 MB |

The BHS algorithm is designed to identify the optimal scheduling of tasks assigned to the cloud and to estimate the optimal possible amount of energy for consumption and the makespan based on the importance factor determined by the end-user or service provider. The pseudocode of BHS is shown in Algorithm

Input: number of grasshoppers, Max iteration, lower limit, upper bound, number of dimensions and features that the grasshopper is to optimize them, and objective function. This is the RACF algorithm and VMs.

Output: optimum value of the objective function, order to perform tasks.

function [TargetFitness, TargetPosition] = BHS (N,

GrassHopperPositions = initialization (N, dim);

for

[GrassHopperFitness(1,i)

end for;

while

for

temp = GrassHopperPositions’;

for

for

If

end if

end for

end for

GrassHopperPositions_temp(i,:) = round(

[FNew] = RACF (Task(GrassHopperPositions_temp),VM,alpha);

[FLSTF] = RACF (LSTFlist, VM, alpha);

[FSPT] = RACF (SPTlist, VM, alpha);

[FLPT] = RACF (LPTlist, VM, alpha);

[FLNS] = RACF (LNSlist, VM, alpha);

ISelected = RouletteWheelSelection (FNew, FLSTF, FSPT, FLPT, FLNS, TargetFitness);

switch ISelected

case1: GrassHopperPositions(i,:) = GrassHopperPositions_temp(i,:);

case2: GrassHopperPositions(i,:) = IDof List(LSTFlist);

case3: GrassHopperPositions(i,:) = IDof List(SPTlist);

case4: GrassHopperPositions(i,:) = IDof List(LPTlist);

case5: GrassHopperPositions(i,:) = IDof List(LNSlist);

end switch

end for

end while

End

Input: list of task, resources, and alpha

Output: assigning the best resources to tasks and estimating the amount of objective function according to alpha

function [f

while

if

CurrentTask = list(

for

if CurrentTask.Ram ≤ VM(

VM(

VM(

reserved = [reserved; [

end if;

end for;

end if;

for

if reserved(r, 3) < time

VM(

VM(

ID = [ID

end if;

end for;

Reserved (ID,:) = [];

time = time + 1;

end while;

End

Resource allocation cost function (RACF) algorithm is used to allocate resources to tasks and calculate the amount of objective function expressed by Algorithm

On evaluating the proposed method, heuristic methods and grasshopper algorithms were used to sort the tasks each time they were performed. Based on the proposed BHS algorithm, a sorting method was selected for each task, resulting in the most optimal response. This has improved the proposed method compared to the MHRA method.

In this section, for 1000 tasks, we changed the importance factor (

Impact of the importance factor on energy consumption and makespan in the LPT method.

As shown in Figure

In this section, the amount of energy consumption and makespan with different importance factors are reviewed and compared to determine the importance factor according to Figure

Investigating energy consumption and makespan at different significance coefficients.

As mentioned in the previous section, when the energy consumption is more important for the end-user or service provider, the importance factor is equal to 0.0, and when makespan is more important, the importance factor is equal to 1.0. According to Figure

In this section, we review and compare the energy consumption and the proposed BHS method with the MHRA method. For this purpose, the implementation of 1000 tasks with different coefficients of importance and the LPT heuristic method for two scheduling methods was analyzed. The results are shown in Figures

Comparison of energy consumption with the BHS method and MHRA method.

Comparison of makespan with the BHS method and MHRA method.

According to the results obtained in the previous sections, the lowest energy consumption with an importance factor of 0.0 for the BHS method is equal to 2500 Wh and for the MHRA method is equal to 3113.6 Wh. These results show that, in the proposed BHS method, energy consumption has decreased by 19.71%. In the worst case, for energy consumption, where the importance factor is 0.1, the energy consumption in the BHS method is equal to 3584 Wh and, in the MHRA method, is equal to 3812 Wh, which in this case also decreased by 6.51%. It can be concluded that the BHS method, using the least amount of available resources, causes significant energy storage and is suitable for reducing energy consumption.

When we consider the importance factor as 1.0, the makespan value has the lowest value, which is equal to 15,000 seconds in the BHS method and 11,425.6 seconds in the MHRA method, which has increased by 31.28%. When the importance factor is 0.0, makepan has the highest value, which is 16,298 seconds in the BHS method and 37,138 seconds in the MHRA method, which is reduced by 56.12%. With a change in the importance factor, according to the graph, the makespan changed less with the BHS method than with the MHRA method. This indicates that, in the MHRA method, with a decreasing importance factor that approaches 0.0, the makespan increases significantly. When the importance factor is equal to 0.0, it increases by about 73.1% compared to its value with an importance factor of 1.0. However, this is not the case in the BHS method, and the rate of change from the importance factor of 0.0 to 1.0 is about 7.9%. As a result, the BHS method demonstrates a significant reduction in energy consumption and makespan compared to the MHRA method when the importance factor is 0.0.

We want to analyze the time complexity of algorithms presented in the previous sections.

This algorithm is designed to find the best task schedule based on the importance factor determined by the user or service provider. Lines 3 to 5 run the number of grasshoppers, i.e., |^{2}|+|_{nm}|).

This algorithm is used to allocate resources to the tasks in the lists created in the BHS algorithm and to calculate the value of the objective function to execute each list. Assuming that the number of virtual machines is equal to

The MHRA algorithm in the paper [^{2}

In this paper, we have presented a dual-objective scheduling algorithm that is aware of makespan and energy consumption in order to allocate resources to tasks and to sort tasks, based on heuristic methods and grasshopper algorithm. Furthermore, the most appropriate method to execute each task is selected based on the importance factor determined by the end-user or service provider, set by using the roulette wheel in the cloud. The proposed BHS algorithm minimizes the target function according to this importance factor, taking into account the start times, setup times, and end times for virtual machines and energy profiles.

To implement the desired algorithm, MATLAB simulator was used with a DAG generated for 1,000 tasks having different coefficients of importance and four virtual machines from Intel and AMD. The results of the assessment indicate that, to execute any task based on the importance factor determined by end-user or service provider, a specific type of heuristic or grasshopper method is appropriate. The response is more efficient compared to the rest of the methods. It can also be concluded that when energy consumption is more important for the end-user or service provider, they must set the importance factor equal to 1.0. When the makespan is more critical, the end-user or service provider must set the importance factor equal to 0.0, and when both the energy consumption and the makespan are critical, they must set the importance factor equal to 0.7. Therefore, determining the importance factor is very important. The evaluation results show that the proposed algorithm has reduced energy consumption by 19.71% compared to MHRA and has reduced the makespan by 56.12% when energy consumption is of high importance. Overall, selecting the optimal method for sorting and performing each task can significantly reduce the makespan and amount of energy consumed, as well as the costs involved.

Future research should investigate parameters such as reliability, performance enhancement, and security enhancement for each task, based on the importance factor set by the end-user or service provider.

The data used to support the findings of this study are available on request to the corresponding author.

The authors declare that they have no conflicts of interest.

This work was supported by the Youth Program of National Natural Science Foundation of China under grant no. 11701062.