why applications are still draining our batteries talks/schulmnan.pdfpodcast & radio addict...

20
WHY APPLICATIONS ARE STILL DRAINING OUR BATTERIES and how we can help. Aaron Schulman & Sachin Katti

Upload: others

Post on 09-Aug-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: WHY APPLICATIONS ARE STILL DRAINING OUR BATTERIES Talks/Schulmnan.pdfPodcast & Radio Addict Player FM Player FM decodes and add effects to the audio in software 18 Datacenters need

WHY APPLICATIONS ARE STILL DRAINING OUR BATTERIES

and how we can help.

Aaron Schulman & Sachin Katti

Page 2: WHY APPLICATIONS ARE STILL DRAINING OUR BATTERIES Talks/Schulmnan.pdfPodcast & Radio Addict Player FM Player FM decodes and add effects to the audio in software 18 Datacenters need

We cannot rely on improvements in battery technology

2

In past 30 years: only 4x improvement in energy density

Source: Panasonic

���

���

���

���

���

���

���

��������

��������

��������

����

������

����

����

�������������������

Page 3: WHY APPLICATIONS ARE STILL DRAINING OUR BATTERIES Talks/Schulmnan.pdfPodcast & Radio Addict Player FM Player FM decodes and add effects to the audio in software 18 Datacenters need

����

���

���

���

���

���

���

���

���

��������

��������

��������

��������

��������

��������� �����

����� �������

����������� �����������

We can no longer rely on shrinking transistors

3

End of Dennard Scaling2005

Transistors (thousands)

Source: Horowitz et al.

Page 4: WHY APPLICATIONS ARE STILL DRAINING OUR BATTERIES Talks/Schulmnan.pdfPodcast & Radio Addict Player FM Player FM decodes and add effects to the audio in software 18 Datacenters need

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

Page 5: WHY APPLICATIONS ARE STILL DRAINING OUR BATTERIES Talks/Schulmnan.pdfPodcast & Radio Addict Player FM Player FM decodes and add effects to the audio in software 18 Datacenters need

Application energy regressions often appear in the wild2015

2016

5

Page 6: WHY APPLICATIONS ARE STILL DRAINING OUR BATTERIES Talks/Schulmnan.pdfPodcast & Radio Addict Player FM Player FM decodes and add effects to the audio in software 18 Datacenters need

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:

Page 7: WHY APPLICATIONS ARE STILL DRAINING OUR BATTERIES Talks/Schulmnan.pdfPodcast & Radio Addict Player FM Player FM decodes and add effects to the audio in software 18 Datacenters need

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

Page 8: WHY APPLICATIONS ARE STILL DRAINING OUR BATTERIES Talks/Schulmnan.pdfPodcast & Radio Addict Player FM Player FM decodes and add effects to the audio in software 18 Datacenters need

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

Page 9: WHY APPLICATIONS ARE STILL DRAINING OUR BATTERIES Talks/Schulmnan.pdfPodcast & Radio Addict Player FM Player FM decodes and add effects to the audio in software 18 Datacenters need

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

Page 10: WHY APPLICATIONS ARE STILL DRAINING OUR BATTERIES Talks/Schulmnan.pdfPodcast & Radio Addict Player FM Player FM decodes and add effects to the audio in software 18 Datacenters need

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

Page 11: WHY APPLICATIONS ARE STILL DRAINING OUR BATTERIES Talks/Schulmnan.pdfPodcast & Radio Addict Player FM Player FM decodes and add effects to the audio in software 18 Datacenters need

11

Intercepting a smartphone’s battery connection without soldering

Insight: Many smartphones have the same battery connectorsPhoneBattery

Practical

Page 12: WHY APPLICATIONS ARE STILL DRAINING OUR BATTERIES Talks/Schulmnan.pdfPodcast & Radio Addict Player FM Player FM decodes and add effects to the audio in software 18 Datacenters need

Camera flash-based clock sync

12

Attributed

Insight: Clock sync markers can be modulated into power measurements

Page 13: WHY APPLICATIONS ARE STILL DRAINING OUR BATTERIES Talks/Schulmnan.pdfPodcast & Radio Addict Player FM Player FM decodes and add effects to the audio in software 18 Datacenters need

Demo: BattOr is built into Google Chrome

13

Page 14: WHY APPLICATIONS ARE STILL DRAINING OUR BATTERIES Talks/Schulmnan.pdfPodcast & Radio Addict Player FM Player FM decodes and add effects to the audio in software 18 Datacenters need

Can BattOr find energy bugs in real world applications?

14

Page 15: WHY APPLICATIONS ARE STILL DRAINING OUR BATTERIES Talks/Schulmnan.pdfPodcast & Radio Addict Player FM Player FM decodes and add effects to the audio in software 18 Datacenters need

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

Page 16: WHY APPLICATIONS ARE STILL DRAINING OUR BATTERIES Talks/Schulmnan.pdfPodcast & Radio Addict Player FM Player FM decodes and add effects to the audio in software 18 Datacenters need

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

Page 17: WHY APPLICATIONS ARE STILL DRAINING OUR BATTERIES Talks/Schulmnan.pdfPodcast & Radio Addict Player FM Player FM decodes and add effects to the audio in software 18 Datacenters need

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

Page 18: WHY APPLICATIONS ARE STILL DRAINING OUR BATTERIES Talks/Schulmnan.pdfPodcast & Radio Addict Player FM Player FM decodes and add effects to the audio in software 18 Datacenters need

Why is their energy consumption different?

Podcast & Radio Addict

Player FM

Player FM decodes and add effects to the audio in software

18

Page 19: WHY APPLICATIONS ARE STILL DRAINING OUR BATTERIES Talks/Schulmnan.pdfPodcast & Radio Addict Player FM Player FM decodes and add effects to the audio in software 18 Datacenters need

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

Page 20: WHY APPLICATIONS ARE STILL DRAINING OUR BATTERIES Talks/Schulmnan.pdfPodcast & Radio Addict Player FM Player FM decodes and add effects to the audio in software 18 Datacenters need

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