[kcdc 2022] calculating your cloud co2e emissions

Speaker: Joel Lord @joel__lord

For more, see the table of contents

Code impact

  • data centers 2% global electricity demand and 3% greenhouse gasses
  • equivalent to irline ndustry
  • planet has SLO – limit to what we can put in it
  • Car 192g/km
  • Domestic fight 255g/km
  • SMS .014g
  • Email 3g [I googled why high. It can be. .3 to 26 depending on how long to read/write]
  • Tweet .2g
  • Googe search .2g
  • Fart – .2g

Factors

  • CPU/GPU – GPU use more energy, but can perform for consistently – 12.4/38.2
  • RAM – always used so more RAM you have, the more energy used – .3 per GB hour
  • DIsk storage – .002 – per GB hour
  • Network Transfer .027 – per GB
  • Other (cooling, lighting, etc)

Formula includes

  • Time
  • PUE (power usage efficiency) – AWS 1.2, GCP 1.1, Azure (1.125). Only GCP publishes number. Others found somewhere. By contast, average is 1.67 including private data farms
  • CI (carbon intensity) – region specific depending on source of power. NY 200g/kWh, Australlia (lots of coal) 880g/kWH, Quebec 14g/kWh
  • Server tier – CPU, RAM, hard drive
  • Utilization – ex: Atlas CLI/management API
  • M30 on US East 1 for 24 hours – 401g CO2e (72K farts)
  • https://github.com/joellord/atlas-co2

Notes

  • GCP has a carbon footprint dashboard to get bar charts with info for your services
  • Reduce energy using
  • Return only top results
  • Llower default quality
  • Don’t autoplay video
  • Use dark mode – less energy for dark pixels
  • Package size matters – use JAM (JavaScript, APIs and markup) stack
  • Derver rendered pages
  • Reduce complexity – data access together should be stored together
  • Green programming language – C, Rust, C++, Java, C#, JS best. TypeScript, PHP, Ruby, Python worse
  • Migrate to the public cloud – they try to reduce costs by saving energy
  • Serverless or autoscaling
  • Cloud region matters – 80x differences
  • Latency may be ok and then can use smaller nodes
  • Pause servers when not in use – ex: weekend
  • Better monitoring – can go to lower tier if needed
  • Leerage XaaS solutions – (anything as a service)
  • Use right tool – ex: do you need a database

My take

A lot of the beginning was about the impacts of climate change. I feel like the audience knew this part and would have liked to get to the part sooner. The comparisons were good and number of farts were fun. I would have liked more examples of the numbers. The end on things you can do was good.

Leave a Reply

Your email address will not be published. Required fields are marked *