+ All Categories
Home > Presentations & Public Speaking > GreenDroid: A Tool for Analysing Power Consumption in the Android Ecosystem

GreenDroid: A Tool for Analysing Power Consumption in the Android Ecosystem

Date post: 22-Jan-2018
Category:
Upload: greenlabatdi
View: 475 times
Download: 2 times
Share this document with a friend
16
GreenDroid:A Tool for Analysing Power Consumption in the Android Ecosystem Marco Couto*¶, Jácome Cunha*§, João Paulo Fernandes‡, Rui Pereira*¶, and João Saraiva*¶ 1 Informatics ‘ 2016 – Poprad greenlab.di.uminho.pt * HASLab/INESC ¶ Universidade do Minho, Portugal ‡ RELEASE, Universidade da Beira Interior, Portugal § Universidade Nova de Lisboa, Portugal {mcouto, ruipereira, jas}@di.uminho.pt, [email protected], [email protected]
Transcript
Page 1: GreenDroid: A Tool for Analysing Power Consumption in the Android Ecosystem

GreenDroid:A Tool for Analysing Power

Consumption in the Android Ecosystem

Marco Couto*¶, Jácome Cunha*§, João Paulo Fernandes‡,

Rui Pereira*¶, and João Saraiva*¶

1

Informatics ‘ 2016 – Poprad greenlab.di.uminho.pt

* HASLab/INESC ¶ Universidade do Minho, Portugal

‡ RELEASE, Universidade da Beira Interior, Portugal

§ Universidade Nova de Lisboa, Portugal

{mcouto, ruipereira, jas}@di.uminho.pt, [email protected], [email protected]

Page 2: GreenDroid: A Tool for Analysing Power Consumption in the Android Ecosystem

Going Green

Informatics ‘ 2016 – Poprad greenlab.di.uminho.pt

2

+ =

Page 3: GreenDroid: A Tool for Analysing Power Consumption in the Android Ecosystem

Green Computing

Caught the attention of many companies allowing them to save:

Informatics ‘ 2016 – Poprad greenlab.di.uminho.pt

3

“close to 50% of the energy costs of an organization can be

attributed to the IT departments”

- [Harmon and Auseklis, 2009]

“up to 90% of energy used by ICT hardware can be attributed to

software”

- [Standard, 2013]

Page 4: GreenDroid: A Tool for Analysing Power Consumption in the Android Ecosystem

Green Software

Reducing energy consumption through software analysis and optimization

Problem:

How to analyze

How to interpret

How to improve

In mobile devices, the interest is quite large

Battery lifetime is critical!

Informatics ‘ 2016 – Poprad greenlab.di.uminho.pt

4

Page 5: GreenDroid: A Tool for Analysing Power Consumption in the Android Ecosystem

GreenDroid

Power consumption model oriented

Consumption per execution and program trace

Predicts possible power-expensive methods

Informatics ‘ 2016 – Poprad greenlab.di.uminho.pt

5

Page 6: GreenDroid: A Tool for Analysing Power Consumption in the Android Ecosystem

GreenDroid: Basic Workflow 6

Source

Code

Tests

Instrument

Source

Code

I

Tests

I

Build

APP

Tests

. Execution Trace

. Consumption

. Execution Time

*For each

Analyzer

Power Consumption

Model

Build

Informatics ‘ 2016 – Poprad greenlab.di.uminho.pt

Page 7: GreenDroid: A Tool for Analysing Power Consumption in the Android Ecosystem

Power Consumption Model – Power Tutor

Hardware components have states

e.g., CPU has different percentages of usage

Each state implies different consumptions

Idea: assign consumption to each component state

When monitoring consumption:

Check the components’ states;

Determine consumption using the power model

Informatics ‘ 2016 – Poprad greenlab.di.uminho.pt

7

Page 8: GreenDroid: A Tool for Analysing Power Consumption in the Android Ecosystem

The Model as an API

Power Tutor is an Android application

Problem: cannot be invoked in other applications

Solution: transform the model into an API

Informatics ‘ 2016 – Poprad greenlab.di.uminho.pt

8

1. traceMethod()

2. config()

3. start()

4. stop()

Program trace

Initializes Power Consumption Model

Starts the power monitoring thread

Stops the power monitoring thread

Page 9: GreenDroid: A Tool for Analysing Power Consumption in the Android Ecosystem

Instrumentation: Source Code

Informatics ‘ 2016 – Poprad greenlab.di.uminho.pt

9

Source

Codepublic class C1{

...

public void m1(){

Estimator.traceMethod(“m1”, “C1”);

...

}

...

}

public class C1{

...

public void m1(){

...

}

...

}

Page 10: GreenDroid: A Tool for Analysing Power Consumption in the Android Ecosystem

Instrumentation: Tests

Informatics ‘ 2016 – Poprad greenlab.di.uminho.pt

10

Tests

public class TestSuite1{

...

public void setUp(){

...

}

public void tearDown(){

...

}

...

...

}

public class TestSuite1{

...

public void setUp(){

Estimator.config(“package”,

_______android.os.Process.myUid(),

this.getContext());

Estimator.start();

...

}

public void tearDown(){

Estimator.stop()

...

}

...

...

}

Page 11: GreenDroid: A Tool for Analysing Power Consumption in the Android Ecosystem

Result Analysis

Informatics ‘ 2016 – Poprad greenlab.di.uminho.pt

11

Page 12: GreenDroid: A Tool for Analysing Power Consumption in the Android Ecosystem

Power Consumption Graphics

Informatics ‘ 2016 – Poprad greenlab.di.uminho.pt

12

Page 13: GreenDroid: A Tool for Analysing Power Consumption in the Android Ecosystem

Power Consumption Graphics

Informatics ‘ 2016 – Poprad greenlab.di.uminho.pt

13

Page 14: GreenDroid: A Tool for Analysing Power Consumption in the Android Ecosystem

Power Consumption Graphics

Informatics ‘ 2016 – Poprad greenlab.di.uminho.pt

14

Method classifications and analysis

technique based on prior research

“Detecting Anomalous Energy

Consumption in Android

Applications” – SBLP’2014

Page 15: GreenDroid: A Tool for Analysing Power Consumption in the Android Ecosystem

Conclusions

GreenDroid Tool

Analyze power consumption of Android apps

Detect possible power leaks

Plan to extend GreenDroid approach to analyze other applications

Download at: https://github.com/greensoftwarelab/GreenDroid

Informatics ‘ 2016 – Poprad greenlab.di.uminho.pt

15

Page 16: GreenDroid: A Tool for Analysing Power Consumption in the Android Ecosystem

GreenDroid:A Tool for Analysing Power

Consumption in the Android Ecosystem

Marco Couto*¶, Jácome Cunha*§, João Paulo Fernandes‡,

Rui Pereira*¶, and João Saraiva*¶

16

Informatics ‘ 2016 – Poprad greenlab.di.uminho.pt

* HASLab/INESC ¶ Universidade do Minho, Portugal

‡ RELEASE, Universidade da Beira Interior, Portugal

§ Universidade Nova de Lisboa, Portugal

{mcouto, ruipereira, jas}@di.uminho.pt, [email protected], [email protected]


Recommended