Comparson of Heurstcs for Schedulng Independent Tasks on Heterogeneous Dstrbuted Envronments Hesam Izakan¹, Ath Abraham², Senor Member, IEEE, Václav Snášel³ ¹ Islamc Azad Unversty, Ramsar Branch, Ramsar, Iran ² Norwegan Center of Excellence, Center of Excellence for Quantfable Qualty of Servce, Norwegan Unversty of Scence and Technology, Trondhem, Norway ³Faculty of Electrcal Engneerng and Computer Scence VSB-Techncal Unversty of Ostrava, Czech Republc Hesam.zakan@gmal.com, Ath.abraham@eee.org, vaclav.snasel@vsb.cz Abstract Schedulng s one of the core steps to effcently explot the capabltes of heterogeneous dstrbuted computng systems and s an NP-complete problem. Therefore usng meta-heurstc algorthms s a sutable approach n order to cope wth ts dffculty. In meta-heurstc algorthms, generatng ndvduals n the ntal step has an mportant effect on the convergence behavor of the algorthm and fnal solutons. Usng some heurstcs for generatng one or more near-optmal ndvduals n the ntal step can mprove the fnal solutons obtaned by meta-heurstc algorthms. Dfferent crtera can be used for evaluatng the effcency of schedulng algorthms, the most mportant of whch are makespan and flowtme. In ths paper we propose an effcent heurstc method and then we wll compare wth fve popular heurstcs for mnmzng makespan and flowtme n heterogeneous dstrbuted computng systems. 1. Introducton Mxed-machne heterogeneous computng (HC) envronments utlze a dstrbuted sute of dfferent hgh-performance machnes, nterconnected wth hgh-speed lnks, to perform dfferent computatonally ntensve applcatons that have dverse computatonal requrements [1, 2]. To explot the dfferent capabltes of a sute of heterogeneous resources, typcally a resource management system (RMS) allocates the resources to the tasks and the tasks are ordered for executon on the resources. At a tme nterval n HC envronment a number of tasks are receved by RMS from dfferent users. Dfferent tasks have dfferent requrements and dfferent resources have dfferent capabltes. Optmally schedulng s mappng a set of tasks to a set of resources to effcently explot the capabltes of such systems and s one of the key problems n HC envronments. As mentoned n [9] optmal mappng tasks to machnes n an HC sute s an NP-complete problem and therefore the use of meta-heurstcs s one of the sutable approaches. The most popular of metaheurstc algorthms are genetc algorthm (GA), tabu search (TS), smulated annealng (SA), ant colony optmzaton (ACO) and partcle swarm optmzaton (PSO). Rtche and Levne [4] used a hybrd ant colony optmzaton, Yarkhan and Dongarra [5] used smulated annealng approach and Page and Naughton [3], used genetc algorthm for task schedulng n HC systems. The algorthmc flow n meta-heurstc algorthms starts wth randomly generatng populaton of ndvduals that are potental solutons. Then n a fxed number of teratons the algorthm tres to obtan optmal or near-optmal solutons usng predefned operators (such as crossover and mutaton n GA etc) and a ftness functon that evaluates the optmalty of solutons. Generatng potental solutons at the begnnng of the algorthm has an mportant effect n obtanng fnal solutons and f n ths step of the algorthm bad solutons are generated randomly, then the algorthm provdes bad solutons or local optmal solutons. To overcome the posed problem, we usually generate one or more ndvduals usng well-known heurstcs and others randomly n the ntal step of the algorthm. These heurstcs generate near-optmal
solutons and the meta-heurstc algorthm combnes random solutons wth them for obtanng better solutons. Usng ths method we can obtan better solutons usng meta-heurstc algorthms. Exstng schedulng heurstcs can be dvded nto two classes [6]: on-lne mode (mmedate mode) and batch-mode heurstcs. In the on-lne mode, a task s mapped onto a host as soon as t arrves at the scheduler. In the batch mode, tasks are not mapped onto hosts mmedately and they are collected nto a set of tasks that s examned for mappng at prescheduled tmes called mappng events. The onlne mode heurstc s sutable for the low arrval rate, whle batch-mode heurstcs can acheve hgher performance when the arrval rate of tasks s hgh because there wll be a suffcent number of tasks to keep hosts busy between the mappng events, and schedulng s accordng to the resource requrement nformaton of all tasks n the set [6]. In ths paper, we consdered batch-mode heurstcs. Dfferent crtera can be used for evaluatng the effcency of schedulng algorthms, the most mportant of whch are makespan and flowtme. Makespan s the tme when an HC system fnshes the latest ob and flowtme s the sum of fnalzaton tmes of all the obs. An optmal schedule wll be the one that optmzes the flowtme and makespan. In ths paper, we proposed an effcent heurstc called mn-max. Also we nvestgate the effcacy of mn-max and 5 popular heurstcs for mnmzng makespan and flowtme. These heurstcs are mnmn, max-mn, LJFR-SJFR, sufferage, and WorkQueue. These heurstcs are popular, effectve and are used n many studes. So far, some of works have been done for nvestgatng number of these heurstcs for mnmzng makespan, yet no attempt has been made to mnmze flowtme or both flowtme and makespan. Also the effcency of these heurstcs s nvestgated on smple benchmarks and the varous characterstcs of machnes and tasks n HC envronments are not consdered. In ths paper, we nvestgate the effcency of these heurstcs on HC envronments wth varous characterstcs of both machnes and tasks. The remander of ths paper s organzed n the followng manner: Secton 2 formulates the problem, n Secton 3 we provde the defntons of heurstcs, and Secton 4 reports the expermental results. Fnally Secton 5 concludes ths work. 2. Problem formulaton An HC envronment s composed of computng resources where these resources can be a sngle PC, a cluster of workstatons or a supercomputer. Let T = T, T,..., T } denote the set of tasks that n a { 1 2 n specfc tme nterval s submtted to RMS. Assume the tasks are ndependent of each other (wth no ntertask data dependences) and preempton s not allowed (they cannot change the resource they have been assgned to). Also assume at the tme of recevng these tasks by RMS, m machnes M = M, M,..., M } are wthn the HC { 1 2 m envronment. In ths paper schedulng s done at machne level and t s assumed that each machne uses Frst-Come, Frst-Served (FCFS) method for performng the receved tasks. We assume that each machne n HC envronment can estmate how much tme s requred to perform each task. In [2] Expected Tme to Compute (ECT) matrx s used to estmate the requred tme for executng a task n a machne. An ETC matrx s an n m matrx n whch n s the number of tasks and m s the number of machnes. One row of the ETC matrx contans the estmated executon tme for a gven task on each machne. Smlarly one column of the ETC matrx conssts of the estmated executon tme of a gven machne for each task. Thus, for an arbtrary taskt and an arbtrary machne M, ETC T, M ) s the estmated executon tme of T on ( M. In ETC model we take the usual assumpton that we know the computng capacty of each resource, an estmaton or predcton of the computatonal needs of each ob, and the load of pror work of each resource. Assume that C, ( {1,2,..., m}, {1,2,..., n}) s the completon tme for performng th task n th machne and W ( {1,2,..., m}) s the prevous workload of for M, then Eq. (1) shows the tme requred M to complete the tasks ncluded n t. Accordng to the aforementoned defnton, makespan and flowtme can be estmated usng Eq. (2) and Eq. (3) respectvely. C + W (1) makespan = max{ C + W}, {1,2,..., m} flowtme = m C = 1 (2) (3)
As mentoned n the prevous secton, the goal of the scheduler n ths paper s to mnmze makespan and flowtme. 3. Heurstc descrptons Ths secton provdes the descrpton of 5 popular heurstcs for mappng tasks to avalable machnes n HC envronments. Then we propose an effcent heurstc called mn-max. 3.1. Mn-mn heurstc Mn-mn heurstc uses mnmum completon tme (MCT) as a metrc, meanng that the task whch can be completed the earlest s gven prorty. Ths heurstc begns wth the set U of all unmapped tasks. Then the set of mnmum completon tmes, M = {mn( completon_ tme( T, M )) for ( 1 n, 1 m)}, s found. M conssts of one entry for each unmapped task. Next, the task wth the overall mnmum completon tme from M s selected and assgned to the correspondng machne and the workload of the selected machne wll be updated. And fnally the newly mapped task s removed from U and the process repeats untl all tasks are mapped (.e. U s empty) [2, 7]. 3.2. Max-mn heurstc The Max-mn heurstc s very smlar to mn-mn and ts metrc s MCT too. It begns wth the set U of all unmapped tasks. Then, the set of mnmum completon tmes, M = {mn( completon _ tme( T, M )), for ( 1 n, 1 m)}, s found. Next, the task wth the overall maxmum completon tme from M s selected and assgned to the correspondng machne and the workload of the selected machne wll be updated. And fnally the newly mapped task s removed from U and the process repeats untl all tasks are mapped [2, 7]. 3.3. LJFR-SJFR Heurstc Longest Job to Fastest Resource- Shortest Job to Fastest Resource (LJFR-SJFR) [8] heurstc begns wth the set U of all unmapped tasks. Then, the set of mnmum completon tmes, M = {mn( completon_ tme( T, M )) for ( 1 n, 1 m)}, s found the same as mn-mn. Next, the task wth the overall mnmum completon tme from M s consdered as the shortest ob n the fastest resource (SJFR). Also the task wth the overall maxmum completon tme from M s consdered as the longest ob n the fastest resource (LJFR). At the begnnng, ths method assgns the m longest obs to the m avalable fastest resources (LJFR) and then assgns the shortest task to the fastest resource and the longest task to the fastest resource alternatvely. After each allocaton, the workload of each machne wll be updated. 3.4. Sufferage Heurstc In ths heurstc for each task, the mnmum and second mnmum completon tme are found n the frst step. The dfference between these two values s defned as the sufferage value. In the second step, the task wth the maxmum sufferage value s assgned to the correspondng machne wth mnmum completon tme. The Sufferage heurstc s based on the dea that better mappngs can be generated by assgnng a machne to a task that would suffer most n terms of expected completon tme f that partcular machne s not assgned to t [6]. 3.5. WorkQueue Heurstc Ths heurstc s a straghtforward and adaptve schedulng algorthm for schedulng sets of ndependent tasks. In ths method the heurstc selects a task randomly and assgns t to the machne as soon as t becomes avalable (n other word the machne wth mnmum workload). 3.6. Proposed Heurstc Ths heurstc (called mn-max) s composed of two steps for mappng each task and uses the mnmum completon tme n the frst step and the mnmum executon tme n the second as metrc. In the frst step, ths heurstc begns wth the set U of all unmapped tasks. Then the set of mnmum completon tmes, M = {mn( completon_ tme( T, M )) for ( 1 n, 1 m)}, s found the same as mnmn heurstc. In the second step, the task whose mnmum executon tme (tme for executng task on the fastest machne) dvde by ts executon tme on the selected machne (n the frst step), has the maxmum value wll be selected for mappng. The ntuton behnd ths heurstc s that we select par machnes and tasks from the frst step that the
machne can executes ts correspondng task effectvely wth a lower executon tme n comparson wth other machnes. 4. Comparson and Expermental results We compared the performance of the above heurstcs for mnmzng makespan and flowtme. We used the benchmark proposed n [2]. The smulaton model n [2] s based on expected tme to compute (ETC) matrx for 512 obs and 16 machnes. The nstances of the benchmark are classfed nto 12 dfferent types of ETC matrces accordng to the three followng metrcs: ob heterogenety, machne heterogenety, and consstency. In ETC matrx, the amount of varance among the executon tmes of tasks for a gven machne s defned as task heterogenety. Machne heterogenety represents the varaton that s possble among the executon tmes for a gven task across all the machnes. Also an ETC matrx s sad to be consstent whenever a machne M executes any task T faster than machne M ; n ths case, machne M executes all k tasks faster than machne M k. In contrast, nconsstent matrces characterze the stuaton where machne M may be faster than machne M k for some tasks and slower for others. Partally-consstent matrces are nconsstent matrces that nclude a consstent sub-matrx of a predefned sze [2]. Instances consst of 512 obs and 16 machnes and are labeled as u-yy-zz-x as follow: u means unform dstrbuton used n generatng the matrces. yy ndcates the heterogenety of the obs; h means hgh and lo means low. zz represents the heterogenety of the nodes; h means hgh and lo means low. x shows the type of nconsstency; c means consstent, means nconsstent, and p means partally-consstent. The obtaned makespan and flowtme usng mentoned heurstcs are compared n tables 1 and 2 respectvely. The results are obtaned as an average of fve smulatons. In these tables, the frst column ndcates the nstance name, and the second, thrd, fourth, ffth and sxth columns ndcate the makespan and flowtme of workqueue, max-mn, LJFR-SJFR, Sufferage, mn-mn and mn-max heurstcs. Fgures 1 and 2 show the comparson of statstcal results usng dfferent heurstcs for mean makespan and flowtme for the 12 consdered cases. As t s evdent from the fgures, mn-max, the proposed heurstc, can mnmze the makespan better than others n most cases. Also mn-mn heurstc can mnmze flowtme better than others. 5. Conclusons Schedulng n HC envronments s an NP-complete problem. Therefore, usng meta-heurstc algorthms s a sutable approach n order to cope wth ts dffculty n practce. In meta-heurstc algorthms, the use of one or more heurstcs for generatng ndvduals s an approprate method that can mprove the fnal solutons. In ths paper we compare 6 heurstcs for schedulng n HC envronments. The goal of the scheduler n ths paper s mnmzng makespan and flowtme. The expermental results show that mn-mn heurstc can obtan the best results for mnmzng flowtme and the proposed heurstc can obtan the best results for mnmzng makespan too. These results ndcate that usng mn-max heurstc for generatng ntal ndvduals n meta-heurstc algorthms s a sutable selecton. Fgure 1. Comparson results between heurstcs on makespan Fgure 2. Comparson results between heurstcs on flowtme
Table 1. Comparson of statstcal results on makespan (Seconds) Instance WorkQueue Max-Mn LJFR-SJFR Sufferage Mn-Mn Mn-Max u-lo-lo-c 7332 6753 6563 5461 5468 5310 u-lo-lo-p 8258 5947 5179 3433 3599 3327 u-lo-lo- 9099 4998 4251 2577 2734 2523 u-lo-h-c 473353 400222 391715 333413 279651 273467 u-lo-h-p 647404 314048 279713 163846 157307 146953 u-lo-h- 836701 232419 209076 121738 113944 102543 u-h-lo-c 203180 203684 202010 170663 164490 164134 u-h-lo-p 251980 169782 155969 105661 106322 103321 u-h-lo- 283553 153992 138256 77753 82936 77873 u-h-h-c 13717654 11637786 11305465 9228550 8145395 7878374 u-h-h-p 18977807 9097358 8027802 4922677 4701249 4368071 u-h-h- 23286178 7016532 6623221 3366693 3573987 2989993 Table 2. Comparson of statstcal results on flowtme (Seconds) Instance WorkQueue Max-Mn LJFR-SJFR Sufferage Mn-Mn Mn-Max u-lo-lo-c 108843 108014 102810 86643 80354 84717 u-lo-lo-p 127639 95091 81861 54075 51399 52935 u-lo-lo- 140764 79882 66812 40235 39605 39679 u-lo-h-c 7235486 6400684 6078313 5271246 3918515 4357089 u-lo-h-p 10028494 5017831 4383010 2568300 2118116 2323396 u-lo-h- 12422991 3710963 3303836 1641220 1577886 1589574 u-h-lo-c 3043653 3257403 3153607 2693264 2480404 2613333 u-h-lo-p 3776731 2714227 2461337 1657537 1565877 1640408 u-h-lo- 4382650 2462485 2181042 1230495 1214038 1205625 u-h-h-c 203118678 185988129 173379857 145482572 115162284 125659590 u-h-h-p 282014637 145337260 126917002 76238739 63516912 69472441 u-h-h- 352446704 112145666 104660439 47237165 45696141 46118709 References [1] S. Al, T. D. Braun, H. J. Segel, and A. A. Maceewsk, Heterogeneous computng, Encyclopeda of Dstrbuted Computng, Kluwer Academc, 2001. [2] H.J. Braun et al, A comparson of eleven statc heurstcs for mappng a class of ndependent tasks onto heterogeneous dstrbuted computng systems Journal of Parallel and Dstrbuted Computng, 61(6), 2001. [3] J. Page and J. Naughton, Framework for task schedulng n heterogeneous dstrbuted computng usng genetc algorthms, Artfcal Intellgence Revew, 2005 pp. 415 429. [4] G. Rtche and J. Levne, A hybrd ant algorthm for schedulng ndependent obs n heterogeneous computng envronments, In: 23rd Workshop of the UK Plannng and Schedulng Specal Interest Group, 2004. [5] A. Yarkhan and J. Dongarra, Experments wth schedulng usng smulated annealng n a grd envronment, In: 3rd Internatonal Workshop on Grd Computng (GRID2002), 2002, pp. 232 242. [6] M. Macheswaran, S. Al, H.J. Segel, D. Hensgen, R.F. Freund, Dynamc mappng of a class of ndependent tasks onto heterogeneous computng systems, J. Parallel Dstrbut. Comput. 59 (2) (1999) 107 131. [7] R. F. Freund et al, Schedulng resources n mult-user, heterogeneous, computng envronments wth SmartNet, In: 7th IEEE Heterogeneous Computng Workshop (HCW 98), 1998, pp. 184-199. [8] A. Abraham, R. Buyya, and B. Nath, Nature s heurstcs for schedulng obs on computatonal grds, In: The 8th IEEE Internatonal Conference on Advanced Computng and Communcatons, Inda, 2000. [9] D. Fernandez-Baca, Allocatng modules to processors n a dstrbuted system, IEEE Trans. Software Engrg. 15, 11 (Nov. 1989), pp. 1427-1436.