the illinois grace project: cross-layer adaptation for saving...

32
Faculty: Sarita V. Adve, Douglas L. Jones, Robin H. Kravets, Klara Nahrstedt Students: Albert F. Harris, Won Jeon, Daniel Grobe Sachs, Vibhore Vardhan Alumni: Christopher J. Hughes, Wanghong Yuan Computer Science and Electrical & Computer Engineering University of Illinois at Urbana-Champaign [email protected] GRACE The Illinois GRACE Project: Cross-Layer Adaptation for Saving Energy

Upload: others

Post on 05-Jul-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The Illinois GRACE Project: Cross-Layer Adaptation for Saving …rsim.cs.illinois.edu/grace/presentations/grace-20051025.pdf · 2018-02-19 · Real-time ⇒Needn’t go ... MMKP solver

Faculty: Sarita V. Adve, Douglas L. Jones, Robin H. Kravets, Klara Nahrstedt

Students: Albert F. Harris, Won Jeon, Daniel Grobe Sachs, Vibhore Vardhan

Alumni: Christopher J. Hughes, Wanghong Yuan

Computer Science and Electrical & Computer Engineering

University of Illinois at Urbana-Champaign

[email protected]

GRACE

The Illinois GRACE Project:Cross-Layer Adaptation for Saving Energy

Page 2: The Illinois GRACE Project: Cross-Layer Adaptation for Saving …rsim.cs.illinois.edu/grace/presentations/grace-20051025.pdf · 2018-02-19 · Real-time ⇒Needn’t go ... MMKP solver

Target systemMobile devices w/ multimedia apps, wireless communication

ChallengesStringent, dynamic, multidimensional resource constraints

OpportunitiesReal-time ⇒ Needn’t go faster than real-timeDynamic ⇒ Slow down to save energySoft correctness ⇒ Trade output quality for resource use

Motivation

Computation

Real-time

Energy

Battery lifeNetwork bandwidthLosses, congestion

many current processors!

Page 3: The Illinois GRACE Project: Cross-Layer Adaptation for Saving …rsim.cs.illinois.edu/grace/presentations/grace-20051025.pdf · 2018-02-19 · Real-time ⇒Needn’t go ... MMKP solver

Key ObservationsDynamic resources & demands + Flexible output quality ⇒

Use adaptation to respond to changes

Adapt all system layersHardware, network, operating system, application, …

All layers must adapt cooperativelyto maximize user experience - system utilitywhile meeting current resource constraints

⇒ GRACE – Global Resource Adaptation through CoopEration

Page 4: The Illinois GRACE Project: Cross-Layer Adaptation for Saving …rsim.cs.illinois.edu/grace/presentations/grace-20051025.pdf · 2018-02-19 · Real-time ⇒Needn’t go ... MMKP solver

Example for Cross-Layer AdaptationConsider real-time video delivery over wireless network

HardwareWhich frequency, voltage?

Which processor, cache, memory configuration?

ApplicationHow much compression?

What quality?Network

How much transmit power?How much error correction for wireless channel?

Operating SystemHow to allocate resources to multiple applications?

How to allocate among components of the same application?

Each adaptive layer must make several decisions affecting

• all resources – CPU time, network bandwidth, system energy

• output quality

• other layers

Page 5: The Illinois GRACE Project: Cross-Layer Adaptation for Saving …rsim.cs.illinois.edu/grace/presentations/grace-20051025.pdf · 2018-02-19 · Real-time ⇒Needn’t go ... MMKP solver

Current Practice vs. GRACE

• Global community

• All adapt cooperatively

• Retain advantages of layeringwith clean, minimal interfaces

• System divided into layers

• Adapt 0, 1, or 2 layers inisolation

Current practiceA

pplicationOperating

System

Network

Har

dwar

e

Coordinator

GRACE

Application

Network

Operating System

Hardware

Page 6: The Illinois GRACE Project: Cross-Layer Adaptation for Saving …rsim.cs.illinois.edu/grace/presentations/grace-20051025.pdf · 2018-02-19 · Real-time ⇒Needn’t go ... MMKP solver

OverviewChallenges in Cross-Layer Adaptation

GRACE Adaptation Hierarchy

GRACE System Layers and Adaptations

Putting it Together

Experimental Testbed and Results

Conclusions and Future Work

Page 7: The Illinois GRACE Project: Cross-Layer Adaptation for Saving …rsim.cs.illinois.edu/grace/presentations/grace-20051025.pdf · 2018-02-19 · Real-time ⇒Needn’t go ... MMKP solver

Challenges in Cross-Layer Adaptation (1 of 2)What to adapt? When to adapt?

Ideal: All layers, all apps Frequent

Practical?: All layers, all apps Infrequent

One app, one system layer Frequent

GRACE solution = hierarchical adaptation

Three adaptation levels: global, per-app, internal

full system, frequent,infrequent limited scope

Expensive

Imprecise

Limited scope

Page 8: The Illinois GRACE Project: Cross-Layer Adaptation for Saving …rsim.cs.illinois.edu/grace/presentations/grace-20051025.pdf · 2018-02-19 · Real-time ⇒Needn’t go ... MMKP solver

Challenges in Cross-Layer Adaptation (2 of 2)Implementing cross-layered hierarchical adaptation is difficult

Multiple adaptations

Multiple time scales

What information to expose at each layer?

How and when to communicate information between layers?

⇒ Interfaces need to be well designed

Page 9: The Illinois GRACE Project: Cross-Layer Adaptation for Saving …rsim.cs.illinois.edu/grace/presentations/grace-20051025.pdf · 2018-02-19 · Real-time ⇒Needn’t go ... MMKP solver

OverviewChallenges in Cross-Layer Adaptation

GRACE Adaptation HierarchyGlobalPer-appInternal

GRACE System Layers and Adaptations

Putting it Together

Experimental Testbed and Results

Conclusions and Future Work

Page 10: The Illinois GRACE Project: Cross-Layer Adaptation for Saving …rsim.cs.illinois.edu/grace/presentations/grace-20051025.pdf · 2018-02-19 · Real-time ⇒Needn’t go ... MMKP solver

GRACE ComponentsAdaptive layers

Adaptation controllers

Choose configuration for a layer

⇒ Choose resource usage, app quality

Global, per-app, internal controllers

Each layer has multiple configurations

Each configuration impacts resource usage, app quality 1s, 1J 0.8s, 2J 0.5s, 4J

500MHz, 750MHz, 1GHz

CPU, network, application, scheduler

Page 11: The Illinois GRACE Project: Cross-Layer Adaptation for Saving …rsim.cs.illinois.edu/grace/presentations/grace-20051025.pdf · 2018-02-19 · Real-time ⇒Needn’t go ... MMKP solver

Global Adaptation (1 of 2)Adapts all applications and system layers at large changes

Goal: For all apps,choose app, CPU, network, … configuration such that

• optimize objective function• subject to constraints

MMKP problem - expensive

minimize CPU + n/w energyCPU time, n/w bandwidth, app quality

Page 12: The Illinois GRACE Project: Cross-Layer Adaptation for Saving …rsim.cs.illinois.edu/grace/presentations/grace-20051025.pdf · 2018-02-19 · Real-time ⇒Needn’t go ... MMKP solver

Global Adaptation (2 of 2)

CPU time, network bytes, quality

ConfigurationsGlobal controller

MMKP solver

App m

App config 1

App 1

…CPU config 1

…CPU config k

App config n

CPU config 1…

CPU config kX all n/w configs

Expensive

Adapts for long-term resource demands and availability– triggered on large changes (e.g., app entry, exit)

available bandwidth

long-term usage, profiled

Page 13: The Illinois GRACE Project: Cross-Layer Adaptation for Saving …rsim.cs.illinois.edu/grace/presentations/grace-20051025.pdf · 2018-02-19 · Real-time ⇒Needn’t go ... MMKP solver

Considers one application at a time - adapts all layers

Triggered at granularity meaningful to application (e.g., frame)

Adapts for resource demand for next frame

Goal: For a single app,choose app, CPU, network configuration such that• minimize CPU + network energy (for next frame)• subject to CPU time, bandwidth, app quality constraints

Per-Application Adaptation (1 of 2)

Global adaptation decision = resource allocation

allocation from global

Page 14: The Illinois GRACE Project: Cross-Layer Adaptation for Saving …rsim.cs.illinois.edu/grace/presentations/grace-20051025.pdf · 2018-02-19 · Real-time ⇒Needn’t go ... MMKP solver

Per-app Adaptation (2 of 2)

Per-app controllerSimple search

App i

CPU time, network bytes(short-term history)

App, CPU config

App config 1

CPU config 1…

CPU config k

App config n

CPU config 1…

CPU config k

available bandwidth

Page 15: The Illinois GRACE Project: Cross-Layer Adaptation for Saving …rsim.cs.illinois.edu/grace/presentations/grace-20051025.pdf · 2018-02-19 · Real-time ⇒Needn’t go ... MMKP solver

Internal AdaptationAdapts single system layer

Triggered at granularity meaningful to layer

E.g., packets for network

Respects resource allocation from global

Not visible to rest of the system

Page 16: The Illinois GRACE Project: Cross-Layer Adaptation for Saving …rsim.cs.illinois.edu/grace/presentations/grace-20051025.pdf · 2018-02-19 · Real-time ⇒Needn’t go ... MMKP solver

OverviewChallenges in Cross-Layer Adaptation

GRACE Adaptation Hierarchy

GRACE System Layers and AdaptationsCPUNetworkApplicationO.S. Scheduler

Putting it Together

Experimental Testbed and Results

Conclusions and Future Work

Page 17: The Illinois GRACE Project: Cross-Layer Adaptation for Saving …rsim.cs.illinois.edu/grace/presentations/grace-20051025.pdf · 2018-02-19 · Real-time ⇒Needn’t go ... MMKP solver

Current GRACE PrototypeAdaptive CPU, network, application, OS scheduler

Pentium M laptop

IEEE 802.11b

H.263 based video encoder

Other non-adaptive apps

Periodic (e.g., video frames)

Earliest deadline first (EDF) soft real-time scheduler

Page 18: The Illinois GRACE Project: Cross-Layer Adaptation for Saving …rsim.cs.illinois.edu/grace/presentations/grace-20051025.pdf · 2018-02-19 · Real-time ⇒Needn’t go ... MMKP solver

Adaptation mechanismsDynamic voltage and frequency scaling (DVFS)

ImpactEnergy ↓ Execution time ↑

Control hierarchy

Layer-specific detailsDecisions based on dynamic power ⇒ Slower is better

The CPU Layer

Globalapp n

app

scheduler

CPU

network

scheduler

time

laye

r

CPU

network

app 1…

laye

r

Per-app

time

app i

app

Page 19: The Illinois GRACE Project: Cross-Layer Adaptation for Saving …rsim.cs.illinois.edu/grace/presentations/grace-20051025.pdf · 2018-02-19 · Real-time ⇒Needn’t go ... MMKP solver

The Network Layer

Internal

app i

CPU

n/w

sched

Adaptation mechanisms

Transmit power, bandpass modulation

Impact

Energy ↓ Data rate ↑

Control hierarchy

Layer-specific details

IEEE 802.11b ⇒ Faster is better

Reliability?

retransmission

Page 20: The Illinois GRACE Project: Cross-Layer Adaptation for Saving …rsim.cs.illinois.edu/grace/presentations/grace-20051025.pdf · 2018-02-19 · Real-time ⇒Needn’t go ... MMKP solver

The Application LayerAdaptation mechanisms

Trade off CPU work for amount of compressionTerminate motion search early

Eliminate some discrete-cosine transforms (DCT)

I-frames – force use, send portions uncoded

Impact

Energy ? CPU work ↓ Bandwidth ↑ Quality similar

Control hierarchy

time

laye

r

app

Global

CPU

network

schedulerapp 1

…app n la

yer

CPU

network

scheduler

Per-app

time

app i

app

Page 21: The Illinois GRACE Project: Cross-Layer Adaptation for Saving …rsim.cs.illinois.edu/grace/presentations/grace-20051025.pdf · 2018-02-19 · Real-time ⇒Needn’t go ... MMKP solver

The OS Scheduler LayerAdaptation mechanisms

Allocation of CPU time among applications

ImpactEnergy, CPU time, deadline misses

Control

Layer-specific detailsMonitors CPU budget, reclaims unused CPU budget

time

laye

r

app

Global

CPU

network

schedulerapp 1

…app n

Internal

app i

CPU

n/w

sched

Page 22: The Illinois GRACE Project: Cross-Layer Adaptation for Saving …rsim.cs.illinois.edu/grace/presentations/grace-20051025.pdf · 2018-02-19 · Real-time ⇒Needn’t go ... MMKP solver

OverviewChallenges in Cross-Layer Adaptation

GRACE Adaptation Hierarchy

GRACE System Layers and Adaptations

Putting it Together

Experimental Testbed and Results

Conclusions and Future Work

Page 23: The Illinois GRACE Project: Cross-Layer Adaptation for Saving …rsim.cs.illinois.edu/grace/presentations/grace-20051025.pdf · 2018-02-19 · Real-time ⇒Needn’t go ... MMKP solver

GRACE System Architecture

Application

Per-app Controller

OS Scheduler

long-term resource demandsallocated time,

bandwidth

Global Controller

CP

U

Net

wor

k

Ada

ptor

Monitor Adaptor Predictor

Monitor

Mon

itor

Mon

itor

allocated time, bandwidth

app config next frame’s resource demands

frequency

bandwidthavailable

frequency

miss, overrun

cycles usage

Page 24: The Illinois GRACE Project: Cross-Layer Adaptation for Saving …rsim.cs.illinois.edu/grace/presentations/grace-20051025.pdf · 2018-02-19 · Real-time ⇒Needn’t go ... MMKP solver

OverviewChallenges in Cross-Layer Adaptation

GRACE Adaptation Hierarchy

GRACE System Layers and Adaptations

Putting it Together

Experimental Testbed and Results

Conclusions and Future Work

Page 25: The Illinois GRACE Project: Cross-Layer Adaptation for Saving …rsim.cs.illinois.edu/grace/presentations/grace-20051025.pdf · 2018-02-19 · Real-time ⇒Needn’t go ... MMKP solver

Experimental Testbed

Two laptops: One GRACE, one non-GRACE

Run video conference (no audio) over IEEE 802.11b ad hoc link– Video encoder (adaptive), decoder (non-adaptive)– 10fps, 320x240 video from web cam– Cisco Aironet wireless card

Power meter measures system watts for GRACE laptop

Page 26: The Illinois GRACE Project: Cross-Layer Adaptation for Saving …rsim.cs.illinois.edu/grace/presentations/grace-20051025.pdf · 2018-02-19 · Real-time ⇒Needn’t go ... MMKP solver

Results From Prototype

100 99 93 88

0

20

40

60

80

100

120

NoAdapt CPU App CPU+App

Nor

mal

ized

Ene

rgy

GRACE gives 12% energy savings for entire system

App + CPU adaptation better than sum of each alone

Canned video stream for (partial) repeatability

Page 27: The Illinois GRACE Project: Cross-Layer Adaptation for Saving …rsim.cs.illinois.edu/grace/presentations/grace-20051025.pdf · 2018-02-19 · Real-time ⇒Needn’t go ... MMKP solver

Simulation Results - Methodology

Simulation/emulation for repeatable experimentsCPU: Athlon Mobile XP 1700+, up to 25WNetwork: 750mW active power, 3 bandwidth models

Fixed constrained – 200 Kbytes/sFixed unconstrained – 600 Kbytes/sVariable – 200 to 600 Kbytes/s

WorkloadFour encodersCanned video streamsQCIF, 15fps

Energy reported only for CPU+network

Page 28: The Illinois GRACE Project: Cross-Layer Adaptation for Saving …rsim.cs.illinois.edu/grace/presentations/grace-20051025.pdf · 2018-02-19 · Real-time ⇒Needn’t go ... MMKP solver

Overall Results

100 100 100

6050 58

020406080

100120

300 600 200-600

Nor

mal

ized

Ene

rgy

NoAdapt GRACE

Bandwidth (KBytes/sec)

GRACE provides 40% to 50% energy savings over large range

Page 29: The Illinois GRACE Project: Cross-Layer Adaptation for Saving …rsim.cs.illinois.edu/grace/presentations/grace-20051025.pdf · 2018-02-19 · Real-time ⇒Needn’t go ... MMKP solver

Benefits of Global Adaptation

100 100 10097 96 9796

62

9594

47

92

020406080

100120

300 600 200-600

Nor

mal

ized

Ene

rgy

NoAdapt Global CPU Global App Global CPU+App

Bandwidth (KBytes/sec)

Global works well with fixed, unconstrained bandwidth

App adaptation gives most benefits

App + CPU better than sum of each alone

Page 30: The Illinois GRACE Project: Cross-Layer Adaptation for Saving …rsim.cs.illinois.edu/grace/presentations/grace-20051025.pdf · 2018-02-19 · Real-time ⇒Needn’t go ... MMKP solver

Benefits of Per-App Adaptation

100 100 10094

47

9291

48

9070

4868

55 50 58

020406080

100120

300 600 200-600

Nor

mal

ized

Ene

rgy

No-Adapt Global Per-App CPU Per-App App GRACE

Bandwidth (KBytes/sec)

Per-app adaptation responds to constraints, bandwidth variations

Application adaptation gives most benefits

App + CPU better than sum of each alone

Page 31: The Illinois GRACE Project: Cross-Layer Adaptation for Saving …rsim.cs.illinois.edu/grace/presentations/grace-20051025.pdf · 2018-02-19 · Real-time ⇒Needn’t go ... MMKP solver

Conclusions

GRACE – Saving energy for mobile multimedia

• Cross-layer, hierarchical adaptation

• Frequent, multi-layer, practical adaptation

Application

Operating System

Network

Har

dwar

e

Coordinator

Real implementation

• Adaptive CPU, network, app, scheduler

• Global, per-app, internal adaptation

• Significant benefits from all layers, all adaptation levels

Saved 12% system energy (real), 50% CPU+n/w energy (model)

Page 32: The Illinois GRACE Project: Cross-Layer Adaptation for Saving …rsim.cs.illinois.edu/grace/presentations/grace-20051025.pdf · 2018-02-19 · Real-time ⇒Needn’t go ... MMKP solver

Future WorkReliability

Other objective functions for global adaptation - utility

Other networks; e.g., cellular

Application adaptations and predictions

OS scheduling for application groups

Integrating architecture adaptations (multicore, heterogeneity)

Other layers – memory, disk, …

Distributed systems and new applications