Table of contents
1.
Introduction
2.
Principles of Sustainable Software Development
2.1.
Carbon
2.2.
Electricity
2.3.
Carbon intensity
2.3.1.
Carbon intensity variability
2.3.2.
Marginal carbon intensity
2.3.3.
Demand shifting
2.4.
Embodied carbon
2.5.
Energy proportionality
2.5.1.
Static power draw
2.5.2.
Clock speed
2.6.
Network efficiency
2.7.
Demand shaping
2.7.1.
Carbon-awareness
2.7.2.
Eco-mode
2.8.
Optimization
2.8.1.
Carbon
2.8.2.
Energy
2.8.3.
Cost
2.8.4.
Networking
2.8.5.
Performance
3.
Frequently Asked Questions
3.1.
How does software affect the environment?
3.2.
Is there a limit to clock speed?
3.3.
How is static power draw measured?
4.
Conclusion
Last Updated: Mar 27, 2024

Overview of Sustainable Software Engineering

Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction

At the nexus of climate science, software, hardware, power markets, and data centre architecture is an emerging field called sustainable Software Engineering. A core set of capabilities known as sustainable software engineering concepts and philosophies must be possessed to define, create, and maintain sustainable software applications. A Sustainable Software Engineer (SSE) may make decisions that significantly reduce the carbon pollution of their applications by combining this expertise.

Source

The philosophies that guide sustainable software development are:

  • Everyone can contribute to the solution to the climate crisis since nothing occurs in a vacuum, everything is interconnected, and even modest adjustments may have a significant impact. Climate change is everyone’s responsibility.
    Sustainable Software Engineers think everyone can contribute to the fight against global warming. Engineering software sustainably is inclusive. You can always do something to make a difference, no matter the area, industry, function, or technology.
  • Sustainability is sufficient to justify our work: We know there are numerous benefits to developing sustainable apps as sustainable software engineers. They are nearly always more affordable, frequently more effective, and often more durable. However, sustainability is the main benefit of our practice of sustainable software engineering; everything else is a bonus.

 

Now let’s discuss the principles that guide sustainable software development.

Principles of Sustainable Software Development

Carbon

A natural occurrence, greenhouse gases (GHG) operate as a blanket to raise the Earth's temperature. However, due to human activity, the temperature is increasing far more quickly than plants and animals can adjust. This has led to what most scientists call the Climate Crisis.

GHGs come in a wide variety. Carbon dioxide is the most prevalent GHG released by human activities (CO2). We standardise all GHG quantities to carbon dioxide equivalent to simplify computations (CO2eq). For instance, we can normalise methane to 25 tonnes of CO2eq since one tonne of methane has the same warming impact as about 25 tonnes of CO2.

By 2100, the temperature increase should stabilise at 1.5°C over pre-industrial levels, according to the UN IPCC's aim, which 195 states agreed to and confirmed in the Paris Climate Agreement. Decreasing the amount of carbon in the atmosphere is the first step to achieving net-zero carbon emission. This can only be done with the development of carbon-efficient technologies. This is where sustainable software development comes in. It is the goal of sustainable software development to create more carbon-efficient products.

Electricity

Unlike what popular conceptions suggest, electricity is not more eco-friendly than carbon. While carbon has a direct and visible impact on climate change, electricity also adversely affects the environment. Most electricity is produced in coal plants by burning fossil fuels anyway, so the effect of carbon and electricity is almost the same.

The principle of sustainable software development states that developers must try to build applications that are energy efficient.

Carbon intensity

The amount of carbon (CO2eq) emissions generated per kilowatt-hour of used power is called the carbon intensity of electricity. It is measured in gCO2eq/kWh, or grammes of carbon per kilowatt-hour. Sustainable software development seeks to minimise the carbon intensity of the programs it makes. To do that, we have to keep in mind some variables that affect carbon intensity.

Carbon intensity variability

Since certain locations have an energy mix that contains more clean energy sources than other places, carbon intensity varies by location.

Due to the erratic nature of renewable energy, carbon intensity also fluctuates over time. Since more of the power in your mix comes from sources that produce carbon, for instance, carbon intensity rises when it's gloomy, or the wind isn't blowing.

Marginal carbon intensity

If the population is consuming more than usual energy, marginal power plants are used to increase the production of power temporarily. These power plants are usually fossil-fueled since renewable energy can’t regulate its output.

The marginal plant emits carbon, and at any one time, we know both the carbon intensity of the energy mix in the grid as well as the carbon intensity of the energy that would need to be brought online to satisfy increased demand. This is called the marginal carbon intensity.

Demand shifting

Electrical grid systems currently don't have a lot of storage or buffering. Normally, enough power is generated to keep up with demand. When all available storage alternatives are filled, and there is excess renewable energy production beyond what is required to meet demand, we curtail that clean energy. Demand shifting is one way to do this. It involves moving workloads to times and places where there is greater availability of renewable energy.

Embodied carbon

The quantity of carbon pollution released during the manufacture and disposal of a device is known as embedded carbon (also known as "Embedded Carbon"). Include both the carbon pollution created by running the computer and the carbon in the machine itself when determining the overall amount of carbon pollution produced by the computers running your program. The embedded carbon cost of a gadget may be higher than the carbon cost of the electricity powering it, depending on the carbon intensity of your energy mix.

Sustainable software development tries to lower the embodied carbon amount by increasing the lifespan of the product.

Source

Energy proportionality

The pace at which beneficial work is completed in a computer system is measured by energy proportionality. It is considered to be energy proportional if the overall power use is proportionate to the computer's usage. Energy efficiency in an energy proportional system is constant, meaning that it does not change depending on usage.

Hardware's energy efficiency, however, varies with time. Context dictates how it changes. A hardware device may be non-linear, which indicates that the connection between power and usage is not proportional due to the intricate interactions of several separate components.

In most modern devices, the energy proportionality is non-linear. A device becomes better at turning power into meaningful computing operations the more you use it. The most energy-efficient use of your servers is to run as little work as possible on as many of them as possible.

Source

There are several factors that you need to consider as a sustainable software developer to make the energy proportionality as close to linear as possible.

Static power draw

Even at 100% usage, a computer still uses power when idle. This is called the static power draw. All hardware components have some static power demand, albeit the amount varies depending on setup and component. One of the reasons PCs, laptops, and mobile devices have power-saving modes accessible is the potential power consumption. The device will ultimately enter a hibernation mode, put the screen and disc to sleep, and even adjust the CPU frequency if it is left inactive. The trade-offs associated with these power-saving settings include a delayed startup when the device wakes up.

Clock speed

The operating speed of a computer or its microprocessor is measured in cycles per second and is known as clock speed. Consumer electronics frequently employ dynamic clock speed adjustment to increase energy proportionality. The clock speed of a computer indicates how quickly it can carry out commands.

Microprocessor energy efficiency varies with clock speed; high clock rates are frequently less energy-efficient than low clock rates.

Network efficiency

Switches, routers, and servers make up a network. Every piece of hardware in a network uses electricity and contains carbon.

When you transfer data over the internet, which is just a vast network, it passes via a variety of networked devices, each of which uses power. Any data you send or receive online, therefore, releases carbon.

The amount of carbon released by the network depends on a variety of factors:

  • The amount of data
  • The number of network devices the data hops between
  • The network devices' energy efficiency
  • The distance travelled by the data
  • The network protocol
  • The carbon intensity of the energy near the devices

 

All of these factors must be considered to create network-efficient sustainable software.

Demand shaping

Demand shaping the strategy of shaping our demand such that it is high when the available renewable electricity is high, and thus the carbon intensity is low, and low when the available renewable electricity is scarce. So, if the supply of sustainable resources is high, increase its demand and decrease the demand if the supply is low.

Source

This can usually be done in two ways:

Carbon-awareness

There will come the point when being carbon-efficient is not enough to get to net-zero emissions. At that time, we can make the device carbon-aware. In cases when the carbon intensity is high, the behaviour of the device would change. It would shape itself to use less carbon, either automatically or by user input.

Eco-mode

Eco-modes are often utilised in everyday life, such as in vehicles and washing machines.

When turned on, their performance improves because they need less fuel or power to complete the same activity. We make compromises because it's not free (otherwise, we'd always use eco-modes). Eco-modes are nearly always offered to a user as an option since it's a trade-off, and the user determines if they want to go with it and accept the tradeoffs.

Read more, Data Structure

Optimization

Sustainability involves hundreds of optimizations, not just one. One piece of advice is to approach things methodically and from beginning to end. Understanding the whole stack—from user experience to data centre design or electrical grids—often results in straightforward fixes that vastly increase carbon efficiency.

Compare the possible benefits of decarbonisation with the work involved. Some industries will be more difficult to decarbonise than others, similar to the larger global environmental movement. Some application sectors in computing will be more challenging to decarbonise than others. It will be harder to decarbonise some components of your application architecture than others.

The secret to optimization success is selecting a measurement criterion that will provide crystal-clear indications about where to focus optimization efforts.

Carbon

With some work, it is possible to quantify the amount of carbon released into the atmosphere, despite the fact that some components of the stack must be guessed rather than measured.

The overall amount of carbon emitted may vary based on the time of day or location the program is executed due to the variety of carbon intensity and other variables.

Different quantities of carbon will be produced by the same application when measured at various periods. This change might be noise if you are concentrating on energy improvements, but it could also be a helpful signal if you are open to workloads that move with demand.

Energy

Every time your program runs, the amount of energy it uses changes. You could want to use this variation as a sign for improvement, or you might want to control it.

Due to variations in energy efficiency across hardware components, the same program running on various hardware may consume varying amounts of energy. Since the hardware is used differently between the two runs, the same program running on the same hardware at different times may result in different quantities of energy being spent due to the energy proportionality principle. In other words, the hardware's total energy efficiency may alter since it may be executing different programs during the second run.

In general, however, developing applications with less power consumption for the same human-perceptible performance and output is a suitable substitute for cutting carbon emissions.

Cost

Most services eventually take into account the price of hardware and power. A good indicator of apps that release less carbon is often to build them to run as inexpensively as feasible.

Networking

Most often, the carbon cost of networking is overlooked. Networking is a stand-in for carbon since it uses hardware and consumes power.

A good way to cut carbon emissions is to measure the length and distance your data must travel and then minimise it.

Performance

Applications that use hardware and power more effectively are those that are built with higher performance.

The ability to construct an application that performs better for the same usage level would probably reduce overall carbon, as hardware and power are proxies for carbon.

Refer to know about :  What is debugging

Frequently Asked Questions

How does software affect the environment?

IT hardware's resource efficiency and how long it is used are both significantly influenced by software. Depending on how they are written, programs that perform the same job might consume vastly different amounts of energy.

Is there a limit to clock speed?

Yes, most consumer-grade devices have an upper limit of 5 GHz that hasn’t been surpassed yet despite years of research by CPU makers. Dedicated overclockers use liquid nitrogen cooling systems to force these chips to clock at 9 GHz, but prolonged usage in this state is dangerous for the chip’s longevity.

How is static power draw measured?

Simply applying a static (DC) input signal prevents switching so that we can quantify the static power draw. This is equivalent to a high (VDD) or low (ground) at the input for digital circuits, which normally switches off one side of the circuit and stops any static short circuit current from flowing through the transistors.

Conclusion

This article discusses sustainable software engineering, the philosophies that inspired it and the principles that guide it.

Refer to our guided paths on Coding Ninjas Studio to upskill yourself in Data Structures and AlgorithmsCompetitive ProgrammingJavaScriptSystem Design, and many more! If you want to test your competency in coding, you may check out the mock test series and participate in the contests hosted on Coding Ninjas Studio! But if you have just started your learning process and looking for questions asked by tech giants like Amazon, Microsoft, Uber, etc; you must have a look at the problemsinterview experiences, and interview bundle for placement preparations.

Nevertheless, you may consider our paid courses to give your career an edge over others!

Do upvote our blogs if you find them helpful and engaging!

Happy Learning!

Live masterclass