You can not avoid it! — measuring the energy consumption of software systems has become essential

Green Technologies

Measuring the consumption of software systems is becoming increasingly important for industries. Software systems accounted for 6% of the world’s energy in 2019, surpassing civil aviation for gas emissions.

Governments and European administrations must consider software energy consumption when selecting products to reduce the ecological impact. Thus, it becomes essential to measure the energy consumption of its system to sell it and reduce its impact.

laws-20241120-193141.png

As the urgency to address this issue grows, the literature reveals numerous studies investigating solutions for energy-efficient software applications. For instance, research has been conducted on the energy efficiency of monolithic versus microservice architecture, as well as the effect of interface technologies, such as REST and WebSockets, on energy consumption.

However, these studies provide valuable insights into energy-efficient practices but are often limited by their focus on small-scale applications, which may not apply to larger, more complex systems. Additionally, they tend to overlook the specific technologies and workflows used in organizations like Berger-Levrault thereby reducing their relevance

We so define a novel approach that allows Berger-Levrault to measure the consumption of our system in development and deploy to better grasp where the energy is used.

How to analyze the energy consumption of your software?

By discussing this with the Dynatrace company, we discovered that they have developed the Carbon Impact module. Dynatrace includes an analyzer that reports the consumption of a VM every hour. This solution makes it possible to measure the consumption of different scenarios.

To do so, we designed an approach that provides a thorough, balanced evaluation of energy efficiency across application versions through a four-step process.

  1. Identifying workloads. We first identify a scenario that can be played on a version of the application. To ensure real-world relevance, we derive these workloads from functional test cases that reflect typical end-user interactions.
  2. Executing large workload sizes. Then, we execute the scenario with varying parameters, such as
    the number of users or the number of iterations. To do so, one can use tools such as Neoload. We do not need to stress too much about the VM to get results.

  3. Collecting performance metrics. We collect the results using Dynatrace. Then we export the result in CSV-like files.

  4. Comparing energy consumption. Once we have collected the result for a run, we can import the data into data analysis tools such as Excel and perform comparisons. It allows us to measure the consumption of the workload with multiple scenarios. It is also possible to update the code and investigate if different design choices can lead to clear differences in energy consumption.

Modernizing applications for better energy consumption

Berger-Levrault is moving to the SaaS system with only web applications. Before, applications were also sometimes hosted by Berger-Levrault (or sub-servers of our customers) and users accessed the JavaSwing application with the Citrix system.

We explored many scenarios: idling servers, small and large scenarios with more and more customers at the same time iterating on the scenario. Our approach allows us to measure that moving to new technology reduces the energy consumption of our system up to 4 times.

Looking at the WeMagnus software use case

The efforts we are doing to reduce the carbon footprint of Berger-Levrault solutions, including the SaaS software WeMagnus, is manifold. In fact, we’re not targeting just one area for improvement, but all possible areas, from design to production. For the application itself, this concerns: the servers used to host the application, the sizing of the machines, the communication protocols between our servers and our customers’ computers, the code architecture and the code itself. By optimizing the application at every level, right from the design stage, we obtain an application that consumes very little energy and that can be continually improved. To this end, we have already adopted tools for monitoring and alerting on the consumption of our software, enabling us to track the evolution of its energy demand over time.

And now?

This project demonstrates the effectiveness of the proposed approach and provides valuable insights into the energy consumption of different design solutions. However, several promising avenues for future research could expand the scope of this work, including:

  • Integrating the measure earlier in the development to have it accessible at development time.
  • Investigate the code to propose an automatic update making the code greener

  • Exploring more on the measurement: how to consider the consumption of computers required to develop the system, how to consider the services used by our application that also consume energy?

More ...

Scroll to Top