The document discusses how software and coding can help reduce greenhouse gas emissions and energy consumption. It notes that the ICT sector accounts for 4-10% of global energy use and growing. Practical solutions proposed include reducing the amount of data transferred by using caching and compression, removing unnecessary code, and improving coding efficiency by focusing on optimizing hotspots. The key message is that reducing energy use in software is an ongoing journey that requires incremental improvements over time.
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
How to (Help to) Save Our Planet with Green Coding
1. How to (Help to)
Save Our Planet
with Green Coding
Janne Kalliola
Photo by Niilo Isotalo on Unsplash
2. Contents
About me and my book
Why green coding is important?
Energy consumption in modern software
Measurements or lack of them
Reducing waste
Practical solutions
Final words
1
2
3
4
5
6
7
3. About Myself
● Janne Kalliola, Chief Growth Officer
and founder of Exove
● Have been coding since 1983 – Basic,
Pascal, Lisp, Fortran, C/C++/Obj-C, Java,
PHP, JavaScript
● Now focusing on growth of Exove, a
leading open web technology
company delivering digital growth
● Working with green coding and
carbon neutrality for a few years now
6. The ICT sector accounts for
4–10% of the world's energy
consumption1)
and 2.1–3.9%
of greenhouse emissions2)
.
The numbers are growing.
1)
Ministry of Transport and Communications: Climate and environmental strategy for the ICT sector.
2)
The real climate and transformative impact of ICT: A critique of estimates, trends, and regulations
7. 3.0% of global carbon
emissions1)
=
1 580 000 000 tons
Every year.
1)
Global emissions 58.2Gt from UN Emissions Gap Report 2022
8. For the sake of
perspective, this is
about the mass of
all land mammals
and people.1)
1)
https://energyeducation.ca/encyclopedia/Gigatonne
9. ICT Infrastructure and Emissions
In the years 2017-2022, global internet traffic is estimated to
quadruple. 1)
Data consumption is predicted to multiply. Besides consumers,
data usage is increased by new technologies, such as AI, IoT,
blockchains and the metaverse.
The communication and data explosion will correspondingly
require more hardware and energy in all parts of the value chain.
And we do not clean our tracks properly. Electronic waste is the
world's fastest growing type of waste. Only 17% of electronic waste
is treated properly.
1)
Ministry of Transport and Communications: Climate and environmental strategy for the ICT sector.
12. Generic Architecture of Modern Software
Network between the
end-user devices and cloud
/ datacenter
Different connection
methods have different
energy usage per gigabyte
transferred
Typically, the last mile
connection uses the most
energy
N.B. The client may connect
to several backends
Devices used by end-users
to access the service
Battery-powered, such as
mobile phone or laptop, or
plugged into wall, such as
game console or TV
Device energy
consumption should be
split between the various
applications running on the
device
All systems participating in
providing the service
◦ Web and application
servers, databases, storage
◦ Firewalls, VPN endpoints,
log systems
◦ Backup & restore systems
◦ Internal connectivity
Energy consumed by
dedicated and shared
systems used
End-user Devices Network Cloud / Datacenter
13. Cloud / Datacenter
End-user Devices
Energy Consumption
Electricity consumption of
data transferred
Typically calculated on
energy used per gigabyte
Varies a lot between the
various types of networks –
10,000 times efficiency
differences (mobile vs. optic
fibre)
Electricity consumption of
the CPU, GPU, display,
network connection, GPS,
etc.
Typically very optimised
hardware when devices are
battery-powered
Not so when the device is
plugged to a wall socket
The screen is the biggest
hog of energy in mobile
devices
Electricity consumption of
servers, storage, and
internal network
Optimised hardware,
designed to be run with a
full throttle all the time
Network
14. Software and Emissions
Software needs hardware to run. Hardware causes emissions in
several steps in their lifecycle: manufacturing, logistics, usage and
dismantling
Hardware needs electricity, and the emissions depend on the type
of energy
Energy production causes emissions, including also renewables.
Using renewable or carbon offsetted energy does not solve the
problem, but moves it to another location.
Thus, it is paramount to save energy.
16. Measuring Energy Consumption
Energy consumption is not straightforward to measure due to
several factors:
● Several systems running on the same platform
● Hard to measure electricity consumption inside the device
● All cloud providers or datacenters do not provide electricity
information
● The communication between the cloud and the end user
device may use several different networks
● CDNs, caches, etc. all complicate matters
17. Instead
The study executed by the university of Beira Interior in Portugal
found a strong or very strong correlation between the execution
time and the electricity consumption.
Thus, if a software achieves the its goals with less time, it is more
efficient also in using energy.
Further, the less data is transferred, the less energy is used in the
data networks.
Thirdly, the less hardware is used, the less emissions are caused.
19. Reducing Waste
In Lean manufacturing, “waste” is commonly defined as any
action that does not add value to the customer. [...] Lean
manufacturing is centered around eliminating waste from a
manufacturing process. 1)
We can use the same metaphor in reducing energy consumption
in software – execution and data transfer – by removing bits that
do not add value.
1)
https://www.techsolve.org/8-wastes-of-lean-manufacturing/
20. Types of Waste
Transferring data for the sake of
certainty
Algorithmic inefficiency
Deceiving user
Too much code
Wrong programming language
Waste in initialisation
Extraneous stuff
Redundant software
Using software in wrong task
User errors
Wrong architecture
Wrong data model
Extra data
Unoptimised data
24. Reduce Amount of Data Transferred
● Use proper formats, if possible
● Cache when you can and make sure that cache strategy is
well-thought out
● Compress everything that is possible
● Minimise possibilities for errors
● Reduce amount of videos, replace them with animations
(they compress better) or static images
● Reduce data transfer frequency
● Strip unneeded typefaces and/or glyphs from fonts
25. Reduce Amount of Code
● Remove dead code – rely on version control instead
● Be mindful when adding new libraries – check their footprint
and also check whether the same goal can be achieved with a
smaller library – be cautious to implement larger
implementations by yourself instead of using a readymade
library
● Limit the amount of code that is sent over the network – this
is a web specific problem
26. Improve Code Efficiency
● Find the hotspots of the software and focus on optimising
them. Do not spread optimisation efforts evenly to all code
● Do not do premature or local optimisations, focus on the
bigger picture
● Use right algorithms for the task – especially when the
amount of data is large
● Consider implementing critical parts with different language,
if possible
28. This Is a Journey
● Do not expect that all changes can be done at once.
● Instead, we need to keep the client – internal or external –
needs in primary focus, and operate within agreed budgets.
● Satisfied clients allow us to make more changes to the
systems, including also making it more energy efficient, than
dissatisfied clients.
● Do not set too ambitious goals or try to gobble everything up
at once.
Photo by Todd Trapani on Unsplash