1
Load Shedding Algorithm
• Evaluation Step– When to shed load?
• Load Shedding Road Map (LSRM) – Where to shed load?– How much load to shed?
2
Load Evaluation
• Load Coefficients (L)– the number of processor cycles required to push
a single tuple through the network to the outputs
c1
s1
c2
s2
cn
sn
…I O
n
i
i
ij
j
j cs1
1
1
*)(L = • n operators
• ci = cost
• si = selectivity
3
Load Evaluation Load Coefficient
L1 = 10 + (0.5 * 10) + (0.5 * 0.8 * 5) + (0.5 * 10) = 22
L2 = 10 + (0.8 * 5) = 14
1
c1 = 10
s1 = 0.5
2
c2 = 10
s2 = 0.8
3
cn = 5
sn = 1.0
I
O1
4
c2 = 10
s2 = 0.9
O2
L1 = 22
L2 = 14 L3 = 5
L4 = 10L(I) = 22
4
• Stream Load (S)– load created by the current stream rates
Load Evaluation
m
i
ii rL1
*S = • m input streams
• Li = load coefficient
• ri = input rate
5
Load EvaluationStream Load
S = 22 * 10 = 220
1
c1 = 10
s1 = 0.5
2
c2 = 10
s2 = 0.8
3
cn = 5
sn = 1.0
I
O1
4
c2 = 10
s2 = 0.9
O2
L1 = 22
L2 = 14 L3 = 5
L4 = 10L(I) = 22r = 10
6
• Queue Load (Q)– load due to any queues that may have built up
since the last load evaluation step
• MELT_RATE = how fast to shrink the queues
(queue length reduction per unit time)
Load Evaluation
Q = MELT_RATE * Li * qi
• Li = load coefficient
• qi = queue length
7
Load EvaluationQueue Load
MELT_RATE = 0.1
Q = 0.1 * 5 * 100 = 50
1
c1 = 10
s1 = 0.5
2
c2 = 10
s2 = 0.8
3
cn = 5
sn = 1.0
I
O1
4
c2 = 10
s2 = 0.9
O2
L1 = 22
L2 = 14 L3 = 5
L4 = 10L(I) = 22r = 10
q = 100
8
Load EvaluationTotal Load
•Total Load (T) = S + Q
T = 220 + 50 = 270
1
c1 = 10
s1 = 0.5
2
c2 = 10
s2 = 0.8
3
cn = 5
sn = 1.0
I
O1
4
c2 = 10
s2 = 0.9
O2
L1 = 22
L2 = 14 L3 = 5
L4 = 10L(I) = 22r = 10
q = 100
10
Load Shedding Algorithm
• Evaluation Step– When to drop?
• Load Shedding Road Map (LSRM)– How much to drop?– Where to drop?
11
Load Shedding Road Map (LSRM)
<Cycle Savings Coefficients (CSC)
Drop Insertion Plan (DIP)
Percent Delivery Cursors (PDC)>set of drops that will be inserted
how many cycles will be saved
where the system will be running when the DIP is adopted
…
max savings
…
(0,0,0,…,0)
CSC
DIP
PDC
ENTRY n……ENTRY 1
cursor more load sheddingless load shedding
12
LSRM Constructionset Drop Locations
compute & sort Loss/Gain ratios
how much to drop?
take the least ratio
insert Drop
create LSRM entry
how much to drop?
take the least ratio
insert Filter
create LSRM entry
determine predicate
Drop-Based LS Filter-Based LS
13
Drop LocationsSingle Query
set Drop Locations
compute & sort Loss/Gain ratios
Drop-Based LS Filter-Based LS
1
c1 = 10
s1 = 0.5
2
c2 = 10
s2 = 0.8
3
cn = 5
sn = 1.0
I O
L1 = 17 L2 = 14 L3 = 5
A B C D
14
Drop LocationsSingle Query
set Drop Locations
compute & sort Loss/Gain ratios
Drop-Based LS Filter-Based LS
1
c1 = 10
s1 = 0.5
2
c2 = 10
s2 = 0.8
3
cn = 5
sn = 1.0
I O
L1 = 17 L2 = 14 L3 = 5
A
15
Drop LocationsShared Query
1
c1 = 10
s1 = 0.5
2
c2 = 10
s2 = 0.8
3
cn = 5
sn = 1.0
I
O1
4
c2 = 10
s2 = 0.9
O2
L1 = 22
L2 = 14 L3 = 5
L4 = 10A
B
C
D E
F
set Drop Locations
compute & sort Loss/Gain ratios
Drop-Based LS Filter-Based LS
16
Drop LocationsShared Query
1
c1 = 10
s1 = 0.5
2
c2 = 10
s2 = 0.8
3
cn = 5
sn = 1.0
I
O1
4
c2 = 10
s2 = 0.9
O2
L1 = 22
L2 = 14 L3 = 5
L4 = 10A
B
C
set Drop Locations
compute & sort Loss/Gain ratios
Drop-Based LS Filter-Based LS
17
Loss/Gain RatioLoss
• Loss – utility loss as tuples are dropped
– determined using loss-tolerance QoS graph
set Drop Locations
compute & sort Loss/Gain ratios
Drop-Based LS Filter-Based LS
100 50 0% tuples0
0.7
1
utility
Loss for first piece of graph
= (1 – 0.7) / 50
= 0.006
18
Loss/Gain RatioGain
• Gain – processor cycles gained
• R = input rate into drop operator
• L = load coefficient
• x = drop percentage
• D = cost of drop operator
• STEP_SIZE = increments for x to find G(x)
Gain G(x) =
otherwise 0
0 x if )*(* DLxR
set Drop Locations
compute & sort Loss/Gain ratios
Drop-Based LS Filter-Based LS
19
Drop-Based Load Sheddinghow much to drop?
• Take the least Loss/Gain ratio
• Determine the drop percentage p
how much to drop?
take the least ratio
insert Drop
create LSRM entry
Drop-Based LS
20
Drop-Based Load Sheddingwhere to drop?
how much to drop?
take the least ratio
insert Drop
create LSRM entry
Drop-Based LS
1
c1 = 10
s1 = 0.5
2
c2 = 10
s2 = 0.8
3
cn = 5
sn = 1.0
I O
L1 = 17 L2 = 14 L3 = 5
A drop drop dropdrop
If there are other drops in the network, modify their drop percentages.
21
Drop-Based Load Sheddingmake LSRM entry
• All drop operators with the modified percentages form the DIP
• Compute CSC
• Advance QoS cursors and store in PDC
LSRM Entry
<Cycle Savings Coefficients (CSC)
Drop Insertion Plan (DIP)
Percent Delivery Cursors (PDC)>
how much to drop?
take the least ratio
insert Drop
create LSRM entry
Drop-Based LS
22
Filter-Based Load Sheddinghow much to drop?predicate for filter
• Start dropping from the interval
with the lowest utility.
• Keep a sorted list of intervals according to their utility and relative frequency.
• Find out how much to drop and what intervals are needed to .
• Determine the predicate for filter.
how much to drop?
take the least ratio
insert Filter
create LSRM entry
determine predicate
Filter-Based LS
23
Filter-Based Load Sheddingplace the filter
how much to drop?
take the least ratio
insert Filter
create LSRM entry
determine predicate
Filter-Based LS
1
c1 = 10
s1 = 0.5
2
c2 = 10
s2 = 0.8
3
cn = 5
sn = 1.0
I O
L1 = 17 L2 = 14 L3 = 5
A filter filter filterfilter
If there are other filters in the network, modify their selectivities.
Top Related