[MUSIC]
Hello and good afternoon at CAS Communication Camp 2023.
It's day two.
The stage is Bitz and Boimer.
As you can probably see, I'm an old guy.
And for me, if I hear green IT, I think of IBM mainframe terminals,
the green light from the terminal, glowing flickering.
And so when I saw this talk, I said, "Oh yeah, this is about old machinery and old computers and old terminals."
And they're like, "Oh no, actually it's about environmental impact of IT."
So before I blame myself any further, because I have no clue and our speaker is way more well versed in knowing all of this,
this is Fooled by the Website Carbon Calculator, green coding and measuring the environmental impacts of IT.
Please welcome with a very warm round of applause Roberta.
[APPLAUSE]
Hi everyone. Thank you very much.
Welcome to my talk, Fooled by the Website Carbon Calculator.
And when I think of green IT, I think of the environmental impacts of IT.
And this is also what this talk is about.
It's a short talk, just 15 to 20 minutes.
Usually when I start talking about environment and IT, I take about an hour at least.
You have to forcefully stop me.
So let's see how I do on the timing.
What I would like to introduce to you is the context of why did we even look at Website Carbon Calculator tools.
Then of course what did we find, what were the challenges, and I'm going to leave you at the end with some final thoughts.
So let's start with the context.
I'm a member of a community of practice that is looking at green technology at my employer's company.
And we are a group exploring different techniques of how can we code, how can we write and create software in a way that is more environmentally friendly,
that is using less resources, less electricity, less hardware utilization, etc.
And so last year we spent a lot of time researching recommendations, how to optimize code, what saves more energy.
And so this year we said we want to get our hands dirty, we want to try this out.
Does it really make a difference?
So we said we are going to do a proof of concept around green coding for the question of does green coding really matter.
And our idea was we are going to build a web app, a front end app, in two ways, in a green way, optimized way, and in a normal standard way.
We did end up doing it in three ways, because we got curious and said if we really want to fuck this up, if we create the worst case, how bad can it get?
But the talk is not about this at all.
I'm just giving you the context because the step two was analyzing the apps that we created and measuring the difference,
if there really is a difference, if it's really measurable with these tools.
So to share a bit with you what the kind of techniques were, again, I'm not going to go into these in detail,
but we had some things in mind where we wanted to try the differences.
None of these are like rocket science, but we just wanted to see what really is the difference of using an optimized technique to using a non-optimized technique.
And so we started building our app, and I'm showing you a screenshot.
For each of these optimization techniques that we wanted to test, we created a single page in our site,
and this is app A, and this is app B, and I swear they are different screenshots of different apps.
The idea was to create something that looks exactly the same, but behind the hood, under the hood, the techniques that we used would be different.
And for example, for the image optimization, we created a page, we put a gallery of cat pictures on there,
because obviously the internet is for cat pictures, and so for each of the pages and each of the techniques that we wanted to test,
we put something on there that also the user that we could interact with during our testing.
So we thought, great, we created these apps, we are done, now we're just going to do some simple tests,
we're going to see the differences, and yay, we are finished.
Well, we were wrong.
When we started to run our tests with the website Carbon Calculator tools, we ran into a lot of issues, we ran into a lot of problems.
One of them was that it's not possible to test individual pages.
We're always just testing the main page basically, the whole site, or these tools are doing an average of all your sub pages,
but you can't really test anything individually, so how can we see for any of the techniques if any of them have a difference?
This was one of the first things that we found out, but we found out that there are more and more and more issues.
So the POC became a lot more about trying to understand what the hell are these calculator tools actually calculating.
This is an opportunity for a special thanks and a special shout out to Daedalus AI.
They are a startup, less than a year old, and they are also one of those companies doing a website Carbon Calculator tools.
They're a startup that we happen to know, that we happen to be friends with, and they let us really look behind the hood.
They actually built for us a beta version that allowed the testing of individual pages,
and that gave us a lot more information so that we could actually understand what we are really measuring.
Okay, now you are for sure curious about what was the difference that we measured, even though this talk is not about the POC itself,
just showing you as a highlight the difference.
So you can see here for two of the pages where we have the extremist test result, the difference ranges from 35% to 99% of savings on CO2.
This is measured with Daedalus AI. I'm saying this, it's measured, it's not the real CO2,
and I'm also explicitly naming the tool because in each tool we would get a different result.
So awesome, green coding matters. Don't write shitty code, optimize your code, take care that your code runs really smoothly and is efficient.
And the question arose, what do these website carbon calculator tools really calculate? How do they calculate CO2?
So a lot of them use some version of this formula that is proposed by the sustainablewebdesign.org,
and is basically taking the amount of data, multiplying it with 0.81, multiplying it with the carbon intensity of the electricity, and then you get the total CO2.
Let's talk a little bit about this formula. Let's start at the bottom.
The total CO2 means really everything. So all the electricity consumption in the data center, the network, the end user device, and all the embodied emissions.
Embodied emissions are those emissions caused during the production of the hardware. So really considering everything.
And everything should fit in this simple formula? So all right. The CO2 intensity, this is the global and the intensity of the global energy mix.
OK, we could use any other number for a local energy mix or for say we have a data center that we are running completely on coal, then we can of course substitute our own numbers here.
What is really curious is this number of 0.81, which is the assumed consumption of energy that is caused by transferring 1 gigabyte of data.
And I'm going to go into a little bit of detail in the next slide.
And then what the formula doesn't include, but is actually the case for most of these website calculator tools, is that this is the transferred data for the initial page load.
And I'm also going to go into a bit more detail because these two points of the initial page load and this value of 0.81 of course are the curious values.
So data is an energy proxy. Where does this number come from of 0.81?
This is from one scientific study. It's linked at the bottom, it's quite small and you can't see it because of the sun, but the link is there.
And basically they did a rough estimate of the entire energy consumption of all of the internet and then an estimate of the total data volume that is transmitted on the internet.
And then they said voila, this is the number. It's a little bit more complex of course, but simplifying this a lot.
There are several studies out there that try to link data, the amount of data, with the energy consumed.
And the results that they get are completely different. There's like a factor of 300 as a difference.
And there are lots of reasons why this is, but this is just one value from one study. So we should question this value, we should try to improve this value.
And we should also question if data is even a good energy proxy.
Because of course reading, writing, transmitting, processing data is causing a lot of energy consumption.
But what about all these other things like CPU, GPU, other hardware utilizations, etc.
Our app was a front end only app, we didn't do anything in the cloud. So for us most likely the data transmission is really the correct thing to use.
But if you think of an app like ChetGPT where you're just sending a text message basically and you're just getting a text message back, but in the cloud there is some crazy calculation happening.
That's not data that is causing the energy consumption, not data that is being transmitted, but it's all the calculation done by the AI in the cloud.
So for these cases, using data as an energy proxy probably isn't a good idea.
So of course this is also a question, what else can we use?
We didn't find any formula that would translate CPU usage into energy consumption and then CO2, if you know anything, let me know.
I'm always curious to learn more.
So then there's also the question of looking only at the initial page load.
If we only look at the initial page load, we are not getting anything that happens after the initial page load.
So any of the user interactions that happen once the page is loaded are not measured at all.
And again we have a huge difference in the page depending on what it is.
If I'm just looking up an article on Wikipedia, okay, the page load, that's it.
If I am going to Netflix or some other streaming site to watch a movie, after the initial page load is where the data is being transmitted, is where the stuff happens.
So we are missing a lot of the user interactions that we are not measuring them at all.
This also means that several of the optimization techniques that we wanted to try could not be detected at all.
Because some of these techniques only play a role after the page has been loaded.
So here are the results per page that we measured.
And in the green color columns we have those pages where we have local and global optimization techniques that are really being measured.
And then in the blue columns we are not detecting the actual optimization technique that we wanted to test,
but only the global optimization strategies play a role here, not the actual optimization technique.
And who only loads a page?
Most people load a page and then do something.
So we wanted to know how relevant this use case is, and we looked a little bit into the data around search engine optimizations,
because of course for companies it's quite important that people land on their page and then actually interact with the page.
And we found some values, again they are different values, I just used these numbers now,
between 26 and 70% of bounce rate means that this is the amount of people who just open the page and then leave again without doing any kind of interaction.
So if we are now just going to say, okay let's assume 50%.
50% of the interactions in the internet are then covered by these kinds of tests, but 50% aren't.
And this is getting me to the final thoughts.
This morning for fun I tested events CCCDE with some of the website carbon calculators that are out there.
And you can see I got four different results from 0.37 grams to 1.24 grams,
so it's quite a range of what is the result for the page or the entire site.
And it's also interesting how they are wording the result.
There's only one of them that is talking about estimation, the others just say this is your carbon footprint, only one says this is estimated.
Then I find it quite curious that the first one is saying only, so they are including a kind of judgment and saying,
no you're not causing very many CO2 emissions, so who says that 0.37 is only, who says this is little, who says it is good.
They are determining this by crawling other sites and then comparing your site to those other sites,
but this is basically only saying we are better than the rest, but does it mean that we are good is a different topic.
And then only one of those calculators actually gave additional information of where the most energy consumption was caused
and is giving some hints on how you can improve it.
And of course for us as developers it is important to understand this point of how can we write better code, how can we create a better website.
For all of them it was either very difficult to understand how they are actually getting to the result or it was not possible at all.
And this brings me to the final, final thoughts.
Okay, so these estimations, they are estimations, they are really rough. Is this a problem?
Here my personal opinion is it can be used to raise awareness that IT is consuming energy, but transparency for me personally is the issue.
They are just saying this is your carbon footprint, they are not explaining how they are calculated or anything.
They are not even telling you that this is estimated, they are just telling you this is the result.
And of course as a last thought we need some tools that we can use as developers so that we can create better code.
And this was now a POC and testing things for web design, but of course also for all these other areas of coding.
And if you have any idea, if you have any knowledge I would be super happy to connect and learn from you as well.
And with the same thing, thanks for listening to me.
I would take one or two quick, with emphasis on quick questions.
Comments later, questions please. No, no, no, questions, quick questions.
Well, okay, sorry for, but talk afterwards because we have to set up the stage for the next person.
I'm here in the village, I'm part of the crew of Bits and Boimer for this habitat so I'm going to be here not just now, but also in the next days, come and find me.
Well, in that case, please give another warm Roberta.
[Music]