How much carbon is your server emitting?

Using Green Cost Explorer to understand emissions from AWS services

Guest

No items found.

Guest

November 1, 2019

How much carbon is your server emitting?

Using Green Cost Explorer to understand emissions from AWS services

Guest

No items found.

Guest

November 1, 2019

One place that is often overlooked when calculating carbon use is energy spend by compute infrastructure.

Last year, we wrote about how we went carbon neutral and re-affirmed our commitment to offset emissions. We calculated our footprint across many parts of Mapbox, from travel to powering our offices and all the way down to the nitty-gritty of lunch catering. We used various tools to add up our energy usage and carbon emissions (CO2e) and make savings where possible. In places where it wasn’t yet possible to make that change, we purchased equivalent carbon offsets and renewable energy credits.

This year we did all that, and also dug deeper into the energy use of our cloud computing infrastructure, most of which runs on AWS.

In collaboration with Chris Adams from the Green Web Foundation, we developed the Green Cost Explorer to better understand these emissions.

Sustainability on AWS Compute

AWS announced that it exceeded 50% renewable energy use in 2018 — powered by more than 100 renewable energy projects around the world. However, it is not yet 100% carbon-neutral. Amazon has committed to be 100% renewable-powered by 2030. (In contrast, Google Cloud runs on 100% renewable energy and Microsoft Azure has been carbon-neutral since 2012.)

Amazon renewable energy projects

AWS publishes the list of which data centers are 100% carbon-neutral by default. This is great — it means that any workload you run on those data centers will be carbon-offset. Mapbox compute runs currently in nine different AWS regions — some of which are fully carbon-neutral, some of which are not. Here you can see which regions are carbon-neutral:

The five AWS Regions with a green leaf are carbon-neutral. Source: awsgeek.com

Exploring green cost

Let’s dig into the numbers. AWS supplies us with a flat number of total carbon use across the whole account. However, we wanted more granular visibility into the spending to see which services were not running on sustainable data centers, and where we could save carbon.

Green vs. Grey (carbon-neutral vs not) cost summary for your AWS account. (Sample numbers)

Green Cost Explorer uses the AWS Cost Explorer API and data from AWS’s sustainability pages to get cost of each AWS product you use per region. You can then export the data in different formats to dig deeper in your setup.

Of course, cost is not a totally accurate indicator of carbon spend. However, in many cases, cost on AWS is calculated around compute unit utilization. So while the mapping may not be 1-to-1, it is a decent indicator of where your carbon-heavy hitters may lie.

Green vs. Grey (carbon-neutral vs not) cost breakdown for your AWS account. (Sample numbers)

What can you do?

Use green-cost-explorer to track “green cost” of your AWS workloads. You’ll gain more insight into where your grey cost is, and which services are driving it. You may be able to transfer some of your workloads into a different region to maximize your use of AWS’s sustainable regions! (But keep in mind that data transfer and network usage also cost energy and money, so make smart decisions based on locality of your users.) Check out green-cost-explorer on Github to explore your breakdown of sustainable vs not-sustainable spend.

Maximize your compute utilization by using containerised infrastructure. We run on Docker on AWS ECS to power our computing workloads. Read about how we switched to AWS ECS on Spot and saved money and energy in the process.

Learn more about sustainable tech. There are other ways you can green your tech stack. Check out Chris Adam’s talk on the topic to learn more.

Heading 1

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Heading 2

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Heading 3

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Heading 4

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Heading 5

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Heading 6

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

response = requests.get(

  "https://api.mapbox.com/v4/mapbox.temperature-raster-tileset/tilequery/40,-105.json",

    params={

        "layers": "temperature,wind_speed",

        "bands": "1708304400,1708311600",

    },

Optional caption
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque euismod maximus porta. Pellentesque vitae augue elit. Nam semper eros leo, nec hendrerit nunc aliquet quis. Morbi ac sapien tortor. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Curabitur porta imperdiet lorem, ut aliquet orci pellentesque quis. Donec magna augue, molestie aliquam enim eu, auctor feugiat metus."

Ordered list

  1. Item 1
  2. Item 2
  3. Item 3

Unordered list

  • Item A
  • Item B
  • Item C

Text link

Bold text

Emphasis

Superscript

Subscript

No items found.
No items found.

Related articles