<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Olivier Bierlaire on Medium]]></title>
        <description><![CDATA[Stories by Olivier Bierlaire on Medium]]></description>
        <link>https://medium.com/@obierlaire?source=rss-26e93016cb1b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*K3rhsfvja-BB-H4E.jpg</url>
            <title>Stories by Olivier Bierlaire on Medium</title>
            <link>https://medium.com/@obierlaire?source=rss-26e93016cb1b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 10:09:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@obierlaire/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Carbon Aware Cloud]]></title>
            <link>https://medium.com/@obierlaire/carbon-aware-cloud-eb32daa747cd?source=rss-26e93016cb1b------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb32daa747cd</guid>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[greenhouse-gas-emissions]]></category>
            <category><![CDATA[carbon-footprint]]></category>
            <category><![CDATA[infrastructure-as-code]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Olivier Bierlaire]]></dc:creator>
            <pubDate>Tue, 07 Mar 2023 13:51:55 GMT</pubDate>
            <atom:updated>2023-03-07T13:51:55.937Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-sa/4.0/</cc:license>
            <content:encoded><![CDATA[<p>Microsoft recently <a href="https://news.xbox.com/en-us/2023/01/11/xbox-carbon-aware-console-sustainability/">announced</a> that Xbox will now be “Carbon Aware”. It will download updates during periods of low carbon intensity on the power grid.</p><p>Can we imagine doing the same for cloud infrastructure? Can we imagine a carbon-aware cloud? Public cloud providers are constantly improving their environmental impact by, for example, saving water or building solar plants. However, the virtual machines we spin up or the computing tasks we trigger are completely up to us. And there is room for improvement.</p><h3>What is the problem with data centres?</h3><p>According to the <a href="https://www.iea.org/reports/data-centres-and-data-transmission-networks">International Energy Agency</a>, data centres consume between 220 and 320 terawatt-hours (TWh) of electricity, which is around one per cent of the world’s electricity demand in 2021. Data centres account for around 0.3% of all global CO2 emissions. While this number may seem small, it can be compared to the total emissions of countries like <a href="https://www.climatewatchdata.org/ghg-emissions?breakBy=countries&amp;chartType=line&amp;end_year=2019&amp;gases=co2&amp;regions=AUS%2CFRA%2CGBR%2CDEU&amp;sectors=total-including-lucf&amp;start_year=1990">France, the UK or Australia</a>!</p><p>Projections published by <a href="https://www.nature.com/articles/d41586-018-06610-y">Nature</a> suggest that the electricity demand of Information and Communications Technology (ICT) will jump to 20% of global electricity. To put this in perspective, ICT currently has the same carbon footprint as the aviation industry, and data centres account for 20% of it according to the <a href="https://theshiftproject.org/en/article/lean-ict-our-new-report/">Shift Project</a>. This share is only expected to grow!</p><figure><img alt="Energy Forecast of Information and Communication Technology (ICT) will accelerate in 2020s and that data centres will take a larger slice: 20.9% of projected electricity demand — Nature" src="https://cdn-images-1.medium.com/max/1024/1*LIKFGtdJRtmUEvUe3XHOTA.png" /><figcaption>Source: <a href="https://www.nature.com/articles/d41586-018-06610-y">Nature</a></figcaption></figure><figure><img alt="Distribution of energy consumption per source for the production and use of digital devices in 2017. Data centers : 19% [Source: The Shift Project 2018, as of Andrae &amp; Edler 2015]" src="https://cdn-images-1.medium.com/max/538/1*1cJt7CiHEUGJlIBzdsOLew.png" /></figure><h3>First, measure your cloud carbon footprint</h3><p>There are tools available to analyse the carbon footprint of your cloud infrastructure. Major public cloud providers have released tools for this purpose:</p><ul><li>AWS <a href="https://aws.amazon.com/aws-cost-management/aws-customer-carbon-footprint-tool/">Carbon Footprint Tool</a></li><li>Google Cloud <a href="https://cloud.google.com/carbon-footprint">Carbon Footprint</a></li><li>Microsoft Azure <a href="https://azure.microsoft.com/en-gb/blog/microsoft-sustainability-calculator-helps-enterprises-analyze-the-carbon-emissions-of-their-it-infrastructure/">Sustainability Calculator</a></li></ul><p>Various open-source initiatives, like <a href="https://www.cloudcarbonfootprint.org/docs/methodology/#appendix-iii-gpus-and-minmax-watts">Cloud Carbon Footprint</a>, can analyse your cloud provider bill, get resource usage, and estimate carbon emissions.</p><p>Other tools, like <a href="https://hubblo-org.github.io/scaphandre-documentation/index.html">Scaphandre</a>, rely on monitoring agents to measure the electric consumption of your machines.</p><p>There are many methodologies to estimate the power consumption of your cloud resources. Basically, if you know the underlying models of the CPU, memory, disk, or GPU, you need to multiply it by their usage per cent over time, and you will have the power consumption in kilowatt-hours (kWh).</p><p>Having power consumption is the most difficult part. Once you have it, there are various methods to estimate CO2 emissions from it.</p><figure><img alt="Formula : SCI = ((E * I) + M) per R" src="https://cdn-images-1.medium.com/max/1024/1*P5L8ZncWB_rpxGDDXDCr3Q.png" /><figcaption>SCI formula — <a href="https://learn.greensoftware.foundation/measurement#the-sci-equation">Green Software Foundation</a></figcaption></figure><p>The key part is multiplying your power consumption (E) by the carbon intensity of the electricity consumed (I).</p><p>But, what’s the carbon intensity of the electricity? Cloud providers might provide some net value, taking into account their effort to offset carbon (basically net-zero according to <a href="https://cloud.google.com/sustainability/region-carbon">Google</a>), but realistically electricity used by data centres comes from the regional grid. So, depending on where the data centre is located, electricity can be more or less “clean”:</p><figure><img alt="Carbon Intensity per Country in 2022" src="https://cdn-images-1.medium.com/max/1024/1*qiPfZvwThMwQtfZWfuNVJQ.png" /><figcaption>Source : OurWorldData.org/energy</figcaption></figure><p>We can even get a real-time value from projects like <a href="https://app.electricitymaps.com/map">Electricity Maps</a></p><figure><img alt="Screenshot of Electricity Map showing Carbon emissions of electricity per country in realtime" src="https://cdn-images-1.medium.com/max/1024/1*Z7IJRbmCul9sESFkb_iFVw.png" /><figcaption><a href="https://app.electricitymaps.com/map">Electricity Maps</a></figcaption></figure><h3>Then, reduce your cloud carbon footprint</h3><p>Once you know how to measure your carbon footprint, it’s time to take action! The first thing that comes to mind is making software more energy efficient. However, on the infrastructure level, some choices can be made.</p><h3>Move to an Hyperscaler provider</h3><p>Moving to a <a href="https://www.gartner.com/en/newsroom/press-releases/2022-01-24-gartner-predicts-hyperscalers-carbon-emissions-will-drive-cloud-purchase-decsions-by-2025">hyperscaler</a> cloud provider can have a significant impact. Public cloud providers, such as AWS, GCP, and Azure, are constantly working to lower energy bills by improving water cooling, among other things.</p><h3>Choose your region wisely</h3><p>According to <a href="https://cloud.google.com/sustainability/region-carbon">Google</a>, hosting in Paris can result in a carbon footprint as low as 59 gCO2eq/kWh, while in Frankfurt it can jump to 269. By choosing a “greener” region in the same neighbourhood, the impact on carbon footprint can be massive!</p><figure><img alt="Worlmap showing “Spatial Shifting” of servers being moved from a region to a greener one" src="https://cdn-images-1.medium.com/max/1024/1*PoqIkPIoFkWEquRaeUfF5Q.png" /><figcaption>Spatial Shifting —<a href="https://learn.greensoftware.foundation/carbon-awareness#spatial-shifting"> Green Software Foundation</a></figcaption></figure><h3>Follow the sun</h3><p>Carbon intensity varies a lot during the day because of renewable energy which depends on weather conditions. During a windless night, carbon intensity is worse than during a windy and sunny day!</p><figure><img alt="Graph showing energy mix emtting 120 gCO2/kWh then later 350" src="https://cdn-images-1.medium.com/max/1024/1*BQ-H6YWkGcljjyiHXPiYCA.png" /><figcaption>Variability of Carbon intensity over time — <a href="https://learn.greensoftware.foundation/carbon-awareness#variability-of-carbon-intensity">Green Software Foundation</a></figcaption></figure><p>Scheduling a heavy task, like machine learning, where it’s daylight can be a powerful way to reduce the carbon footprint of asynchronous tasks.</p><h3>Leverage Infrastructure as Code (IaC)</h3><p>Infrastructure as Code (IaC) tools like <a href="https://www.terraform.io/">Terraform</a> enable infrastructure automation. Your infrastructure is described in a machine-readable file, which can be analysed and generated (templates, variables). Changing the region of your infrastructure could be as simple as changing the value of a variable.</p><p>By reading these Terraform files, tools like <a href="https://github.com/carboniferio/carbonifer">Carbonifer</a> can compute the size and number of virtual machines in your infrastructure and estimate the carbon footprint in gCO2eq/h.</p><figure><img alt="Screenshot of Carbonifer tool which reads Terraform files and estimate carbon emissions of this infrastructure if deployed" src="https://cdn-images-1.medium.com/max/1005/1*Y1-UJI2Sg2PkJxUwr1xDaQ.png" /><figcaption>Carbonifer estimation of carbon emission of Terraform project — <a href="http://carbonifer.io/">Carbonifer</a></figcaption></figure><p>Integrating such a tool with your Continuous Integration (CI) could raise alerts when you reach a threshold of CO2 emission estimation for any planned changes to your infrastructure (thanks to GitOps).</p><h3>Accept a loss of quality</h3><p>There is virtually no limit to the performance of your software, regardless of the cost of money. Having more and bigger machines can ensure customer satisfaction with features like Ultra HD streaming and instant responsiveness. However, during a dark, cold winter when electricity relies on fossil fuels, it may not make sense to prioritise these features. Cloud companies could reduce their quality of service slightly to remain within their climate commitments. Tools could be developed to resize “autoscaling groups” when the carbon intensity of the cloud is high.</p><h3>Carbon Aware Cloud</h3><p>Although there is not yet a fully integrated solution for a carbon-aware cloud, various tools, automation and methodologies can help in the following ways:</p><ul><li><strong>Estimate</strong> the CO2 emissions of a deployment</li><li><strong>Analyse</strong> the Carbon Footprint of an existing infrastructure</li><li>actively <strong>pilot</strong> your infrastructure according to the carbon intensity of the grid</li></ul><p>By changing the hosting region, selecting a better time of day, or accepting a lower quality and automating these actions, there are ways to reduce our cloud carbon footprint.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb32daa747cd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OPSoletes?]]></title>
            <link>https://medium.com/@obierlaire/opsoletes-b5ccbadc9ac2?source=rss-26e93016cb1b------2</link>
            <guid isPermaLink="false">https://medium.com/p/b5ccbadc9ac2</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[noops]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[autoscaling]]></category>
            <dc:creator><![CDATA[Olivier Bierlaire]]></dc:creator>
            <pubDate>Tue, 07 Feb 2017 14:20:12 GMT</pubDate>
            <atom:updated>2017-02-07T14:20:12.614Z</atom:updated>
            <content:encoded><![CDATA[<p>I was at first developer. One day the guy in charge of the infrastructure/ops resigned and my boss asked me to take over his duty. Well… The handover was basically me asking dumb questions like “What the hell is SystemD?”, “Why do you want me to use docker?”, “Amazon? The bookstore?”… Again, I was a dev guy…<br>Once he left, I still had no idea of what needed to be done in order to <em>host</em> our brand new web application. I learned.</p><p>One day, we asked a AWS expert to came over and he taught me how to deploy an entire AWS EC2 infrastructure in few hours. He showed me how cool are AutoScaling Groups and Cloud-init/Userdata. And we started a new infrastructure, from scratch, with only 3 basic concepts:</p><ul><li><strong>User-data/Cloud-init</strong>: when you spin a new Instance up in the cloud, you can add a little script. That script (user-data or cloud-init) is executed as soon as the machine is up. You can use it in order to set up your Linux server, install packages, get your code and run it!</li></ul><pre>#!/bin/bash</pre><pre># Install NodeJS<br>curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -<br>sudo apt-get install -y nodejs</pre><pre># Install git<br>sudo apt-get install -y git</pre><pre># Get our code<br>git archive --format=tar --remote=https://login:pass@github.com/mycompany/myproject.git HEAD | tar xf -</pre><pre># Run the app<br>cd myproject<br>npm start</pre><ul><li><strong>AutoScaling group (ASG)</strong>: even if you don’t need to “Auto-scale”, that is an elegant way to manage your machine(s). Imagine you have an API server, you need 3 instances in order to be highly available. Well you just tell your ASG to start 3 machines (using userdata to set up and run your api server). You need 4: scale-it to 4 in one click. Then a machine dies (memory full, etc), it will automatically replace it! You need to upgrade, no problem, once you have updated your ASG (a new Launch configuration actually), you can kill one instance: it will be replaced by the new one with your new version! yay! Rolling upgrade!</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BEjp9Pgf9SmaIGL_JjMDEg.png" /></figure><ul><li><strong>Elastic Load Balancer</strong>: in order to have one public endpoint you can place an Elastic Load Balancer in front of your Autoscaling Group. It will also perform health checks for helping your ASG replacing unhealthy instances. Done: you have a single public endpoint!</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F9gvj5enoIEMA_M-0_2QVA.png" /></figure><p>Seriously, the AWS consultant helped my workmates and I to set this up in one afternoon. <strong>One afternoon</strong>. You don’t need more to have a robust infrastructure. No need to have a multi-year experienced Ops background.</p><p>Of course we also needed databases, a file storage, etc. The key is <strong><em>Managed Services</em></strong>. Cloud provider like Amazon or Google can provide it in one click. No need to take care of backup, logs, patch, etc. They will manage it for you.</p><p>By the end of the day, even if I was the <em>Designated Ops Survivor</em>, the entire dev team was able to deploy a new version of our code on our servers, on a real robust, highly available infrastructure, <strong>auto-managed by the team</strong>.</p><p>My job as OPS expert became actually more exploring new techs rather than dealing with daily issues like backups, patches, installing new versions of our app, etc.</p><p>That’s why I’m thinking Sysadmins, OPS, etc as a thing of the past. Some companies will probably still need some, Amazon need some in order to offer us a nice sparkling AWS Cloud! But if you are a start-up, creating a web application as a lot of us, you don’t need to deal with linux patches. You need to focus on your business. With Cloud providers and a DevOps oriented organisation: an infrastructure can be managed by the dev team. You can use the leverage of the Iaas (infrastructure as service) without the burden of sysadmin daily duties.</p><p>Ops are OPSolete?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b5ccbadc9ac2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>