Green Software Lab

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.

Rui Pereira receives silver medal in ACM Student Research Competition at ICSE 2017

Rui Pereira, a doctoral student of HASLab, reached the second place in the ACM Student Research Competition at ICSE 2017, with the article “Locating energy hotspots in source code”.
The article entitled “Locating energy hotspots in source code”, which was initially submitted in the form of a long abstract paper, was presented in a second evaluation phase in poster form at the 39th International Conference on Software Engineering, one of the most important conferences in the field of Software Engineering, and it was carried out under the project GSL – Green Software Laboratory, a national project financed by FCT.

In this evaluation phase, along with nine other candidates, Rui Pereira made a small public presentation and exhibition of the poster during a special session of the same conference, before a jury composed of five ICSE and ACM members. Only four researchers advanced to the final phase of the competition.

In the third and final phase, with a research talk at ICSE, Rui Pereira achieved the second place in the competition, losing the first place to a researcher from Carnegie Mellon University, and prior Apple researcher. In this phase, three were awarded a medal.

The next round will be in the Grand Final of the ACM Research Competition, where all medalists participate in the ACM Student Research Competition. This round will be during the ACM Awards Banquet an event where, as a general rule, the Turing Award is presented, that is, a prize awarded by ACM to a person who contributed significantly to the area of Computing.

It is important to mention that this competition, sponsored by Microsoft, offers a unique forum for undergraduate and graduate students to present their original research before a panel of judges and attendees at well-known ACM-sponsored and co-sponsored conferences.

This edition of ICSE was held in Buenos Aires, Argentina, from May 20 to 28 and has an annual membership of approximately 1600 participants.

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.

Marco Couto talk @ InfoBlender, Universidade do Minho, May 10th

Please find below the detailed program.
Date & Location: Wednesday, May 10th, 2017, at DI, Gualtar campus, Braga.
Coffee Session: 13h30 -14h, Sala de Estar, 4th Floor.
Talk Session: 14h -14h30, Auditório A2, firstfloor.
Speakers. Marco Couto, HASLabINESC TEC & Minho University.
Title. Static Energy Consumption Analysis in Software: The Worst-Case Scenario
Abstract. Energy consumption is becoming an evident concern to software developers. While programming languages provide several compiler optimizations, memory profiler tools, benchmark and time execution monitoring frameworks, there are no equivalent tools/frameworks to profile/optimize energy consumption.This is even more notorious due to the propagation of mobile devices. Such propagation of devices is also influencing software development: a software system is now developed as a set of similar products sharing common features. This talk will focus on explaining how energy consumption analysis can be performed in software in a very challenging and promising manner: statically, without execution. Moreover, a case study will be used to better explain how to achieve this, while showing the speaker’s ongoing work in the area.

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.

Rui Pereira talk @ InfoBlender, Universidade do Minho, March 29th

Please find below the detailed program.
Date & Location: Wednesday, March 29th, 2017, at DI, Gualtar campus, Braga.
Coffee Session: 13h30 -14h, Sala de Estar, 4th Floor.
Talk Session: 14h -14h30, Auditório A1, ground floor.
Speakers. Rui Pereira, HASLabINESC TEC & Minho University.
Title. Green Computing as an Engineering Discipline.
Abstract. While in the previous century computer users were mainly looking for fast computer software, this is nowadays changing with the advent of powerful mobile devices, like laptops, tablets and smartphones. In our mobile-device age, one of the main computing bottlenecks is energy consumption. This growing concern on energy efficiency may also be associated with the perspective of software developers. Unfortunately, developing energy-aware software is still a difficult task. While programming languages provide several compiler optimizations, memory profiler tools, benchmark and time execution monitoring frameworks, there are no equivalent tools/frameworks to profile/optimize energy consumption.
This talk is focused on introducing the motivation behind green software and briefly showing some challenges faced in researching this topic. The talk will also touch on several misconceptions in this research area, while also showcasing several of the speaker’s concluded and ongoing research.

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.