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>