using the black-box approach with machine learning methods in

12
Using the black-box approach with machine learning methods in order to improve job scheduling in GRID environments DANIEL VLADU ˇ SI ˇ C XLAB d.o.o. Pot za Brdom 100, SI-1000 Ljubljana SLOVENIA [email protected] Abstract: This article focuses on mapping jobs to resources with use of off-the-shelf machine learning methods. The machine learning methods are used in the black-box manner, having a wide variety of parameters for internal cross validation. In the article we focus on two sets of experiments, both constructed with a goal of congesting the system. In the first part, the machine learning methods are used as assistants for the base resource selection algorithms, while in the second part, they are used to directly select the resource for job execution. We set up two experiments with different objectives. In the first experiment, the objective was to maximize the number of jobs finished within the deadline, while in the second experiment, the objective was to minimize the job tardiness. Finally, in the first part we were changing resource selections of simple job dispatching algorithms, while in the second part, we were employing the optimization scheme of the ALEA algorithm [15]. The results show that even with a such black-box approach of the off-the-shelf machine learning methods, we can achieve improvements or at least get comparable results. Key–Words: scheduling, distributed systems, GRID, dispatching jobs in GRIDs, machine learning 1 Introduction The problem description The definition of the GRID scheduling problem, usu- ally found in literature consists of the definition of a set of resources (e.g., machines, computational nodes, storage, network capacity, etc.) and a set of jobs (e.g., computational, storage tasks) and some optimality cri- terion used for quantitative measurements of the qual- ity of the scheduling. In addition to this basic de- scription, the definition of such problem usually also consists of some specifications about the actual GRID system and of other specific constraints. Given this definition, we can conclude that GRID systems are typical examples of dynamic environ- ment, where the complexity of the scheduling prob- lem is strongly dependent on the system itself, the constraints on job execution and properties of the job itself. Namely, the resources in the GRID system may be non-uniform (e.g., machines with different speeds and number of CPUs). The same also holds for jobs, which have different computational complexities (i.e., lengths), may require different machine architec- tures or a specific number of processors. Furthermore, jobs may have interdependencies in terms of the order of execution, deadlines, priorities and so forth. Fi- nally, jobs can also be migrated during their execu- tion, which introduces another possibility for schedul- ing. In addition to these parameters, GRID systems can also have varying network topology and bandwith requirements. We can thus conclude that the prob- lem space of scheduling on GRID systems is large and non-heterogenous, while the general goal of schedul- ing is usually to meet the users and system adminis- trators demands. This general goal can be explicitely defined as maximization of the CPU utilization, mini- mization of job tardiness, etc. Motivation Our motive in performing these experiments was to test how the off-the-shelf machine learning ap- proaches can be used in already existing GRID frame- works. To this end, we used implementations of machine learning algorithms available in the WEKA package [14]. Using this approach we also minimize the efforts needed for their implementation in the real frameworks. Our focus was in minimization of tardi- ness of jobs, in other words to maximize the number of jobs finished within the deadline. These two cri- teria are not, however, completely interchangeable, as minimization of tardiness may also result in a higher number of jobs that are not finished within the dead- line. The success of the machine learning methods in WSEAS TRANSACTIONS on SYSTEMS and CONTROL Daniel Vladusic ISSN: 1991-8763 259 Issue 6, Volume 4, June 2009

Upload: butest

Post on 23-Jan-2015

521 views

Category:

Documents


4 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Using the black-box approach with machine learning methods in

Using the black-box approach with machine learning methods inorder to improve job scheduling in GRID environments

DANIEL VLADUSICXLAB d.o.o.

Pot za Brdom 100, SI-1000 LjubljanaSLOVENIA

[email protected]

Abstract: This article focuses on mapping jobs to resources with use of off-the-shelf machine learning methods.The machine learning methods are used in the black-box manner, having a wide variety of parameters for internalcross validation. In the article we focus on two sets of experiments, both constructed with a goal of congestingthe system. In the first part, the machine learning methods are used as assistants for the base resource selectionalgorithms, while in the second part, they are used to directly select the resource for job execution. We set uptwo experiments with different objectives. In the first experiment, the objective was to maximize the number ofjobs finished within the deadline, while in the second experiment, the objective was to minimize the job tardiness.Finally, in the first part we were changing resource selections of simple job dispatching algorithms, while in thesecond part, we were employing the optimization scheme of the ALEA algorithm [15]. The results show that evenwith a such black-box approach of the off-the-shelf machine learning methods, we can achieve improvements orat least get comparable results.

Key–Words: scheduling, distributed systems, GRID, dispatching jobs in GRIDs, machine learning

1 Introduction

The problem description

The definition of the GRID scheduling problem, usu-ally found in literature consists of the definition of aset of resources (e.g., machines, computational nodes,storage, network capacity, etc.) and a set of jobs (e.g.,computational, storage tasks) and some optimality cri-terion used for quantitative measurements of the qual-ity of the scheduling. In addition to this basic de-scription, the definition of such problem usually alsoconsists of some specifications about the actual GRIDsystem and of other specific constraints.

Given this definition, we can conclude that GRIDsystems are typical examples of dynamic environ-ment, where the complexity of the scheduling prob-lem is strongly dependent on the system itself, theconstraints on job execution and properties of the jobitself. Namely, the resources in the GRID systemmay be non-uniform (e.g., machines with differentspeeds and number of CPUs). The same also holds forjobs, which have different computational complexities(i.e., lengths), may require different machine architec-tures or a specific number of processors. Furthermore,jobs may have interdependencies in terms of the orderof execution, deadlines, priorities and so forth. Fi-nally, jobs can also be migrated during their execu-

tion, which introduces another possibility for schedul-ing. In addition to these parameters, GRID systemscan also have varying network topology and bandwithrequirements. We can thus conclude that the prob-lem space of scheduling on GRID systems is large andnon-heterogenous, while the general goal of schedul-ing is usually to meet the users and system adminis-trators demands. This general goal can be explicitelydefined as maximization of the CPU utilization, mini-mization of job tardiness, etc.

Motivation

Our motive in performing these experiments wasto test how the off-the-shelf machine learning ap-proaches can be used in already existing GRID frame-works. To this end, we used implementations ofmachine learning algorithms available in the WEKApackage [14]. Using this approach we also minimizethe efforts needed for their implementation in the realframeworks. Our focus was in minimization of tardi-ness of jobs, in other words to maximize the numberof jobs finished within the deadline. These two cri-teria are not, however, completely interchangeable, asminimization of tardiness may also result in a highernumber of jobs that are not finished within the dead-line. The success of the machine learning methods in

WSEAS TRANSACTIONS on SYSTEMS and CONTROL Daniel Vladusic

ISSN: 1991-8763 259 Issue 6, Volume 4, June 2009

Page 2: Using the black-box approach with machine learning methods in

satisfying these criteria were tested in two separate ex-periments and using two different sets of comparisonmethods.

Related work

In the area of GRID systems, the artificial intelligencealgorithms and more precisely, machine learning al-gorithms, are used in various ways, ranging from theapplications in packet routing, failure diagnosis andscheduling. In the packet routing field, the suggestedautomatic learning of routing tables is usually under-taken with the Q-Learning approach [1, 2, 3, 4]. Themost commonly used solution is the Q-Learning ap-proach [1] where response (positive or negative) fromdifferent routing decisions is used to learn good rout-ing strategy through time. These machine-learning-supported systems are adaptable, both in the sense ofincorporating different criteria for estimating successin the sense of adapting to the underlying (physical)networks. Q-Learning is also used for the negotiationstrategies for the Service Level Agreements [17]. Inthe area of failure diagnosis, one of the approaches isa use of decision trees [5]. The idea behind the ap-proach is to use the application level logs in order topredict which type of requests combined with specificnodes cause the system to fail.

In the field of GRID scheduling, machine learn-ing is used in particular for the prediction of job com-plexity (i.e., the job runtime length) [12, 18]. Use ofgenetic algorithms is present in the field of the offlinescheduling [6, 7, 8, 9], while in the past, there werealso attempts to use simulated annealing [10]. Cur-rent interesting approaches towards scheduling withgenetic algorithms are described in [19]. An inter-esting approach is also a combination of planningand scheduling, described in [11]. The advantageof such hybrid approach is in its two-level scope:the long-term planning and short-term scheduling.The approach shows interesting results on example ofproduction planning. Finally, the approach towardsGRID scheduling with use of ant colony optimisationalgorithms is described in [20, 21].

Following the descriptions of the problem, ourmotivation and related work, we proceed with the de-scription of the experiments.

2 The experimentsOur experiments comprise of two sets, where the firstset deals with simple job dispatching algorithms andthe second set is using the framework ALEA [15] asthe foundation and benchmark. In both sets of experi-ments we used the same machine learning algorithms

and procedures, described in section 2.1. The simplejob dispatching algorithms, which are the focus of thefirst set of experiments are Random, Round Robin andFirst Available. While the first two do not need anyadditional explanations, we provide the description ofthe First Available algorithm in the section 2.2. Theobjective function in these experiments was the num-ber of jobs executed within the deadline. The secondset of experiments is presented in section 2.3. Whileour machine learning methods have not changed sig-nificantly, the ALEA framework offers a better bench-mark to our methods, thus we are testing our methodsagainst advanced scheduling solution. The objectivefunction in these experiments has changed to mini-mization of the overall job tardiness.

2.1 The machine learning extensionsIn this section we describe the setup of the machinelearning algorithms used in our experiments. We usedthe algorithms implemented in the machine learningframework WEKA [14]. We first describe the learningprocedure and then list the used algorithms and theirparameters.

In order to prevent the problem of overfitting,we used 4-fold cross-validation on the learning data,where the measure for prediction performance wasthe Area under Receiver Operating Characteristic(AROC). The reasoning behind using this measureinstead of classification accuracy (CA) was that weshould use a measure which should perform well inimbalanced datasets.

The positive examples (where the job was exe-cuted within the deadline) were also given weights.In order to determine how much weight these exam-ples should have, we also included additional evalu-ation of a set of weights for positive examples. Thealgorithm is presented as Algorithm 1. We can seethat we have two loops, where the inner loop per-forms cross-validation using different cross-validationparameters, while the outer loop is responsible for dif-ferent weights of the positive examples.

The selected algorithms for use in the experi-ments were: Locally Weighted Learning (LWL forshort), Naive Bayes (NB for short) and decisiontrees (J48 for short), all implemented in WEKA. Theweights we used for weighting the positive exampleswere: 1, 2, 5 and 10. The cross-validation parameterfor LWL was the number of neighboring nodes takeninto account: all, 1, 10, 50 and 100, while for J48,we used the confidence threshold for pruning with thevalues: 0.05, 0.1, 0.2, 0.3, 0.4 and 0.5.

The number of tests we perform in the process oflearning the machine learning model is quite large, aswe aim for a plug-in to the existing framework which

WSEAS TRANSACTIONS on SYSTEMS and CONTROL Daniel Vladusic

ISSN: 1991-8763 260 Issue 6, Volume 4, June 2009

Page 3: Using the black-box approach with machine learning methods in

Algorithm 1INPUT: machine learning algorithm (mlAlg) and jobexecution history data (eData).OUTPUT: machine learning induced scheduler(mlSched ),

1: weights← MLSetup.getWeights()2: cvPars← MLSetup.getCVPar(mlAlg)3: evaluations← {}4: for all weight : weights do5: for all cvPar : cvPars do6: wEData← ML.reWeight(eData, weight)7: aroc← ML.eval(mlAlg ,wEData, cvPar)8: evaluations.add([aroc, weight, cvPar])9: end for

10: end for11: [aroc, weight, cvPar] ←

evaluations.getBestAroc()12: mlSched← ML.build(mlAlg,weight, cvPar)13: return mlSched

has minimal number of tuning parameters and there-fore needs to use a wide array of possible parametersinternally1.

2.2 Simple dispatching rules experimentsThese experiments were performed withing the Peer-Sim simulation environment [13]. The reason fornot using a typical GRID simulation framework (e.g.ALEA) is the legacy code, which is using these exten-sions. The PeerSim framework was extended primar-ily in nodes which were used as the CPU resources.The following paragraph explains the setup from thearchitectural point of view.

2.2.1 The architectureThe architecture of our experiment is shown in Fig. 1.The GridBroker, is responsible for dispatching thejobs that arrive into the system. These jobs areexecuted on computational resources, marked withCPU1 to CPUn, where each of these resources hasits own queue, marked with q1 to qn respectively.When a new job enters the system, the GridBrokerdecides which computational resource should handlethe execution. When this decision has been made,the job is placed into the queue of the selected nodeand when the job completes, the feedback is sentback to the GridBroker, with job completion status.

1It should alse be noted that we performed tests with automaticattribute selection. Preliminary results of using such set up haveshown significantly worse performance when compared to any ofthe benchmarks thus we did not pursue this possibility anymore.

Figure 1: The architecture overview of our experi-mental setup.

In our case, this status is only finished in time ornot finished in time. The job results are sent to theResults Access Point where the users collect them.

Fig. 2 shows a more in-depth schematic view ofthe GridBroker module. It consists of the three sub-modules, used to map the job to the computational re-source:

• The base resource selector: By base node selec-tor algorithm we refer to one of the algorithms,usually found in this place: Random, Round-Robin, etc.

• The machine learning resource selector: Themachine learning node selector algorithm is, inour case, a suitable off-the-shelf machine learn-ing algorithm - e.g.: Naive Bayes, LocallyWeighted Learning, etc.

• The database: The database serves as storagefor the data about history of dispatched jobs andtheir status when they were finished and is thusused as the learning data for the machine learningnode selector algorithms.

Algorithm 2 shows the data flow in the GridBro-ker module. First, the base resource selector selectsthe resource on which the job should be executed (i.e.,default node of execution). This information is, alongwith the job description, passed to the machine learn-ing resource selector, which tries to find a resource,which is possibly more suitable for execution of thisjob. The basic property of this algorithm is the afore-mentioned use of machine learning predictions onlywhen there is a chance, based on historical data, thatthe machine learning selected resource of execution

WSEAS TRANSACTIONS on SYSTEMS and CONTROL Daniel Vladusic

ISSN: 1991-8763 261 Issue 6, Volume 4, June 2009

Page 4: Using the black-box approach with machine learning methods in

Figure 2: The architecture overview of the GridBrokermodule.

will perform better than the default resource of ex-ecution. Let us now briefly describe the algorithm.First, the base resource selector selects the resourceof execution (i.e., the default resource of execution).The next step is to evaluate all resources with ma-chine learning scheduling model. The data for thisevaluation is job description, the resource which isbeing evaluated and the current system state. If themachine learning resource selector predicts the eval-uated node is suitable for execution (i.e., it predictsthat the job will be executed within the deadline), it isstored into the list of suitable resources. In the nextstep, we evaluate the probability of successful job ex-ecution of the best machine learning predicted and thedefault resource. Only if the chance of success withthe machine learning predicted resource of executionis higher than the one of the default resource, we se-lect the predicted resource. Otherwise, the resource ofexecution remains the same as selected by the defaultresource selector.

An important note regarding this algorithm is thatit needs to go over all nodes in the system. Whilethis is not a problem in a simulation environment, thereal GRID systems may consist of thousands of re-sources. Still, the modern GRID systems schedulejobs only after the phase of resource discovery, whichusually implements some sort of system policy or re-source suitability step, hence the length of the list ofavailable resources may not be very long. Still, weacknowledge that the algorithm must be improved foruse in real systems. we must however, accept that useof off-the-shelf machine learning algorithms, withoutany domain tuning or use of system specific attribute,may not result in accurate predictions. Furthermore,as the learning data for these simple machine learn-ing algorithms is obtained from the so-called base al-gorithm for scheduling, the algorithm which is builtinto the GRID framework, the predictions may beskewed towards the original resource selections. Fi-nally, the machine learning algorithm, when it cannotpredict the resource for job execution with sufficientcertainty, relies to the base algorithm and these datais then used for updating the models of the machine

Algorithm 2INPUT: job description (jDesc), last known systemstate (sState) and job execution history data (eData).OUTPUT: resource of execution (rExec),

1: defResOfExec← BaseSelector.getResource()2: evaluations← {}3: for all resource : resources do4: eval← ML.eval(jDesc, resource, sState)5: if eval.getSuccess == true then6: evaluations.add(eval)7: end if8: end for9: bestEval← evaluations.getBest()

10: defEval← evaluations.getEval(defResOfExec)11: if bestEval.successProb >

defEval.successProb then12: rExec← bestEval.getResource()13: else14: rExec← defResOfExec;15: end if16: return rExec

learning algorithms and used for further predictions.We can thus conclude, that despite the aforementionedproblems, the machine learning algorithms produce amodel which takes into account past performance andmore importantly, mistakes, of the scheduling algo-rithm.

2.2.2 Experiments and results with simple dis-patching rules

We performed two sets of experiments. Each of themconsisted of running five batches of jobs, where eachbatch consisted of 1000 jobs thus giving 5000 jobsper experiment. Descriptions of jobs consisted of thefollowing attributes: an estimate of the time to runneeded for execution of the job, the deadline for thejob execution, the queue length of the node at timeof job submission, the node on which the job wassubmitted and finally, the success of the job execu-tion, described only with values finished in time ornot finished in time, corresponding to finished untilthe deadline or not.

In section 2.1 we described the machine learningalgorithms that were used in our experiments, hencehere we describe only the base scheduling algorithmswhich were used: Random, Round Robin and FirstAvailable. While the first two are commonly used, weneed to explain the last one. The algorithm randomlypicks a node and checks its state. The attributes it col-lects are whether the node is idle and the number of

WSEAS TRANSACTIONS on SYSTEMS and CONTROL Daniel Vladusic

ISSN: 1991-8763 262 Issue 6, Volume 4, June 2009

Page 5: Using the black-box approach with machine learning methods in

jobs waiting in the queue. If the node is not idle, itproceeds in round robing fashion and assigns a job tothe first idle node. If there are no idle nodes, the algo-rithm assigns the job to the node with shortest queue.We pick the first node randomly in order to preventskewing of the job assignments towards the start of thenode list. Please note, that Random and First Avail-able are stochastic, hence the results, when combinedwith our selected machine learning algorithms are notdirectly comparable.

The job descriptions were created randomlyand scheduled to start within the first third ofthe simulation time. The estimate for the re-quired execution time was also set randomly, alongwith the due time to finish the job (i.e., dead-line), which was set according the following for-mula: timeToStartJob + requiredCPUTime +13random(requiredCPUTime). We can see that thetest was indeed synthetic and that we explicitly intro-duced a large amount of randomness in the learningdata. The reasoning for this was two-fold: first, thesimulated system should reach the congestion pointand second, the machine learning algorithms need touse the learning data which results from running suchsets of jobs. The latter is especially important, as ab-sence of strong patterns in data poses a problem formachine learning algorithms. The underlying systemconsisted of 10 heterogeneous nodes, differing in theCPU speed.

In order to provide the machine learning algo-rithms with a starting set of data which is used forbuilding the initial model, we performed a test runwith the learning batch of jobs. This batch of jobsconsisted of 1000 jobs, which were created in a waythat which prevented congestions of the system andhence produce useful and meaningful results (withstrong patterns showing some of the systems’ prop-erties). These learning jobs were also created ran-domly, but distributed more uniformly over the sim-ulation time than the test jobs batches. During the testexperiments, the system performed an update of themachine learning scheduling model on every 100 fin-ished jobs.

The first set of experiments consisted of runningthe five batches of jobs on the network of computers,with the resource CPU performance shown in Table 1.The speed marked with 1 means the normal speed(the job will execute normally), while speeds aboveone denote slower (the execution of the job will takelonger) and speeds below one faster nodes (the execu-tion of the job will be faster), respectively.

Results of running the first set of experiments areshown in Table 2. The table consists of three parts,where the first part shows the results, obtained with

p1 p2 p3 p4 p5

1.32 1.26 0.8 1.33 0.81p6 p7 p8 p9 p10

0.91 1.06 1.35 0.97 1.52

Table 1: The relative resource CPU performance forthe first set of experiments.

using the First Available base algorithm and followingtwo show the use of Random and Round Robin algo-rithms, respectively. The rows in each part present theresults for each of the machine learning algorithms,while columns show the results for each of the fivebatches. The meaning of the numbers is as follows:as we performed each experiment twice, once with as-sistance of the machine learning algorithm and oncewithout it, we present the comparison of performanceas division between the percent of jobs finished withinthe deadline with machine learning assistance and thepercent of jobs finished within the deadline withoutmachine learning assistance. In other words, the val-ues higher than 1 show the advantage of machine-learning-assisted algorithms and vice-versa. The re-

First AvailableJ48 1.12 0.95 0.99 1.16 0.65

LWL 1.11 1.17 0.86 1.08 0.96NB 0.95 1.02 0.94 1.28 1.05

RandomJ48 1.08 1.08 1.03 1.19 0.89

LWL 1.2 0.98 1.18 0.74 1.14NB 0.97 0.89 1.1 0.82 0.75

Round RobinJ48 0.98 0.99 1.39 1.03 1.04

LWL 1.16 1.05 0.92 1.01 1.04NB 0.92 0.89 0.93 0.97 0.84

Table 2: The comparison between machine-learning-assisted and no machine learning assistance algo-rithms for the first set of experiments.

sults of the first experiment show that the assistanceof the Naive Bayes algorithm results in underperform-ing system - in majority of cases, the Naive Bayesassisted algorithm performs worse than the algorithmwithout the assistance. The Locally Weighted Learn-ing and J48 algorithm perform better, but clearly, theLWL algorithm performs best. It must be noted, thatnot all results are comparable between the differentmachine-learning-assisted algorithms, as Random andFirst Available are not deterministic, hence we cancomment only on the Round Robin algorithm. Itshows that the use of machine-learning-assisted al-

WSEAS TRANSACTIONS on SYSTEMS and CONTROL Daniel Vladusic

ISSN: 1991-8763 263 Issue 6, Volume 4, June 2009

Page 6: Using the black-box approach with machine learning methods in

Round Robin-J480.09 0.07 0.09 0.08 0.10.14 0.1 0.09 0.15 0.09

Round Robin-LWL0.05 0.06 0.18 0.07 0.150.17 0.08 0.03 0.17 0.04

Round Robin-NB0.11 0.12 0.06 0.11 0.10.11 0.12 0.12 0.04 0.11

Table 3: The percent of job assignments over nodes inthe first experiment. The ordering of the values corre-sponds to the node CPU speeds in Table 1.

gorithms can improve the percent of successfully fin-ished jobs (LWL) and also that machine learning algo-rithms, especially J48, are brittle (i.e., small changesin the learning data can produce big changes in themodel and predictions) and thus not to be used with-out caution.

In order to assess the differences between ma-chine learning algorithms, we need to focus on theRound Robin algorithm, as the assistance value canbe directly compared. Table 3 shows the percentageof job assignments to resources. Its structure is thesame as of the Table 1. The bold values correspondto the fastest resources. This comparison shows thatonly the LWL algorithm adapts to the performance ofthe nodes and uses faster nodes consistently more thanthe slower ones. The two remaining algorithms do notadapt to the performance of the nodes to such a de-gree.

The second set of experiments consisted of twoexperiments: we used a new set of the five job batchesand executed them as in the first experiment. We thenrun another experiment, using the same set of jobs, butwith an important difference: after the second batchof jobs was executed, we completely changed theproperties of the nodes thus testing the performanceof the machine learning algorithms under completelychanged conditions. Furthermore, we did not allowfor the learning set of jobs to be used nor discardingof the old results from the first two batches, thus test-ing the adaptability of the machine-learning-assistedalgorithms. The CPU performance of the nodes be-fore and after the change are shown in Table 4, wherethe node speeds marked with Normal were used in thefirst experiment and in the first two batches of the sec-ond experiment and the nodes marked with Changedwere used after the second batch of the second exper-iment.

The results of the experiment described above isshown in Table 5 and divided into three parts, ac-

Normal

p1 p2 p3 p4 p5

1.45 1.54 1.22 0.96 1.52p6 p7 p8 p9 p10

1.53 1.34 1.47 1.45 1.17

Changed

p1 p2 p3 p4 p5

1.46 1.58 1.23 1.1 0.97p6 p7 p8 p9 p10

0.81 1.1 1.14 1.4 0.91

Table 4: The resource relative CPU speeds for the sec-ond set of experiments.

cording to the base scheduling algorithm. Each ofthese parts is then subdivided according to the ma-chine learning algorithm used and whether the nodeproperties have been changed. Review of the secondset of experiments shows that some trends are simi-lar to the ones observed in the first set of experiments.The J48 algorithm performs in some cases very welland in others rather poorly thus showing its brittle-ness. The LWL and the Naive Bayes algorithm per-form well in almost all cases. The performance of thelatter is in stark contrast with the first set of experi-ments, where it performed rather poorly. Given thislimited set of tests, we can thus conclude that only theLWL algorithm can be considered as stable enough tobe used in real systems. Let us turn our attention to theperformance before and after the change of the nodes:in majority of cases the machine-learning-assisted al-gorithms underperform immediately after the change(the third set of jobs) when compared to the base al-gorithm. In the fourth and fifth set of jobs their perfor-mance usually improves and overcomes the base algo-rithm. This leads to the conclusion that the algorithmscan adapt to the changed circumstances, despite thefact that they also learn from the data originating fromthe entirely different set of nodes.

In the following section we describe our secondset of experiments with dispatching of jobs using ma-chine learning assitance.

2.3 ALEA ExperimentsFor these experiments we used a GRID simulationframework ALEA [15]. This simulation frameworkenabled us to test our machine learning extensions, de-scribed in section 2.1, against the advanced schedul-ing algorithm. ALEA provides two benchmark algo-rithms: Earliest Deadline First (EDD for short), Ear-liest Release Date First (ERD for short), both com-bined with the Tabu search algorithm. The ERD andEDD algorithms are used only when new job entersthe system. Further optimizations of the schedule aremade with the Tabu search algorithm. The EDD algo-

WSEAS TRANSACTIONS on SYSTEMS and CONTROL Daniel Vladusic

ISSN: 1991-8763 264 Issue 6, Volume 4, June 2009

Page 7: Using the black-box approach with machine learning methods in

First Available

J48 1.73 0.882.11 1.76 1.58 no change0.66 1.24 0.89 change

LWL 1.47 0.941.17 0.90 1.13 no change0.81 1.26 1.01 change

NB 1.42 0.701.48 2.81 2.61 no change0.97 0.95 0.94 changeRandom

J48 1.09 1.360.66 1.35 1.85 no change0.73 1.48 1.07 change

LWL 1.74 0.971.14 0.85 1.17 no change0.81 1.39 1.01 change

NB 1.03 0.990.97 1.33 0.67 no change1.25 1.10 1.20 change

Round Robin

J48 0.84 1.241.08 0.5 1.16 no change0.98 1.11 1.08 change

LWL 1.16 1.450.75 1.15 1.01 no change0.80 1.13 1.08 change

NB 1.03 0.851.13 0.95 1.03 no change1.11 1.03 1.08 change

Table 5: Relative improvements of jobs being finishedwithin the deadline for the second set of experiments.

rithm iterates over all of the computational resourcesand inserts the job into the schedule according to thejob’s deadline, i.e. the insertion is between the jobswhere the predecessor is due to be finished before thecurrent and the ancestor is due to be finished after thecurrent job. The resource on which the increase oftardiness is the smallest, is selected to execute the job.The same principle is used in the ERD2 insertion strat-egy, the only difference being the insertion accordingto the time of arrival of the job into the system (i.e.,the release date).

The policy for new jobs is to add newly arrivedjob into the existing schedule (either via EDD or ERDstrategy), therefore it is reusing the existing schedul-ing soulution (e.g., the incremental approach). Giventhat the schedules, derived from focusing on the newlyarrived job, for each machine now exist, the Tabusearch optimization is performed. This optimization isperformed periodically (after a pre-determined num-ber of new jobs has arrived into the system) and fo-cuses on repairing the schedules of all resources in thesystem. In a sense, it takes the global view on the sys-tem and concentrates on all jobs that are currently inqueues for execution. The jobs that are currently run-ning are not taken into account, therefore no migration

2Earliest Release Date is equivalent to the First Come FirstServe algorithm.

is being undertaken, despite of possibly evident tardi-ness of the running job.

In the first step, the Tabu search optimizationfinds the resource with maximum tardiness. Then, itfinds the job on this resource with maximum tardi-ness. This job is the candidate for moving to otherresources. Alternatively, if no jobs can be moved (i.e.,they are already in the tabu list), the resource is alsoadded to the tabu list. The job is moved in the fol-lowing way: first, a resource with minimum tardinessis found and the job is inserted into its list accordingto its due date. Next, this move is evaluated againstoverall tardiness and if the move reduces it, the jobis left in the schedule of the selected resources andadded to the job tabu list (i.e., it will not be movedagain). Otherwise, the schedules are reverted back totheir original states and the resource is added to thetabu list of candidate resources. Note that in the Tabusearch phase the jobs are always inserted according totheir deadline and that the gaps (i.e., the time the CPUis idle) in schedules are not considered.

The above paragraphs present an outline of thealgorithm in the ALEA simulator, which is necessaryfor understanding of our additions to the ALEA simu-lator. A more in-depth understanding of the simulatorcan be obtained through [15] and [16].

For our experiments we let simulator use its de-fault settings:

• When job enters the system, it is added to theschedule of the machine with the objective tominimally increase the overall tardiness. Thetests were performed with both insertion strate-gies - EDD and ERD, respectively.

• The optimizations of the schedules was per-formed periodically with Tabu search, therefore,after every 10 jobs arriving into the system, theschedules of the machines were optimized. Tabusearch was set to perform 10 steps of optimiza-tion.

2.3.1 Machine Learning Additions SetupThe machine learning algorithms were added on twolevels: firstly, when a new job enters the system andsecondly after 10 jobs have entered the system. Wehence take the same approach as with the use of Tabusearch in ALEA. However, an important differencebetween the approaches lies in the fact that we didnot check whether the moves were good, but reliedonly on the prediction given by the machine learningalgorithm.

When a new job arrives into the system, we usethe currently built model to decide to which resourceit should be dispatched. The algorithm is shown in

WSEAS TRANSACTIONS on SYSTEMS and CONTROL Daniel Vladusic

ISSN: 1991-8763 265 Issue 6, Volume 4, June 2009

Page 8: Using the black-box approach with machine learning methods in

Algorithm 3INPUT: job description (jDesc) and last known sys-tem state (sState).OUTPUT: node of execution (nExec),

1: evaluations← {}2: for all node : nodes do3: eval← ML.eval(jDesc,node, sState)4: if eval.getSuccess == true then5: evaluations.add(eval)6: end if7: end for8: bestEval← evaluations.getBest()9: nExec← bestEval.getNode()

10: return nExec

Fig. 3. The main difference between this algorithmand the algorithm used in previous experiments (de-scribed in section 2.2) is in the fact that this algo-rithm does not rely on the base prediction anymorethus the dispatching of jobs to nodes is completely upto the machine learning algorithm. The algorithm alsoshows that we employed the same approach as in theprevious experiments, i.e. we select the resource ac-cording to its probability of successfully execution thejob.

Let us now turn towards the periodic optimiza-tion of the schedules with machine learning methods.First, we search for the resource with highest tardi-ness and find the job with highest expected tardiness.We then take this job out of the schedule and employthe same approach as shown in the Algorithm 3. Thejob is put into schedule of the resource with highestprobability of the timely execution. This procedure isrepeated 10 times.

The machine learning algorithms were set up asin our previous experiments, with the same parame-ters for optimization of the built models and the sameattributes that were used for learning. We, however,did not use the LWL algorithm in these experiments,as the performance of its implementation in WEKArapidly degraded with larger amounts of data.

The description of our machine learning exten-sions to the original algorithm shows that in these ex-periments we used only the high-level scheme of theoriginal scheduling algorithm, as shown in Fig. 3. Theselection of resources was not provided with any helpfrom the original algorithm (i.e., there is no Base re-source selector algorithm), but rather a scheme withonline reparations of the schedule was employed. Thebasic difference between the architecture of the firstset of experiments (shown in Fig. 1) and these exper-iments is in the position of the queues. While in thefirst set of experiments we had no control over queues

(i.e., schedules) after we have dispatched the job, herethe queues are manipulated during the periodic opti-mization phase.

Figure 3: The architecture overview of our experi-mental setup.

Finally, let us sum up the differences between theALEA and our scheme. ALEA is using the EDD andERD insertion strategy, combined with Tabu Search.All job migrations (i.e., between schedules of differ-ent resources) are performed with insertion accordingto the due date of the job. The candidate resources foroptimizations are found through search over all the re-sources and calculating their tardiness. The algorithmis also calculating the overall tardiness for the evalua-tion of job moves. On the other hand, our algorithm iscalculating tardiness only when deciding on which jobshould be moved on the candidate resource. The can-didate resource is the one with longest queue of jobsto be executed. These differences show that we areusing significantly lower amount of information forinitial dispatching and optimization of the schedules.Furthermore, our insertion strategy is always accord-ing to the due date criterion.

2.3.2 ExperimentsWe performed two sets of experiments. In both sets,we used 8 resources, each with 2 CPUs. The jobs thatwere generated were synthetic and always requiredonly 1 CPU. The start time of the jobs and their dead-lines were set by the job generation algorithm, pro-vided in ALEA. As job tardiness is dependent on theratio between the number of resources avaliable andjobs to execute, this setup guaranteed job tardiness.

Descriptions of jobs were the same as in exper-iments, described in section 2.2 and hence consistedof the following attributes: an estimate of the time

WSEAS TRANSACTIONS on SYSTEMS and CONTROL Daniel Vladusic

ISSN: 1991-8763 266 Issue 6, Volume 4, June 2009

Page 9: Using the black-box approach with machine learning methods in

to run needed for execution of the job, the deadlinefor the job execution, the queue length of the node attime of job submission, the node on which the job wassubmitted and finally, the success of the job execu-tion, described only with values finished in time ornot finished in time, corresponding to finished untilthe deadline or not.

In the first set of experiments we first used theALEA default settings to generate and execute 10000synthetic jobs, which were used as the learning datafor the machine learning algorithms in order to pro-duce the initial predictors. We then performed 10 ex-periments with each of the selected machine learningmethods and compared them to the results obtainedwith the original algorithm. During these experi-ments, the machine learning algorithms always usedthe learning data in order to initialize the predictor. Inother words, they did not use any information fromthe previous experiments. The results are shown inTable 6, where the average tardiness of jobs is shownfor each of the experiments and method used. The lastline shows the average of the average tardiness over allof the experiments.The comparison between methods shows that only

use of the J48 algorithm in our scheme can be roughlycompared to the ALEA algorithms. Furthermore, theJ48 algorithm can be compared only to the EDD in-sertion strategy, while ERD strategy performs signifi-cantly better.

In the next experiment, we allowed the machinelearning algorithms to incrementally learn over exper-iments, but we did not allow for any initial learningdata before the first experiment. The machine learn-ing algorithms performed an update of their modelsafter 10 new jobs entered the system. The aim of thisexperiment was to see whether performance of the MLalgorithms can be improved with use of larger datasetsand through use of incremental learning.

The results are shown in Fig. 4. The mutual com-parison is performed as follows: The benchmarks forour approach were ALEA Tabu search optimizationstrategies with EDD and ERD insertion strategy, bothrepeated 10 times with 1000 jobs. The average tardi-ness of these 10 experiments was then again averagedover the number of experiments and is hence shownas a flat line in the graph. The machine learning ex-periments were performed 50 times with 1000 jobs,giving 50 average tardiness results. Each dot in thegraph represents the average of 10 experiments, i.e.the first dot is the average of experiments 1 to 10, thesecond dot is the average of the experiments 2 to 11,and so on. Thus, the graph consists of 40 experiments,where the dots are calculated in way which guaranteesstability of the obtained results.

The comparison between the J48 and Naive

Bayes machine learning algorithms shows that J48performs significantly better. Furthermore, from thefourteenth experiment on, the J48 algorithm performsas well as the EDD insertion strategy with Tabu searchoptimization, while the ERD insertion strategy per-forms overall best. Both of the machine learning ap-proaches show improvements with increasing of num-ber of learning examples. While the J48 algorithmshows stable results with the increase of availablelearning data, the results of the Naive Bayes algorithmshow much more instability. Even though the resultsare averaged over 10 experiments, we can label theperformance of the Naive Bayes algorithm as erratic.

Comparison with the overall behaviour of the ma-chine learning algorithms from this and previous ex-periments, described in section 2.2, where we foundthe LWL algorithm to be stable, while Naive Bayesand J48 algorithms were brittle, shows that the largeset of experiments puts the J48 algorithm into the cat-egory of stable algorithms.

3 DiscussionWe performed two sets of experiments, both usingthe same machine learning algorithms and infras-tructure for selection of the resource for job execu-tion. The first experiment concentrated on experi-ments with smaller amounts of data with three ma-chine learning algoriths: J48, Naive Bayes and LWL.The second experiment concentrated on experimentswith larger amounts of data and, due to degraded per-formance of the implementation of the LWL algo-rithm in WEKA, used only two machine learning al-gorithms: J48 and Naive Bayes. The objectives of thetwo algorithms were different: in the first set of ex-periments, we were maximizing the number of jobsfinished within the deadline, while in the second setwe minimized tardiness. The role of the machinelearning algorithms differed between the two experi-ments: in the first set, their predictions were used onlyif probability of successfully finishing the job on thedefault selected resource was lower than the machinelearning predicted one. In the second set of experi-ments, the machine learning algorithms were not inthe role of assistant, but had complete control over se-lection of the resource. In both experiments we eval-uated performance of the off-the-shelf machine learn-ing approaches, aiming towards straightforward andcost-effective integration into existing GRID environ-ments. Furthermore, almost all of the attributes usedfor model induction were simple and can be obtainedor calculated directly. The only exception is the re-quired job CPU time, which was always given be-forehand. Still, the evaluation of job complexity may,

WSEAS TRANSACTIONS on SYSTEMS and CONTROL Daniel Vladusic

ISSN: 1991-8763 267 Issue 6, Volume 4, June 2009

Page 10: Using the black-box approach with machine learning methods in

# J48 Naive Bayes ALEA-EDD ALEA-ERD1 6852986 7802715 4562290 36861642 6975198 8311823 4898042 39468783 5991922 9450453 4629544 38346694 4273658 7858624 4616085 38026945 4956201 8225339 5242742 44858156 4426126 8187952 4805775 41579727 4636639 10273174 4932950 41342148 4194367 7955454 4515571 38791289 4243210 11394544 4421033 3667836

10 4126020 8864409 4288354 4016526average 5067633 8832449 4691239 3961190

Table 6: The average tardiness over 1000 jobs - the average tardiness over 10 experiments is shown in italic.

to some extent, be also predicted [12]. Finally, thenumber of parameters used for their self-optimizationthrough internal cross-validation was quite large andhence enabled the use of the black-box approach,which suits the intended use the most (i.e., the plug-inarchitecture).

The performance of the machine learning algo-rithms in both experiments shows issues with stabilityof predictions. Furthermore, the performance of thesame algorithms may be radically different in differentsetups of the experiments. For example, in the first setof experiments, the performance of the Naive Bayesalgorithm can be either very good or rather poor. Thisbehaviour is to some extent evident also in the secondset of experiments, which shows, on a significantlylarger learning dataset, instabilites in terms of perfor-mance. The J48 algorithm shows stable performanceonly in the second set of experiments, where largeramounts of learning data is available. We can thusconclude that, given sufficient amount of data, J48 al-gorithm can be used in the described setup. Finally,the LWL algorithm, while its performance was stablein the first set of experiments, could not be tested inthe second set of experiments due to performance is-sues. Still, it is safe to assume that due to the natureof the algorithm itself, its performance should providethe required stability.

The comparison with the base or benchmark al-gorithms shows that the performance of the black-boxapproach with the off-the-shelf machine learning al-gorithms, can perform either well or at least compa-rably to some of the benchmarks. The applicabilityof the employed approach is dependent on the ac-tual GRID system, available attributes and availablescheduling or job dispatching algorithms.

Finally, we acknowledge the ideal circumstancesof our simulations. In the real-world we cannot as-sume the machines and the network are ideal in terms

of possibility of failure. We also directly used thetime needed for computation of the job and the queuelengths of the nodes. We decided that for these ex-periments we omit these complications and try toassess the machine-learning-assisted job dispatchingand scheduling algorithms on their own. Also, we ac-knowledge that we have not used the whole array ofpossible attributes, which are available in the real sys-tems (e.g., user and user group to which the job be-longs).

4 ConclusionsThis paper describes use of off-the-shelf machinelearning algorithms for mapping jobs to resourceswith black-box approach. The performance of the al-gorithms was tested in two different setups with twodifferent objectives - maximization of jobs finishedwithin the deadline and minimization of tardiness.

In the first set of experiments, the machine learn-ing methods were used as assistants to the base re-source selection algorithm. Furthermore, the machinelearning algorithms were used cautiously and were al-lowed to change the decision of the base schedulingalgorithm only if their prediction was, based on histor-ical data, better. The results show that use of machinelearning algorithms in the sense of correcting the basealgorithm’s decisions improves the number of jobsfinished within the deadline to some degree. On theother hand, the results also show that these algorithmsare brittle thus there is no guarantee that their use willalways improve the base algorithm. Furthermore, ourresults also show that even the algorithm which canbe considered as overall best, in some cases underper-forms when compared to the base algorithm. Still, theresults of the the experiment where we changed nodeproperties between batches of jobs are encouraging asthey show that our approach can adapt to completely

WSEAS TRANSACTIONS on SYSTEMS and CONTROL Daniel Vladusic

ISSN: 1991-8763 268 Issue 6, Volume 4, June 2009

Page 11: Using the black-box approach with machine learning methods in

Figure 4: The comparison of performance between ALEA (EDD and ERD version) versus J48 and Naive Bayesalgorithms, both learning incrementally.

different circumstances quite quickly.In the second set of experiments the machine

learning methods were used to select the resources di-rectly. The benchmark algorithms used were ALEAwith EDD and ERD job insertion strategy, combinedwith Tabu search. Use of the machine learning meth-ods in this set of experiments only followed the opti-mization scheme of the original algorithm, while try-ing to use even less information about the system. Theresults show that the machine learning algorithms, inthis scheme, are as good as the ALEA with EDD jobinsertion strategy and Tabu search, but perform worsethan ALEA with ERD job insertion strategy and Tabusearch optimization algorithm.

The machine learning algorithms were used asblack boxes, using internal cross validation for param-eter tuning and without any inspections of the inducedmodels. The properties of the system were learned us-ing a simple batch of jobs, while the testing was per-formed with jobs and system, which guaranteed con-gestions of the system.

Finally, given the number and type of experi-ments, we also acknowledge that more experimentsneed to be performed. Our future plans consist of useof real system data, an increase of the number and di-versity of experiments (i.e., different number of nodes,system and network failing, different loads on the sys-tem, use of user data, etc.) and inclusion of additionalbase and machine learning algorithms (e.g., ALEA-EG-EDF with Tabu search, Neural networks, etc.).

References:

[1] J. Boyan, M. L. Littman, Packet routing in dy-namically changing networks: a reinforcementlearning approach, Advances in Neural Informa-tion Processing Systems, 7, 1994, pp. 671–678.

[2] G. Di Caro, M.Dorigo, AntNet: Distributed stig-mergetic control for communications networks,Journal of Artificial Intelligence Research, 9,1998, pp. 317–365.

[3] D. D. Clark, C. Partridge, J. C. Ramming,J. T. Wroclawski, A knowledge plane for the in-ternet, Proceedings of the 2003 conference onApplications, technologies, architectures, andprotocols for computer communications, Karl-sruhe, Germany, 2003, pp. 3–10.

[4] T. Itao, T. Suda, T. Aoyama, Jack-in-the-net:Adaptive networking architecture for serviceemergence, IEICE Transactions on Communica-tions, E84-B(10), 2001.

[5] M. Chen, A. X. Zheng, J. Lloyd, M. I.Jordan,E. Brewer, Failure Diagnosis Using DecisionTrees, First International Conference on Auto-nomic Computing (ICAC’04), New York NY,USA, 2004, pp. 36—43.

[6] E. K. Burke, J. .P. Newall, A Multi-Stage Evo-lutionary Algorithm for the Timetable Problem,

WSEAS TRANSACTIONS on SYSTEMS and CONTROL Daniel Vladusic

ISSN: 1991-8763 269 Issue 6, Volume 4, June 2009

Page 12: Using the black-box approach with machine learning methods in

IEEE Transactions on Evolutionary Computa-tion, 3.1, 1999, pp. 1085–1092.

[7] Genetic Algorithms And Highly ConstrainedProblems: The Time-Table Case, Proceedingsof the First International Workshop on ParallelProblem Solving from Nature, Dortmund, Ger-many, Lecture Notes in Computer Science 496,Springer-Verlag, 1990, pp. 55–59.

[8] M. W. Carter, G. Laporte, and S. Y. Lee. Exam-ination timetabling: Algorithmic strategies andapplications. Working Paper 94-03, Universityof Toronto Dept of Industrial Engineering, Jan-uary 1995.

[9] B. Paechter, A. Cumming, and H. Luchian. Theuse of local search suggestion lists for improvingthe solution of timetable problems with evolu-tionary algorithms. Lecture Notes in ComputerScience 993 (AISB Workshop on EvolutionaryComputing), Springer-Verlag, Berlin, 1995, pp.86–93.

[10] J. M. Thompson and K. A. Dowsland. Gen-eral cooling schedules for a simulated annealingbased timetabling system. In: The Practice andTheory of Automated Timetabling: Selected Pa-pers from the 1st International Conference, Lec-ture Notes in Computer Science 1153, Springer-Verlag, Berlin, 1996, pp. 345-364.

[11] D. E. Smith, J. Frank, A. K. Jonsson, Bridg-ing the Gap Between Planning and Scheduling,Knowledge Engineering Review, 2000.

[12] H. Li, L. Wolters, An Investigation of Grid Per-formance Predictions Through Statistical Learn-ing, First Workshop on Tackling Computer Sys-tems Problems with Machine Learning Tech-niques (SysML), Saint-Malo, France, 2006.

[13] PeerSim. PeerSim.http://peersim.sourceforge.net/.

[14] I. H. Witten and E. Frank, Data Mining: Prac-tical machine learning tools and techniques,2nd Edition, Morgan Kaufmann, San Francisco,2005.

[15] D. Klusek, L. Matyska, H. Hana. Alea GridScheduling Simulation Environment, ParallelProcessing and Applied Mathematic SpringerVerlag, Berlin, 2007, pp 1028–1038.

[16] ALEA Simulation Framework, ver-sion 1. http://www.fi.muni.cz/ xk-lusac/alea/download/source1.zip.

[17] J. Li, R. Yahyapour, Learning-Based Negotia-tion Strategies for Grid Scheduling, Sixth IEEEInternational Symposium on Cluster Computingand the Grid (CCGRID’06), 2006, pp. 576–583.

[18] W. Smith, Prediction Services for Grid Comput-ing. In: The 22nd IEEE International Paralleland Distributed Processing Symposium, April2007.

[19] C. Franke, Design and Evaluation of Multi-Objective Online Scheduling Strategies for Par-allel Machines using Computational Intelli-gence, PhD Thesis, University of Dortmund,44221 Dortmund, Germany, 2006.

[20] Z. Xu, X. Hou, J. Sun, Ant algorithm-based taskscheduling in grid computing. In: Electrical andComputer Engineering 2003, 2003, pp. 1107–1110.

[21] G. Ritchie, J. Levine, A hybrid ant algorithm forscheduling independent jobs in heterogeneouscomputing environments, In:Third Workshop ofthe UK Planning and Scheduling Special Inter-est Group (PLANSIG 2004), December 2004.

WSEAS TRANSACTIONS on SYSTEMS and CONTROL Daniel Vladusic

ISSN: 1991-8763 270 Issue 6, Volume 4, June 2009