storage on your smartphone uses more energy than … · storage on your smartphone uses more energy...

30
Jayashree Mohan, Dhathri Purohith, Matthew Halpern, Vijay Chidambaram, Vijay Janapa Reddy Storage on Your Smartphone Uses More Energy Than You Think

Upload: doandung

Post on 10-Jul-2019

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: STORAGE ON YOUR SMARTPHONE USES MORE ENERGY THAN … · Storage on Your Smartphone Uses More Energy Than You Think. 2. ... workload. Random reads take 8x ... STORAGE ON YOUR SMARTPHONE

Jayashree Mohan, Dhathri Purohith,

Matthew Halpern,

Vijay Chidambaram, Vijay Janapa Reddy

Storage on Your Smartphone Uses More Energy Than You Think

Page 2: STORAGE ON YOUR SMARTPHONE USES MORE ENERGY THAN … · Storage on Your Smartphone Uses More Energy Than You Think. 2. ... workload. Random reads take 8x ... STORAGE ON YOUR SMARTPHONE

2

Page 3: STORAGE ON YOUR SMARTPHONE USES MORE ENERGY THAN … · Storage on Your Smartphone Uses More Energy Than You Think. 2. ... workload. Random reads take 8x ... STORAGE ON YOUR SMARTPHONE

Limited battery capacity is a

major concern!

However, battery density doubles

only once every 10 years3

Page 4: STORAGE ON YOUR SMARTPHONE USES MORE ENERGY THAN … · Storage on Your Smartphone Uses More Energy Than You Think. 2. ... workload. Random reads take 8x ... STORAGE ON YOUR SMARTPHONE

What consumes battery?

Usual suspects: screen, network

Is storage a major contributor?4

Page 5: STORAGE ON YOUR SMARTPHONE USES MORE ENERGY THAN … · Storage on Your Smartphone Uses More Energy Than You Think. 2. ... workload. Random reads take 8x ... STORAGE ON YOUR SMARTPHONE

Random writes take

20xmore energy than

sequential writes.

Storage subsystem takes

36%Of total energy for

random IO intensive

workload.

Random reads take

8xmore energy than

sequential reads.

Measure energy

Differentiallyto segregate storage

sub-system energy on a

commercial smartphone.

5

Page 6: STORAGE ON YOUR SMARTPHONE USES MORE ENERGY THAN … · Storage on Your Smartphone Uses More Energy Than You Think. 2. ... workload. Random reads take 8x ... STORAGE ON YOUR SMARTPHONE

Overview

How do we measure storage energy?

Energy at different layers of storage stack

File IO Operations

SQLite Operations

Android applications

Implications for File System Design

Conclusions

6

Outline

Page 7: STORAGE ON YOUR SMARTPHONE USES MORE ENERGY THAN … · Storage on Your Smartphone Uses More Energy Than You Think. 2. ... workload. Random reads take 8x ... STORAGE ON YOUR SMARTPHONE

Tools to measure energy

Software Based:

Battery sensor: Periodically check current battery level

Apps: Requires power models.

Very crude measure.

Cannot detect small consumptions.

Hardware Based:

More fine-grained measure.

Requires specialized hardware to get component-wiseenergy.

7

Page 8: STORAGE ON YOUR SMARTPHONE USES MORE ENERGY THAN … · Storage on Your Smartphone Uses More Energy Than You Think. 2. ... workload. Random reads take 8x ... STORAGE ON YOUR SMARTPHONE

Experimental setup

8

Samsung Galaxy nexus connected to

Monsoon Power Monitor

Page 9: STORAGE ON YOUR SMARTPHONE USES MORE ENERGY THAN … · Storage on Your Smartphone Uses More Energy Than You Think. 2. ... workload. Random reads take 8x ... STORAGE ON YOUR SMARTPHONE

Differential Energy Analysis

Hardware tools provide fine-grained energymeasurements, but not component-wise.

Design experiments to measure energy“differentially”.

IO intensive Workload: 100 MB of randomwrites of IO size 4KB.

9

Page 10: STORAGE ON YOUR SMARTPHONE USES MORE ENERGY THAN … · Storage on Your Smartphone Uses More Energy Than You Think. 2. ... workload. Random reads take 8x ... STORAGE ON YOUR SMARTPHONE

IDLE STATE CPU AND MEMORY

NETWORK STORAGE SUBSYSTEM

10

Differential energy measurement

Screen On,

No background

Apps, No IO

Writes to

in-memory

filesystem

In-memory

writes over

network

Writes to

internal eMMC

Page 11: STORAGE ON YOUR SMARTPHONE USES MORE ENERGY THAN … · Storage on Your Smartphone Uses More Energy Than You Think. 2. ... workload. Random reads take 8x ... STORAGE ON YOUR SMARTPHONE

Overall Storage Energy Consumption

Energy consumed by storage subsystem is almostequal to the energy consumed by screen for an IOintensive workload.

11

37.0%

0.6%24.5%

36.5%

Screen

CPU & Memory

Network

Storage

Page 12: STORAGE ON YOUR SMARTPHONE USES MORE ENERGY THAN … · Storage on Your Smartphone Uses More Energy Than You Think. 2. ... workload. Random reads take 8x ... STORAGE ON YOUR SMARTPHONE

12

Overview

How do we measure storage energy?

Energy at different layers of storage stack

File IO Operations

SQLite Operations

Android applications

Implications for File System Design

Conclusions

Page 13: STORAGE ON YOUR SMARTPHONE USES MORE ENERGY THAN … · Storage on Your Smartphone Uses More Energy Than You Think. 2. ... workload. Random reads take 8x ... STORAGE ON YOUR SMARTPHONE

File IO operations

Sequential IO Workload:

IO Size : 512KB blocks.

Total IO : 1GB of file reads and writes.

Random IO Workload:

IO Size : 4KB blocks.

Total IO : 100MB of file reads and writes.

Fsync issued after every IO request.

13

Page 14: STORAGE ON YOUR SMARTPHONE USES MORE ENERGY THAN … · Storage on Your Smartphone Uses More Energy Than You Think. 2. ... workload. Random reads take 8x ... STORAGE ON YOUR SMARTPHONE

F2FS vs Ext4 : File ops

14

0

100

200

300

400

500

600

700

800

900

Seq Write Rand Write

Sto

rage e

nerg

y in u

J/K

B

Ext4

19X

0

50

100

150

200

250

300

350

400

450

500

Seq Write Rand Write

Sto

rage e

nerg

y in u

J/K

B

F2FS

12X

Page 15: STORAGE ON YOUR SMARTPHONE USES MORE ENERGY THAN … · Storage on Your Smartphone Uses More Energy Than You Think. 2. ... workload. Random reads take 8x ... STORAGE ON YOUR SMARTPHONE

F2FS vs Ext4 : File ops

15

Seq Read Rand Read

Ext4

7X

Seq Read Rand Read

F2FS

8X

Page 16: STORAGE ON YOUR SMARTPHONE USES MORE ENERGY THAN … · Storage on Your Smartphone Uses More Energy Than You Think. 2. ... workload. Random reads take 8x ... STORAGE ON YOUR SMARTPHONE

F2FS vs Ext4: Write Amplification

72

RANDOM WRITE (10MB)

AC

TU

AL I

O A

T T

HE

BLO

CK

LA

YE

R (

IN M

B)

Ext4

16

Ext4: In-place updates.

Fsync forces both data and metadatato be written on to the disk.

Meta data includes:

Inode table

Journal transaction begin block

Journal transaction end block

list of blocks in the transaction.

Page 17: STORAGE ON YOUR SMARTPHONE USES MORE ENERGY THAN … · Storage on Your Smartphone Uses More Energy Than You Think. 2. ... workload. Random reads take 8x ... STORAGE ON YOUR SMARTPHONE

F2FS vs Ext4: Write Amplification

31

RANDOM WRITE (10MB)

AC

TU

AL I

O A

T T

HE

BLO

CK

LA

YE

R (

IN M

B)

F2FS

17

F2FS: Log structured.

Maintains NAT table for

address translation.

Only data blocks and their

direct node blocks are written

after every fsync.

Meta data includes – File

inodes, NAT and SIT

updates.

Page 18: STORAGE ON YOUR SMARTPHONE USES MORE ENERGY THAN … · Storage on Your Smartphone Uses More Energy Than You Think. 2. ... workload. Random reads take 8x ... STORAGE ON YOUR SMARTPHONE

18

195

RANDOM READ (100MB)

AC

TU

AL I

O A

T T

HE

BLO

CK

LA

YE

R (

IN M

B)

Ext4

F2FS vs Ext4: Read Amplification

Ext4: Android uses aggressive

read prefetching.

Blktrace reveals minimum

size of read request is 8KB.

Page 19: STORAGE ON YOUR SMARTPHONE USES MORE ENERGY THAN … · Storage on Your Smartphone Uses More Energy Than You Think. 2. ... workload. Random reads take 8x ... STORAGE ON YOUR SMARTPHONE

19

272

RANDOM READ (100MB)

AC

TU

AL I

O A

T T

HE

BLO

CK

LA

YE

R (

IN M

B)

F2FS

F2FS vs Ext4: Read Amplification

F2FS: Every read constitutes of a

request to read direct node

block and the data.

Every read request to

direct node block results in

NAT translation.

Page 20: STORAGE ON YOUR SMARTPHONE USES MORE ENERGY THAN … · Storage on Your Smartphone Uses More Energy Than You Think. 2. ... workload. Random reads take 8x ... STORAGE ON YOUR SMARTPHONE

20

Overview

How do we measure storage energy?

Energy at different layers of storage stack

File IO Operations

SQLite Operations

Android applications

Implications for File System Design

Conclusions

Page 21: STORAGE ON YOUR SMARTPHONE USES MORE ENERGY THAN … · Storage on Your Smartphone Uses More Energy Than You Think. 2. ... workload. Random reads take 8x ... STORAGE ON YOUR SMARTPHONE

SQLite operations

Workload:

Prepopulate 1M entries.

15K each of SQLite Inserts, Updates and Deletes.

SQLite record size : 4KB.

WAL-NORMAL

21

Page 22: STORAGE ON YOUR SMARTPHONE USES MORE ENERGY THAN … · Storage on Your Smartphone Uses More Energy Than You Think. 2. ... workload. Random reads take 8x ... STORAGE ON YOUR SMARTPHONE

F2FS vs Ext4 : SQLite Operations

22

0

1

2

3

4

5

6

7

Inserts Updates Deletes

Sto

rage e

nerg

y in m

J/T

xn

Ext4 F2FS

1.5X 1.5X

Page 23: STORAGE ON YOUR SMARTPHONE USES MORE ENERGY THAN … · Storage on Your Smartphone Uses More Energy Than You Think. 2. ... workload. Random reads take 8x ... STORAGE ON YOUR SMARTPHONE

23

Overview

How do we measure storage energy?

Energy at different layers of storage stack

File IO Operations

SQLite Operations

Android applications

Implications for File System Design

Conclusions

Page 24: STORAGE ON YOUR SMARTPHONE USES MORE ENERGY THAN … · Storage on Your Smartphone Uses More Energy Than You Think. 2. ... workload. Random reads take 8x ... STORAGE ON YOUR SMARTPHONE

Android applications

Applications Studied: Mail and Facebook

Duration traced: 180 seconds

Energy estimation:

Percentage of random and sequential IO iscomputed using blktrace.

Sequential IO between two flushes are merged.

IO size < 32KB after merge is tagged as random.

Application energy consumption is estimated usingFile IO energy stats.

24

Page 25: STORAGE ON YOUR SMARTPHONE USES MORE ENERGY THAN … · Storage on Your Smartphone Uses More Energy Than You Think. 2. ... workload. Random reads take 8x ... STORAGE ON YOUR SMARTPHONE

F2FS vs Ext4 : Android applications

25

Percentage of Random IO at block level

0

10

20

30

40

50

60

Write Read Write Read

% o

f ra

ndom

ness

Mail Facebook

Ext4 F2FS

Page 26: STORAGE ON YOUR SMARTPHONE USES MORE ENERGY THAN … · Storage on Your Smartphone Uses More Energy Than You Think. 2. ... workload. Random reads take 8x ... STORAGE ON YOUR SMARTPHONE

F2FS vs Ext4 : Android applications

26

Total energy consumed by storage for

different Android applications

42.91

14.13

20.07

8.79

MAIL FACEBOOK

EN

ER

GY

CO

NS

UM

ED

(IN

J)

Ext4 F2FS

1.6X

2.1X

Page 27: STORAGE ON YOUR SMARTPHONE USES MORE ENERGY THAN … · Storage on Your Smartphone Uses More Energy Than You Think. 2. ... workload. Random reads take 8x ... STORAGE ON YOUR SMARTPHONE

Use sequential IO

F2FS still performs around 20-28% of randomwrites and about 12-20% of random reads.

Sequentializing the last 20-28% of random writes inF2FS can reduce energy consumption by half.

Account for trade-off between sequentialwrites and random reads.

Use compression to reduce IO.

27

Implications for File System Design

Page 28: STORAGE ON YOUR SMARTPHONE USES MORE ENERGY THAN … · Storage on Your Smartphone Uses More Energy Than You Think. 2. ... workload. Random reads take 8x ... STORAGE ON YOUR SMARTPHONE

Differential analysis gives component-wiseenergy measurements on commercial phones.

Contribution of storage to energy consumptionin Android is significant - 36%!

Huge energy benefits by sequentializing I/O.

F2FS can be made significantly more energy-efficient.

28

Conclusions

Page 29: STORAGE ON YOUR SMARTPHONE USES MORE ENERGY THAN … · Storage on Your Smartphone Uses More Energy Than You Think. 2. ... workload. Random reads take 8x ... STORAGE ON YOUR SMARTPHONE

29

Page 30: STORAGE ON YOUR SMARTPHONE USES MORE ENERGY THAN … · Storage on Your Smartphone Uses More Energy Than You Think. 2. ... workload. Random reads take 8x ... STORAGE ON YOUR SMARTPHONE

Thank you!

30