avatarTanmay Deshpande

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

3970

Abstract

Source — <a href="https://ourworldindata.org/emissions-by-sector">https://ourworldindata.org/emissions-by-sector</a></figcaption></figure><p id="1f84">There are various sectors in which various efforts are being undertaken. As a result of this, the environmental impact of computing is also increasingly under scrutiny.</p><p id="8473">In this article, I will talk about the <b>Sustainable/Green Software Engineering discipline,</b> which talks about various ways we as Software Engineers can make energy use more efficient.</p><h1 id="f89c">Green/Sustainable Software Engineering</h1><p id="73e8" type="7">Green Software Engineering is an emerging discipline at the intersection of climate science, software practices, and architecture, electricity markets, hardware, and data center design.</p><p id="a918">There are 8 principles of <b>Green/Sustainable Software Engineering</b></p><div id="9008"><pre>Carbon: Build applications <span class="hljs-keyword">that</span> are carbon efficient</pre></div><div id="f7cc"><pre>Electricity: Build applications <span class="hljs-keyword">that</span> are energy efficient.</pre></div><div id="03c8"><pre>Carbon Intensity: Consume electricity <span class="hljs-keyword">with</span> <span class="hljs-keyword">the</span> lowest carbon intensity.</pre></div><div id="23cf"><pre>Embodied Carbon: Build applications <span class="hljs-keyword">that</span> are hardware efficient.</pre></div><div id="d045"><pre>Energy Proportionality: Maximize the energy efficiency <span class="hljs-keyword">of</span> hardware.</pre></div><div id="9213"><pre><span class="hljs-symbol">Networking:</span> Reduce the amount of <span class="hljs-meta">data</span> <span class="hljs-keyword">and</span> distance <span class="hljs-keyword">it</span> must travel across the network.</pre></div><div id="82df"><pre>Demand <span class="hljs-keyword">Shaping: </span><span class="hljs-keyword">Build </span>carbon-aware applications.</pre></div><div id="d2b5"><pre>Measurement & Optimization: Focus <span class="hljs-keyword">on</span> <span class="hljs-keyword">step</span>-<span class="hljs-keyword">by</span>-<span class="hljs-keyword">step</span> optimizations that increase the overall carbon efficiency.</pre></div><h1 id="fbc6">What should I exactly do?</h1><p id="e499">Here are some tips on how, we as software engineers, can contribute to this global cause.</p><ul><li>When using typical <b>data center-based application</b> deployments, there could be a possibility that the applications running in a data center might <b>not be utilizing the full capacity </b>of the infrastructure. Which means burning <b>more energy to do less work</b>. You can always keep a track of capacity vs. utilization to make the application run more carbon efficient. To achieve this, you will need special talent who can build & automate this. Another easier way is to build cloud-native applications. Most cloud providers provide SaaS, PaaS, Serverless services that internally run in a multi-tenant capacity and hence are more carbon efficient.</li><li>Keep in mind, that everything in the cloud is not always efficient. According to a <a href="https://www.parkmycloud.com/blog/overprovisioning/">report</a>, <b>overprovisioning & always-on resources lead to $26.6 Billion in public cloud waste expected in 2021.</b></li><li>Since the Cloud model works on pay-as-you-go, you can use various techniques like right-sizing, <a href="https://cloud.google.com/scheduler/docs/start-and-stop-compute-engine-instances-on-a-schedule">scheduled shut-downs</a>, etc.</li><li>Various cloud service providers have provided services to give details of usage and recommendations for downsizing. For example, Google Cloud provides a service called <a href="https://cloud.google.com/recommender">Recommender</a> to optimize the cloud resources.</li><li>There are companies like <a href="https://www.turbonomic.com/solutions/optimize-public-cloud/">Turbonomic</a>, whic

Options

h also provides service to showcase utilization and recommend the re-sizing.</li><li>In order to improve the <b>energy utilization of your apps, you need to measure it as well</b>. This <a href="https://devblogs.microsoft.com/sustainable-software/how-to-measure-the-power-consumption-of-your-frontend-application/">article</a> suggests the use of tools like <a href="https://mobile-efficiency-index.com/">Mobile Efficiency Index,</a> <a href="https://developers.google.com/web/tools/lighthouse">LightHouse</a> to understand the performance and energy utilization of your applications.</li></ul><figure id="0536"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*geRD0vzp9EnZW3KXeRfwpQ.png"><figcaption>Mobile Efficiency Index Report run on Medium.com</figcaption></figure><figure id="4d09"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*VCiR3Hnw7UPddI8DAptvMA.png"><figcaption>Lighthouse report run on Medium.com</figcaption></figure><ul><li>Similar techniques you can find in <a href="https://devblogs.microsoft.com/sustainable-software/how-to-measure-the-power-consumption-of-your-backend-service/">this article</a>, which talks about understanding the energy utilization of the backend application.</li><li>Main consumers of the power in a typical server will be CPU, GPU, Memory. Many sidecar proxies like <a href="https://www.envoyproxy.io/">EnvoyProxy</a>, <a href="https://dapr.io/">Dapr</a> these days allow you to keep track of CPU, Memory utilization. Based on which region and time the servers are running you can surely be able to track the utilization and can infer the energy consumption based on that.</li><li>One very important point is, <b>the process of manufacturing a device emits more carbon than once it is in use</b>. Hence you need to think about ways to build applications that can run on older hardware as well.</li><li>Many organizations these days are also thinking of extending the device lifecycle by year. It means instead of scrapping the laptops in 4 years, you can extend the use for another year and improve the hardware utilization.</li><li>We need to give attention to the networking side of software development as well. The less data needs to travel the less it impacts the carbon emission. Hence techniques like using <b>browser caching</b>, <b>data compressions</b>, use of <b>Content Delivery Networks(</b>CDN) can improve the efficient utilization of the networks.</li><li>You can also think about building apps in <a href="https://principles.green/principles/demand-shaping/">Eco Mode</a> where the app provides similar functionality but less fancy and using an energy-efficient backend.</li><li>You can also check out some libraries like (<a href="http://powerapi.org/">PowerAPI</a>, <a href="https://software.intel.com/content/www/us/en/develop/articles/intel-power-gadget.html">Intel PowerGadge</a>t, etc.), which can help calculate energy utilization in real-time.</li></ul><h1 id="ba46">Conclusion</h1><p id="f2b0">The topic is very interesting and there is growing interest in this movement. If you have been working on something similar then feel free to share in the comments section.</p><h1 id="b8d6">References</h1><ul><li><a href="https://principles.green/p">https://principles.green/</a></li><li><a href="https://devblogs.microsoft.com/sustainable-software">https://devblogs.microsoft.com/sustainable-software</a></li><li><a href="https://asim.dev/articles/climate-change-101/">https://asim.dev/articles/climate-change-101/</a></li></ul><figure id="710d"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/0*F4OCHorZd1xrxzMP.png"><figcaption></figcaption></figure><h1 id="e449">Hey, if you enjoyed this story, check out Medium Membership! Just $5/month!</h1><p id="9699"><i>Your membership fee directly supports me and other writers you read. You’ll also get full access to every story on Medium.</i></p><h1 id="e609">Become a Medium Member Now!</h1></article></body>

Climate Change Combat Guide For Software Engineers

Climate Science, Software Practices, Data Center Design, etc.

Photo by Mika Baumeister on Unsplash

Climate Change

The article — Take the Green pill and I’ll show you how deep the rabbit hole goes gives in-depth insights into climate change. I really like the introduction piece where it says —

Weather is what you see outside every day, it’s changing pretty often.

Climate is the average change in weather over a long period, it changes slowly.

What we are seeing is the climate changing over time, it’s currently 1 degree hotter on average than pre-industrial times and that has a lot of people worried.

Now if you want to understand the impact of temperature increase by 1.5/2 degrees, I suggest you take a look at this website.

Source — https://interactive.carbonbrief.org/impacts-climate-change-one-point-five-degrees-two-degrees/#

And it is not just about sea level rises, it impacts many other things like Rainfall, Drought, Storms, Health and Economy

Source — https://interactive.carbonbrief.org/impacts-climate-change-one-point-five-degrees-two-degrees/#

Now you must be wondering, what are we doing about this?

The Paris Agreement

The Paris Agreement is a legally binding international treaty on climate change.

The goal of the Paris Agreement is to limit global warming to well below 2, preferably to 1.5 degrees Celsius, when compared to pre-industrial levels.

To achieve this temperature goal, countries are planning to reduce the global emission of greenhouse gases as soon as possible to achieve a climate-neutral world by mid-century.

The following chart shows the greenhouse gas emissions by sector. If you look carefully, 24.2% of greenhouse emissions are contributed by Energy used in industry.

Source — https://ourworldindata.org/emissions-by-sector

There are various sectors in which various efforts are being undertaken. As a result of this, the environmental impact of computing is also increasingly under scrutiny.

In this article, I will talk about the Sustainable/Green Software Engineering discipline, which talks about various ways we as Software Engineers can make energy use more efficient.

Green/Sustainable Software Engineering

Green Software Engineering is an emerging discipline at the intersection of climate science, software practices, and architecture, electricity markets, hardware, and data center design.

There are 8 principles of Green/Sustainable Software Engineering

Carbon: Build applications that are carbon efficient
Electricity: Build applications that are energy efficient.
Carbon Intensity: Consume electricity with the lowest carbon intensity.
Embodied Carbon: Build applications that are hardware efficient.
Energy Proportionality: Maximize the energy efficiency of hardware.
Networking: Reduce the amount of data and distance it must travel across the network.
Demand Shaping: Build carbon-aware applications.
Measurement & Optimization: Focus on step-by-step optimizations that increase the overall carbon efficiency.

What should I exactly do?

Here are some tips on how, we as software engineers, can contribute to this global cause.

  • When using typical data center-based application deployments, there could be a possibility that the applications running in a data center might not be utilizing the full capacity of the infrastructure. Which means burning more energy to do less work. You can always keep a track of capacity vs. utilization to make the application run more carbon efficient. To achieve this, you will need special talent who can build & automate this. Another easier way is to build cloud-native applications. Most cloud providers provide SaaS, PaaS, Serverless services that internally run in a multi-tenant capacity and hence are more carbon efficient.
  • Keep in mind, that everything in the cloud is not always efficient. According to a report, overprovisioning & always-on resources lead to $26.6 Billion in public cloud waste expected in 2021.
  • Since the Cloud model works on pay-as-you-go, you can use various techniques like right-sizing, scheduled shut-downs, etc.
  • Various cloud service providers have provided services to give details of usage and recommendations for downsizing. For example, Google Cloud provides a service called Recommender to optimize the cloud resources.
  • There are companies like Turbonomic, which also provides service to showcase utilization and recommend the re-sizing.
  • In order to improve the energy utilization of your apps, you need to measure it as well. This article suggests the use of tools like Mobile Efficiency Index, LightHouse to understand the performance and energy utilization of your applications.
Mobile Efficiency Index Report run on Medium.com
Lighthouse report run on Medium.com
  • Similar techniques you can find in this article, which talks about understanding the energy utilization of the backend application.
  • Main consumers of the power in a typical server will be CPU, GPU, Memory. Many sidecar proxies like EnvoyProxy, Dapr these days allow you to keep track of CPU, Memory utilization. Based on which region and time the servers are running you can surely be able to track the utilization and can infer the energy consumption based on that.
  • One very important point is, the process of manufacturing a device emits more carbon than once it is in use. Hence you need to think about ways to build applications that can run on older hardware as well.
  • Many organizations these days are also thinking of extending the device lifecycle by year. It means instead of scrapping the laptops in 4 years, you can extend the use for another year and improve the hardware utilization.
  • We need to give attention to the networking side of software development as well. The less data needs to travel the less it impacts the carbon emission. Hence techniques like using browser caching, data compressions, use of Content Delivery Networks(CDN) can improve the efficient utilization of the networks.
  • You can also think about building apps in Eco Mode where the app provides similar functionality but less fancy and using an energy-efficient backend.
  • You can also check out some libraries like (PowerAPI, Intel PowerGadget, etc.), which can help calculate energy utilization in real-time.

Conclusion

The topic is very interesting and there is growing interest in this movement. If you have been working on something similar then feel free to share in the comments section.

References

Hey, if you enjoyed this story, check out Medium Membership! Just $5/month!

Your membership fee directly supports me and other writers you read. You’ll also get full access to every story on Medium.

Become a Medium Member Now!

Software Development
Programming
Technology
Climate Change
Software Engineering
Recommended from ReadMedium