why applications are still draining our batteries talks/schulmnan.pdfpodcast & radio addict...
TRANSCRIPT
WHY APPLICATIONS ARE STILL DRAINING OUR BATTERIES
and how we can help.
Aaron Schulman & Sachin Katti
We cannot rely on improvements in battery technology
2
In past 30 years: only 4x improvement in energy density
Source: Panasonic
�
���
���
���
���
���
���
���
��������
��������
��������
����
������
����
����
�������������������
����
���
���
���
���
���
���
���
���
��������
��������
��������
��������
��������
��������� �����
����� �������
����������� �����������
We can no longer rely on shrinking transistors
3
End of Dennard Scaling2005
Transistors (thousands)
Source: Horowitz et al.
Storage
We now rely on heterogeneous design and power management logic
App
Cellular
CPU
WiFi
GPSCamera
RAM Battery
Operating systemApp Hardware
Kernel Drivers
Bluetooth
Manages system-levelpower and thermals
Manages IC-levelpower and thermals
Uses hardware
4
However, this makes it difficult for developers to reason about energy
Power & Thermal Management
PCU
PCU PCU PCUSource: MediaTek
Application energy regressions often appear in the wild2015
2016
5
Accurately measure system-level power and attribute to apps.
Empower application developers with tools that enable them to write efficient software
6
StorageApp
Bluetooth
CPU
WiFi
GPSCamera
RAM Battery
Operating systemApp Hardware
Kernel Drivers
CellularPower & Thermal
Management
PCU
PCU PCU PCU
Measurement
My work:
BattOr: Power measurement for application developers
1. Power monitor circuit
2. Power supply interceptors
3. Clock synchronization
7
0
2
4
6
8
10
12
0 100 200 300 400 500 600 700
1011011010010000110011001100100011110011100010100011001111110000
Po
we
r (W
)
Time (ms)
Insight: The designs of battery powered computing devices are amenable to power measurement
Application developer requirements for power measurement
8
Power measurements must be actionable
Power must be associated with application actions
Doesn’t require hardware mods, portable, automatable
Accurate
Attributed
Practical
Today’s power monitors trade off ease-of-use for accuracy and attribution
9
Monsoon - Requires AC power and battery wires must
be soldered onto device
NEAT - Requires modification of an external battery
and soldering a trigger wire
Also, neither can monitor laptops
Accurate AttributedAccurate
A portable power monitor for smartphones & laptops
10
Current & Voltage Measurement
Storage
USB
Power supply connection
AccuratePractical
Insight: Power measurement is an ideal application for embedded systems
11
Intercepting a smartphone’s battery connection without soldering
Insight: Many smartphones have the same battery connectorsPhoneBattery
Practical
Camera flash-based clock sync
12
Attributed
Insight: Clock sync markers can be modulated into power measurements
Demo: BattOr is built into Google Chrome
13
Can BattOr find energy bugs in real world applications?
14
Diagnosing an energy bug in Chrome-for-Mac’s graphics stack
15
0 5
10 15 20 25 30 35 40
0 2 4 6 8 10 12 14 16
Po
we
r (W
)
Time (msec)
Apr. 2015
133%
0 5
10 15 20 25 30 35 40
0 2 4 6 8 10 12 14 16
Po
we
r (W
)
Time (msec)
Apr. 2015
0 5
10 15 20 25 30 35 40
0 2 4 6 8 10 12 14 16
Po
we
r (W
)
Time (msec)
125%
API fix
0 5
10 15 20 25 30 35 40
0 2 4 6 8 10 12 14 16
Po
we
r (W
)
Time (msec)
114%
Partial swap
Teaching Stanford EE students about embedded systems by building BattOrs
Atmel 8-bit microcontroller (integrated ADC)
Digitally controlled potentiometers
1 Mbit/s UART
Instrumentation Amplifier
LEDs
16 MHz Crystal
- Synchronous serial
- Microcontroller arch. - Firmware development
- Analog circuits
- GPIO
- Clocks- Timing
- Asynchronous serial2”x3” PCB- PCB Design - SMD soldering
16
Stanford’s EE107 students used their BattOrs to compare similar Android apps
A student’s BattOr connected to a Nexus 5 smartphone
17
���������������
�� �� ��
���������
Podcast
Republic
Player FM
Podcast &
Radio Addict
1.34x
Why is their energy consumption different?
Podcast & Radio Addict
Player FM
Player FM decodes and add effects to the audio in software
18
Datacenters need energy debugging tooEfficiency gains from improving cooling and power distribution are diminishing
19
PUE - ratio of total data center energy to computing energy
Source: Google
Future work: BattOr in the data center
Vision: Use BattOrs to develop efficient cluster computing applications
• Likely many energy bugs in cluster computing applications
• Can we produce a global trace of the energy consumed across all servers?
• How do we design cluster applications that are optimized for energy?
20