Dear viewer, these subtitles were generated by a machine via the service YouTube and therefore are (very) buggy. If you are capable, please help us to create good quality subtitles: https://c3subtitles.de/talk/2537 Thanks!
[Music]
hello and good afternoon at cast
communication Camp 2023 it's day two the
stage is bits and Bo um as you can
probably see I'm I'm I'm an old guy uh
and for me if I hear green it I think of
IBM Mainframe terminals the green the
green light from the terminal glowing
flickering um and so when I when I saw
this talk I said oh yeah this is about
old machinery and old computer and all
Terminals and I'm like oh no actually
it's about environmental impact of of it
so before I blame myself any further
because I have no clue and our speaker
is way more well vered in in knowing all
of this um 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
hi everyone thank you very
much welcome to my talk fooled by the
website carbon
calculator um when I think of green it I
think on of the environmental impacts of
it and this is also what this talk is
about um 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 um what I would like to introduce
to you um is the context of why did we
even look at website carbon calculator
tools um 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 um I'm a member of a community
of practice that is looking at Green
Technology at my employer company
um 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 um less Hardware
utilization Etc um and so last year we
spent a lot of time
researching
um 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 coating um for the question of
does green coating really matter and our
idea was we are going to build a VAP app
a front-end app um in two ways in a
Green Way optimized way and in a normal
standard way we did end up in in
doing it in three ways because we got
curious and said if we really want to
[ __ ] this up if you create the r worst
case how bad can I get but the talk is
not about this at all um I'm just giving
you the context um because the step two
was analyzing the apps that we created
and um measuring the difference if there
really is a difference if it's really
measurable with these
tools so um 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 that 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 uh
for each of these optimization
techniques that we wanted to test we
created a single page in our site um and
this is app a and this is app B and I
swear they are different screenshots of
different apps um the idea was to create
something that looks exactly the same
but behind the hood under the hood the
um techniques that we used would be
different and um for example um for the
image optimization we created a page we
put a gallery of C pictures on there
because obviously the internet is for
cat pictures um and so for each of the
pages and each of the of the techniques
that we wanted to test we uh 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 um well we were
wrong when we started to run our tests
with web uh 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 you're always just test
testing the main page basically um the
whole site or the these tools are um
doing an average of um all your sub
Pages uh 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 um this was one of the
first things that we found out but we
found out that there are more and more
more issues so the PC became a lot more
about trying to understand what the hell
are these calculator tools actually
calculating and this is an opportunity
to um for a special thanks and a special
shout out to Dei they are um stting
less than a year old and um they are
also one of those companies doing a
website carbon calculator tools they're
startup that we happen to know that we
happen to be friends with and they um
let us really look behind the hood they
actually built for us a beta version um
that allowed the testing of individual
pages and that gave us a lot more
information um so that we could actually
understand what we are really
measuring okay now you're are for sure
curious about what was the difference
that we measured even though this talk
is not about the POC itself um just
showing you as a highlight the
difference um so you can see here for
two of the pages where we had the
extremest test result um the
difference ranges from 35% to 99% of
savings on co2 the this is measured with
de Loi 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 will get a different
result so um awesome green coding
matters don't write shitty code optimize
your code take care that your code runs
really smoothly and is efficient um 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 sustainable webd
design.org
um and is basically taking the amount of
data multiplying it with 0. uh 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
um let's start at the bottom the total
CO2 means really
everything so all the electricity
consumption in the data center the
network the enduser device and all the
embodied emissions embodied emissions
are those emissions caused during the
production of the heartware so really
considering everything and everything
should fit in this simple formula
H so all right the CO2 intensity this is
the global um the intensity of the
global Energy Mix okay we could use any
other um form um any other number for
local energy um mix or for say we have a
data center that we are running
completely on coal then we can of course
substitute um our own numbers here what
is really curious is this number of 0 81
which is um the
assumed consumption of energy that is
caused by transferring one gigabyte of
data and I'm going to go into a little
bit of detail on the next
slide um and then what they 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 uh because these two points of
the initial page load and this this
value of 0.81 of course are the the the
Curious values so data is an energy
proxy
hm where does this number come from of
0.81 this is from one scientific
study um is is linked at the bottom it's
quite small and you can't see it because
of the Sun but the link is there
um and basically they did did a rough
estimate of the entire um energy
consumption of the all of the internet
and then um a estimate of the the total
data volume that is transmitted in the
internet and then they said voila this
is the number it's a little bit more
complex of course but um simplifying
this a lot um there are several studies
out there that try to link um data the
amount of data with the energy
consumed um and the the results that
they get are completely different
there's like a factor of 300 um as a
difference um and there are lots of
reason 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 if if if data is even um a
good energy proxy because of course
Reading Writing transmitting processing
data is is causing a lot of energy
consumption um but what about all these
other things like CPU GPU other Hardware
utilizations um Etc um 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
cor thing to use but if you think of an
app like CH GPT 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 um 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 um the
the using data as an energy proxy
probably isn't a good
idea
um so of course this is also a question
um what else can we use we didn't find
any formula that would translate CPU
usage into um energy consumption and
then CO2 if you
know anything let me know I'm always
curious to learn more um so then there's
also the question of looking only at the
initial page load um 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 uh once the
pages loaded are not measured at all and
again we have a huge difference in um
the page depending what it is if I'm
just looking up um an article in
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 transmitters where the stuff
happens um so we are missing a lot of
the user interactions um that we are we
are not measuring them at
all um this also means that several of
the optim 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 the green
color columns um we have those pages
where we have local and Global
optimization techniques that are really
uh being measured and then in the blue
columns um we are not detecting the
actual optimization technique that we
wanted to test but only the global
strategies the only the global um
optimization strategies play a role here
not the actual optimization
technique and who only loads a page um
most people load a page and then do
something um so we wanted to know how
relevant this use case is and we looked
a little a bit into um the data around
uh 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
um and we found some values again there
different values I just use these
numbers now um 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 uh um and this is getting me to
the final
thoughts um this morning for fun I
tested um events cccd with some of the
uh website carbon calculators that are
out there and um you can see I got four
different
results from um
0.37 G to
1 uh 2 for grams so it's quite a range
of what is the result for um the page um
or the entire side 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 um then I find it quite
curious that the first one is saying
only so they are including a um a kind
of judgment and saying oh you're not
transmitt you're not causing very many
um CO2 emissions um so who says that
0.37 is only who says this is little who
says it is good um they are determining
this by crawling other sides and then
comparing your side to those other sides
but this is basically only saying we are
better than the rest but doesn't mean
that we are
good is is a different
topic um and then only one of those uh
calculators actually gave additional
information of where the most energy
consumption was caused and is giving
some hints on how you can Pro improve it
and of course for us as developers is
important to understand this point of
how can we write better code how can we
create a better website
um for all of them it was either very
difficult to understand what they're how
they're actually getting to the risk
result or it was not possible at all and
this brings me to the final final
thought okay so these estimations
they're estimations they're really rough
is this a
problem here um 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're
just saying this is your carbon
footprint they're not explaining how
they calculated anything um they they
are not even telling you that this is
estimation estimated they're just
telling you this is the result um and of
course as a last thought we need some
tools that we can use as developers so
that we can create better um code and
it's
um this was now a PC and testing things
uh for repb design but of course also
for all these other other areas of
coding um 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
[Applause]
me I 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 I'm here
in the village um I'm part of the crew
of bits and boa 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
W Roberta
[Applause]
wo
[Music]