Green Software Lab

GSL members win Best Paper Award @ CIbSE’18

The article “Using Automatic Refactoring to Improve Energy Efficiency of Android Apps“, authored by Luis Cruz and Rui Abreu, was awarded the Best Paper Award at CIbSE’18.

The ever-growing popularity of mobile phones has brought additional challenges to the software development lifecycle. Mobile applications (apps, for short) ought to provide the same set of features as conventional software, with limited resources: such as, limited processing capabilities, storage, screen and, not less important, power source. Although energy efficiency is a valuable requirement, developers often lack knowledge of best practices. In this paper, we study whether or not automatic refactoring can aid developers ship energy efficient apps. We leverage a tool, Leafactor, with five energy code smells that tend to go unnoticed. We use Leafactor to analyze code smells in 140 free and open source apps. As a result, we detected and fixed code smells in 45 apps, from which 40% have successfully merged our changes into the official repository.

New Paper Accepted @ GREENS’18

Helping developers write energy efficient Haskell through a data-structure evaluation – Gilberto Melfe, Alcides Fonseca, João Paulo Fernandes

How a program is written has implications in the energy consump- tion of the running system, with economical and environmental consequences.

In this context, understanding the energy consumption of opera- tions on data-structures is crucial when optimizing software to exe- cute under power constricted environments. Existing studies have not focused on the di erent components of energy consumption that processors expose, rather considering the global consumption.

To understand the relationship between CPU and memory energy consumptions with execution time, we instrument a microbench- mark suite to collect such values, and we analyze the results.

Our benchmark suite is comprised of 16 implementations of functional sequences, collections and associative collections while measuring detailed energy and time metrics. We further investi- gate the energy consumption impact of using di erent compilation optimizations.

We have concluded that energy consumption is directly proportional to execution time. Additionally, DRAM and Package energy consumptions are directly proportional, with the DRAM representing between 15 and 31% of the total energy consumption. Finally, we also conclude that optimizations can have both a positive or a negative impact on energy consumption. 

 

 

GSL members win Best Paper Award @ SBLP’17

The article “Towards a Green Ranking for Programming Languages”, authored by HASLab/INESC TEC & UMinho researchers Marco Couto, Rui Pereira, Francisco Ribeiro, Rui Rua and João Saraiva, was awarded the Best Paper Award at SBLP 2017.

In this work, the researchers analysed and compared the energy efficiency of various programming languages. More specifically, this award-winning research used a set of benchmarking programs and problems in 10 different programming languages in order to compare the energy efficiency of each. In a second phase, the execution time data of the programs was collected, in order to try to understand the relation between energy consumption and execution time.

Finally, while the obtained results showed that the C language is, unsurprisingly, the most efficient language in terms of both energy consumption and performance, the study also showed languages which are slower than others yet consume less energy. It should be noted that execution time and energy consumption vary in different and not directly related ways, since some languages are more efficient in some cases and less in others. Therefore, this study will allow not only the optimisation of energy consumption, but also the optimisation of the execution time of each program.

The 21st Brazilian Symposium on Programming Languages (SBLP 2017) took place on the 21st and 22nd of September, in Fortaleza, Brazil, and is one of the conferences that compose the Brazilian Conference on Software (CBSOFT).

New Paper Accepted @ SLE’17

Energy Efficiency across Programming Languages: How does energy, time, and memory relate? – Rui Pereira, Marco Couto, Francisco Ribeiro, Rui Rua, Jácome Cunha, João Paulo Fernandes, João Saraiva

This paper presents a study of the runtime, memory usage and energy consumption of twenty seven well-known software languages. We monitor the performance of such languages using ten different programming problems, expressed in each of the languages. Our results show interesting findings, such as, slower/faster languages consuming less/more energy, and how memory usage influences energy consumption. We show how to use our results to provide software engineers support to decide which language to use when
energy efficiency is a concern.

New Paper Accepted @ SBLP’17

Towards a Green Ranking for Programming Languages – Marco Couto, Rui Pereira, Francisco Ribeiro, Rui Rua, João Saraiva

While in the past the primary goal to optimize software was the run time optimization, nowadays there is a growing awareness of the need to reduce energy consumption. Additionally, a growing number of developers wish to become more energy-aware when programming and feel a lack of tools and the knowledge to do so.
In this paper we define a ranking of energy efficiency in programming languages. We consider a set of computing problems implemented in ten well-known programming languages, and monitored the energy consumed when executing each langauge. Our preliminary results show that although the fastest languages tend to be the lowest consuming ones, there are other interesting cases where slower languages are more energy efficient than faster ones.

New paper accepted @ SPLC’17

 

Products go Green: Worst-Case Energy Consumption in Software Product Lines -Marco Couto, Rui Pereira, Paulo Borba, Jácome Cunha, João Paulo Fernandes and João Saraiva

The optimization of software to be (more) energy efficient is becoming a major concern for the software industry. Although several techniques have been presented to measure energy consumption for software, none has addressed software product lines (SPLs). Thus, to measure energy consumption of a SPL, the products must be generated and measured individually, which is too costly.

In this paper, we present a technique and a prototype tool to statically estimate the worst case energy consumption for SPL. The goal is to provide software developers with techniques and tools to reason about the energy consumption of all products in a line, without having to produce, run and measure the energy in every combination.

Our technique combines classic static program analysis techniques and worst case execution time prediction with energy consumption analysis. This technique analyses all products in a feature-sensitive manner, that is, a feature used in several products is analyzed only once, while the energy consumption is estimated once per product.

We implemented our technique in a tool called Serapis. We did a preliminary evaluation using a realistic product line for image processing implemented in C. Our experiments considered 7 products from such line and our initial results show that the tool was able to estimate the worst-case energy consumption with a mean error percentage of 9.4% and standard deviation of 6.2% when compared with the energy measured when running the products.

New Paper Accepted @ ICEE’17

An Economic Energy Approach For Queries On Data Centers – João Saraiva, Miguel Guimarães, Orlando Belo

Energy consumption is an issue that involves all of us, both as individuals and as members of a society, and covers all our areas of activity. It is something so broad that its impact has important reflections on our social, cultural and financial structures. The domain of software, and in particular database systems, is not an exception. Although it seems to be a little bit strange to study the energy consumption of just one query, when we consider the execution of a a few thousand queries per second, quickly we see the importance of the querying consumption in the monthly account of any company that has a conventional data center.

To demonstrate the energy consumption of queries in data centers, we idealized a small dashboard for monitoring and analyzing the sales of a company, and implemented all the queries needed for populating it and ensuring its operation. The queries were organized into two groups, oriented especially to two distinct database management systems: one relational (MySQL) and one non relational (Neo4J).

The goal is to evaluate the energy consumption of different types of queries, and at the same time compare it in terms of relational and non-relational database approaches. This paper relates the process we implemented to set up the energy consumption application scenario, measure the energy consumption of each query, and present our first preliminary results.

New Paper Accepted @ MobileSoft’17 (Tool Demo)

Leafactor: Improving Energy Efficiency of Android Apps via Automatic Refactoring – Luis Cru, Rui Abreu and Jean-Nöel Rouvignac

Leafactor is a tool to automatically improve the energy consumption of Android apps. It does so by refactoring the source code to follow a set of patterns known to be energy efficient. The toolset was validated using 222 refactorings in 140 open-source apps. Changes were submitted to the original apps by creating pull requests to the official projects.

New Paper Accepted @ MobileSoft’17

Performance-based Guidelines for Energy Efficient Mobile Applications – Luís Cruz and Rui Abreu

Mobile and wearable devices are nowadays the de facto personal computers, while desktop computers are becoming less popular. Therefore, it is important for companies to deliver efficient mobile applications. As an example, Google has published a set of best practices to optimize the performance of Android applications. However, these guidelines fall short to address energy consumption. As mobile software applications operate in resource-constrained environments, guidelines to build energy efficient applications are of utmost importance. In this paper, we studied whether or not eight best performance-based practices have an impact on the energy consumed by Android applications. In an experimental study with six popular mobile applications, we observed that the battery of the mobile device can last up to approximately an extra hour if the applications are developed with energy-aware practices. This work paves the way for a set of guidelines for energy-aware automatic refactoring techniques.

New Paper Accepted @ ICSE’17

Invited paper for the Poster Track at ICSE 2017.

Helping Programmers Improve the Energy Efficiency of Source Code – Rui Pereira, Tiago Carção, Marco Couto, Jácome Cunha, João Paulo Fernandes, João Saraiva

This paper briefly proposes a technique to detect energy inefficient fragments in the source code of a software system. Test cases are executed to obtain energy consumption measurements, and a statistical method, based on spectrum-based fault localization, is introduced to relate energy consumption to the system’s source code. The result of our technique is an energy ranking of source code fragments pointing developers to possible energy leaks in their code.

 

Pages:12