Going green in IT: How and why

Four steps to reduce your company’s IT carbon footprint — and save money.

Four steps to reduce your company’s IT carbon footprint — and save money.

Digital is usually perceived as nonphysical, ephemeral. However, digital services run on physical servers that require energy, and most energy is still produced by burning fossil fuels. That means digital services have a very real impact on carbon emissions and climate change. That impact, and how to minimize it, was the main topic of the talk Chris Adams of the Green Web Foundation gave at 36c3.

Big IT companies are already measuring their carbon footprints. Do you?

First let’s talk numbers, looking at the biggest IT companies’ impact. Amazon recently started sharing carbon emissions data. In the year 2018, Amazon was accountable for 44.4 megatons of carbon emissions, which is as much as the country of Finland emitted that year. Most of that is third-party carbon emissions (for example, from packaging and transportation of Amazon goods, emissions from business travel, and so on).

Apple had a carbon footprint of 25.2 megatons in 2018, as much as that of Mongolia. However, if we do not count emissions from the production of Apple-branded goods, then Apple’s own emissions amount to just 0.6 megatons — about as much as that year’s emissions of the republic of Gambia. Half of that comes from business travel, another 30% from employees commuting. Google’s carbon footprint is somewhat bigger — 1.2 megatons, comparable to that of Liberia.

As you can see, IT companies have a significant impact on carbon emissions. What can you do with your own IT infrastructure to minimize your impact?

1. Use scalable architecture

With the rise of cloud computing, a lot of businesses started migrating their infrastructure to the cloud. But the typical approach to using cloud infrastructure involves renting an always-on server that safely exceeds the business’s current peak load.

However, people use the Internet — and your services — differently depending on time of day, which results in big differences in the loads. The load at night is probably significantly lower than the midday load. Analytics tools can give you a very clear understanding of how that applies to your particular services, but you get the general idea.

Typical distribution of Internet traffic during a day

Typical distribution of Internet traffic during a day

This is where scalability comes in handy. For software with scalable architecture, load balancers can automatically add more computing power on a single machine or add more servers depending on the number of requests you’re receiving. That means you don’t need to waste electricity — and money — on servers running in idle mode.

Most cloud providers offer load balancing, both horizontal and vertical. Of course, you’ll need to build your services with scalability in mind to use load balancing, but once you start, doing so will save you quite a bit of money while also lowering your cloud infrastructure’s carbon footprint.

2. Use greener providers

Cloud providers differ in their energy supplies. First of all, their choices may depend on the general state of electric services in the region. Some regions — for example, Sweden — rely mostly on renewable energy sources such as wind and water. Some, such as France, heavily employ nuclear power, which is also a greener choice. And some, such as Poland, get most of their energy burning coal.

So, your company’s carbon emissions vary depending on the location of the data center that provides its cloud computing. Bigger services such as AWS and Microsoft Azure usually pay more attention than smaller ones to that aspect of ecological sustainability.

For example, Amazon Web Services users can choose the physical location of their computing power, and there’s a map illustrating which of AWS’s data centers run on green energy and which do not.

AWS regions. The green leaf means green power. Source: https://www.awsgeek.com/AWS-Regions/index.html

AWS regions. The green leaf means green power. Image source

Microsoft, together with a group of scientists, has even built a low-carbon Kubernetes scheduler that basically helps dynamically migrate your tasks to data centers across the globe to increase use of greener power and minimize your carbon footprint. The scheduler can be ported to work with other cloud providers as well.

You don’t necessarily need to choose AWS or Azure if you want to go green. The Green Web Foundation offers a directory of smaller providers that rely on green energy. Running your computing on your own hardware is usually worse from an ecological perspective, though; cloud systems allow for a more even distribution of tasks among computing powers, helping conserve energy.

3. Choose your programming language wisely

Programming languages differ in quite a few aspects including logic, syntax, capabilities, and more. They also differ in terms of resource consumption. Scripts in languages such as JavaScript and Python tend to consume more resources than compiled programs written in languages such as Fortran, C++, and Rust. And object-oriented languages, in turn, consume more than imperative ones. More resources means more power means more emissions.

It’s worth noting, however, that faster doesn’t necessarily mean greener. In some cases, a program may be executed for longer but consume less energy. To learn more about languages that are time-, memory-, and energy-efficient, you can read this paper.

Languages optimal for different objectives. Source: https://greenlab.di.uminho.pt/wp-content/uploads/2017/10/sleFinal.pdf

Languages optimal for different objectives. Source

Of course, you are more likely to choose programming languages for the tasks they perform, based on the abilities of your workforce, and according to the rest of your technological stack, but it’s worth taking the power aspect into account; programs written in, say, JavaScript may consume twice the computing resources of those written in C.

It should go without saying that optimizing the code can help lower your carbon footprint as well as make your code faster and less power-hungry, no matter the language. Profiling your software and rewriting ineffective parts can have a significant impact.

4. Optimize your Web pages

Recently, the size of the average Web page exceeded that of the original Doom download: more than 3 megabytes. The bigger the page, the more power needed to transfer it from server to the client and to display it on the client. You may think that doesn’t account for a huge part of carbon emissions, but the Green Web Foundation disagrees.

For example, Green Web found that running a background video on a Web page resulted in as much carbon as emitted by the project team’s commutes. Remember that 30% of Apple’s total emissions come from its workers’ commutes? Now you see the scale.

Let’s add another comparison: Videos streamed over the Internet account for the same carbon footprint as the country of Spain. (The cherry on top: Porn accounts for 27% of it, or Austria’s emissions.) So, point zero of optimizing is not playing videos automatically.

You can use a variety of tools for optimization. Google Lighthouse is a good example. It scores your website on four measures: performance optimization, accessibility, using best practices, and SEO optimization. Actually, performance involves all aspects, including search engine rankings and bounce rate.

The Green Web Foundation has introduced another tool, called Greenhouse, that analyzes pages and checks which of the domains they use run on renewable energy. It’s not as useful as Lighthouse in terms of optimization, but it may help ecologically savvy organizations choose service providers.

You can use The Green Web App to check if your site is hosted on a server that runs on green energy. Unfortunately, not many hosting providers publish information about the greenness of the electricity they use, so your site will probably end up in gray, which simply means the foundation doesn’t have the relevant information about your hosting provider.

Save the planet while saving money

For some people and organizations, trying to prevent global warming is a compelling enough reason to bother with all these optimizations. But for many others, it’s not. However, when it comes to IT, going green usually means saving money as well.

In case the idea of saving the planet doesn’t do the job, here are some more benefits of going green that may help persuade your boss:

  • After optimizing your hosting and code you will need less computing power, so you’ll save money on that.
  • Your website will load faster, too, which means fewer customers closing it before it can fully load.
  • The faster the website is, the higher search engines rank it, putting it where more customers will see it.
Tips