• No se han encontrado resultados

2.7 Antecedentes Conceptuales Generales:

2.7.15. Acogimiento institucional como medida de protección especial.

For modeling and solving the job scheduling problem, we use the Con- straint Programming paradigm. CP is a declarative programming paradigm in which the user can formulate a model, which is then fed to a solver that explores the space of possible solutions to find the best one (according to a given objective function).

This two-step process is similar to that of Mixed Integer Linear Program- ming (MILP). However, unlike in MILP, in CP a user is not forced to em- ploy only linear constraints: instead, a model can be formulated using any constraint from a given (solver-dependent) library. These constraints have

6.5. Profit-driven CP scheduler 95

a semantic (i.e. they enforce certain properties on the solutions), and they are associated to one or more filtering algorithms. At search time, the solver interleaves branching decisions with invocations of the filtering algorithms, which examine the domains of the problem variables and remove values that are provably infeasible: by doing so, they enable (possibly dramatic) reduc- tions of the search space. The CP research community has developed specific constraints (and filtering algorithms) for scheduling, which usually allow a CP solver to outperform a MILP one on this class of problems [111,112].

This section presents the model, which is implemented in CP Optimizers.

6.5.1

The Model Variables

This model consists of a set of interval variables ai, each representing job

i. Each such interval variable encapsulates four integer decision variables: ai.st denotes the job start time, ai.et the end time, ai.d the job duration, and

ai.pwhether the variable is “present”, optional or “absent”. To keep track of

the job units assigned to each node, we use a set of interval variables jui,w,n,

which represents the execution of the w-th unit of job i on node n. With w ∈ [1, .., min(M Ui,n, |U Ni|)], where M Ui,n is the maximum number of different

job units of the i-th job that can execute simultaneously on the node n having the node completely free. The ai variables are set to “present”, the jui,w,nare

“optional” and capture the possibility of the unit executing on a node.

6.5.2

The Constraints

The constraints of the CP model are given in Equation6.2: ai.setDuration(di) ∀i ∈ A

ai.setStartM in(qi) ∀i ∈ A

ai.setStartM ax(H) ∀i ∈ A

Cumulative(ju(:,:,n), req(:,k), cn,k) ∀n ∈ N, ∀k ∈ RK

Alternative(ai, ju(i,:,:), |U Ni|) ∀i ∈ A

(6.2)

Since this is an offline scheduler, each activity ai has a fixed duration di that

corresponds to the duration obtained from logs. The notation ju(i,:,:) repre-

sents the set of all (optional) interval variables associated with job i. Simi- larly, ju(:,:,n)represents the set of (optional) intervals associated with node n.

Finally, req(:,k) represents the set of the requirements of all job units for the

resource type k.

The ALTERNATIVEconstraints ensure that exactly |U Ni| intervals associ-

ated with job i are present. In other words, just the |U Ni| units of the job must

be assigned to a node. Moreover, the ALTERNATIVEconstraints synchronize a job and its units: They have the same starting and ending times. The CU- MULATIVE constraints ensure that the job units assigned to node n do not exceed the node capacity for each resources type k at any given time instant.

96 Chapter 6. Optimal Profit-driven offline scheduling with cooling optimization

6.5.3

The Objective Function

The definition of the objective function of our model relies on a set S of time segments. A time segment s is a portion of the day with an approximately uniform temperature (i.e., within an interval of 5 degrees Celsius). A seg- ment s is defined by a start time s.st, an end time s.et, and a temperature s.t. We chosen the 5 degree tollerance as it is the discretization step in the cool- ing model [99] we use for estimating the cooling cost for a given operating condition. Equation6.3specifies the objective function, which maximizes the total profit during each time segment. For simplicity we define sf irst as the

first segment and slastthe last segment in S.

M aximize  G ∗ K1− W ∗ K2− J ∗ K2  G = X i∈A

overlapLength(ai, sf irst.st, slast.et)∗

resourceCost(jui, resi,:)



W =X

i∈A

overlapLength(ai, sf irst.st, slast.et) ∗ poweri

Ws =

X

i∈A

overlapLength(ai, s.st, s.et) ∗ poweri

J =X

s∈S

Ws∗ LU T (Ws, s)

(6.3)

We now explain all the terms of this objective function. G is the profit ob- tained by all the jobs executed during the time segments in S. The expres- sion overlapLength(ai, o, p) returns the amount of time the job ai has spent

executing during the interval [o, .., p], with o < p.

resourceCost(jui,w,n, resi,:) is an expression that returns the computing-

center gain of the resources used by each job unit jui. This accounting ap-

proach is used by most HPC centers (e.g. [162]) to compute the amount of money spent by a user. The term poweri represents the average power con-

sumption measured by the system for job i. As indicated in [163] approx- imating the variable power consumption profile to the average power con- sumption when the whole machine is taken into account, leads to accurate results. Based on this value, we can compute W as the expenses of energy for the workload (i.e. to execute the jobs) during segment s. Wscontains the ex-

penses for the workload during the segment s. The computation of W have been done without the use of Ws for better performance in the constraint

propagation, however Ws is necessary to compute the cooling expenses J.

The expression LU T (Ws, s) (Equation 6.4) returns the cooling efficiency

for the workload of segment s, given the workload energy Wsof the segment,

and the external temperature s.t. This expression is based on the P U E table from [99] and an example can be found in Table6.1. This table contains the piecewise linear function of the PUE varying the IT power consumption and external temperature. With P U E[s.t] we select the row that models the PUE

6.6. Heuristic for the first solution 97

Documento similar