Fast Multi-objective Scheduling of Jobs to ... - Semantic Scholar

2 downloads 35 Views 767KB Size Report
tics and the well-known Giffler-Thompson algorithm (GTA) [5]. It is the ... Section 3 describes the heuristics used, the necessary extensions of the GTA, and the.
Fast Multi-objective Scheduling of Jobs to Constrained Resources Using a Hybrid Evolutionary Algorithm Wilfried Jakob, Alexander Quinte, Karl-Uwe Stucky, Wolfgang Süß Forschungszentrum Karlsruhe GmbH Institute for Applied Computer Science P.O. Box 3640, 76021 Karlsruhe, Germany {wilfried.jakob, alexander.quinte, uwe.stucky, wolfgang.suess}@iai.fzk.de

Abstract. The problem tackled here combines three properties of scheduling tasks, each of which makes the basic task more challenging: job scheduling with precedence rules, co-allocation of restricted resources of different performances and costs, and a multi-objective fitness function. As the algorithm must come up with results within a few minutes runtime, EA techniques must be tuned to this limitation. The paper describes how this was achieved and compares the results with a common scheduling algorithm, the Giffler-Thompson procedure.

1

Introduction

The problem is motivated by, but not limited to the task of scheduling jobs to the resources of a computational grid [1] in such a way that the partially conflicting interests of resource users and providers are satisfied as well as possible. Due to the dynamic nature of the grid, this is a permanent process and the time available for the scheduling is limited to a few minutes. The scheduling task can be briefly characterised as follows: users describe their application jobs, consisting of one or more atomic grid jobs, by workflows, each of which may be regarded a directed acyclic graph (DAG) defining precedence rules between the grid jobs. They state what a grid job should do by requesting resources like software, storage capacity, and/or additional equipment. These resources may need other resources. For example, a software tool may require a certain operating system and appropriate computer hardware to run on. This leads to the concept of primary and dependent resources, the latter being requested by other resources rather than by grid jobs directly. The availability of all these resources is limited in a heterogeneous way, e.g. the amount of software licences will usually differ from the number of computers the software can run on. The availability of resources may be restricted to certain time periods per day or week according to the needs of the resource provider. The costs may also vary over time. Furthermore, the performance of the resources will usually differ, thus resulting in different cost-performance ratios. Nearly all job scheduling tasks and algorithms deal with a single objective to be optimised like e.g. the makespan [2, 3]. However, this is not sufficient to fulfil the different needs of resource users and providers. Therefore, the following four objectives are considered: completion time and costs of each application job measured as

G. Rudolph et al. (Eds.): PPSN X, LNCS 5199, pp.1031-1040, 2008. Springer-Verlag Berlin Heidelberg, 2008

- 1032 -

fulfilment of user-given limits and averaged, and to meet the demands of resource providers, the total makespan of all application jobs and the ratio of resource utilisation. As the scheduling process is an automated procedure, a single solution is required instead of a set of alternative ones. Hence, the weighted sum is used with weights based on earlier experience. It also allows for an easy steering of the solution. Generalising, this scheduling task requires co-allocation of heterogeneous resources of different performances, varying abilities (software), and with time dependant availability and costs. Precedence rules of the elementary jobs must be adhered to and time and cost limits should be fulfilled as well as possible. This task has some similarities to the resource-constrained project scheduling problem (RCPSP), one of the most ambitious tasks of operations research [4]. The RCPSP consists of a comparable scheduling task of jobs with precedence rules and alternative resources, but is subject to capacity constraints of the resources. The task on hand is of greater complexity as the RCPSP considers only one objective, the makespan, and as in the RCPSP the allocation time required by a particular job is equal for all resources. As our task includes the job shop problem, it is NP-complete. Thus, approximated solutions can be expected only. First solutions are generated by some simple heuristics and the well-known Giffler-Thompson algorithm (GTA) [5]. It is the aim of our work to improve these solutions to the largest extent possible using a hybrid Evolutionary Algorithm (EA). The application of EA or other meta heuristics to scheduling tasks is nothing new, see e.g. [4], but the combination of scheduling multi-DAGs, constrained heterogeneous resources, multi-objective optimisation, and a short runtime makes it more or less special and unique, as pointed out in Section 2. This section also gives a formal definition of the problem and an overlook of related work. Section 3 describes the heuristics used, the necessary extensions of the GTA, and the EA together with the used gene models, repair mechanisms, and specialised crossover operators. These algorithms and models are compared in the experiments reported in Section 4. Section 5 contains a conclusion and an outlook.

2

Problem Definition and Related Work

We use a notation common to the scheduling literature [2, 4] to ease comparisons to other scheduling problems. Given are a set M={M1, …, Mm} of resources, a set J={J1, …, Jl} of application jobs, and a set O of grid jobs. The n GridJobs of application job Ji are denoted by Oi1, …, Oin.. The following functions are given: • a precedence function p:O×O → {TRUE,FALSE} for the grid jobs • an assignment function µ :O → P(P(M)) from grid jobs to resource sets. P(M) is the power set of M. µij is the set of all possible combinations of resources from M, which together are able to perform the grid job Oij • a function t:O×P(M) → ℜ, which gives for every grid job Oij the time needed for the processing on a resource set Rij∈µij • a cost function, c:ℜ×P(M) → ℜ, which gives for every time z the costs per time unit of the given resource set Optimisation is done by choosing suitable start times s(Oij)∈ℜ and resource allocations Rij∈µij. A solution is valid, if the following two restrictions are met:

-1033 -

1. All grid jobs are planned and resources are allocated exclusively:

∀Oij : ∃s (Oij ) ∈ ℜ, Rij ∈ µ ij : ∀M j ∈ Rij : M j is in [ s (Oij ); s (Oij ) + t (Oij , Rij ) ] exclusively allocated by Oij .

(1)

2. Precedence relations are adhered to:

∀i, j ≠ k : p(Oij , Oik ) ⇒ s (Oik ) ≥ s (Oij ) + t (Oij , Rij )

(2)

A violation of the two following constraints is treated by penalty functions in such a way that the amount of time and cost overruns is considered as well as the number of affected application jobs. 1. All application jobs Ji have due dates di, which must be adhered to:

∀J i : d i ≥ s (Oin ) + t (Oin , Rin ) where Oin is the last grid job of Ji

(3)

2. All application jobs Ji have a cost limit ci, which must be observed: n

s ( Oij ) + t ( Oij , Rij )

j =1

s ( Oij )

∀J i : ci ≥ ∑

∫ c(s, R ) ds ij

(4)

The fitness is calculated as the weighted sum of the already mentioned four main objectives and one auxiliary objective, which is described here very briefly only due to the lack of space. It measures the average delay of each non-terminal grid job (i.e. a grid job with no successors) relative to the earliest starting time of its application job and it is aimed at rewarding the earlier completion of non-terminal grid jobs. The idea is to support the process of starting grid jobs earlier such that the final grid job can be completed earlier in the end which is recognised by the main objective completion time. We name the resulting fitness sum raw fitness, as it can be lowered by the application of one ore more penalty functions, each of which delivers a factor between 0 and 1, by which the raw fitness is multiplied to obtain the end fitness. A comparable problem could not be found in literature, see e.g. [2] and [4] for a comprehensive presentation of scheduling problems. This corresponds to the results of the literature review found in [3]. There, it is concluded that only few publications deal with multiple objectives in scheduling and, if so, they mostly deal with single machine problems and Pareto optimisation. Of course, a lot of literature focuses on partial aspects of this problem. We will come back to some articles when already existing techniques incorporated in the used EA are presented.

3

Basic Algorithms, Two Gene Models, and Some EA Extensions

The original Giffler-Thompson algorithm [5, 6] is aimed at achieving a minimal makespan and a good rate of utilisation. It was extended for the problem on hand, such that it can deal with alternative resources, resource-dependant execution times, and multiple successors of one grid job. Costs are not taken into account by the original GTA and the used implementation does it only when the next set of resources is

- 1034 -

constructed and alternatives are available. We used some recommended [6] and some problem-specific priority rules, which are explained later with the results. In addition to the GTA, the following heuristics are used to generate schedules. In a first step a sequence of grid jobs is produced by these three heuristic rules: 1. Shortest due date: grid jobs of the application job with the shortest due date first 2. Shortest working time of grid job: grid jobs with the shortest working time first 3. Shortest working time of application job: grid jobs of the application job with the shortest working time first In the next step resources are allocated to the grid jobs using one of the following three resource allocation strategies (RAS): RAS-1: Use the fastest resource of the earliest available for all grid jobs RAS-2: Use the cheapest resource of the earliest available for all grid jobs RAS-3: Use RAS-1 or RAS-2 for all grid jobs of an application job according to its time/cost preference Processing of the three grid job sequences with these RAS, which can be computed very fast, yields up to nine different schedules. Our Global Optimising Resource Broker and Allocator [7] performs a two-step planning process. In the first step the set of heuristics, including the GTA, is applied and the results are used to seed the start population of the subsequent EA run. As EA we use GLEAM [8], which already contains some evolutionary operators designed for combinatorial problems. Due to the lack of space, they are summarised only and the interested reader is referred to [8]. Apart from the standard mutation, which changes the sequence of genes by simply shifting one of them, GLEAM contains the movement of gene segments and the inversion of their internal order. A chromosome consists of a sequence of segments, containing a sequence of genes. As segment boundaries can be changed by some mutations, the segments form an evolvable meta structure over the chromosomes. Segment boundaries are also used for the 1- and n-point crossover operators, which include a genetic repair that insures that every offspring does not lack genes in the end. The evolvable segmentation and its associated operators among others distinguish GLEAM from most standard EAs. Two gene models are compared. Both use one gene per grid job, which contains the grid job index at the minimum. The interpretation of a chromosome is done by processing the genes in the order of their appearance as described below.

Gene model GM2 is aimed at a reasonable reduction of the search space. It replaces the evolutionary selection of resources by the evolutionary selection of one of the RAS heuristics. This is done by an additional RAS gene and the crossover operators are modified to pass on the RAS gene of the better parent.

-1035 -

The interpretation of the chromosomes described ensures that the precedence relations of grid jobs are not violated as long as no gene is located before the gene of its preceding grid job. As this may be interfered with by some genetic operators, two alternative repair mechanisms are applied and compared: The genetic repair searches for all genes of grid jobs, the genes of the preceding grid jobs of which are not located on the chromosome before. Such a gene is shifted until all genes of preceding grid jobs are on prior positions. As a result, the mechanism may hamper meaningful steps of shifting genes. This is the explanation of the outcome of experiments earlier than those reported here, which produced best results when a fraction of about 20% of the offspring is corrected only. Using genetic repair therefore requires the application of an appropriate penalty function. Phenotypic repair is aimed at a correct interpretation of a chromosome rather than altering it. If the processing of a gene tries to schedule a grid job with missing, already scheduled predecessors, it simply suspends the scheduling until all predecessors will have been scheduled. The advantage of this approach is that there are no faulty schedules and that intermediate steps of shifting genes, which itself may be faulty, are now allowed to occur and hopefully result in a better schedule. Furthermore, in the experiment section we report about the effect of two crossover operators from literature, which are aimed at passing on sequence information. The well-known order-based crossover OX [9] preserves the relative order of the parent genes, while the precedence-preserving operator PPX [10] does this more strictly by perpetuating the absolute order. In contrast to OX, PPX ensures that sequence-correct parents produce sequence-correct offspring at the price of limited gene mixing.

4

Experiments

For the experiments, a set of benchmarks has been developed and they are evaluated using a simulated grid environment. This paper presents the results obtained with the standard benchmark set described in [7]. It consists of four classes of application jobs, each class representing different values of the following two characteristics: the degree of dependencies between grid jobs D and the degree of freedom of resource selection R. The four basic benchmark classes are abbreviated by sRsD, sRlD, lRsD, and lRlD, where s stands for small and l for large values of R and D. As the amount of grid jobs is another measure of complexity, benchmarks containing 50, 100, and 200 grid jobs were defined using the same set of resources for every class. A fourth benchmark set again consists of 200 grid jobs, but with a doubled set of resources available (abbreviated by 200d in the figures).

- 1036 -

Besides the structure and amount of jobs and resources, the tightness of time and cost restrictions is another essential characteristic of the complexity and complicacy of a scheduling task. These two limits are intentionally set in such a way that cost and time overruns (cf. eqs. (3) and (4)) are provoked for the heuristic procedures running before the EA, i.e. they are always invoking the corresponding penalty functions. Thus, a measure of success is defined for both the GTA and the EA: can schedules be found that adhere to the given restrictions and, if so, always or to what fraction of the EA runs? This fraction is denoted as success rate and represents the first and crucial measure of the experiments. The second is the quality of the schedules measured as the fitness improvement obtained from an EA run. For a fair judgment, the nonpenalised raw fitness of heuristic planning is compared to the end fitness of the EA. The fitness values are also used to decide on the significance of differences observed. For judging the differences between heuristic and EA results, we check whether the best heuristic raw fitness is outside of the confidence interval (99% confidence) of the EA results. To assess different EA runs, the t-test is used. If it cannot be applied because of too large variance differences, the results are considered different. The experiments are based on a runtime limit of three minutes (on one processor of an AMD Athlon 64 4400+ 2.0 GHz CPU), because this is considered a reasonable time frame for planning. It must be stressed that the complete investigation is based on the goal of achieving the best possible results within this short period of time. For sufficiently longer planning times, other settings of the algorithms or gene models may perform better. All combinations of the two gene models GM1 and GM2 and the two repair mechanisms were investigated and the results are based on 100 runs per combination and benchmark in order to obtain meaningful success rates. For every setting, different population sizes in the range of 200 to 600 were used. 4.1

Results of the Heuristics and the Giffler-Thompson Algorithm

The most striking result is that the GTA can solve one benchmark only and this is a simple one with just 50 grid jobs. For an overall comparison, the best result of each benchmark is set to 100%. Table 1 shows the averaged percentages of all benchmarks for all heuristics introduced and the GTA with its priority rules. There are two surprising results: there is only one outstanding procedure and this is not the GTA, but the heuristic shortest due time. However, the GTA produces the second best values for the end fitness which gives rise to the hope that its results are good seeds for the initial population of the subsequent EA run. Obviously, our scheduling task differs too much from the pure job shop scheduling problem the GTA is aimed at. 4.2

Best Gene Model and Repair Method

At first, the two gene models are compared in figures 1 and 2 for both repair methods. GM2 performs better in most cases, especially for phenotypic repair, the only exception being the low robustness (cf. Fig. 1) for benchmark kRgA-100. Earlier experiments using a permutation-based coding like the one described in [10] yielded significantly poorer results than GM1. We attribute this to the effect of the segment mutations described in Section 3, as runs without them produced comparably poor results.

-1037 Table 1. Results of the heuristics and the Giffler-Thompson algorithm (GTA). The relative raw and end fitness values (abbreviated as raw f. and end f.) are compared. For the GTA different priority rules were investigated, some of them recommended by [6]. The last two rules were an attempt of tailoring rules to the given problem. They try to keep the grid jobs of one application job together by preferring the scheduling of grid jobs of already begun application jobs.

GTA with seven priority rules and heuristics with different RAS Giffler-Thompson – longest job first Giffler-Thompson – shortest job first Giffler-Thompson – shortest due time Giffler-Thompson – shortest relative due time Giffler-Thompson – most work remaining Giffler-Thompson – last of considered job set (s-set) Giffler-Thompson – planned application job preferred Shortest due time & RAS-3 (appl. job dependant res. preference) Shortest due time & RAS-2 (cheapest resource always) Shortest due time & RAS-1 (fastest resource always) Shortest working time of grid job & RAS-3 Shortest working time of grid job & RAS-2 Shortest working time of grid job & RAS-1 Shortest working time of appl. job & RAS-3 Shortest working time of appl. job & RAS-2 Shortest working time of appl. job & RAS-1

raw f. 71 % 72 % 73 % 74 % 72 % 69 % 68 % 99 % 98 % 96 % 70 % 70 % 70 % 82 % 80 % 79 %

end f. 3% 2% 10 % 11 % 2% 1% 1% 86 % 81 % 87 % 2% 2% 2% 6% 8% 7%

Fig. 1. Comparison of the success rates of the two gene models and genotypic repair. Dotted bars indicate that this result was obtained for one population size only (low robustness). If the values are a little below 100%, the exact numbers are given for a better distinction. T-test results of the corresponding fitness values are given for those cases, where significance can not be derived from the success rate directly: ≠: difference significant at 99.9%, (≠): t-test not applicable due to too large variance differences, ≈: differences are not significant.

- 1038 -

Fig. 2. Comparison of the success rates of the two gene models and phenotypic repair. Explanations see Fig. 1.

An analysis of some runs longer than three minutes reveals the same type of behaviour for more than 50 grid jobs, as shown in Fig. 3. The reduced search space of GM2 allows for a faster progress of the evolution, but cannot produce as good results as GM1 in the long run, because GM1 covers the complete search space. If all other parameters are fixed, the number of grid jobs determines the complexity and, hence the position of the intersection point. For Fig. 3. Basic course of evolution of both benchmarks of about 50 jobs, this is left of gene models for more than 50 grid jobs. the limit of three minutes and GM1 yields the better results. A comparison of the two repair methods for GM2 (right parts of Figs. 1 and 2) shows the superiority of phenotypic repair. This can be explained by the greater flexibility in altering the chromosomes. Thus, GM2 and phenotypic repair are used as the basis of the following investigation described in the next two sections. 4.3

Results for the Two Crossover Operators

As the benchmarks of sRlD and lRlD obviously are the most difficult ones for more than 50 grid jobs, further investigations are restricted to them to reduce the effort. The effect of both crossover operators was examined by using them solely or together to either replace or complement the standard operators. The strict PPX operator failed completely, while the OX was beneficial, but only when used alone and in addition to the standard 1- and n-point crossover operators. Fig. 4 shows the results for the added OX operator. They can be explained by the more exploitative character of the OX operator, which completes the standard operators that are more aimed at exploration.

-1039 -

Fig. 4. The effect of the OX operator used in addition to the standard crossover operators. With the exception of sRlD-200d benchmark, all results with and without OX differ significantly. For further explanations, see Fig. 1.

Fig. 5. Improvement of the end fitness compared to the raw fitness of the best heuristic. All differences are significant, as the raw fitness values are far outside of the confidence intervals of the EA results.

The comparison of success rates is completed by the comparison of the averaged fitness differences as shown in Fig. 5 for GM2, phenotypic repair, and the OX crossover. The end fitness values obtained from the best EA runs are better by 5% at the minimum than the raw fitness of the best heuristic. The figure also shows that a small amount of resource alternatives (sR) yields slightly better results than more alternatives. This is due to the fact that more search steps may be required for finding a suitable time slot when more resources are under consideration. This results in fewer evaluations and, hence, a shorter search within the given runtime. 4.4

The Effect of Seeding the Start Population

For the difficult benchmarks sRlD200, lRlD-200, and -200d, significantly better result can be obtained by seeding the start population with the results of the heuristics, as displayed in Fig. 6. This corresponds to similar improvements of the end fitness not shown here. In the other cases, only minor improvements can be achieved, if any. This means that starting the evolution from randomly generated individuals is sufficient in most cases. Seeding the start population may help in some difficult ones but not in all, as is shown by lRlD-100.

Fig. 6. Seeding the start population with the results of the heuristics yields a significant improvement. For explanations of symbols and dotted bars see Fig. 1.

- 1040 -

On the other hand, it makes sense to enter the heuristic results, because only improvements may occur due to the elitist nature of GLEAM. The same experiment was performed using the GTA results, but no significant differences were observed in all cases. This means that the GTA cannot even support the subsequent EA run.

5

Conclusions and Outlook

We have introduced a scheduling problem that is a combination of job scheduling with precedence rules, heterogeneous resources with different performances and costs as well as limited availability, and multi-objective optimisation. To make things worse, a solution is required within a few (here, three) minutes. This combination makes the problem more or less special and unique. In fact, we could not find a similar one in literature. The task is to overcome violations of time and cost limits, which cannot be solved by the heuristics applied in a first step, and to improve the general quality of the schedule. It has been shown that with the limited run time, the restriction of the search space by handing over a part of the search to heuristic resource allocation strategies cannot only eliminate the violations, but also improves the solution quality. Best results have been achieved by a phenotypic repair of precedence violations and the well-known order-based crossover, provided that it is applied in addition to the standard 1- and n-point crossover operators. The given problem is so far away from standard job shop scheduling that one of the standard procedures, the Giffler-Thompson algorithm, is not successful. Our investigation was based on the scenario of planning of new jobs and an empty grid. This is good for testing and tuning algorithms and gene models, but not realistic. The next step will be the application of our system to the situation of replanning due to comparable small alterations like some new resources or a new application job.

References 1. Foster, I., Kesselman, C.: The Anatomy of the Grid: Enabling Scalable Virtual Organisations. Int. J. of Supercomputer Applications, vol. 15 (3) (2001) 200-222 2. Brucker, P.: Scheduling Algorithms. Springer, Berlin (2004) 3. Setamaa-Karkkainen, A., Miettinen, K., Vuori, J.: Best Compromise Solution for a New Multiobjective Scheduling Problem. Computers & OR, vol. 33 (8) (2006) 2353-2368 4. Brucker, P., Knust, S.: Complex Scheduling. Springer, Berlin (2006) 5. Giffler, B., Thompson, G.L.: Algorithms for Solving Production Scheduling Problems. Operations Research 8 (1960) 487-503 6. Neumann, K., Morlock, M.: Operations Research. Carl Hanser, München (2002) 7. Süß, W., Quinte, A., Jakob, W., Stucky, K.-U.: Construction of Benchmarks for Comparison of Grid Resource Planning Algorithms. In: Filipe, J. et al. (eds.): Conf. Proc. ICSOFT 2007, vol. PL, Inst.f. Systems and Techn. of Information, Control and Com. (2007) 80-87 8. Blume, C., Jakob, W.: GLEAM – An Evolutionary Algorithm for Planning and Control Based on Evolution Strategy. Conf. Proc. GECCO 2002, Vol. Late Breaking Papers, (2002) 9. Davis, L. (eds): Handbook of Genetic Algorithms. V. Nostrand Reinhold, New York (1991) 10. Bierwirth, C., Mattfeld, D.C., Kopfer, H.: On Permutation Representations for Scheduling Problems. In: Voigt, H.-M. et al. (eds.): PPSN IV, LNCS 1141, Springer (1996) 310-318

Suggest Documents