SlideShare ist ein Scribd-Unternehmen logo
1 von 28
The Influence of the Java Collection
Framework on Overall Energy
Consumption
Rui Pereira*, Marco Couto*, Jácome Cunha§,
João Paulo Fernandes‡, and João Saraiva*
greenlab.di.uminho.pt
* HASLab/INESC Tec, Universidade do Minho
§ NOVA LINCS, Universidade Nova de Lisboa
‡ RELEASE, Universidade da Beira Interior
{ruipereira, mcouto, jas}@di.uminho.pt, jacome@fct.unl.pt, jpf@di.ubi.pt
Going Green
greenlab.di.uminho.pt
2
+ =
Global energy system is unsustainable
greenlab.di.uminho.pt
3
Green Computing
 Caught the attention of many companies allowing them to save:
greenlab.di.uminho.pt
4
“close to 50% of the energy costs of an organization can be
attributed to the IT departments”
- [PICMET, 2009]
“up to 90% of energy used by ICT hardware can be attributed to
software”
- [The Greenhouse Gas Protocol Report, 2013]
Green Software
 Reducing energy consumption through software analysis and optimization
 Problem:
 How to analyze
 How to interpret
 How to improve
greenlab.di.uminho.pt
5
Green Software
 Problems (extend to programmers):
 How to analyze
 How to interpret
 How to improve
greenlab.di.uminho.pt
6
Mining questions about software energy consumption
- [MSR’14]
Integrated energy-directed test suite optimization
- [ISTA’14]
Can we save energy by refactoring Java
programs to use different data structure
implementations?
greenlab.di.uminho.pt
7
Research Questions
greenlab.di.uminho.pt
8
 (RQ1) Can we define an energy consumption quantification of Java data
structures and their methods?
 (RQ2) Can we use such quantification to decrease the energy consumption
of software systems?
Towards a Ranking of Java data structures
greenlab.di.uminho.pt
9
Design
 Simple scenario of:
 Storing
 Retrieving
 Deleting
 String values
greenlab.di.uminho.pt
10
 Java Collections Framework (JCF) library
ConcurrentSkipListSet ArrayList ConcurrentHashMap
CopyOnWriteArraySet AttributeList ConcurrentSkipListMap
HashSet CopyOnWriteArrayList HashMap
LinkedHashSet LinkedList Hashtable
TreeSet RoleList IdentityHashMap
RoleUnresolvedList LinkedHashMap
Stack Properties
Vector SimpleBindings
TreeMap
UIDefaults
WeakHashMap
Sets Lists Maps
Towards a Ranking of Java data structures
Design – Data Structures
greenlab.di.uminho.pt
11
add add clear
addAll addAll containsKey
clear add(index) containsValue
contains addAll(index) entrySet
containsAll clear get
iterateAll contains iterateAll
iterator containsAll keySet
remove get put
removeAll indexOf putAll
retainAll iterator remove
toArray lastIndexOf values
listIterator
listIterator(index)
remove
removeAll
Continues…
Sets Lists Maps
Towards a Ranking of Java data structures
Design - Methods
greenlab.di.uminho.pt
12
 Defined population sizes (popsize) of
 25,000
 250,000
 1,000,000
 When a second data structure is needed (i.e. addAll)
 SecondaryCol = 10% of popsize
 Half existing & half new (shuffled)
Towards a Ranking of Java data structures
Design - Benchmark
greenlab.di.uminho.pt
13
 Linux 3.13.0-74-generic OS
 8GB Ram
 Intel(R) Core(TM) i3-3240 CPU @ 3.40GHz
 Java Interpreter/Compiler versions 1.8.0_66
 RAPL/jRAPL
Towards a Ranking of Java data structures
Execution - Specifications
greenlab.di.uminho.pt
14
 Warm-up
 Instantiated
 Populated w/ popsize
 Performed simple actions on the data structure
 Each test x20
 Extracted time/Joules consumed
 Removed lowest/highest 20%
 336 different test (Collection.method) configurations
 6720 executions for each popsize
 20,000+ different executions
Towards a Ranking of Java data structures
Execution – For every test
greenlab.di.uminho.pt
15
Towards a Ranking of Java data structures
Results (25k pop)
greenlab.di.uminho.pt
16
Towards a Ranking of Java data structures
greenlab.di.uminho.pt
17
Towards a Ranking of Java data structures
greenlab.di.uminho.pt
18
Towards a Ranking of Java data structures
Is faster, Greener?!
greenlab.di.uminho.pt
19
Is slower, Greener?!
Faster
Slower
Research Questions
greenlab.di.uminho.pt
20
 (RQ1) Can we define an energy consumption quantification of Java data
structures and their methods?
 (RQ2) Can we use such quantification to decrease the energy consumption
of software systems?
Optimizing Energy Consumption of Java Programs
greenlab.di.uminho.pt
21
Methodology
1. Compute which implementations/methods are used in the programs
2. Look up the appropriate energy tables for the used implementations/methods
3. Choose the most energy efficient alternative
Optimizing Energy Consumption of Java Programs
greenlab.di.uminho.pt
22
Applying the methodology – Data acquisition
 Obtained Java projects of a Journalism support platform
 First year OO course
 Collaborators, Journalists, Readers, Editors
 Write chronicles and reports
 Give likes and comments
 Etc.
 Average of
 36 classes
 104 methods
 2000 lines of code
Optimizing Energy Consumption of Java Programs
greenlab.di.uminho.pt
23
Applying the methodology – Data acquisition
 Obtained 7 test cases to simulate usage
 Size varied vetween 2000-10000 for each test case/each entity
 Chosen popsize – 25,000 (smallest)
 Applied methodology on 5 projects
 Detected usage of any JCF implementation
 Detected which methods were used for each implementation
 Chose the most efficient implementation for each project
 Measured the changes before and after
Optimizing Energy Consumption of Java Programs
greenlab.di.uminho.pt
24
Applying the methodology – Example
Optimizing Energy Consumption of Java Programs
greenlab.di.uminho.pt
25
Applying the methodology – Results
 Between 4.37% - 11.05%
 Average of 6.2%
FW + Conclusion
greenlab.di.uminho.pt
26
 Presented detailed study of the energy consumption of Sets, Lists, and Maps
 Quantification of the energy spent by each method (RQ1 Answer)
 Introduced a very simple methodology to optimize Java programs (RQ2 Answer)
 Consider other object types (int, objects, etc.)
 Implement an automatic refactoring plugin
 Found @ our page: http://greenlab.di.uminho.pt/
greenlab.di.uminho.pt
27 Portuguese National Science Foundation (FCT)
 Starts July 2016
 Grants available for young researchers
 MSc
 PhD
 Postdoc
 Universities:
 University of Minho (Braga)
 University of Beira Interior (Covilhã)
 University of Porto (Porto)
 New University of Lisbon (Lisbon)
The Influence of the Java Collection
Framework on Overall Energy
Consumption
Rui Pereira*, Marco Couto*, Jácome Cunha§,
João Paulo Fernandes‡, and João Saraiva*
greenlab.di.uminho.pt
* HASLab/INESC Tec, Universidade do Minho
§ NOVA LINCS, Universidade Nova de Lisboa
‡ RELEASE, Universidade da Beira Interior
{ruipereira, mcouto, jas}@di.uminho.pt, jacome@fct.unl.pt, jpf@di.ubi.pt

Weitere ähnliche Inhalte

Was ist angesagt?

How might machine learning help advance solar PV research?
How might machine learning help advance solar PV research?How might machine learning help advance solar PV research?
How might machine learning help advance solar PV research?Anubhav Jain
 
Computing Just What You Need: Online Data Analysis and Reduction at Extreme ...
Computing Just What You Need: Online Data Analysis and Reduction  at Extreme ...Computing Just What You Need: Online Data Analysis and Reduction  at Extreme ...
Computing Just What You Need: Online Data Analysis and Reduction at Extreme ...Ian Foster
 
AI at Scale for Materials and Chemistry
AI at Scale for Materials and ChemistryAI at Scale for Materials and Chemistry
AI at Scale for Materials and ChemistryIan Foster
 
DuraMat Data Analytics
DuraMat Data AnalyticsDuraMat Data Analytics
DuraMat Data AnalyticsAnubhav Jain
 
Going Smart and Deep on Materials at ALCF
Going Smart and Deep on Materials at ALCFGoing Smart and Deep on Materials at ALCF
Going Smart and Deep on Materials at ALCFIan Foster
 
Project Matsu: Elastic Clouds for Disaster Relief
Project Matsu: Elastic Clouds for Disaster ReliefProject Matsu: Elastic Clouds for Disaster Relief
Project Matsu: Elastic Clouds for Disaster ReliefRobert Grossman
 
Hyperparameter Optimization with Hyperband Algorithm
Hyperparameter Optimization with Hyperband AlgorithmHyperparameter Optimization with Hyperband Algorithm
Hyperparameter Optimization with Hyperband AlgorithmDeep Learning Italia
 
Software tools for high-throughput materials data generation and data mining
Software tools for high-throughput materials data generation and data miningSoftware tools for high-throughput materials data generation and data mining
Software tools for high-throughput materials data generation and data miningAnubhav Jain
 
Materials Project computation and database infrastructure
Materials Project computation and database infrastructureMaterials Project computation and database infrastructure
Materials Project computation and database infrastructureAnubhav Jain
 
Reusable Software and Open Data To Optimize Agriculture
Reusable Software and Open Data To Optimize AgricultureReusable Software and Open Data To Optimize Agriculture
Reusable Software and Open Data To Optimize AgricultureDavid LeBauer
 
Software Tools, Methods and Applications of Machine Learning in Functional Ma...
Software Tools, Methods and Applications of Machine Learning in Functional Ma...Software Tools, Methods and Applications of Machine Learning in Functional Ma...
Software Tools, Methods and Applications of Machine Learning in Functional Ma...Anubhav Jain
 
Selective and incremental re-computation in reaction to changes: an exercise ...
Selective and incremental re-computation in reaction to changes: an exercise ...Selective and incremental re-computation in reaction to changes: an exercise ...
Selective and incremental re-computation in reaction to changes: an exercise ...Paolo Missier
 
Bioclouds CAMDA (Robert Grossman) 09-v9p
Bioclouds CAMDA (Robert Grossman) 09-v9pBioclouds CAMDA (Robert Grossman) 09-v9p
Bioclouds CAMDA (Robert Grossman) 09-v9pRobert Grossman
 
Accelerating the Experimental Feedback Loop: Data Streams and the Advanced Ph...
Accelerating the Experimental Feedback Loop: Data Streams and the Advanced Ph...Accelerating the Experimental Feedback Loop: Data Streams and the Advanced Ph...
Accelerating the Experimental Feedback Loop: Data Streams and the Advanced Ph...Ian Foster
 
Clustbigfim frequent itemset mining of
Clustbigfim frequent itemset mining ofClustbigfim frequent itemset mining of
Clustbigfim frequent itemset mining ofijfcstjournal
 
Balaji_CLIMA_Slide Deck
Balaji_CLIMA_Slide DeckBalaji_CLIMA_Slide Deck
Balaji_CLIMA_Slide DeckBalaji Kalluri
 
Machine learning for materials design: opportunities, challenges, and methods
Machine learning for materials design: opportunities, challenges, and methodsMachine learning for materials design: opportunities, challenges, and methods
Machine learning for materials design: opportunities, challenges, and methodsAnubhav Jain
 
Overview of DuraMat software tool development
Overview of DuraMat software tool developmentOverview of DuraMat software tool development
Overview of DuraMat software tool developmentAnubhav Jain
 

Was ist angesagt? (20)

How might machine learning help advance solar PV research?
How might machine learning help advance solar PV research?How might machine learning help advance solar PV research?
How might machine learning help advance solar PV research?
 
Computing Just What You Need: Online Data Analysis and Reduction at Extreme ...
Computing Just What You Need: Online Data Analysis and Reduction  at Extreme ...Computing Just What You Need: Online Data Analysis and Reduction  at Extreme ...
Computing Just What You Need: Online Data Analysis and Reduction at Extreme ...
 
AI at Scale for Materials and Chemistry
AI at Scale for Materials and ChemistryAI at Scale for Materials and Chemistry
AI at Scale for Materials and Chemistry
 
DuraMat Data Analytics
DuraMat Data AnalyticsDuraMat Data Analytics
DuraMat Data Analytics
 
Going Smart and Deep on Materials at ALCF
Going Smart and Deep on Materials at ALCFGoing Smart and Deep on Materials at ALCF
Going Smart and Deep on Materials at ALCF
 
Project Matsu: Elastic Clouds for Disaster Relief
Project Matsu: Elastic Clouds for Disaster ReliefProject Matsu: Elastic Clouds for Disaster Relief
Project Matsu: Elastic Clouds for Disaster Relief
 
Hyperparameter Optimization with Hyperband Algorithm
Hyperparameter Optimization with Hyperband AlgorithmHyperparameter Optimization with Hyperband Algorithm
Hyperparameter Optimization with Hyperband Algorithm
 
Software tools for high-throughput materials data generation and data mining
Software tools for high-throughput materials data generation and data miningSoftware tools for high-throughput materials data generation and data mining
Software tools for high-throughput materials data generation and data mining
 
Materials Project computation and database infrastructure
Materials Project computation and database infrastructureMaterials Project computation and database infrastructure
Materials Project computation and database infrastructure
 
B017550814
B017550814B017550814
B017550814
 
Reusable Software and Open Data To Optimize Agriculture
Reusable Software and Open Data To Optimize AgricultureReusable Software and Open Data To Optimize Agriculture
Reusable Software and Open Data To Optimize Agriculture
 
Software Tools, Methods and Applications of Machine Learning in Functional Ma...
Software Tools, Methods and Applications of Machine Learning in Functional Ma...Software Tools, Methods and Applications of Machine Learning in Functional Ma...
Software Tools, Methods and Applications of Machine Learning in Functional Ma...
 
Selective and incremental re-computation in reaction to changes: an exercise ...
Selective and incremental re-computation in reaction to changes: an exercise ...Selective and incremental re-computation in reaction to changes: an exercise ...
Selective and incremental re-computation in reaction to changes: an exercise ...
 
Bioclouds CAMDA (Robert Grossman) 09-v9p
Bioclouds CAMDA (Robert Grossman) 09-v9pBioclouds CAMDA (Robert Grossman) 09-v9p
Bioclouds CAMDA (Robert Grossman) 09-v9p
 
Accelerating the Experimental Feedback Loop: Data Streams and the Advanced Ph...
Accelerating the Experimental Feedback Loop: Data Streams and the Advanced Ph...Accelerating the Experimental Feedback Loop: Data Streams and the Advanced Ph...
Accelerating the Experimental Feedback Loop: Data Streams and the Advanced Ph...
 
CLIM Program: Remote Sensing Workshop, The Earth System Grid Federation as a ...
CLIM Program: Remote Sensing Workshop, The Earth System Grid Federation as a ...CLIM Program: Remote Sensing Workshop, The Earth System Grid Federation as a ...
CLIM Program: Remote Sensing Workshop, The Earth System Grid Federation as a ...
 
Clustbigfim frequent itemset mining of
Clustbigfim frequent itemset mining ofClustbigfim frequent itemset mining of
Clustbigfim frequent itemset mining of
 
Balaji_CLIMA_Slide Deck
Balaji_CLIMA_Slide DeckBalaji_CLIMA_Slide Deck
Balaji_CLIMA_Slide Deck
 
Machine learning for materials design: opportunities, challenges, and methods
Machine learning for materials design: opportunities, challenges, and methodsMachine learning for materials design: opportunities, challenges, and methods
Machine learning for materials design: opportunities, challenges, and methods
 
Overview of DuraMat software tool development
Overview of DuraMat software tool developmentOverview of DuraMat software tool development
Overview of DuraMat software tool development
 

Ähnlich wie The Influence of the Java Collection Framework on Overall Energy Consumption

jStanley: Placing a Green Thumb on Java Collections
jStanley: Placing a Green Thumb on  Java CollectionsjStanley: Placing a Green Thumb on  Java Collections
jStanley: Placing a Green Thumb on Java CollectionsJácome Cunha
 
Locating Energy Hotspots in Source Code
Locating Energy Hotspots in Source CodeLocating Energy Hotspots in Source Code
Locating Energy Hotspots in Source CodeGreenLabAtDI
 
Green Computing as an Engineering Discipline
Green Computing as an Engineering DisciplineGreen Computing as an Engineering Discipline
Green Computing as an Engineering DisciplineGreenLabAtDI
 
Let's Talk a Bit About: Green Software
Let's Talk a Bit About: Green SoftwareLet's Talk a Bit About: Green Software
Let's Talk a Bit About: Green SoftwareGreenLabAtDI
 
HSO: A Hybrid Swarm Optimization Algorithm for Reducing Energy Consumption in...
HSO: A Hybrid Swarm Optimization Algorithm for Reducing Energy Consumption in...HSO: A Hybrid Swarm Optimization Algorithm for Reducing Energy Consumption in...
HSO: A Hybrid Swarm Optimization Algorithm for Reducing Energy Consumption in...TELKOMNIKA JOURNAL
 
Knowledge Discovery in Environmental Management
Knowledge Discovery in Environmental Management Knowledge Discovery in Environmental Management
Knowledge Discovery in Environmental Management Dr. Aparna Varde
 
2023comp90024_Spartan.pdf
2023comp90024_Spartan.pdf2023comp90024_Spartan.pdf
2023comp90024_Spartan.pdfLevLafayette1
 
Implementing Workload Postponing In Cloudsim to Maximize Renewable Energy Uti...
Implementing Workload Postponing In Cloudsim to Maximize Renewable Energy Uti...Implementing Workload Postponing In Cloudsim to Maximize Renewable Energy Uti...
Implementing Workload Postponing In Cloudsim to Maximize Renewable Energy Uti...IJERA Editor
 
Green indexes used in CAST to measure the energy consumption in code
Green indexes used in CAST to measure the energy consumption in codeGreen indexes used in CAST to measure the energy consumption in code
Green indexes used in CAST to measure the energy consumption in codeCAST
 
Harnessing deep learning algorithms to predict software refactoring
Harnessing deep learning algorithms to predict software refactoringHarnessing deep learning algorithms to predict software refactoring
Harnessing deep learning algorithms to predict software refactoringTELKOMNIKA JOURNAL
 
Towards a Green Ranking for Programming Languages
Towards a Green Ranking for Programming LanguagesTowards a Green Ranking for Programming Languages
Towards a Green Ranking for Programming LanguagesGreenLabAtDI
 
JISC's Greening ICT Programme
JISC's Greening ICT ProgrammeJISC's Greening ICT Programme
JISC's Greening ICT ProgrammeRob Bristow
 
Rob bristow sgl cardiff_2010
Rob bristow sgl cardiff_2010Rob bristow sgl cardiff_2010
Rob bristow sgl cardiff_2010Rob Bristow
 
The Green Lab - Experimentation in Software Energy Efficiency (ICSE)
The Green Lab - Experimentation in Software Energy Efficiency (ICSE)The Green Lab - Experimentation in Software Energy Efficiency (ICSE)
The Green Lab - Experimentation in Software Energy Efficiency (ICSE)Giuseppe Procaccianti
 
HPC + Ai: Machine Learning Models in Scientific Computing
HPC + Ai: Machine Learning Models in Scientific ComputingHPC + Ai: Machine Learning Models in Scientific Computing
HPC + Ai: Machine Learning Models in Scientific Computinginside-BigData.com
 
Derivación y aplicación de un Modelo de Estimación de Costos para la Ingenier...
Derivación y aplicación de un Modelo de Estimación de Costos para la Ingenier...Derivación y aplicación de un Modelo de Estimación de Costos para la Ingenier...
Derivación y aplicación de un Modelo de Estimación de Costos para la Ingenier...Academia de Ingeniería de México
 

Ähnlich wie The Influence of the Java Collection Framework on Overall Energy Consumption (20)

jStanley: Placing a Green Thumb on Java Collections
jStanley: Placing a Green Thumb on  Java CollectionsjStanley: Placing a Green Thumb on  Java Collections
jStanley: Placing a Green Thumb on Java Collections
 
Locating Energy Hotspots in Source Code
Locating Energy Hotspots in Source CodeLocating Energy Hotspots in Source Code
Locating Energy Hotspots in Source Code
 
Green Computing as an Engineering Discipline
Green Computing as an Engineering DisciplineGreen Computing as an Engineering Discipline
Green Computing as an Engineering Discipline
 
Let's Talk a Bit About: Green Software
Let's Talk a Bit About: Green SoftwareLet's Talk a Bit About: Green Software
Let's Talk a Bit About: Green Software
 
HSO: A Hybrid Swarm Optimization Algorithm for Reducing Energy Consumption in...
HSO: A Hybrid Swarm Optimization Algorithm for Reducing Energy Consumption in...HSO: A Hybrid Swarm Optimization Algorithm for Reducing Energy Consumption in...
HSO: A Hybrid Swarm Optimization Algorithm for Reducing Energy Consumption in...
 
Knowledge Discovery in Environmental Management
Knowledge Discovery in Environmental Management Knowledge Discovery in Environmental Management
Knowledge Discovery in Environmental Management
 
2023comp90024_Spartan.pdf
2023comp90024_Spartan.pdf2023comp90024_Spartan.pdf
2023comp90024_Spartan.pdf
 
Implementing Workload Postponing In Cloudsim to Maximize Renewable Energy Uti...
Implementing Workload Postponing In Cloudsim to Maximize Renewable Energy Uti...Implementing Workload Postponing In Cloudsim to Maximize Renewable Energy Uti...
Implementing Workload Postponing In Cloudsim to Maximize Renewable Energy Uti...
 
Green indexes used in CAST to measure the energy consumption in code
Green indexes used in CAST to measure the energy consumption in codeGreen indexes used in CAST to measure the energy consumption in code
Green indexes used in CAST to measure the energy consumption in code
 
Green it
Green itGreen it
Green it
 
Harnessing deep learning algorithms to predict software refactoring
Harnessing deep learning algorithms to predict software refactoringHarnessing deep learning algorithms to predict software refactoring
Harnessing deep learning algorithms to predict software refactoring
 
Hassan - Condor _48_x_36
Hassan - Condor _48_x_36Hassan - Condor _48_x_36
Hassan - Condor _48_x_36
 
Towards a Green Ranking for Programming Languages
Towards a Green Ranking for Programming LanguagesTowards a Green Ranking for Programming Languages
Towards a Green Ranking for Programming Languages
 
JISC's Greening ICT Programme
JISC's Greening ICT ProgrammeJISC's Greening ICT Programme
JISC's Greening ICT Programme
 
Rob bristow sgl cardiff_2010
Rob bristow sgl cardiff_2010Rob bristow sgl cardiff_2010
Rob bristow sgl cardiff_2010
 
The Green Lab - Experimentation in Software Energy Efficiency (ICSE)
The Green Lab - Experimentation in Software Energy Efficiency (ICSE)The Green Lab - Experimentation in Software Energy Efficiency (ICSE)
The Green Lab - Experimentation in Software Energy Efficiency (ICSE)
 
B7 merlin
B7 merlinB7 merlin
B7 merlin
 
HPC + Ai: Machine Learning Models in Scientific Computing
HPC + Ai: Machine Learning Models in Scientific ComputingHPC + Ai: Machine Learning Models in Scientific Computing
HPC + Ai: Machine Learning Models in Scientific Computing
 
Energy Efficiency in Data Centers
Energy Efficiency in Data CentersEnergy Efficiency in Data Centers
Energy Efficiency in Data Centers
 
Derivación y aplicación de un Modelo de Estimación de Costos para la Ingenier...
Derivación y aplicación de un Modelo de Estimación de Costos para la Ingenier...Derivación y aplicación de un Modelo de Estimación de Costos para la Ingenier...
Derivación y aplicación de un Modelo de Estimación de Costos para la Ingenier...
 

Mehr von GreenLabAtDI

Products go Green: Worst-Case Energy Consumption in Software Product Lines
Products go Green: Worst-Case Energy Consumption in Software Product LinesProducts go Green: Worst-Case Energy Consumption in Software Product Lines
Products go Green: Worst-Case Energy Consumption in Software Product LinesGreenLabAtDI
 
Static Energy Prediction in Software: A Worst-Case Scenario Approach
Static Energy Prediction in Software: A Worst-Case Scenario ApproachStatic Energy Prediction in Software: A Worst-Case Scenario Approach
Static Energy Prediction in Software: A Worst-Case Scenario ApproachGreenLabAtDI
 
Haskell in Green Land: Analyzing the Energy Behavior of a Purely Functional L...
Haskell in Green Land: Analyzing the Energy Behavior of a Purely Functional L...Haskell in Green Land: Analyzing the Energy Behavior of a Purely Functional L...
Haskell in Green Land: Analyzing the Energy Behavior of a Purely Functional L...GreenLabAtDI
 
Green Software Lab
Green Software LabGreen Software Lab
Green Software LabGreenLabAtDI
 
GreenDroid: A Tool for Analysing Power Consumption in the Android Ecosystem
GreenDroid: A Tool for Analysing Power Consumption in the Android EcosystemGreenDroid: A Tool for Analysing Power Consumption in the Android Ecosystem
GreenDroid: A Tool for Analysing Power Consumption in the Android EcosystemGreenLabAtDI
 
Marco Couto's Msc Thesis Presentation
Marco Couto's Msc Thesis PresentationMarco Couto's Msc Thesis Presentation
Marco Couto's Msc Thesis PresentationGreenLabAtDI
 
Rui Pereira's PhD Pre-Thesis
Rui Pereira's PhD Pre-ThesisRui Pereira's PhD Pre-Thesis
Rui Pereira's PhD Pre-ThesisGreenLabAtDI
 
Detecting Anomalous Energy Consumption in Android Applications
Detecting Anomalous Energy Consumption in Android ApplicationsDetecting Anomalous Energy Consumption in Android Applications
Detecting Anomalous Energy Consumption in Android ApplicationsGreenLabAtDI
 
PresentationMeasuring and Visualizing Energy Consumption within Software Code
PresentationMeasuring and Visualizing Energy Consumption within Software CodePresentationMeasuring and Visualizing Energy Consumption within Software Code
PresentationMeasuring and Visualizing Energy Consumption within Software CodeGreenLabAtDI
 

Mehr von GreenLabAtDI (9)

Products go Green: Worst-Case Energy Consumption in Software Product Lines
Products go Green: Worst-Case Energy Consumption in Software Product LinesProducts go Green: Worst-Case Energy Consumption in Software Product Lines
Products go Green: Worst-Case Energy Consumption in Software Product Lines
 
Static Energy Prediction in Software: A Worst-Case Scenario Approach
Static Energy Prediction in Software: A Worst-Case Scenario ApproachStatic Energy Prediction in Software: A Worst-Case Scenario Approach
Static Energy Prediction in Software: A Worst-Case Scenario Approach
 
Haskell in Green Land: Analyzing the Energy Behavior of a Purely Functional L...
Haskell in Green Land: Analyzing the Energy Behavior of a Purely Functional L...Haskell in Green Land: Analyzing the Energy Behavior of a Purely Functional L...
Haskell in Green Land: Analyzing the Energy Behavior of a Purely Functional L...
 
Green Software Lab
Green Software LabGreen Software Lab
Green Software Lab
 
GreenDroid: A Tool for Analysing Power Consumption in the Android Ecosystem
GreenDroid: A Tool for Analysing Power Consumption in the Android EcosystemGreenDroid: A Tool for Analysing Power Consumption in the Android Ecosystem
GreenDroid: A Tool for Analysing Power Consumption in the Android Ecosystem
 
Marco Couto's Msc Thesis Presentation
Marco Couto's Msc Thesis PresentationMarco Couto's Msc Thesis Presentation
Marco Couto's Msc Thesis Presentation
 
Rui Pereira's PhD Pre-Thesis
Rui Pereira's PhD Pre-ThesisRui Pereira's PhD Pre-Thesis
Rui Pereira's PhD Pre-Thesis
 
Detecting Anomalous Energy Consumption in Android Applications
Detecting Anomalous Energy Consumption in Android ApplicationsDetecting Anomalous Energy Consumption in Android Applications
Detecting Anomalous Energy Consumption in Android Applications
 
PresentationMeasuring and Visualizing Energy Consumption within Software Code
PresentationMeasuring and Visualizing Energy Consumption within Software CodePresentationMeasuring and Visualizing Energy Consumption within Software Code
PresentationMeasuring and Visualizing Energy Consumption within Software Code
 

Kürzlich hochgeladen

Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfayushiqss
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...Nitya salvi
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyAnusha Are
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 

Kürzlich hochgeladen (20)

Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 

The Influence of the Java Collection Framework on Overall Energy Consumption

  • 1. The Influence of the Java Collection Framework on Overall Energy Consumption Rui Pereira*, Marco Couto*, Jácome Cunha§, João Paulo Fernandes‡, and João Saraiva* greenlab.di.uminho.pt * HASLab/INESC Tec, Universidade do Minho § NOVA LINCS, Universidade Nova de Lisboa ‡ RELEASE, Universidade da Beira Interior {ruipereira, mcouto, jas}@di.uminho.pt, jacome@fct.unl.pt, jpf@di.ubi.pt
  • 3. Global energy system is unsustainable greenlab.di.uminho.pt 3
  • 4. Green Computing  Caught the attention of many companies allowing them to save: greenlab.di.uminho.pt 4 “close to 50% of the energy costs of an organization can be attributed to the IT departments” - [PICMET, 2009] “up to 90% of energy used by ICT hardware can be attributed to software” - [The Greenhouse Gas Protocol Report, 2013]
  • 5. Green Software  Reducing energy consumption through software analysis and optimization  Problem:  How to analyze  How to interpret  How to improve greenlab.di.uminho.pt 5
  • 6. Green Software  Problems (extend to programmers):  How to analyze  How to interpret  How to improve greenlab.di.uminho.pt 6 Mining questions about software energy consumption - [MSR’14] Integrated energy-directed test suite optimization - [ISTA’14]
  • 7. Can we save energy by refactoring Java programs to use different data structure implementations? greenlab.di.uminho.pt 7
  • 8. Research Questions greenlab.di.uminho.pt 8  (RQ1) Can we define an energy consumption quantification of Java data structures and their methods?  (RQ2) Can we use such quantification to decrease the energy consumption of software systems?
  • 9. Towards a Ranking of Java data structures greenlab.di.uminho.pt 9 Design  Simple scenario of:  Storing  Retrieving  Deleting  String values
  • 10. greenlab.di.uminho.pt 10  Java Collections Framework (JCF) library ConcurrentSkipListSet ArrayList ConcurrentHashMap CopyOnWriteArraySet AttributeList ConcurrentSkipListMap HashSet CopyOnWriteArrayList HashMap LinkedHashSet LinkedList Hashtable TreeSet RoleList IdentityHashMap RoleUnresolvedList LinkedHashMap Stack Properties Vector SimpleBindings TreeMap UIDefaults WeakHashMap Sets Lists Maps Towards a Ranking of Java data structures Design – Data Structures
  • 11. greenlab.di.uminho.pt 11 add add clear addAll addAll containsKey clear add(index) containsValue contains addAll(index) entrySet containsAll clear get iterateAll contains iterateAll iterator containsAll keySet remove get put removeAll indexOf putAll retainAll iterator remove toArray lastIndexOf values listIterator listIterator(index) remove removeAll Continues… Sets Lists Maps Towards a Ranking of Java data structures Design - Methods
  • 12. greenlab.di.uminho.pt 12  Defined population sizes (popsize) of  25,000  250,000  1,000,000  When a second data structure is needed (i.e. addAll)  SecondaryCol = 10% of popsize  Half existing & half new (shuffled) Towards a Ranking of Java data structures Design - Benchmark
  • 13. greenlab.di.uminho.pt 13  Linux 3.13.0-74-generic OS  8GB Ram  Intel(R) Core(TM) i3-3240 CPU @ 3.40GHz  Java Interpreter/Compiler versions 1.8.0_66  RAPL/jRAPL Towards a Ranking of Java data structures Execution - Specifications
  • 14. greenlab.di.uminho.pt 14  Warm-up  Instantiated  Populated w/ popsize  Performed simple actions on the data structure  Each test x20  Extracted time/Joules consumed  Removed lowest/highest 20%  336 different test (Collection.method) configurations  6720 executions for each popsize  20,000+ different executions Towards a Ranking of Java data structures Execution – For every test
  • 15. greenlab.di.uminho.pt 15 Towards a Ranking of Java data structures Results (25k pop)
  • 19. Is faster, Greener?! greenlab.di.uminho.pt 19 Is slower, Greener?! Faster Slower
  • 20. Research Questions greenlab.di.uminho.pt 20  (RQ1) Can we define an energy consumption quantification of Java data structures and their methods?  (RQ2) Can we use such quantification to decrease the energy consumption of software systems?
  • 21. Optimizing Energy Consumption of Java Programs greenlab.di.uminho.pt 21 Methodology 1. Compute which implementations/methods are used in the programs 2. Look up the appropriate energy tables for the used implementations/methods 3. Choose the most energy efficient alternative
  • 22. Optimizing Energy Consumption of Java Programs greenlab.di.uminho.pt 22 Applying the methodology – Data acquisition  Obtained Java projects of a Journalism support platform  First year OO course  Collaborators, Journalists, Readers, Editors  Write chronicles and reports  Give likes and comments  Etc.  Average of  36 classes  104 methods  2000 lines of code
  • 23. Optimizing Energy Consumption of Java Programs greenlab.di.uminho.pt 23 Applying the methodology – Data acquisition  Obtained 7 test cases to simulate usage  Size varied vetween 2000-10000 for each test case/each entity  Chosen popsize – 25,000 (smallest)  Applied methodology on 5 projects  Detected usage of any JCF implementation  Detected which methods were used for each implementation  Chose the most efficient implementation for each project  Measured the changes before and after
  • 24. Optimizing Energy Consumption of Java Programs greenlab.di.uminho.pt 24 Applying the methodology – Example
  • 25. Optimizing Energy Consumption of Java Programs greenlab.di.uminho.pt 25 Applying the methodology – Results  Between 4.37% - 11.05%  Average of 6.2%
  • 26. FW + Conclusion greenlab.di.uminho.pt 26  Presented detailed study of the energy consumption of Sets, Lists, and Maps  Quantification of the energy spent by each method (RQ1 Answer)  Introduced a very simple methodology to optimize Java programs (RQ2 Answer)  Consider other object types (int, objects, etc.)  Implement an automatic refactoring plugin  Found @ our page: http://greenlab.di.uminho.pt/
  • 27. greenlab.di.uminho.pt 27 Portuguese National Science Foundation (FCT)  Starts July 2016  Grants available for young researchers  MSc  PhD  Postdoc  Universities:  University of Minho (Braga)  University of Beira Interior (Covilhã)  University of Porto (Porto)  New University of Lisbon (Lisbon)
  • 28. The Influence of the Java Collection Framework on Overall Energy Consumption Rui Pereira*, Marco Couto*, Jácome Cunha§, João Paulo Fernandes‡, and João Saraiva* greenlab.di.uminho.pt * HASLab/INESC Tec, Universidade do Minho § NOVA LINCS, Universidade Nova de Lisboa ‡ RELEASE, Universidade da Beira Interior {ruipereira, mcouto, jas}@di.uminho.pt, jacome@fct.unl.pt, jpf@di.ubi.pt

Hinweis der Redaktion

  1. Aware of the energy consumption problem, many times seeking help in resolving this, misconceptions within the programming community as to what causes highenergy consumption, how to solve them a heavy lack of support and knowledge for energy-aware development Even in software testing Image from [http://thevunderkind.com/new-to-coding-dont-know-how-to-pick-your-first-language-let-udacitys-infographic-help-you/]
  2. The most classical way is to separate Implement the interfaces Separation makes sense as each interface is used for distinct properties Elimiated: Job State Reasons (SET) IdentityHashMap (MAP)
  3. Provides analysis with multiple orders of magnituted. Learn how it scales also
  4. CopyOnWriteArraySet was discarded. Did not finish in reasonable amount of time.
  5. LinkedHashSet includes most of the efficient methods But we can also note it has the two most inefficient methods (addAll and containsAll)
  6. RoleUnresolved and AttributeList are the best. Interesting they both extend ArrayList which has less efficient methods, and quite different consumption values. LinkedList is by far the worse
  7. HashTable, LinkedHashMap, Properties contain the most efficient methods, with no red. Once again concurrent fails. Properties is generally used to store project configuration data/settings, yet produced very good results for this simple string value scenario