13
Tsinghua Science and Technology Tsinghua Science and Technology Volume 20 Issue 1 Article 3 2015 An Energy-Saving Task Scheduling Strategy Based on Vacation An Energy-Saving Task Scheduling Strategy Based on Vacation Queuing Theory in Cloud Computing Queuing Theory in Cloud Computing Chunling Cheng College of Computer, Nanjing University of Posts and Telecommunications, Nanjing 213001, China. Jun Li College of Computer, Nanjing University of Posts and Telecommunications, Nanjing 213001, China. Ying Wang College of Computer, Nanjing University of Posts and Telecommunications, Nanjing 213001, China. Follow this and additional works at: https://tsinghuauniversitypress.researchcommons.org/tsinghua- science-and-technology Part of the Computer Sciences Commons, and the Electrical and Computer Engineering Commons Recommended Citation Recommended Citation Chunling Cheng, Jun Li, Ying Wang. An Energy-Saving Task Scheduling Strategy Based on Vacation Queuing Theory in Cloud Computing. Tsinghua Science and Technology 2015, 20(1): 28-39. This Research Article is brought to you for free and open access by Tsinghua University Press: Journals Publishing. It has been accepted for inclusion in Tsinghua Science and Technology by an authorized editor of Tsinghua University Press: Journals Publishing.

An Energy-Saving Task Scheduling Strategy Based on

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: An Energy-Saving Task Scheduling Strategy Based on

Tsinghua Science and Technology Tsinghua Science and Technology

Volume 20 Issue 1 Article 3

2015

An Energy-Saving Task Scheduling Strategy Based on Vacation An Energy-Saving Task Scheduling Strategy Based on Vacation

Queuing Theory in Cloud Computing Queuing Theory in Cloud Computing

Chunling Cheng College of Computer, Nanjing University of Posts and Telecommunications, Nanjing 213001, China.

Jun Li College of Computer, Nanjing University of Posts and Telecommunications, Nanjing 213001, China.

Ying Wang College of Computer, Nanjing University of Posts and Telecommunications, Nanjing 213001, China.

Follow this and additional works at: https://tsinghuauniversitypress.researchcommons.org/tsinghua-

science-and-technology

Part of the Computer Sciences Commons, and the Electrical and Computer Engineering Commons

Recommended Citation Recommended Citation Chunling Cheng, Jun Li, Ying Wang. An Energy-Saving Task Scheduling Strategy Based on Vacation Queuing Theory in Cloud Computing. Tsinghua Science and Technology 2015, 20(1): 28-39.

This Research Article is brought to you for free and open access by Tsinghua University Press: Journals Publishing. It has been accepted for inclusion in Tsinghua Science and Technology by an authorized editor of Tsinghua University Press: Journals Publishing.

Page 2: An Energy-Saving Task Scheduling Strategy Based on

TSINGHUA SCIENCE AND TECHNOLOGYISSNl l1007-0214 l l04 /11 l lpp28-39Volume 20, Number 1, February 2015

An Energy-Saving Task Scheduling Strategy Based on VacationQueuing Theory in Cloud Computing

Chunling Cheng�, Jun Li, and Ying Wang

Abstract: High energy consumption is one of the key issues of cloud computing systems. Incoming jobs in cloud

computing environments have the nature of randomness, and compute nodes have to be powered on all the time

to await incoming tasks. This results in a great waste of energy. An energy-saving task scheduling algorithm based

on the vacation queuing model for cloud computing systems is proposed in this paper. First, we use the vacation

queuing model with exhaustive service to model the task schedule of a heterogeneous cloud computing system.

Next, based on the busy period and busy cycle under steady state, we analyze the expectations of task sojourn

time and energy consumption of compute nodes in the heterogeneous cloud computing system. Subsequently, we

propose a task scheduling algorithm based on similar tasks to reduce the energy consumption. Simulation results

show that the proposed algorithm can reduce the energy consumption of the cloud computing system effectively

while meeting the task performance.

Key words: cloud computing; independent task scheduling; energy-saving; vacation queuing theory

1 Introduction

As a new computing model, cloud computing bringsthe adjustment and transformation of the IT industry.With its growing application and popularization, cloudcomputing not only offers enormous opportunities, butalso faces many challenges in its development process.The energy consumption in a cloud datacenter is on therise, while the resources themselves are highly under-utilized; this presents a bottleneck that restricts theimprovement of cloud computing[1].

The energy consumption in a cloud computingsystem consists of energy consumed by different kindsof electrical equipment; one of the highest is the energyrequired by IT equipment, which makes up 46% of thetotal energy consumption[2]. Compute nodes consume

�Chunling Cheng, Jun Li, and Ying Wang are withCollege of Computer, Nanjing University of Posts andTelecommunications, Nanjing 213001, China. E-mail:[email protected]; [email protected]; [email protected].�To whom correspondence should be addressed.

Manuscript received: 2014-11-16; revised: 2014-12-17;accepted: 2015-01-06

the most energy when executing tasks, accountingfor 40% of IT equipment energy consumption[3].According to statistics, the resource utilization ratioof the existing datacenters is less than 30%[4]. Onereason is that cloud computing provides on-demandservices with incoming jobs that are stochastic, attimes dense, and at other times sparse. In order tomeet the requirements of tasks in time, the clouddatacenter keeps compute nodes powered on, waitingfor tasks to arrive. As a result, for most of the time,compute nodes in the cloud are in an idle state,which leads to a significant waste of energy. Moreover,cloud datacenters are usually composed of large-scaleheterogeneous compute nodes, which have differenthardware configurations, different compute capacity,and various power saving states. This causes the energyoptimization problem to be more complex in the clouddatacenter.

In order to solve the above problem, we takeadvantage of the vacation queuing model to analyzethe energy consumption of a cloud computing system,and present a task scheduling algorithm based onsimilar tasks. The main contributions of this paperinclude: (1) We make the first attempt to apply an

Page 3: An Energy-Saving Task Scheduling Strategy Based on

Chunling Cheng et al.: An Energy-Saving Task Scheduling Strategy Based on Vacation � � � 29

exhaustive service, vacation queuing theory to modela cloud computing system; furthermore, consideringthe different states of a compute node, the differentenergy consumption characteristics, and latency duringstate transition of the heterogeneous cloud computingsystem, we improve the vacation queuing theory byadding idle period—when there are no tasks arrivingat a compute node, the node goes through a period ofidle time instead of entering a vacation at once in orderto avoid frequent switches between different states.(2) We analyze the expectations of task sojourn timeand energy consumption of a cloud computing systembased on the busy period and busy cycle under steadystate. Based on our analysis of the partial derivativesof energy consumption with respect to idle time andthe variance of service time, we conclude that energycan be saved by reducing the variance of service timewhile scheduling tasks. (3) Based on our analysis, wepropose a task scheduling algorithm based on similartasks to optimize energy consumption, and evaluatethe performance of the proposed algorithm throughsimulations.

The rest of this paper is organized as follows:Section 2 describes a summary of related work.Section 3 presents the task scheduling model in theheterogeneous cloud computing system. Section 4discusses the expectation of energy consumption inthe cloud computing system in detail; based on ouranalysis, we present our task scheduling algorithm.In Section 5, we describe the experimental setup andresults. Finally, we draw conclusions in Section 6.

2 Related Work

Currently, there are various methods, algorithms,and strategies proposed for optimizing and managingenergy in cloud computing systems, such as energysaving of compute nodes[5, 6], energy-efficientnetwork[7], power-performance tradeoff[8], andrenewable energy harness[9]. Among these, themethod of saving energy of compute nodes issomewhat important, which includes techniquessuch as Dynamic Power Management (DPM),Dynamic Voltage Frequency Scaling (DVFS),server consolidation, energy-saving task scheduling,and so on. DPM reduces power consumption ofelectronic systems by performing selective shutdownof idle system resources[5]. DVFS decreases powerconsumption by dynamically slowing down the CPUvoltage/frequency[6] without affecting the performance

adversely. It is a typical strategy of “time in exchangefor low energy consumption”. Server consolidationachieves energy efficiency through virtualization. Itconsolidates various workloads onto a set of commonservers with the help of live state migration ofVirtual Machines (VM)[10, 11]. Energy-saving taskscheduling technology takes energy consumptioninto consideration in the process of mapping tasksonto resources, while making full use of resources.Since energy-saving task scheduling technology canbe combined with DPM or DVFS, there is greaterattention in this area recently.

The existing energy-saving task schedulingalgorithms in cloud computing mainly include theimproved heuristic task scheduling algorithms[12, 13],the meta-heuristic task scheduling algorithms[14–16],and the queuing theory-based algorithms[17–20]. Aimedat energy conservation, the improved heuristic taskscheduling algorithms improve upon Min-Min, Greedyalgorithm, and other heuristic strategies. For example,the idea of the Min-Min algorithm is applied togetherwith energy-saving independent task scheduling[12], inwhich the task is always assigned to the compute nodewith the least energy consumption. This algorithm cansave energy, but it trades off energy consumption withperformance—since it pays more attention to savingenergy and ignores performance of tasks, it leads topoor adaptability. Valentini et al.[13] presented a timenormalization greedy scheduling algorithm. They firstassumed that the task execution time on a computenode is linearly related to its energy consumption,and then they transformed energy parameters intotime parameters through normalization of energy andtime. In this way, the double objective optimizationproblem with time and energy consumption canbe converted into a single objective optimizationproblem. Subsequently, based on the greedy algorithm,the authors proposed a time normalization schedulingalgorithm, in which a task is scheduled to a computenode with the shortest completion time. In thisalgorithm, since the task completion time and energyconsumption are closely related to the normalizationfactor, the algorithm stability is weak.

Meta-heuristic task scheduling algorithms usuallystart from multiple random schemes, and use anoptimization algorithm to iteratively acquire theoptimal scheduling scheme[14]. For example, Shen andZhang[15] improved the Genetic Algorithm (GA) withshadow price, and presented a green task scheduling

Page 4: An Energy-Saving Task Scheduling Strategy Based on

30 Tsinghua Science and Technology, February 2015, 20(1): 28-39

algorithm using Shadow Price enhanced GA (SPGA)in order to minimize task execution time with an energyconsumption constraint. Two measurements are used tosteer the search towards the optimal solution and keepthe necessary randomness in the search process—oneis a fitness value, used to evaluate the overall solutiongoodness; the other is shadow price, used to evaluatea component’s goodness. Wang et al.[16] proposedan energy-efficient multi-job scheduling model, basedon GA, for cloud computing. In this model, theydesigned a practical encoding and decoding method forchromosomes and an overall energy efficiency functionof the servers is constructed as the fitness value ofeach chromosome. Moreover, a local search operator isintroduced to accelerate the convergence speed of GAand to enhance the searching ability. The experimentalresults show that the proposed model can improve theenergy efficiency of servers.

The energy-saving task scheduling algorithms basedon queuing theory regard the cloud computing systemas a random service queuing system. Tasks submittedto the cloud computing system are called customers,and the heterogeneous compute nodes in the cloudcomputing system are called servers. By using acertain queuing theory to model the cloud computingsystem, the performance metrics of the queuingsystem and the energy consumption of the cloudcomputing system are analyzed. Subsequently, differenttask scheduling strategies are proposed to reduce theenergy consumption. Tan et al.[17] presented a policyof energy optimal management for cloud computingplatform with stochastic tasks to reduce idle energyand luxury energy. It uses M/M/1 queuing modelsto model the cloud computing system for analyzingthe mean sojourn time and mean power consumption.Next, a high service utilization task scheduling strategyand a low execution energy task scheduling strategyare proposed to reduce idle energy and “luxury”energy respectively. Based on the above strategies,an algorithm named Minimum Expectation ExecutionEnergy with Performance Constraints (ME3PC) isdesigned. It can be seen from experiments thatME3PC can reduce energy consumption effectivelywhile meeting performance constraints. However, thechallenges of ME3PC are as follows. First, theperformance of the task scheduling strategy is greatlyinfluenced by the weight of the matching degree.Second, tasks are classified into four types, and ME3PC

assumes that tasks of the same type have the sameparameter values. Clearly, such an assumption doesnot match well with the variety and dynamic natureof tasks in cloud computing. Zikos and Karatza[18]

examined the task scheduling algorithm with unknownservice time in a cluster with heterogeneous servers.It assumed that there are two types of processorsin the cluster, with different performance andenergy characteristics. Subsequently, based on theM/M/n queuing model, three local resource allocationpolicies, namely the highest performance policy, theprobability policy, and the best energy efficiencypolicy are proposed. Simulation results indicate thatthe differences among the policies depend on systemload and that there is a trade-off between performanceand energy consumption. Likewise, by using queuingtheory, Gong et al.[19] presented a performance modelto study the feasibility and limitations of parallelprocessing in a non-dedicated distributed environment.It considers the owner job process as an M/G/1 queuingsystem, wherein the parameters are determined throughsimulation experiments. This model analyzes the taskcompletion time in detail, but the energy consumptionis not considered.

In Refs. [17–19], compute nodes always remainbusy. In fact, with the advancement of hardware,compute nodes have various power states, andthe energy overhead and computation ability indifferent power states are also different. Therefore, theenergy consumption can be optimized by dynamicallyadjusting the power state of compute nodes according tothe workload and the idle time of compute nodes. Wanget al.[20] modeled a datacenter as a heavy trafficapproximation of a large-scale queuing system, anddesigned a load routing mechanism between multipledatacenters in order to reduce the overall energy costs.In this mechanism, a dual-threshold strategy is definedto adjust the on/off/idle states of a single server.However, the mechanism focuses on the income, andignores the time and energy consumption during statetransitions.

In this paper, based on the various power states ofcompute nodes and the randomness of tasks, we applythe vacation queuing model with exhaustive service tomodel the task scheduling of a heterogeneous cloudcomputing system, and propose an energy-efficient taskscheduling algorithm.

Page 5: An Energy-Saving Task Scheduling Strategy Based on

Chunling Cheng et al.: An Energy-Saving Task Scheduling Strategy Based on Vacation � � � 31

3 Task Scheduling Model Based on VacationM/G/1 Queuing System with ExhaustiveService

Due to the randomness of task arrival, tasks are at timesdense and at other times sparse. Their characteristicsand requirements are varied. And usually, there isno precedence constraint relationship between taskssubmitted by different users due to the autonomy andgeographical distribution of user requests; in otherwords, tasks are independent. In addition, computenodes running tasks are heterogeneous in cloudcomputing systems—they have different hardwareconfigurations, different computing capacities, andvarious power states. The time and power needed toswitch state are also different. Each compute nodemaintains its own task queue. When performing a task,a compute node is in the running state with high power.If it is idle for some time, the compute node willswitch to sleep state with low power, similar to beingon vacation. When a task reaches a compute node thatis in the sleep state, the node is woken up to performthe task. In other words, compute nodes at timeswork, and at other times go on a vacation. Therefore,we consider a compute node to be a server that ismodeled as a vacation M/G/1 queuing system withexhaustive service. In this way, a cloud computingsystem consisting of k heterogeneous compute nodescan be modeled as k vacation M/G/1 queuing systemswith exhaustive service. The task scheduling frameworkis shown in Fig. 1.

In Fig. 1, independent tasks get to the cloudcomputing system with Poisson flow. The j -th tasktaskj is defined as

taskj D fcomj ; t arrj ; t

dlj g (1)

Fig. 1 The task scheduling model based on the vacationM/G/1queuing system.

where comj denotes the computational amount of thej -th task, whose unit is Million Instruction (MI), t arr

j

represents the arrival time, and tdlj is the deadline.

The task scheduler runs in the global dispatchingcentral node. It receives task requests that arrivedynamically, and uses the first come first served strategyto perform the task scheduling algorithm and dispatchtasks to appropriate compute nodes.

Compute nodes accept and perform tasks. Assumethat the tasks arriving at the i -th compute node nodei(1 6 i 6 k/ follow a Poisson process with parameter�i , and the intervals of task arrival and service time foreach compute node are independent. Then, the servicetime of nodei follows the distribution function B.ti /,and its first and second order moments are[21]:

1

�iD

Z 10

tidB.ti / (2)

b.2/i D

Z 10

t2i dB.ti / (3)

where�i represents the mean service frequency of tasksin nodei ; therefore, the mean service time is 1=�i . b

.2/i

is the variance of service time.Today’s computers generally support power saving

states. The research results of Gandhi et al.[22] indicatethat sleep states are effective and more beneficial inlarger datacenters. As sleep states on different systemscan be quite different, we reference existing sleepstates[22, 23] and define four power states—running state,idle state, sleep state, and recovering state. As the powerand wake up latency of state S3 and state S4[22] are veryclose, we ignore their differences and regard them bothas sleep states. Therefore, a compute node nodei is inone of the following states at any given moment:

(1) Running state: The state when a compute node isworking;

(2) Idle state: If there are no tasks arriving at acompute node, the node goes through an idle period toavoid frequent switches from the deep sleep state. Thethreshold of idle period is T idl

i .(3) Sleep state: After the idle period of T idl

i , if thereare no incoming tasks, the compute node goes into sleepstate.

(4) Recovering state: When a task arrives at thecompute node under sleep state, the compute nodeneeds to recover and then start to execute the task. Therecovering state is a transition state—in this state, acompute node is woken up from the sleep state andtransitioned to the running state.

Therefore, each compute node can be denoted as a

Page 6: An Energy-Saving Task Scheduling Strategy Based on

32 Tsinghua Science and Technology, February 2015, 20(1): 28-39

five tuple.nodei D fpowrun

i ; powidli ; powslep

i ; powrecovi ; t awak

i g;

where powruni ; powidl

i ; powslepi , and powrecov

i denote thepower in the running state, idle state, sleep state,and recovering state, respectively. t awak

i representsthe recovering time, namely wake up latency. Thecompute node in the idle state can receive tasks atonce, therefore, the transition cost from idle stateto running state can be ignored. The values ofpowrun

i ; powidli ; powslep

i ; powrecovi , and t awak

i are related tothe hardware configuration and server manufacturers,all of which are constant.

The state transition of nodei is shown in Fig. 2. InFig. 2, nodei finishes all tasks at the moment tA; it entersthe idle state in which the power of nodei is powidl

i andthe threshold of idle period is T idl

i . If there are sometasks arriving in the idle state, assume at the momenttB, nodei executes tasks at once, and the power of therunning state is powrun

i . If there are no tasks arrivingduring the entire idle state, nodei starts a vacation atthe moment tC; that is, nodei will be set into sleep statewith powslep

i . If some tasks arrive during sleep state,assume at the moment tD, nodei is woken up; after arecovering period of t awak

i , where the power is powrecovi ,

nodei begins to execute tasks (at the moment tE/, inwhich the power is powrun

i .

Fig. 2 Switches between different power states of nodei.

4 Analysis of the Expectation of EnergyConsumption in the Cloud ComputingSystem

Energy consumption of a compute node is a functionof time and power[24]. Therefore, considering thequalitative behaviors of the M/G/1 vacation queuingsystem with exhaustive service, we first analyze theexpectations of task sojourn time and the power ofthe queuing system in this section. Notations of keyparameters are listed in Table 1.

4.1 Analysis of task sojourn time

The task sojourn time of cloud computing systemconsists of two parts—waiting time in the localqueue of a compute node, and service time of thenode performing tasks. According to the steady-stateconditions of the M/G/1 vacation queuing model withexhaustive service, waiting time of a task can bedecomposed into two independent random variables—waiting time of no vacation M/G/1 queuing system,and additional delay generated by an exhaustive serviceM/G/1 vacation model. For a compute node nodei insteady state, the task waiting time can be denoted as[21]:

twaiti D tWi C t

W,adi (4)

where tWi is the waiting time of the no vacation M/G/1queuing system, and tW,ad

i is the additional delay. Theexpectations of tWi and tW,ad

i are[21]:

E(tWi ) D�ib

.2/i

2 .1 � �i /(5)

E.tW,adi / D

E.Qb2i /2�iE.Qbi /

(6)

where �i D�i

�iis the service strength of nodei , �i < 1

in steady state. Qbi is the number of tasks in nodei at

Table 1 Notations of key parameters.

Notations Definitionsm The number of tasks arriving at the systemk The number of compute nodes in the system

comj ; tarrj; tdl

jThe computational amount, arrival time, and deadline of the j -th task

�i ; �i ; �i The task arrival rate, service rate, and service strength of the i -th compute nodetW,adi

The additional delay of the i -th compute nodetwaiti; T exc

i; T idl

iThe task waiting time, sojourn time, and the threshold of idle period in the i -th compute node

t awaki

The recovering time of the i -th compute nodet

rcyli

The duration of the busy cycle in the i -th compute nodeQbi The number of tasks in the i -th compute node at the beginning of the busy period

t lesuri

; tslepi; t run

i; t recov

iThe idle, sleep, running, and recovering time in a busy cycle of the i -th compute node

powidli; powslep

i; powrun

i; powrecov

iThe idle, sleep, running, and recovering power of the i -th compute node

Page 7: An Energy-Saving Task Scheduling Strategy Based on

Chunling Cheng et al.: An Energy-Saving Task Scheduling Strategy Based on Vacation � � � 33

the beginning of the busy period.Then the expectation of task waiting time is as

follows.

E.twaiti / D

�ib(2)i

2.1 � �i /C

E.Qb2i /

2�iE.Qbi /(7)

If some tasks arrive at nodei in the idle state, or ifthere are no tasks reaching nodei in the sleep state or therecovering state, then QbiD1. QbiDl .l>2/means thatthere is no task reaching nodei during the idle period,and l � 1 tasks reach within the recovering state.

According to exponential probability distribution, weget

P fQbi D lg D8̂<̂:.1 � e��iT

idli /C e��i .T

idliCtawak

i/; l D 1;

.�i tawaki /l�1

.l � 1/Še��i .T

idliCtawak

i/; l > 2

(8)

From Eq. (8), expectation E.Qbi / and the secondorder moment E.Qb2

i / can be drawn as follows.

E.Qbi / D1XsD1

s � P fQbi D sg D 1C �i tawaki e��iT

idli

(9)

E.Qb2i / D

1XsD1

s2P fQbi D sg D

E.Qbi .Qbi � 1//CE.Qbi / D

�i .2tawaki C �i .t

awaki /2/e��iT

idli CE.Qbi / (10)

Substituting Eqs. (9) and (10) into Eq. (6), we obtainthe following.

E.tW,adi / D

.2t awaki C �i .t

awaki /2/e��iT

idli

2.1C �i tawaki e��iT

idli /

C1

2�i(11)

From Eqs. (7) and (11), the expectation of taskwaiting time in nodei under steady state is as follows.

E.twaiti /D

�ib(2)i

2.1 � �i /C.2t awak

i C�i .tawaki /2/e��iT

idli

2.1C �i tawaki e��iT

idli /

C1

2�i

(12)According to Eq. (2), the mean service time of nodei

is 1=�i . Then, under steady state, the expectation oftask sojourn time E.T exc

i / in nodei is as follows.

E.T exci / D E.twait

i /C1

�iD

�ib(2)i

2.1 � �i /C

.2t awaki C �i t

awak2i /e��iT

idli

2.1C �i tawaki e��iT

idli /

C1C 2�i

2�i(13)

4.2 Analysis of mean power

A busy cycle is a period from the end of a busy periodto the end of the no tasks next busy period. If there are

arriving at nodei during the idle state, the duration ofthe busy cycle t rcyl

i of nodei consists of the idle timet lesuri , the immediately following sleep time t slep

i , therecovering time t recov

i , and the running time t runi . Since

there are no incoming tasks during the entire idle state,t lesuri D T idl

i . If there are some tasks reaching nodeiin the idle state, t rcyl

i consists of idle time t lesuri and

the immediately following running time. Therefore,t lesuri follows the conditional distribution of a task

arriving interval Ui under the condition of Ui < T idli .

Consequently, the mean duration of idle state of thecompute node is as follows.E.t lesur

i / D T idli e��iT

idli C.1�e��iT

idli /E.Ui jUi < T

idli /

(14)where Ui follows the exponential distribution withparameter �i , under the condition of Ui < T idl

i , theconditional distribution of Ui is as follows.

FUi.t/ D

8̂̂̂<̂ˆ̂:0; t 6 0I

1 � e��i t

1 � e��iTidli

; 0 < t < T idli I

1; t > T idli

(15)

Thus the conditional expectation of Ui is as follows.

E.Ui jUi < Tidli / D

Z T idli

0

tdFUi.t/ D

1

�i�T idli e��iT

idli

1 � e��iTidli

(16)From Eqs. (14) and (16), we get the following.

E(t lesuri ) D

1

�i.1 � e��iT

idli / (17)

When there are no tasks arriving at nodei during idlestate, the mean time of the sleep state and the recoveringstate of nodei are respectively as follows.

E.tslepi / D

1

�ie��iT

idli (18)

E.t recovi / D t awak

i e��iTidli (19)

The mean service time of nodei for a task is 1=�i ,combining with the expectation of task number E.Qbi /shown in Eq. (9); thus, the mean time of the runningstate E.t run

i / is as follows.

E.t runi / D

1

�iE.Qbi / D

1

�i.1C�i t

awaki e��iT

idli / (20)

To sum up, the mean duration of the busy cycleE.t

rcyli / of nodei is as follows.

E.trcyli / D E.t lesur

i /CE.tslepi /CE.t recov

i /CE.t runi / D

1

�i.1C �i /.1C �i t

awaki e��iT

idli / (21)

From Eqs. (17)–(21), we get the probability of nodeibeing in each state, denoted by pidl

i , pslepi , precov

i , and

Page 8: An Energy-Saving Task Scheduling Strategy Based on

34 Tsinghua Science and Technology, February 2015, 20(1): 28-39

pruni respectively as follows.

pidli D

E.t lesuri /

E.trcyli /

D1 � e��iT

idli

.1C �i /.1C �i tawaki e��iT

idli /

(22)

pslepi D

E.tslepi /

E.trcyli /D

e��iTidli

.1C �i /.1C �i tawaki e��iT

idli /

(23)

precovi D

E(t recovi )

E(t rcyli )

D�i t

awaki e��iT

idli

.1C �i /.1C �i tawaki e��iT

idli /(24)

pruni D

E.t runi /

E.trcyli /D

�i

1C �i(25)

The mean power of nodeiE.Pnodei / is as follows.E.Pnodei / D powrun

i pruni C powidl

i pidli C powslep

i pslepi C

powrecovi precov

i D�i

1C �ipowrun

i C

1 � e��iTidli

.1C �i /.1C �i tawaki e��iT

idli /

powidli C

e��iTidli

.1C �i /.1C �i tawaki e��iT

idli /

powslepi C

�i tawaki e��iT

idli

.1C �i /.1C �i tawaki e��iT

idli /

powrecovi (26)

4.3 Analysis of energy consumption

Using Eqs. (13) and (26), we draw the expectation ofenergy consumption of nodeiE.Enodei / as follows.

E.Enodei / D E.Pnodei / �E.T exci / D

�i

1C�ipowrun

i C1�e��iT

idli

.1C�i /.1C�i tawaki e��iT

idli /

powidli C

e��iTidli

.1C �i /.1C �i tawaki e��iT

idli /

powslepi C

�i tawaki e��iT

idli

.1C �i /.1C �i tawaki e��iT

idli /

powrecovi

!�

�ib

.2/i

2.1��i /C.2t awak

i C�i tawak2

i /e��iTidli

2.1C �i tawaki e��iT

idli /

C1C2�i

2�i

!(27)

The total energy consumption of the cloud computingsystem is the following.

E.Ecloud/ DkXiD1

E.Enodei / (28)

From Eqs. (27) and (28), we can see that the total energyconsumption of the cloud computing system is related

to the task arrival rate, the service rate, the power ofdifferent states, the threshold of the idle period, therecovering time, and the variance of service time of eachcompute node. For a specific cloud computing system,the task arrival rate and service rate of compute nodescan be obtained through long-term statistical results or alarge number of experiments[17]. The power of differentstates and the recovering time of compute nodes aredetermined by manufacturers; therefore, their valuesare constant. The threshold of the idle period and thevariance in service times of compute nodes vary withthe different task scheduling strategies.

Let x denote the threshold of the idle period of nodeiand y denote the variance of the service time of nodei .Then Eq. (27) can be simplified as follows.

E.Enodei / D

Ai C

Bi C Cie��ix

1CDie��ix

!�

Eiy C Fi CGie��ix

1CHie��ix

!(29)

where Ai=�i

1C �ipowrun

i , Bi=�i

1C �ipowidl

i , Ci D

powslepi C�i t

awaki powrecov

i �powidli

.1C �i /, Di D �i t awak

i , Ei D

�i

2.1 � �i /, Fi D

1C 2�i

2�i,Gi D

.2t awaki C �i .t

awaki /2/

2,

and Hi D �i t awaki . Ai �Hi are constants related to the

node properties, and greater than 0.The partial derivatives of E.Enodei / with respect to

x and y are expressed as Eqs. (30) and (31)[email protected] /

@xD

�ie��ix.BiDi � Ci /

.1CDie��ix/2

Eiy C Fi C

Gi CHie��ix

1C Iie��ix

!C

Ai C

Bi C Cie��ix

1CDie��ix

!�ie��ix.GiIi �Hi /

.1C Iie��ix/2(30)

@E.Enodei /@y

D

Ai C

Bi C Cie��ix

1CDie��ix

!�Ei (31)

Equation (30) shows the relationship between energyconsumption and threshold of the idle period of acompute node when the variance of the service time ofthis node does not change. With the change in thresholdof the idle period, the energy consumption of a nodeis related to Ai–Hi , �i , and y:

Equation (31) shows the relationship between energycost and the variance of service time of a compute

Page 9: An Energy-Saving Task Scheduling Strategy Based on

Chunling Cheng et al.: An Energy-Saving Task Scheduling Strategy Based on Vacation � � � 35

node when the threshold of the idle period does notchange. Since Ai–Ei are constants greater than 0,the partial derivative of E.Enodei / with respect toy isa monotonic function whose value is greater than 0.Therefore, the energy consumption of nodei grows asthe variance of service time increases. Moreover, due tothe fact that y > 0, the system gets the minimum energyconsumption when y D 0.

Based on the analysis above, we know that understeady state, the energy consumption of a compute nodeis related to the threshold of the idle period and thevariance of service time. Therefore, energy can be savedby reducing the variance of service time and settingreasonable threshold for the idle period while cloudcomputing system schedules tasks.

4.4 Task scheduling algorithm based on similartasks

Some papers[20, 23] have studied various mechanismsto set the idle period threshold of a compute nodein order to reduce energy consumption. We focus onenergy optimization by reducing the variance of servicetime in this paper, and present a Task SchedulingAlgorithm based on Similar Tasks (TSAST). Asdescribed earlier, the smaller the variance of servicetime of a compute node, the less energy that isconsumed by the node. At the same time, the taskscheduling algorithm needs to provide good service tousers, such as a shorter task sojourn time. Usually,the longer the task queue, the longer the task waitingtime and the task sojourn time. Considering the abovefactors, for soft real-time tasks and non-real-time tasks,we schedule them on compute nodes with similarservice times and shorter task waiting times; in thiscase, we call these tasks with similar service times ona node as similar tasks. For hard real-time tasks withstrict deadlines, if the deadline cannot be satisfied whena task is scheduled to the compute node with a similarservice time, it is scheduled to the compute node withthe earliest finish time. The algorithm is described inAlgorithm 1.

In Algorithm 1, in line (3), a task is acceptedas it arrives dynamically, and this function could beimplemented by an admission control module or alistener process in practical use. As the relationshipbetween the power of the running state powrun

i and theCPU frequency fi is powrun

i D cif3i

[25], where ci is a

constant, we use tj i Dcomjfi

Dcomj

3p

powruni =ci

in line

Algorithm 1: Task scheduling algorithm based on similartasks

(1) algorithm initialization: set KU D 0,

where KU=�1

�i

j1 6 i 6 k

�;

// KU is mean service time set of all compute nodes(2) while (there are incoming tasks) do(3) accept a task taskj using FCFS strategy;(4) record task parameters taskj D fcomj ; t

arrj; tdl

jg;

(5) for each node nodei

(6) calculate task execution time tji of taskj in it:

tji Dcomj

3p

powruni=ci

; i 2 k; ==ci is a constant.

(7) end for(8) choose a node set U=fnodei jtji C t

waiti

< tdlj� t arr

jg;

// U is a set of the compute nodes which can finish// the task before deadline

(9) if U ¤ ∅(10) choose the compute node with the minimumˇ̌̌̌

1

�i

� tji

ˇ̌̌̌C �ji � t

waiti

to U; //1

�i

2 KU

(11) elsechoose the compute node with the minimumftji C t

waitigI

(12) end if(13) update KU;

// update the mean service time of the selected node;(14) end while

(6) to estimate the executing time tj i of taskj in thenodei . �j i in line (10) is the objective weight coefficientto adjust the importance of the objective—the energyconsumption or the task performance.

In Algorithm 1, the computational complexity ofaccepting all tasks in lines (2)–(4) is O.m/, where mis the number of tasks. For each task, the computationalcomplexity to calculate the task execution time in eachcompute node in line (7) and to obtain a node set whichmeets the scheduling objective in line (8) is O.k/,where k is the number of compute nodes. Lines (9)–(12) select a specific compute node from all nodes,whose computational complexity is O.k/. The worstcomputational complexity to update the mean servicetime of the selected node is O.k/. Therefore, thecomputational complexity of Algorithm 1 is O(mk).

5 Experimental Evaluation

5.1 Experimental environment

The simulated dynamic environment is set up using thediscrete event simulation tool in Matlab. We comparethe proposed algorithm TSAST against ME3PC[17]

Page 10: An Energy-Saving Task Scheduling Strategy Based on

36 Tsinghua Science and Technology, February 2015, 20(1): 28-39

and classical Min-Min[26]. The experimental processis as follows: When a task arrives, its parametersare recorded, and then it is scheduled to a computenode according to the three algorithms respectively. InTSAST, the task is scheduled to the compute nodewith similar service times and shorter waiting times.In ME3PC, all compute nodes are divided into threesets according to their load, and the servers withlower load are preferred for performing tasks. Forcomputers with light load, ME3PC adopts the taskscheduling strategy based on great service intensity;for computers with normal load, ME3PC uses the taskscheduling strategy based on less execution energy.When all computers are overloaded, ME3PC schedulestasks to the computers with minimum load[17]. Min-Min is widely used in homogeneous or heterogeneousdistributed parallel computing environments, and hasgood scheduling performance. In Min-Min, the smallesttask is scheduled first, and it is dispatched to thecomputer with the earliest completion time[26]. Thesethree algorithms are evaluated on four aspects—averagesystem power, average energy of one task running, totalidle energy, and average sojourn time of tasks. All theexperiments are performed on a PC configured with a2.40 GHz Intel Core i5 CPU, 4 GB of memory, and a500 G disk. The simulation tool is Matlab7.0.

In the experiments, the task arrival interval followsa negative exponential distribution of 1=�i . Thecomputational amount of tasks is generated randomlyin the interval [1, 10 000] MI. The CPU frequency ofcompute nodes is randomly generated in the interval[5000, 10 000] MIPS. The value of powrun

i is calculatedaccording to powrun

i D cif3i

[25]. The recovering time isin the interval [5, 10] s to simulate heterogeneous cloudcomputing. The average service time is distributedrandomly in the interval [1, 5] s. Similar to Ref. [17], weevaluate the three algorithms under different scenariosdescribed by a tuple .m; �; k/, where m denotes thenumber of tasks, � denotes the task arrival rate inME3PC and Min-Min, and k denotes the number ofcompute nodes. Nine groups of experiments are carriedout, and the corresponding values of .m; �; k/ are:(375, 2�4�10, 1), (750, 2�3�10, 2), (1500, 2�2�10,4), (3000, 2�1�10, 8), (6000, 10, 16), (12 000, 2�10,32), (24 000, 22�10, 64), (48 000, 23�10, 128), and(96 000, 24�10, 256). Since only busy and idle statesare considered in Min-Min and ME3PC, the powersof the corresponding states are powrun

i and powidli

respectively. The parameters and their values or ranges

in the simulation environment are shown in Table 2.

5.2 Experimental results and analysis

We first focus on the effect of energy saving. Theaverage power of the system, the average energy of onetask running in the system, and the total idle energy aremeasured. The results are shown in Figs. 3–5.

Figure 3 shows the average power of the systemwith different numbers of compute nodes. The systemaverage power of Min-Min is the largest, ME3PCis smaller than Min-Min, while TSAST is thesmallest. The reason is that Min-Min schedules tasksin order to complete the tasks as soon as possiblewithout considering energy optimization, so the averagepower consumption is high. ME3PC considers energyoptimization, but it does not take sleep state ofcompute nodes into consideration, so its average powerconsumption is still higher than TSAST.

Figure 4 plots the average energy of one task running

Table 2 Parameters of simulation environment.

Parameter Value Explanationcomj [1,10 000] Computational amount of

tasks1=�i [1,10] Task arrival interval1/�i [1,5] Average service time of nodesfi [5000,10 000] CPU frequencyci 10�6 Coefficient between power

and CPU frequencypowidl

i0.7� powrun

iIdle power of compute node

powslepi

0.1� powruni

Sleep power of compute nodepowrecov

i0.01� powrun

iRecovering power of computenode

T idli

[1,10] Threshold of idle periodt awaki

[5,10] Transition time from sleepstate to running state

�ji

j1=�i � tji j

j1=�i � tji j C twaiti

Objective weight coefficient

Fig. 3 Average power of system.

Page 11: An Energy-Saving Task Scheduling Strategy Based on

Chunling Cheng et al.: An Energy-Saving Task Scheduling Strategy Based on Vacation � � � 37

Fig. 4 Average energy of one task running in the system.

Fig. 5 Total idle energy.

in the system under different scenarios. We note thatthe average energy of the three algorithms is very closeand increases slowly when the number of computenodes is small. This is because all compute nodes areworking and the resource utilization is higher underthe circumstances. As the number of compute nodesincreases, the average energy grows. The curves ofME3PC and Min-Min ascend more quickly than that ofTSAST because TSAST not only takes the minimumexpectation energy into consideration while schedulingtasks, but also uses the sleep state to further save energy.

Figure 5 shows the total idle energy as the numberof compute nodes increases. When there are relativelyfewer compute nodes in the cloud computing system,most nodes are running tasks; therefore, the total idleenergy is lower. As the number of compute nodesincreases, the number of tasks and the computingamount scheduled onto a given compute node decreaseand the idle time increases; as a result, the total idleenergy also increases. In Min-Min, compute nodesalways remain powered on; therefore, idle energyremains the highest. In TSAST, apart from the similartask scheduling policy, compute nodes support sleep

state whose power is less than idle state in ME3PC.Finally, the average sojourn time of tasks is used to

measure performance of task completion of the threealgorithms. The results are shown in Fig. 6. On thewhole, the average sojourn time of each algorithmshows a decreasing trend with an increasing numberof compute nodes. The average sojourn time of Min-Min is the shortest because Min-Min focuses onthe task completion time without considering energyconsumption. TSAST and ME3PC optimize energyconsumption at the expense of a little performance, andthe difference is less than 10%. Moreover, the averagesojourn time of TSAST is shorter than that of ME3PC.

From the experimental results above, we can see thatTSAST has good energy saving performance. Althoughthe average sojourn time is slightly more prolonged thanthat of Min-Min, the overall performance is the best.

6 Conclusions and Future Work

At present, the energy consumption of cloud datacentersis high despite the resource utilization being lowresulting in a significant waste of energy; consequently,the optimization of energy consumption needs to besolved urgently. This frequently occurs due to theunreasonable way in which tasks are scheduled. In thispaper, we model the task scheduling of a heterogeneouscloud computing system using the vacation queuingtheory. We analyze the average sojourn time of tasksand the average power of compute nodes in theheterogeneous cloud computing system under steadystate. We present a task scheduling algorithm based onsimilar tasks. Simulation results show that the proposedalgorithm can ensure task performance, while reducingthe energy cost of a cloud computing system effectively.

Our future work will focus on designing anddeveloping a green resource management software

Fig. 6 Average sojourn time of tasks.

Page 12: An Energy-Saving Task Scheduling Strategy Based on

38 Tsinghua Science and Technology, February 2015, 20(1): 28-39

framework encompassing a scalable monitoringservice and an adaptive provisioning service in orderto implement automatic energy-saving managementand performance optimizations in modern clouddatacenters.

Acknowledgements

This work was supported by Research and InnovationProjects for Graduates of Jiangsu Graduates of JiangsuProvince (No. CXZZ12 0483) and the Science andTechnology Support Program of Jiangsu Province (No.BE2012849).

References

[1] G. Lovasz, F. Niedermeier, and H. De-Meer, Performancetradeoffs of energy-aware virtual machine consolidation,Journal of Networks Software Tools and Applications, vol.16, pp. 37–38, 2013.

[2] J. X. Chen, Energy efficient design of cloud data center,Cloud IDC, vol. 57, pp. 481–496, 2011.

[3] O. Philippe and L. Jorge, Deep network and servicemanagement for cloud computing and data centers: Areport on CNSM 2012, Journal of Network and SystemsManagement, vol. 21, pp. 707–712, 2013.

[4] Y. S. Jing, A. Shahzad, and S. Kun, State-of-the-artresearch study for green cloud computing, Journal ofSupercomputing, vol. 65, pp. 445–468, 2013.

[5] T. L. Chen and H. L. Lachlan, Simple and effectivedynamic provisioning for power-proportional data centers,IEEE Transactions on Parallel and Distributed Systems,vol. 24, pp. 1161–1171, 2013.

[6] C. Y. Lee and A. Zomaya, Energy conscious scheduling fordistributed computing systems under different operatingconditions, IEEE Transactions on Parallel and DistributedSystems, vol. 22, pp. 1374–1381, 2011.

[7] J. Guo, F. Liu, D. Zeng, J. C. S. Liu, and H. Jin, Acooperative game based allocation for sharing data centernetworks, in Proceedings IEEE Infocom, 2013, pp. 2139–2147.

[8] Z. Zhou, F. Liu, H. Jin, B. Li, B. Li, and H. Jiang, Onarbitrating the power-performance tradeoff in SaaS clouds,in Proceedings IEEE Infocom, 2013, pp. 872–880.

[9] W. Deng, F. Liu, H. Jin, B. Li, and D. Li, Harnessingrenewable energy in cloud datacenters: Opportunities andchallenges, IEEE Network Magazine, vol. 28, pp. 48–55,2014.

[10] F. Xu, F. Liu, L. Liu, H. Jin, B. Li, and B. Li, iAware:Making live migration of virtual machines interference-aware in the cloud, IEEE Transactions on Computers, vol.63, pp. 3012–3025, 2014.

[11] F. Xiu, F. Liu, H. Jin, and A. V. Vasilakos, Managingperformance overhead of virtual machines in cloudcomputing: A survey, state of the art, and future directions,Proceedings of the IEEE, vol. 102, pp. 11–31, 2014.

[12] G. Daniel and T. Anthony, Cooperative load balancingin distributed systems, Concurrency and ComputationPractice & Experience, vol. 20, pp. 1953–1976, 2008.

[13] L. G. Valentini, W. Lassonde, U. S. Khan, N. Min-Allah, S. A. Madani, L. Juan, L. Zhang, L. Wang,N. Ghani, J. Kolodziej, et al., An overview of energyefficiency techniques in cluster computing systems,Cluster Computing, vol. 16, pp. 3–15, 2013.

[14] R. J, R. Kuo and C. W. Cheng, Hybrid meta-heuristicalgorithm for job shop scheduling with due date timewindow and release time, The International Journal ofAdvanced Manufacturing Technology, vol. 67, pp. 59–71,2013.

[15] G. Shen and Y. Zhang, Power consumption constrainedtask scheduling using enhanced genetic algorithms, inEvolutionary Based Solutions for Green Computing.Springer Berlin Heidelberg, 2013, pp. 139–159.

[16] L. X. Wang, P. Y. Wang, and H. Zhu, Energy-efficientmulti-job scheduling model for cloud computing and itsgenetic algorithm, Mathematical Problems in Engineering,vol. 10, pp. 1–16, 2012.

[17] M. Y. Tan, S. G. Zeng, and W. Wang, Policy of energyoptimal management for cloud computing platform withstochastic tasks, Journal of Software, vol. 23, pp. 266–278,2012.

[18] S. Zikos and D. H. Karatza, Performance and energy awarecluster-level scheduling of compute-intensive jobs withunknown service times, Simulation Modeling Practice andTheory, vol. 1, pp. 239–250, 2011.

[19] L. Gong, H. X. Sun, and F. E. Waston, Performancemodeling and prediction of non-dedicated networkcomputing, IEEE Transactions on Computers, vol. 51, pp.1041–1055, 2002.

[20] W. Wang, Z. J. Luo, and B. A. Song, Dynamic pricingbased energy cost optimization in data center environment,Journal of Computers, vol. 36, pp. 600–615, 2013.

[21] Y. Z. Ma, The steady state theory of M/G/1 type multipleadaptive vacation queueing system, Ph. D. dissertation,Yanshan University, Qinhuangdao, China, 2006.

[22] A. Gandhi, M. Harchol-Balter, and A. M. Kozuch, Aresleep states effective in data centers? in 2012 InternationalConference on Green Computing (IGCC), 2012, pp. 1–10.

[23] M. Ware, K. Rajamani, M. Floyd, B. Brock, J. C. Rubio,F. Rawson, and J. B. Carter, Architecting for powermanagement: The IBM POWER 7 approach, in Proc.IEEE 16th International Symposium on High PerformanceComputer Architecture, HPCA, 2010.

[24] H. Blume, V. J. Livonius, L. Rotenberg, T. G. Noll, H.Bothe, and J. Brakensiek, OpenMP-based parallelizationon an MPcore multiprocess or platform—A performanceand power analysis, Journal of Systems Architecture, vol.54, pp. 1019–1029, 2010.

[25] X. Y. Shi, H. X. Jiang, and J. K. Ye, An energy-efficient scheme for cloud resource provisioning based onCloudSim, in IEEE International Conference on ClusterComputing, 2011, pp. 595–599.

[26] D. T. Braun and H. Siegel, A comparison of eleven staticheuristics for mapping a class of independent tasks ontoheterogeneous, Journal of the Parallel and DistributedComputing, vol. 61, pp. 810–837, 2011.

Page 13: An Energy-Saving Task Scheduling Strategy Based on

Chunling Cheng et al.: An Energy-Saving Task Scheduling Strategy Based on Vacation � � � 39

Chunling Cheng received the BS degreein computer software and MS degreein computer application from NanjingUniversity of Science and Technology,China in 1993 and 1996, respectively. Sheis currently a professor at the Collegeof Computer, Nanjing University of Postsand Telecommunications. Her research

interests include cloud computing and data management.

Jun Li received the BS degree incomputer science and technology fromAnqing Normal University, China in2011 and the MS degree in computerapplication at Nanjing University of Postsand Telecommunications in 2014. Herresearch interest is resource managementin cloud computing.

Ying Wang received the BS degreein computer science and technologyfrom Jiangsu University of Technology,China in 2012. She is currently workingtoward the MS degree in computerapplication at Nanjing University of Postsand Telecommunications. Her researchinterest is resource management in cloud

computing.