Cost of Living the Cloud Life: Fossil fuel consumption as a service

Author Shane Nolan

Last updated 24 May, 2023

6 mins read

Cost of Living the Cloud Life: Fossil fuel consumption as a service.

The word “cloud” in the term cloud computing can give us a false sense of security about the toll that it takes on our environment. The word makes it all sound so abstract and metaphysical that you can be forgiven for not realizing that every single byte of code is actually a series of zeros and ones stored on tiny pieces of magnetized metal embedded on the surface of a disk inside a hard drive.

This hard drive is likely stored inside a server located in one of the countless server farms located all over the world. These server farms are basically supercomputer sweatshops, millions of machines stacked on top of each other, all connected by cables and working 24 hours a day, 365 days a year. The infrastructure and logistics required just to download a picture of a cat or google if Jurassic Park is based on a true story, are equally impressive and frightening.

Cloud Costs

Actual Google results

Google has reported that it spends an average of about 0.0003 kWh of energy per search query, that’s about the same amount of energy to power a 60W light bulb for 17 seconds. This translates to roughly 0.2g of carbon dioxide.

If we conservatively estimate that 40,000 searches occur per second, that would be equivalent to 12 kWh of energy, enough to run a ceiling fan continuously for a month. The end result is that a single data center consumes more energy per year than 20,000 homes. That’s a single data center.

As an environmentally conscious user of the cloud, you need to be aware of the environmental consequences of using these services.

TL;DR Infographic

Cloud Cost comparisons.

Location, location, location

A state-owned energy company in Sweden (Vattenfall) compiled a report which showed that some data centers such as those in Scandinavia emit only 3 grams of CO2 per kilowatt-hour of electricity due to their integration of hydroelectricity, however, they estimate that data centers around the world emit much more than this, from Paris (100g/kWh) to Virginia (600g/kWh) to Tianjin in China where it is estimated that 1000 grams of C02 are emitted for every kilowatt-hour.

gC02eq/kWh refers to the grams of carbon dioxide equivalent per kilowatt-hour of electricity generated. When choosing an EC2 type and location you should be aware of its potential carbon footprint.

That c4.4xlarge instance you deployed in ap-south-1 and left running overnight? You just increased your carbon footprint by 2566 grams.

Left it running for a week? You may as well have just burned a 10 kg bag of coal.

Putting EC2 under the microscope

Similar to AWS Cost Explorer forecasts, we’ve made some educated guesses but the following figures should be taken with a grain of salt. AWS has managed to abstract away a lot of the details of their managed services, however, EC2 exposes enough information that the Teads engineering team has developed a tool for estimating carbon emissions resulting from cloud usage.

T2 instances

Designed for general purpose usage but capable of rising above their baseline performance and coping with a higher workload, T2 instances include eight forms of instance sizes ranging from nano to 2xlarge. The carbon emissions of using a medium T2 instance for 12 hours using 10.7 watts at 50% load is 70.3 gCo2e. At 100% it is comparable to driving for one km in a standard four-door car which releases 120gCO2 per km. You better hope you caught that infinite loop before it makes it to production.

M4 instances

Great for memory-intensive tasks, and often seen as a logical choice for medium to large enterprises, an extra-large m4 instance can use between 133 to 455 Watts per hour (a modern fridge freezer averages about 250 Watts an hour) with an estimated carbon footprint of 164.5 gCO₂eq.

X1 instances

Large-size enterprises that require high computational resourcing are well served by the capabilities of an X1 instance. Especially for large-scale and in-memory applications, X1 leads the way. However, even while sitting idle it uses an estimated 480 Watts an hour (that’s the same as playing a PS5 for an hour and a half, or running a washing machine for just over an hour). That leads to a carbon emission of 499.1 gCO₂eq.

EC2 Carbon Footprint

Reverse engineering your EC2 bill

Quick math

Using this tool, if we take all 23 variations of the T2, M4 and X1 instance types and the average watts used from running those instances for an hour at 50% capacity in all 16 of the primary regions, we can provide a rough estimate of the resulting carbon footprint by comparing it to traveling by commercial jet.

We will make the following assumptions:

  • In the US, the average cost of a kWh per hour is 12 cents
  • The energy produced by the average commercial jet during a transatlantic flight is roughly 71428 kWh which equates to 85kg to 90kg of CO2 per hour
  • The average commercial jet travels at 500 mph
  • The average energy consumption of an EC2 instance is 0.14 kWh

Given these figures, we can make the following projections about your EC2 bill:

EC2 bill compared with co2 from flying.

So that $20 bill wouldn’t get you to the end of the runway at JFK.

The $10,000 bill would be a trip from LA to Dublin.

The $2,000,000 bill would get you halfway to the moon, just ask Jeff Bezos.

AWS Carbon Footprint Tool

AWS has taken measures to mitigate and minimize these carbon emissions. Particularly through the use of renewable green energy. They even have an AWS service where you can monitor your carbon footprint. Right now it doesn’t give us much detail and is not much to look at, outside of a date filter with a simple pie chart and table. The services seem to be limited to EC2 and S3 with everything else grouped under Other. The UI is similar to Cost Explorer, so again should be observed with some degree of skepticism.

The carbon emissions summary shows your estimated emissions and the estimated emissions savings – which are broken down by how much was saved from using renewable energy and how much was saved simply from using managed services over a self-hosted solution.

Carbon emission from AWS EC2
Carbon Footprint tool

Conclusion

Don’t lose sleep just yet. Yes the world is warming and yes the atmosphere is slowly being poisoned, but it doesn’t have to be because of something you’re doing. Renewable energy will continue to gain popularity, as Europe (and indeed the rest of the world) make better choices such as reducing dependency on Russian fossil fuels. We will see more adoption of solar, wind, hydroelectric power and other innovative energy solutions.

As an AWS customer, you can take simple steps to reduce your carbon footprint. Make sure code goes through a peer-review process to ensure it performs as efficiently as possible. Remember to make conservative choices when choosing EC2 instances; only use what is required – pick the least powerful instance type that will meet your requirements. Configure auto-scaling to scale as necessary (as opposed to having multiple instances always on). Monitor your instance’s performance and shut them down when not in use. The action listed above will also help you save some $$$ on your EC2 bill.

Even as an internet user you can do simple things to reduce your carbon footprint – stream videos in a lower resolution on YouTube, send fewer photos on WhatsApp, post shorter videos on Instagram, and don’t waste so much time on pointless Google searches (No, Jurassic Park is not based on a true story).

Thank you to the team at Teads engineering
for providing the tool and underlying algorithms used to gather this information.

And thank you to the team at datacenters.com
for explaining the fundamentals of electricity in such a clear and concise manner.

Finally thank you to Charlotte Freitag et al
for their valuable insights into the current and projected climate impact of the entire ICT sector.

Author Shane Nolan
Software engineer by day, writer by night. When he’s not writing regular expressions or blogging about cloud computing, Shane can be found wandering mountaintops in Ireland.

Manage, track, and report your AWS spending in seconds — not hours

CloudForecast’s focused daily AWS cost monitoring reports to help busy engineering teams understand their AWS costs, rapidly respond to any overspends, and promote opportunities to save costs.

Monitor & Manage AWS Cost in Seconds — Not Hours

CloudForecast makes the tedious work of AWS cost monitoring less tedious.

AWS cost management is easy with CloudForecast

We would love to learn more about the problems you are facing around AWS cost. Connect with us directly and we’ll schedule a time to chat!

AWS daily cost reports