energy management at upper levels of system design carla schlatter ellis
DESCRIPTION
Energy Management at Upper Levels of System Design Carla Schlatter Ellis. Milly Watt Project. Systems & Architecture. Milly Watt Project. Energy for computing is an important problem (& not just for mobile computing) Reducing heat production and fan noise - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/1.jpg)
© 2003, Carla Schlatter Ellis
Energy Managementat Upper Levels
of System Design
Carla Schlatter Ellis
Systems & ArchitectureMilly Watt Project
![Page 2: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/2.jpg)
2© 2003, Carla Schlatter Ellis
Energy for computing is an important problem(& not just for mobile computing)– Reducing heat production and fan noise
– Extending battery life for mobile/wireless devices– Conserving energy resources (lessen
environmental impact, save on electricity costs)
How does software interact with or exploit low-power hardware?
Milly Watt Project
![Page 3: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/3.jpg)
3© 2003, Carla Schlatter Ellis
Energy should be a “first class” resource at upper levels of system design– Focus on Architecture, OS, Networking,
Applications
HW / SW cooperation to achieve energy goals
Milly Watt Project
![Page 4: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/4.jpg)
4© 2003, Carla Schlatter Ellis
The Energy Saving Spectrum
• Re-examine interactions between HW and SW, particularly within the resource management functions of the Operating System
• Low level Fine grain Low-power Circuits
Software• High level Coarse grain• OS, compiler or application
HW / SW Cooperation
• Voltage Scaling• Clock gating• Power modes: Turning off HW blocks
Hardware
![Page 5: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/5.jpg)
5© 2003, Carla Schlatter Ellis
Lessons: Performance EnergyLatency techniques
• Substitute a lower-latency component– Memory Hierarchy -Caching.
• Reduce overhead on the critical path.– Maintenance daemons
(time shift)– No-copy (eliminate waste)
• Exploit Overlap for Hiding Latency (HW parallelism)– Scheduling policies
Analogous techniques for Energy
• Substitute a lower-power component or mode.– Voltage scaling
• Amortize transitions in & out of high power states– Time shifting
• Reduce (not just hide) latency– Caching– No-copy (eliminate waste)
![Page 6: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/6.jpg)
© 2003, Carla Schlatter Ellis
ECOSystem:Managing Energy as a First-Class
Operating System Resource
![Page 7: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/7.jpg)
7© 2003, Carla Schlatter Ellis
Outline• Motivation / Context• Design Issues & Challenges• Mechanisms in the ECOSystem
Framework• Prototype Implementation &
Experimental Evaluation• Exploration of Policies
![Page 8: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/8.jpg)
8© 2003, Carla Schlatter Ellis
Energy & the OSTraditionally, the system-wide view of resources
and workload demands resides with the OS – Explicitly managing energy will require
coordination with typical resource management
Energy is not just another resource– Energy has a impact on every other resource
of a computing system – it is central. – A focus on energy provides an opportunity to
rethink OS design
![Page 9: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/9.jpg)
9© 2003, Carla Schlatter Ellis
Traditional Influences in OS Design
Metrics
Workload
Hardware Resources
Services & APIInternal Structure
Policies / MechanismsPerformance asBandwidthand Latency.
Scientific computationsDatabase operations Multi-user
Processor, Memory, Disks, Network
![Page 10: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/10.jpg)
10© 2003, Carla Schlatter Ellis
Rethinking OS Design
What is the impact of changing the primary goal of the OS to energy-efficiency rather than (speed-based) performance?
Affects every aspect of OS services and structure:– Interfaces needed by applications that want to affect
power consumption– Internal organization and algorithms– Resource management policies and mechanisms
![Page 11: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/11.jpg)
11© 2003, Carla Schlatter Ellis
Rethinking OS Design
Metrics
Workload
Hardware Resources
Services & APIInternal Structure
Policies / MechanismsEnergyefficiency
Processor, Memory, Disks, Wireless networking,Mic & Speaker, Motors & Sensors, Batteries
Productivity applications, Games, Multimedia, Web access, Personal (PDAs), Embedded, E-Commerce.
![Page 12: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/12.jpg)
12© 2003, Carla Schlatter Ellis
Initial Research Question What can be done to achieve
energy-related goals – by the OS – without requiring applications to change– with a whole-system perspective
Energy Centric Operating System
![Page 13: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/13.jpg)
13© 2003, Carla Schlatter Ellis
Related WorkEnergy-unaware OS
– Low-power hardware, energy-aware compilers, algorithm development
Services (Chase: MUSE)Energy-aware OS with Unaware applications
– Per-device solutions (disk spindown, DVS)Energy-aware OS with cooperating Energy-
aware Applications– Flinn: Odyssey (fidelity-based), Bellosa: Coop I/O,
Nemesis OS
![Page 14: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/14.jpg)
14© 2003, Carla Schlatter Ellis
Outline• Motivation / Context• Design Issues & Challenges• Mechanisms in the ECOSystem
Framework• Prototype Implementation &
Experimental Evaluation• Exploration of Policies
![Page 15: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/15.jpg)
15© 2003, Carla Schlatter Ellis
ECOSystem Themes1. Energy can serve as a unifying
concept for resource management over a diverse set of devices.
2. We provide a framework for explicit management of energy use:
– Energy accounting– Energy allocation– Scheduling of energy use
![Page 16: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/16.jpg)
16© 2003, Carla Schlatter Ellis
ChallengesHow to • Represent the energy resource to capture its
global impact on system? • Precisely define energy goals? • Formulate strategies that achieve those goals?
Develop a new energy abstraction: currentcy
![Page 17: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/17.jpg)
17© 2003, Carla Schlatter Ellis
ChallengesHow to • Monitor system-wide energy behavior?• Attribute energy use to correct task?• Break down power costs by device?
Perform meaningful energy accounting: Framework based on currentcy model and
resource containers
![Page 18: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/18.jpg)
18© 2003, Carla Schlatter Ellis
ChallengesHow to • Manage the tradeoffs among devices?• Handle the competition among multiple tasks?• Reduce demand when the energy resource is
limited (when applications don’t know how)?
Devise and enforce energy allocation and energy-aware scheduling policiesexploiting the mechanisms in our framework.
![Page 19: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/19.jpg)
19© 2003, Carla Schlatter Ellis
A Concrete Energy Goal: Battery Lifetime
1. Explicitly manage energy use to achieve a target battery lifetime.
• Coast-to-coast flight with your laptop• Sensors that need to operate through the night and
recharge when the sun comes up
2. If that requires reducing workload demand, use energy in proportion to task’s importance.
Scenario: • Revising and rehearsing a PowerPoint presentation• Spelling and grammar checking threads• Listening to MP3s in background
![Page 20: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/20.jpg)
20© 2003, Carla Schlatter Ellis
Battery Properties/Models
Battery models provide strategy:Battery lifetime can be determined by controlling discharge rate.Limiting availability of currentcy.
0
2
4
6
8
10
12
300 500 700 900 1100 1300 1500 1700 1900 2100
Battery Drain Rate (m A)
Bat
tery
Life
time
(Hou
rs)
![Page 21: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/21.jpg)
© 2003, Carla Schlatter Ellis
Discussion: other energy-related metrics?
![Page 22: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/22.jpg)
22© 2003, Carla Schlatter Ellis
Other Metrics• Energy usage (by fixed task set).• Energy * Delay
(penalizes achieving energy saving by bad performance)
• Work units / joule (e.g. Mbytes/joule or MIPS/joule)
• Work per battery discharge.
![Page 23: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/23.jpg)
23© 2003, Carla Schlatter Ellis
Time
mW
Assume fine grainbattery information – What would we see?
Smart Battery Interface –OK for coarse grain measurements
Accounting Challenges
![Page 24: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/24.jpg)
24© 2003, Carla Schlatter Ellis
Time
mW
Associating observedmW to current program counter (sampling technique).
3 tasks: blue, green, and pink
Great for energydebugging/testingsingle task
Accounting Challenges
![Page 25: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/25.jpg)
25© 2003, Carla Schlatter Ellis
Time
mW
Accounting ChallengesWhat are thevarious hardwarecomponentscontributing?
3 devices:CPU (solid)WNICdisk
![Page 26: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/26.jpg)
26© 2003, Carla Schlatter Ellis
Time
mW
Accounting ChallengesHow to capturethese two dimensionsof the accountingproblem?
Our choice:Internal power states model/event-driven
Requires calibration
![Page 27: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/27.jpg)
27© 2003, Carla Schlatter Ellis
Outline• Motivation / Context• Design Issues & Challenges• Mechanisms in the ECOSystem
Framework• Prototype Implementation &
Experimental Evaluation• Exploration of Policies
![Page 28: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/28.jpg)
28© 2003, Carla Schlatter Ellis
Unified Currentcy ModelEnergy accounting and allocation are
expressed in a common currentcy.Mechanism for
1. Characterizing power costs of accessing resources
2. Controlling overall energy consumption3. Sharing among competing tasks
![Page 29: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/29.jpg)
29© 2003, Carla Schlatter Ellis
Mechanisms in the Framework
Currentcy Allocation• Epoch-based allocation – periodically
distribute currentcy “allowance”Currentcy Accounting• Basic idea:
Pay as you go for resource use –no more currentcy no more service.
![Page 30: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/30.jpg)
30© 2003, Carla Schlatter Ellis
Currentcy Flow
OS
AppApp App
1
2
1. Determine overall amount of currentcy available per energy epoch. 2. Distribute available currentcy proportionally among tasks.
![Page 31: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/31.jpg)
31© 2003, Carla Schlatter Ellis
Currentcy Flow
OS
AppApp App
1
Dev Dev Dev
3
3. Deduct currentcy from task’s account for resource use.
2
![Page 32: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/32.jpg)
32© 2003, Carla Schlatter Ellis
Outline• Motivation / Context• Design Issues & Challenges• Mechanisms in the ECOSystem
Framework• Prototype Implementation &
Experimental Evaluation• Exploration of Policies
![Page 33: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/33.jpg)
33© 2003, Carla Schlatter Ellis
ECOSystem Prototype• Modifications to Linux on Thinkpad T20• Initially managing 3 devices: CPU, disk,
WNIC• Embedded power model:
– Calibrated by measurement– Power states of managed devices tracked
![Page 34: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/34.jpg)
34© 2003, Carla Schlatter Ellis
ECOSystem PrototypeModified Linux kernel 2.4.0-test9
– Interface for specifying input parameters (target lifetime, task proportions)
– New kernel thread for currentcy allocation– Simple implementation of resource containers– Simple policies for allocation, scheduling, and
accounting.
![Page 35: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/35.jpg)
36© 2003, Carla Schlatter Ellis
ECOSystem PrototypeIBM Thinkpad T20 laptop platform
– Power model – calibrated by measurements– 650MHz PIII CPU: 15.5W active– Orinoco 802.11b PC card:
doze 0.045W, receive 0.925W, transmit 1.425W– IBM Travelstar hard disk– Base power consumption of 13W captures
everything else and inactive states of above
![Page 36: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/36.jpg)
37© 2003, Carla Schlatter Ellis
Hard Disk Power ModelCost Timeout
Access 1.65 mJ
Idle1 1600 mW 0.5 s
Idle2 650 mW 2 s
Idle3 400 mW 27.5 s
Standby 0 mW
Spinup 6000 mJ
Spindown 6000 mJ
![Page 37: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/37.jpg)
© 2003, Carla Schlatter Ellis
Discussion: How might you account for display usage
in the ECOSystem framework?
![Page 38: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/38.jpg)
39© 2003, Carla Schlatter Ellis
Device Specific Accounting Policies
• CPU: hybrid of sampling and task switch accounting
• Disk: tasks directly pay for file accesses, sharing of spinup & spindown costs.
• Network: source or destination task pays based on length of data transferred
![Page 39: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/39.jpg)
40© 2003, Carla Schlatter Ellis
Experimental Evaluation• Validate the embedded energy model.• Can we achieve a target battery lifetime? • Can we achieve proportional energy
usage among multiple tasks?• Assess the performance impact of
limiting energy availability.
![Page 40: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/40.jpg)
41© 2003, Carla Schlatter Ellis
Energy AccountingApplication Currentcy
ModelPC Sampling
Back-of-envelope
Compute 8,236,720 mJ 9,094,922 mJ 8,521,400 mJ (max CPU)
DiskW 339,749 mJ 470 mJ 338,760 mJ (disk alone)
NetRecv 810,409 mJ 286,012 mJ 506,900 mJ (WNIC alone)
Running three tasks concurrently for 548 seconds
![Page 41: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/41.jpg)
42© 2003, Carla Schlatter Ellis
Achieving Target Battery Lifetime
• Using CPU intensive benchmark and varying overall allocation of currentcy, we can achieve target battery lifetime. 1.4
1.6
1.8
2
2.2
2.4
2.6
1.4 1.6 1.8 2 2.2 2.4 2.6
Target Battery Lifetime (Hours)
Ach
ieve
d B
atte
ry L
ifetim
e (H
ours
)
![Page 42: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/42.jpg)
43© 2003, Carla Schlatter Ellis
Proportional Energy Allocation
00.5
11.5
22.5
33.5
4
70-30 60-40 50-50 40-60 30-70
Ave
Pow
er U
sed
(W)
Ijpeg Netscape
Battery lifetime isset to 2.16 hours(unconstrainedwould be 1.3 hr) Overall allocation equivalentto an average power consumption of 5W.
![Page 43: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/43.jpg)
44© 2003, Carla Schlatter Ellis
Proportional CPU Utilization
05
101520253035
30 40 50 60 70
Currentcy Allocation (%)
CP
U U
tiliz
atio
n (%
)
Max at 5WIjpeg
Performance ofcompute boundtask (ijpeg) scalesproportionally withcurrentcy allocation
![Page 44: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/44.jpg)
45© 2003, Carla Schlatter Ellis
Netscape Performance Impact
0
5
10
15
20
25
30
35
30 40 50 60 70
Currentcy Allocation (%)
Pag
e Lo
ad T
ime
(s)
Some applicationsdon’t gracefullydegrade with drastically reducedcurrentcy allocations
![Page 45: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/45.jpg)
46© 2003, Carla Schlatter Ellis
Outline• Motivation / Context• Design Issues & Challenges• Mechanisms in the ECOSystem
Framework• Prototype Implementation &
Experimental Evaluation• Exploration of Policies
![Page 46: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/46.jpg)
47© 2003, Carla Schlatter Ellis
ECOSystem Themes1. Energy can serve as a unifying concept for
managing a diverse set of resources.– We introduced the currentcy abstraction
2. A framework is needed for explicit management of energy. [ASPLOS 02]
– We developed mechanisms for currentcy accounting, currentcy allocation, and scheduling of currentcy use
3. We need policies to achieve energy goals.
![Page 47: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/47.jpg)
48© 2003, Carla Schlatter Ellis
Previous Experiments• Validated the embedded energy model.• Demonstrated that we can achieve a
target battery lifetime. • Demonstrated we can achieve
proportional energy usage among multiple tasks.
![Page 48: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/48.jpg)
49© 2003, Carla Schlatter Ellis
Previous ExperimentsAlso identified performance implications of
limiting energy availability that motivate this work:
• Mismatches between user-supplied specifications and actual needs of the task
• Other devices causing a form of priority inversion
• Currentcy-starved behaviors (infeasible goals)
![Page 49: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/49.jpg)
50© 2003, Carla Schlatter Ellis
Research Questions• How useful is the currentcy abstraction in
articulating more complex energy goals?
• How effective are the mechanisms in the framework for manipulating currentcy in implementing non-trivial policies?
• What weaknesses are exposed in the currentcy model?
![Page 50: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/50.jpg)
51© 2003, Carla Schlatter Ellis
Manipulating Currentcy• Overall currentcy
allocation– Static vs. dynamic– How often, how
much
• Per-task allocation– How much– Handling of unused
currentcy– Deficit spending?
• Accounting– Pay-as-you-go– Bidding & pricing
games
![Page 51: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/51.jpg)
52© 2003, Carla Schlatter Ellis
Challenges1. To fully utilize available battery capacity
within the desired battery lifetime with little or no leftover (residual) capacity.
Devise an allocation policy that balances supply and demand among tasks.
Currentcy conserving allocation.
![Page 52: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/52.jpg)
53© 2003, Carla Schlatter Ellis
Challenges2. To produce more robust proportional
sharing by ensuring adequate spending opportunities.
Develop CPU scheduling that considers energy expenditures on non-CPU resources.
Currentcy-aware scheduling.
![Page 53: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/53.jpg)
54© 2003, Carla Schlatter Ellis
Challenges3. To reduce response time variability
when energy is limited.
Design a scheduling policy that controls the pace of currentcy consumption.
![Page 54: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/54.jpg)
55© 2003, Carla Schlatter Ellis
Challenges4. To encourage greater energy efficiency
(lower average cost) for I/O accesses on power-managed disks.
Amortize spinup and spindown costs over multiple disk requests by shaping request patterns.
Buffer management and prefetching strategies.
![Page 55: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/55.jpg)
56© 2003, Carla Schlatter Ellis
Challenges1. To fully utilize available battery capacity
within the desired battery lifetime with little or no leftover (residual) capacity.
Devise an allocation policy that balances supply and demand among tasks.
Currentcy conserving allocation.
![Page 56: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/56.jpg)
57© 2003, Carla Schlatter Ellis
OS
Problem: Residual EnergyAllocation Shares
Demand
Caps
Allocations do not reflect actual consumption needs
![Page 57: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/57.jpg)
58© 2003, Carla Schlatter Ellis
OS
Problem: Residual EnergyAllocation Shares
Demand
Caps
A task’s unspent currentcy (above a “cap”) is being thrown away to maintain steady battery discharge. Leftover energy capacity at end of lifetime.
![Page 58: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/58.jpg)
59© 2003, Carla Schlatter Ellis
OS
Currentcy Conserving Allocation
Allocation Shares
Demand
Two-step policy. Each epoch:1. Adjust per-task caps to reflect observed need
• Weighted average of currentcy used in previous epochs.
Caps
![Page 59: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/59.jpg)
60© 2003, Carla Schlatter Ellis
OS
Currentcy Conserving Allocation
Allocation Shares
Demand
2. Redistribute overflow currentcy
![Page 60: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/60.jpg)
61© 2003, Carla Schlatter Ellis
Currentcy Conserving Allocation
ExperimentWorkload:
– Computationally intensive ijpeg – image encoder– Image viewer, gqview, with think time of 10
seconds and images from disk • Performance levels out at 6500mW allocation.
– Total allocation of 12W, shares of 8W for gqview (too much) and 4W for ijpeg (capable of 15.5W).
Comparing against total allocation “correction” method in original prototype.
![Page 61: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/61.jpg)
62© 2003, Carla Schlatter Ellis
Comparison to Auto-correction• Query the smart battery
periodically• Make adjustment to the
overall currentcy each epoch to correct any error introduced by our models.
• In this test – we set the power
consumption of CPU to be 14W instead of measured 15.5W
– Run a CPU intensive benchmark w/ and w/o auto correction
![Page 62: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/62.jpg)
63© 2003, Carla Schlatter Ellis
Currentcy Conserving Allocation
Results
Currentcy ConservingTotal allocation correction
<1% remaining6.7% remaining
![Page 63: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/63.jpg)
64© 2003, Carla Schlatter Ellis
Currentcy Conserving Allocation
Results
<1% remaining capacity
A
B
total alloc
gqview alloc
ijpeg alloc
![Page 64: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/64.jpg)
© 2003, Carla Schlatter Ellis
Discussion: Is getting the allocations “right” the
key? How else could you do that?
![Page 65: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/65.jpg)
66© 2003, Carla Schlatter Ellis
Challenges2. To produce more robust proportional
sharing by ensuring adequate spending opportunities.
Develop CPU scheduling that considers energy expenditures on non-CPU resources.
Currentcy-aware scheduling or energy-centric scheduling.
![Page 66: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/66.jpg)
67© 2003, Carla Schlatter Ellis
Problem: Scheduling/ Allocation Interactions
• Allocation shares may be appropriately specified and consistent with demand, but the ability to spend depends on scheduling policies that control the opportunities to access resource.
• Priority Inversion – a task with small allocation but large CPU component can dominate a task with larger allocation but demands on other devices.
• Scheduling should be “aware” of currentcy expenditures throughout the system.
![Page 67: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/67.jpg)
68© 2003, Carla Schlatter Ellis
Problem: Scheduling/ Allocation Interactions
• Traditional schedulers– Explicitly deal with CPU
time and processes on ready queue
– May implicitly compensate for time spent off ready queue
• Energy-aware– Deals with energy use
outside of CPU– Currentcy explicitly captures
progress using multiple devices
CPUenergy
diskenergy
think
gqview
![Page 68: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/68.jpg)
69© 2003, Carla Schlatter Ellis
Energy-Centric Scheduling• The next task to be scheduled for CPU is the
one with the lowest amount of currentcy spent in this epoch relative to its share– Captures currentcy spent on any device.
• Dynamic share – weighted by the task’s static share divided by currentcy spent in last epoch.– Compensation for previous lack of spending
opportunities
![Page 69: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/69.jpg)
70© 2003, Carla Schlatter Ellis
Energy-Centric SchedulingExperiment
• Workload: – Computationally intensive ijpeg– Image viewer, gqview, with think time of 10
seconds and disk access (700mW)• Performance levels out at 6500mW allocation.
– Given equal allocation shares, total allocation varied
• Comparing against round-robin and stride based on static share value.
![Page 70: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/70.jpg)
71© 2003, Carla Schlatter Ellis
Energy-Centric SchedulingResults
Gqview power consumption
![Page 71: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/71.jpg)
72© 2003, Carla Schlatter Ellis
Energy-Centric SchedulingResults
Ijpeg power consumption
![Page 72: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/72.jpg)
73© 2003, Carla Schlatter Ellis
Energy-Centric SchedulingResults
Gqview delay
(sec
)
![Page 73: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/73.jpg)
74© 2003, Carla Schlatter Ellis
Energy-Centric SchedulingResults
Ijpeg delay
(sec
)
![Page 74: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/74.jpg)
75© 2003, Carla Schlatter Ellis
Challenges3. To reduce response time variability
when energy is limited.
Design a scheduling policy that controls the pace of currentcy consumption.
![Page 75: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/75.jpg)
76© 2003, Carla Schlatter Ellis
Self-pacing Algorithm• Idea: Building upon our E-C Scheduler,
delay a task if currentcy expenditure is ahead of schedule in an epoch.
• Notion of “appropriate progress”• Delay ifcurrentcy-spent-so-far
per-epoch budgetelapsed timeepoch length>
![Page 76: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/76.jpg)
77© 2003, Carla Schlatter Ellis
Response Time VariationPower(mW)
Delay -range (s)
Ave.(s)
Std. Dev.
Unconstrained 2197 0.27- 0.68 0.43 0.11
Epoch length (.01s)
1212 1.0 - 33.8 3.8 5.8
Self-pacing (10s epochs)
1199 3.3 - 5.6 4.0 0.6
![Page 77: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/77.jpg)
© 2003, Carla Schlatter Ellis
Discussion: Can we capture DVS in currentcy model
(instead of having to depend on this on-halt CPU
behavior)?
![Page 78: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/78.jpg)
79© 2003, Carla Schlatter Ellis
Challenges4. To encourage greater energy efficiency
(lower average cost) for I/O accesses on power-managed disks.
Amortize spinup and spindown costs over multiple disk requests by shaping request patterns.
Buffer management and prefetching strategies.
![Page 79: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/79.jpg)
80© 2003, Carla Schlatter Ellis
I/O Request Pattern Shaping
• Goal: make more bursty• Entry price for an I/O (when
disk is not already spinning) set high.
• Tasks offer “bids” from their currentcy budgets that vary over time waiting
• Bids from multiple tasks can cooperatively satisfy entry price
• Actual cost is debited from task.
• Setup: 2 disk-fetching tasks• Ave disk power:
911mW (baseline) vs. 655mW (bidding)
time
Entry
requestb
requesta
![Page 80: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/80.jpg)
81© 2003, Carla Schlatter Ellis
Summary: Benefits of Currentcy
Currentcy abstraction • Provides a concrete representation of energy supply
and demand – allowing explicit energy/power management.
• Provides unified view of energy impact of different devices – enabling multi-device, system-wide resource management– Comparable, quantifiable, tradeoffs can be enforced
• Encourages analogies to economic models – motivating a rich set of policies.
![Page 81: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/81.jpg)
82© 2003, Carla Schlatter Ellis
Future Work/Open Questions with ECOSystem
Using currentcy and ECOSystem to explore– More of the policy design space: other energy
goals, other objectives, other approaches to achieve these objectives
– The power of economic models based on currentcy– Application assistance by extending API– Admission control– Including more components of the system: display,
virtual memory,
![Page 82: Energy Management at Upper Levels of System Design Carla Schlatter Ellis](https://reader035.vdocuments.mx/reader035/viewer/2022070420/56815dc3550346895dcbed81/html5/thumbnails/82.jpg)
© 2003, Carla Schlatter Ellis
Questions?