Date post: | 22-Jan-2018 |
Category: |
Presentations & Public Speaking |
Upload: | greenlabatdi |
View: | 475 times |
Download: | 2 times |
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]
Going Green
Informatics ‘ 2016 – Poprad greenlab.di.uminho.pt
2
+ =
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]
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
GreenDroid
Power consumption model oriented
Consumption per execution and program trace
Predicts possible power-expensive methods
Informatics ‘ 2016 – Poprad greenlab.di.uminho.pt
5
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
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
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
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(){
...
}
...
}
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()
...
}
...
...
}
Result Analysis
Informatics ‘ 2016 – Poprad greenlab.di.uminho.pt
11
Power Consumption Graphics
Informatics ‘ 2016 – Poprad greenlab.di.uminho.pt
12
Power Consumption Graphics
Informatics ‘ 2016 – Poprad greenlab.di.uminho.pt
13
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
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
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]