CSE 599c Hot Topics in Data Management Systems

Lecture 7: Approximate Stream Processing

Magdalena Balazinska

Winter 2006

Today's Paper

N. Tatbul, U. Çetintemel, S. Zdonik, M. Cherniack, and M. Stonebraker. Load Shedding in a Data Stream Manager. VLDB 2003.

Approximate Processing Problem

Stream processing is push-based

Input rates: (unpredictably) variable

Cannot always keep up with inputs

Solution 1: Stream sampling

Solution 2: Load shedding

Problem of precision versus resource utilization or latency is generally applicable

Load Shedding Problem

System provisioned for normal operations

cpu, memory, network bandwidth

Offered load may exceed capacity

Solution 1: do nothing

latency increases, buffers overflow

Solution 2: carefully choose what to drop

graceful degradation

“improve latency with minimal loss in accuracy”

Approach Overview

Filter

Filter

Union

Filter

Filter

Filter

Join

I1

I2

O1

O2

latency

value

loss

utility

QoS 1

QoS 2

Outline

Load shedding approach

when to shed load

where to shed load

how much to shed and what to shed

Approach evaluation

performance, limitations, & possible extensions

Applicability to other domains

precision vs resource utlization & latency

When to shed load?

Filter

Filter

Union

Filter

Filter

Filter

Join

I1

I2

O1

O2

When to Shed Load?

Filter

s=0.5

c=10

Filter

s=0.8

c=10

Union

s=1.0

c=5

Filter

s=0.9

c=10

Filter

s=0.7

c=10

Filter

s=0.5

c=10

Join

s=1.0

c=5

I1

I2

O1

O2

r1=10

r2=20

Compute total load Compare to capacity

When to Shed Load?

Filter

s=0.5

c=10

Filter

s=0.8

c=10

Union

s=1.0

c=5

Filter

s=0.9

c=10

Filter

s=0.7

c=10

Filter

s=0.5

c=10

Join

s=1.0

c=5

I1

I2

O1

O2

r1=10

cost =100

r2=20

5

5

4

cost = 50

cost = 42.5

14

7

4.5

4.5

cost = 50

cost = 200

cost = 140

cost = 57.5

Total load

= 640 cycles/time unit

= L1 r1 + L2 r2

= 26.5 r1+ 18.75 r2

Where to shed load?

Filter

Filter

Union

Filter

Filter

Filter

Join

I1

I2

O1

O2

loss

utility

QoS 1

QoS 2

Where to shed load?

Heuristics:

Drop at beginning of sequence of operators

Drop after split operators

Load shedding:

increases number of spare CPU cycles (Gain)

decreases fraction of tuples delivered (Loss)

Goal: minimize Loss/Gain ratio

Where to shed load?

Filter

s=0.5

Filter

s=0.8

Union

s=1.0

Filter

s=0.9

Filter

s=0.7

Filter

s=0.5

Join

s=1.0

I1

I2

O1

O2

Drop 1%

G = 0.01 * L1 r1

G = 0.01 * 26.5 * 10

G = 2.65

G = 3.75 per 1% dropped

Loss 1% on O1

and 1% on O2

(join with s=1.0)

Ratio 0.02/2.65

Loss 1% on O2

Ratio 0.01/3.75

loss

utility

loss

utility

How much to shed?

Random load shedding

amount to shed depends on total overload

want to ensure Load < H * Capacity

Semantic load shedding

want to ensure Load < H * Capacity

want to drop tuples with lowest utility

approach: transform value graph into loss graph

Semantic Load Shedding

values

utility

0.2

1.0

50

0

100

values

relative frequency

0.4

0.6

50

0

100

% tuples

utility

0.88

60

100

0

1.0

Semantic Load Shedding

Drop-box filters tuples using predicate

Goal: drop 20% of tuples

Predicate: value  25

Goal: drop 70% of tuples

Predicate: value  75

Evaluation

What would you evaluate?

What do they evaluate?

Additional Challenges

Benefits/challenges in precomputing drop plans

What if other resources are bottleneck?

memory or network bandwidth

How to support other operators?

aggregate and map

user-defined operators

Approximate processing in other domains?

2006-01-01T23:16:26