logo

2022-11-23 Agile Testing Days

Title: Why do we need an environmental footprint for software?
Date: 2022-11-23
Location: Potsdam, Germany
Speaker: @Max Schulze

Presentation

Recording

โšก
There is no recording available for this speaking engagement.

Photos

โšก
There is no recording available for this speaking engagement.

Speech

Sustainability

When we started SDIA 3 years ago, the word 'sustainability' was not in vogue and I had to start every presentation with a definition. And today? Again, I'll start this presentation with a definition because it's used so often that it has lost clarity and meaning. It's actually not just about sustainability itself, but about the sustainable development of our society and economy - so a development that balances the needs of the environment, society, the economy and leaves the world for the next generation as we found it . The English original "Sustainable Development" was defined in 1987 by the Brundlandt Commission. This also includes the Sustainable Development Goals, which I am sure youโ€™ve spotted already.

What does this mean for the SDIA Community and the larger IT community?

It means that we also have to deal with how we can develop our sector sustainably and chart a path which enables us to "digitalize more" without negative environmental and social effects.

Itโ€™s difficult to really get a feel for the size of todayโ€™s negative impact from IT, so what do we do?

First measure. But how do you measure the environmental impact of software applications, of a shared service? Of a website? Of a google search? It is possible. And to explain how, you need to follow me on a bit of journey.

When I started software development 15 years ago, the IT world looked like this:

An application sitting on a server which is used by someone The server is in a data center which I know and the network is connecting the user/application and the data center

Then every 2-3 years a new abstraction layer was introduced

And the application is moving further and further away from the actual infrastructure First virtualization Then containerization and current hot shit: serverless
Ironic that serverless but still runs on a server

And then came the complete abstraction of IT infrastructure: cloud infrastructure

Now I don't even know which data center I'm actually in. And the illusion is complete: I can use infinite resources for my software.

And now we're trying to measure the the environmental impact of the physical infrastructure of the application?

Thatโ€™s very complex - itโ€™s much more feasible if we simplify our model, our approach.

So what does a simplified model look like?

I know that every IT person is about to throw a beer bottle at me, but come with me for a moment. Digital infrastructure produces resources. The next layer knows or makes these resources available to one or more applications. The application consumes these resources to provide a product or service to users. The model can be applied to almost anything - digital infrastructure can be a smartphone or laptop, the resource allocation then makes the operating system for the application(s) currently running in parallel. But it can also be a data center with 10 servers that are virtualized.

The key in this model is the idea of the digital resource

Because software does not exist in physical space, it cannot have any environmental impact. However, the creation of the resources that the software consumes may very well have an environmental impact. In the end, a computer does nothing other than convert raw materials and electricity into computing power, into digital resources. So whatever materials and electricity are being used, thatโ€™s where the environmental impact stems from.

So if I can assign an environmental impact to each resource and know how many resources an application consumes

Then it suddenly becomes much easier to measure and determine how much environmental impact is hidden in a software application. And with the idea of digital resources, transparency can be created across the entire value chain: how well the produced resources are utilized, amount of waste, and the environmental impact of each resource

OK, we can measure it, but what does the path to sustainable development of the digital sector look like now?

Let's clarify the responsibilities first. Who is actually responsible for the environmental impact? The user is responsible for sensible use. You shouldn't drive your car in circles, even if it's running on green electricity. The manufacturers of software and digital products are responsible for making the consumption of resources and the associated environmental impact transparent to the user and minimizing them. Digital resources should also be procured from sources with minimal or no environmental impact. When allocating resources, waste of resources should be avoided or idle time reduced. And digital infrastructure must generate sustainable resources and make the environmental impact of each resource transparent.

If the responsibilities are clear, we can create the tools and the transparency that enable the sustainable development of digital economy and digitization

and that's what we're working on with our SDIA community.

Letโ€™s translate this to what this means for testing. Thatโ€™s tests lead to an improvement in maintainability and quality of software is nothing new for you.

But we asked: can we use integration test to measure the environmental impact of software are doing the development process?

And thanks for the German environmental agency. We got some funding to explore this question.

But we need to narrow the scope so we asked again whatโ€™s the most systemic component of software, the very high test coverage? And it wonโ€™t surprise you that we ended up with open source, software, the libraries and components which are the key ingredients for most modern software and digital products.

So we build a test laboratory based on GitLab to measure the energy use and environmental impact of integration and unit tests

And before you ask, no, this does not allow for the comparison, but it gives developers very clear feedback on the additional environmental cost of edit functionality, or in the other direction, the savings from removing functionality, or refactoring a piece of software.

To do this we pioneered a new non-root based methodology using mathematics as well as full support for IPMI/RAPL

Our tooling can be used in any test execution pipeline

Community is slowly bringing it to more test environment such as get up. If you want to help or play with it yourself hit me up afterwards or join our community - itโ€™s free.
SHARE
content