Download - Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS
![Page 1: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/1.jpg)
1
Iterative Integer Programming Formulation for Robust Resource Allocation in Dynamic Real-Time Systems
Sethavidh Gertphol and Viktor K. Prasanna
University of Southern California
presented at WPDRTS
April 26, 2004
![Page 2: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/2.jpg)
2
Outline
• Introduction• Problem statement• Mathematical model• Linearization technique• IIP formulation• Experiments and results• Concluding remarks
![Page 3: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/3.jpg)
3
Introduction
• dynamic real-time systems
sensors actuators
environment
computing power
system
![Page 4: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/4.jpg)
4
Resource allocation
• issues in resource allocation– variations of parameters during run time
– performance requirements satisfaction• end-to-end latency
• throughput
– task and machine heterogeneities
– sharing of resources among tasks
![Page 5: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/5.jpg)
5
Initial allocation
• initial allocation– initial allocation of system resources
– utilizes “off-line” resources to determine an allocation
– can afford high time complexity
• necessity for our initial allocation technique– run-time parameter variations are taken into
account
– system is more robust with respect to varying run-time parameters
![Page 6: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/6.jpg)
6
Goal of initial allocation
• satisfy all performance requirements
• able to absorb variations of run-time parameters for the longest amount of time
• postpone the first dynamic re-allocation at run time
![Page 7: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/7.jpg)
7
Problem statement (1)
• system model– a set of heterogeneous machines connected by a
heterogeneous network– different machines have different compute power– different network links have different capacity
Machines
![Page 8: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/8.jpg)
8
Problem statement (2)
• application modelsensors actuators
1
9
6
3
11
8
ASDF process network
primary edge sensor communication and actuator Control
primary route
2
45
7
10
A
B
X
Y
Z
source Node
sink Node non-primary edge
![Page 9: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/9.jpg)
9
Problem statement (3)
• run-time parameters– load level of a task: amount of data received through the primary
edge
• run-time parameter variations– load level can vary during run time– variations affect computation and communication latency of a
task– assume linear function
between latency and
load level– consider task and
machine heterogeneitieslatency
load level
ETCF matrix
machines
tasks
![Page 10: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/10.jpg)
10
Problem statement (4)
• performance requirements– throughput requirement– end-to-end latency requirement
• performance metric– the amount of load level variations an allocation can absorb– let control load level of all tasks
– MAIL: maximum allowable increase in load level• maximum value of under condition that there is no performance
violation• this value is called max
initii ll ×+= )α1(
![Page 11: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/11.jpg)
11
• base latency– latency of a task when there is no resource sharing
• actual latency– latency of a task when resources are shared– assumption: resource is fairly shared among all tasks– is equal to
base latency * the number of tasks running on the same machine
Mathematical model (1)-- latency
latency
load level
base latency
current load level
an entry in ETCF matrix
![Page 12: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/12.jpg)
12
Mathematical model (2)-- normalized slackness
• normalized slackness - the percentage of “unused” latency– equal to
• must be greater than or equal to 0 to meet performance requirements
trequiremenlatency
zlatency requirement
initial latency
0
z
actual latency
-1 0
initii ll ×+= )α1(
![Page 13: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/13.jpg)
13
Objective
actual latency
i p0
i0 -1 0p )( max
• given an allocation– suppose p0 is a task or
route that violates its requirement first
– p0 determines max
– p0 also has the lowest normalized slackness
– the minimum normalized slackness is called cmin
• comparing different allocations– an allocation has its own
p0 and cmin
– an allocation that has higher cmin has higher max
• objective function: maximize cmin
i
i
i
i
REQ
z=
+α1
α
zi
REQi
REQp0
![Page 14: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/14.jpg)
14
Solving the problem
resources
mathematical
formulation
IIP formulation
initial allocation
tasks requirements objective function
linearization techniques
LP solver (LINDO)
![Page 15: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/15.jpg)
15
Linearization by substitution
• non-linear terms in the mathematical formulationbase latency * the number of tasks running on the same machine
• substitutes the product with an auxiliary variable and adding constraints
• introduces additional variables and constraints• increases complexity
cxx ji ≤ ×
cxQ ≤
0≤ - iQ xx0≤ - jQ xx
1≤ - Qji xxx +
cxQ ≤
0≤ - iQ xx0≤ - jQ xx
1≤ - Qji xxx +
cxx ji ≤ × cxx ji ≤ ×
cxQ ≤
0≤ - iQ xx0≤ - jQ xx
1≤ - Qji xxx +
cxQ ≤
0≤ - iQ xx0≤ - jQ xx
1≤ - Qji xxx +
![Page 16: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/16.jpg)
16
Given M, A, p, ETCF, ETKF, Linit, R, LREQ, THREQ
Find X where xi,l {0,1}
To Minimize
Subject to
Iterative Integer Programming (IIP) approach
1. Set threshold = 0
2. Solve the following Integer Program
Aa
ii
i
kc
MmjiAaayxx
MmjiAaaxy
MmjiAaaxy
Aax
Rrnsr
Aansk
Aansc
ljiljiljli
ljiljlji
ljililji
iMm
li
kk
ii
ii
l
,,,,0
,,,,0
,,,,0
,1
, threshold
, threshold
, threshold
,,,,
,,,
,,,
,
![Page 17: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/17.jpg)
17
IIP approach (2)
3. If the Integer Program is infeasible, stop and use the solution of the previous iteration as solution
4. If the Integer Program has an optimal solution, calculate cmin and save the solution
5. Set threshold = cmin + and go to step 2.
is a user-provided parameter between 0 and 1
![Page 18: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/18.jpg)
18
IIP approach (3)
• IIP maximizes cmin by solving Integer Program iteratively
• in each iteration, threshold value is the acceptable (minimum) cmin value of that iteration– threshold value starts at 0: the IIP approach is not restricted in the
first iteration
• threshold value increases in subsequent iterations, until the IP program is infeasible
• the last feasible allocation (with highest-known cmin value) is used as the solution
• cmin of the resulting allocation is within of the optimal value
![Page 19: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/19.jpg)
19
Experiments--problem generation
• task and machine heterogeneities– use Gamma distribution to generate ETCF and ETKF matrices– high task heterogeneity and high machine heterogeneity
environment
• initial load level– use uniform distribution from 10 to 100 to generate Linit vector
• performance requirements– use a parameter called f to adjust the tightness of requirements– higher f value means requirements are more lax
![Page 20: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/20.jpg)
20
Experiments --other approaches for comparison
• SMIP– linearizes the formulation by substitution
– encodes cmin directly into the formulation
– formulation is a mixed integer program– formulation is solved only once– is expected to produce an optimal allocation
• MIP(CBH)– linearizes the formulation by pre-selecting the value of variables
– encodes cmin directly into the formulation
– formulation is a mixed integer program– formulation is solved only once– may not produce an optimal allocation
![Page 21: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/21.jpg)
21
Experiment #1
• goal: evaluate the performance of IIP approach• problem sets
– 3-5 machines, 12 tasks, f = 1.5
• for each problem instance– enumerate all possible initial allocation
• for each allocation, find its max
• select the allocation with the highest max (the optimal allocation)
– formulate and solve the problem using IIP (with = 0.01), SMIP and MIP(CBH) approaches
– compare max of the allocations with the optimal solution– compare the execution time of each approach
![Page 22: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/22.jpg)
22
Results (1)
MAIL value of each approach (average over 40 problems)
0
20
40
60
80
100
120
3 4 5
number of machines
% o
f o
pti
ma
l v
alu
e
IIP
MIP(CBH)
SMIP
![Page 23: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/23.jpg)
23
Results (2)
Execution time of each approach (average over 40 problems)
0
200
400
600
800
1000
1200
1400
3 4 5number of machines
se
co
nd
s
enumerationIIPMIP(CBH)SMIP
![Page 24: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/24.jpg)
24
Experiment #2
• goal: evaluate the effect of on the performance of the IIP approach
• problem sets– 3-5 machines, 12 tasks, f = 1.5
• for each problem instance– enumerate all possible initial allocation
• for each allocation, find its max
• select the allocation with the highest max (the optimal allocation)
– solve the problem using the IIP approach with value equal 0.01, 0.05 and 0.1
– compare max of the resulting allocations with the optimal solution
– compare the execution time
![Page 25: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/25.jpg)
25
Results (3)
![Page 26: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/26.jpg)
26
Results (4)
![Page 27: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/27.jpg)
27
Concluding remarks
• IIP approach guarantees that cmin of the resulting allocation is within of the optimal value
• trade-off between the quality of results and execution time can be achieved by adjusting the value
• future work– explore alternate methods to adjust threshold value between
iterations to make IIP faster– formulate the IIP such that the resulting allocation is optimal– additional run-time parameters– different variation patterns of the run-time parameters
![Page 28: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/28.jpg)
28
Backup slides
![Page 29: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/29.jpg)
29
Problem statement (5)
• performance metric– the amount of load level variations an allocation can
absorb– let controls load level of all tasks
– MAIL: maximum allowable increase in load level• maximum value of under condition that there is no
performance violation
• this value is called max
initii ll ×+= )α1(
![Page 30: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/30.jpg)
30
Linearization
• the need for linearization: multiplication of two unknown variables in the same term
• recall: actual latency of a task is
base latency * the number of tasks running on the same machine
depend on where the task is allocated
depend on where the task is allocated and on other tasks allocated to the same machine
![Page 31: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/31.jpg)
31
Heuristic for Choosing Nl
• Capability Based Heuristic (CBH)– let slil be the aggregated slope of ETCFi,l and ETKFi,l
– define il
– let πil be the relative speed of ai on ml
– let CCl be the computation capability of ml
– Nl is calculated as
∑'
'απ
lil
ilil
β=
∑πi
illCC =
∑∑'
' ii
ll
ll n
CC
CCN ×=
ilil
sl
1β =
![Page 32: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/32.jpg)
32
Heuristic for Choosing Nl
![Page 33: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/33.jpg)
33
Our approach--overview
• define system and application models• define run-time parameters and their variations• define a performance metric for initial allocation • define mathematical model for latency and
throughput of tasks• formulate the initial resource allocation as a mixed
integer programming (MIP) problem• utilize available MIP packages to solve this
problem
![Page 34: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/34.jpg)
34
Assumptions
• applications are continuously running• multiple applications can share the same
machine and communication link– CPU cycles and communication link bandwidth are
fairly shared among all applications
![Page 35: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/35.jpg)
35
Load level
• LL(ai): load level (amount of data received
through the primary edge) of task ai
– LL: a vector of load level of all tasks
– LLinit: a vector of initial load level of all tasks
• ETCF: an estimated-time-to-compute-function matrix
• ETKF: an estimated-time-to-communicate-function matrix
![Page 36: Sethavidh Gertphol and Viktor K. Prasanna University of Southern California presented at WPDRTS](https://reader035.vdocument.in/reader035/viewer/2022070411/5681472e550346895db46ac9/html5/thumbnails/36.jpg)
36
MmjiAaayxx
MmjiAaaxy
MmjiAaaxy
Aax
Rrnsr
Aansk
Aansc
ljiljiljli
ljiljlji
ljililji
iMm
li
kk
ii
ii
l
,,,,0
,,,,0
,,,,0
,1
, threshold
, threshold
, threshold
,,,,
,,,
,,,
,