Data centers are the physical clouds of cloud computing, where all of the information we save to the cloud gets stored. The construction of these enormous, nondescript buildings—some over 7 million square feet and consuming as much electricity in a year as a city of a million people—has accelerated as 5G networks, machine learning, and the internet of things stimulate further demand for space to store data.
But these digital warehouses are not all built the same. When we click on a Google Sheet or make a commit to a GitHub repository, we don’t know whether the data we’re working with is being retrieved from an unheated Icelandic data center running on renewable energy or a coal-powered facility in the middle of a desert being chilled by giant refrigerators. Odds are, it’s the latter.
If you can design an application that performs better with less hardware, you’ve also created an infrastructure that has the potential to reduce your overall carbon emissions.
“Internet infrastructure is definitely not green,” says Max Schulze, chairman of the Sustainable Digital Infrastructure Alliance, a nonprofit seeking to decarbonize the global digital economy. “The average utilization rate of a server in a data center is 11 percent. But the infrastructure around data centers is not dynamic. A low server utilization rate still means 100 percent power consumption, as if the server is running at 100 percent utilization.”
Coordinated, purposeful action by tech companies large and small is needed to enact the operational and systemic changes required to reduce the sector’s greenhouse gas emissions. There can be many drivers for this change, from compliance with local environmental laws and regulations to embarking on sustainability efforts in order to foster a culture of innovation. Along the way, companies like Zendesk and Nordstrom have discovered that adopting container technologies can play a part in reducing their environmental footprint.
The main reason enterprises of all stripes have been investing in containers in recent years has been to increase server utilization rates and improve service reliability while simultaneously lowering operational costs. But if you can design an application that performs better with less hardware, you’ve also created an infrastructure that has the potential to reduce your overall carbon emissions.
According to an analysis of Gartner data by ParkMyCloud, companies will spend $26.6 billion on idle cloud resources in 2021. As Matt Provo, CEO at StormForge, a Boston-based startup developing a cloud-based platform that automates Kubernetes deployment, notes, “There are a bunch of benefits to eliminating cloud waste and improving resource utilization. This definitely has an impact from a carbon footprint standpoint. However, because we’re a for-profit business, it also has an impact on business outcomes. I like that these two things cross over.”
Carbon emissions at data centers are determined by four variables: server utilization rate, choice of electrical grid, power usage effectiveness and overall power consumption, and the choice and life span of physical equipment. The most direct way container technologies like Docker, Kubernetes, Mesos, and Nomad can help data centers reduce their carbon emissions is by better utilizing servers. “They remove overhead [compared to running a full VM] and, in simple terms, allow you to cram in more applications per physical machine, increasing the utilization rate,” Schulze says. “That means fewer servers are needed in total and existing ones can be better utilized.” Additionally, because containers allow for demand-side management of resources, those who run their services over cloud providers can designate workloads to regions where the infrastructure has a lower emissions intensity.
Helping data centers reduce carbon emissions could have a significant and lasting impact. In 2019, they consumed 2 percent of all electricity produced worldwide and emitted as much carbon dioxide as the entire global aviation industry. These emissions are set to increase as resource-intensive technologies like artificial intelligence are used by an increasing number of businesses, requiring more data centers to be built—unless we can improve the efficiency of existing ones.
Containers allowed Nordstrom to do just that. The American retailer went from operating thousands of VMs on AWS, with an average utilization rate of 4 percent, to adopting Kubernetes, which allowed the company to scale back to 40 VMs with an average CPU utilization rate of 40 percent. Cost savings aside, Nordstrom’s adoption of containers equates to a 90 percent reduction in carbon emissions from electricity and less machine wastage.
Containers’ ability to reduce power consumption is especially important in cases where companies can’t designate a workload to another facility, like when an organization has just one in-house data center and building a greener space or moving to a commercial cloud provider’s facility isn’t feasible. Data centers typically connect to local electrical grids, but not all electrical grids emit the same amount of carbon. Data centers plugged into grids reliant on fossil fuels like coal result in the most carbon emissions per cubic foot.
When moving a workload to a cleaner facility isn’t an option, optimizing electricity usage may be a more achievable goal. Network packets pass through fewer processing layers in container platforms compared to hypervisors, which consumes less energy; a 2015 paper by Ericsson researcher Roberto Morabito found that a single Docker container consumed an average of 176 watts compared to an average of 184 watts for a virtual machine performing the same task. At scale, a difference of 8 watts per container per hour is significant.
By early 2019, the customer service software company Zendesk had completed its move out of on-premises data centers and into AWS, expecting immediate efficiencies in computing performance and power consumption, says Jason Smale, senior vice president of engineering. However, it was progressively adopting Kubernetes that really made a dent in energy consumption. “After our lift-and-shift migration into AWS, we made inefficient use of resources in order to sustain peak loads by running dedicated EC2 instances for services,” Smale says. “By moving nearly 100 percent of our workload to Kubernetes, we’ve been able to dramatically reduce the compute required to run Zendesk services.”
Smale says container schedulers have allowed Zendesk to choose data centers that are plugged into greener power grids and to only request the resources they actually need. “We partition our infrastructure around the world in multiple AWS regions and are constantly rebalancing our load,” he says. “We run in many AWS regions that are carbon neutral and use this as part of our rebalancing formula.
But Schulze cautions that some data centers are harder to decarbonize than others. Data centers in locations that require excessive non-server infrastructure, like air conditioning for a facility in a hot climate, emit more carbon than similar-sized facilities that don’t require such infrastructure. (As an example, the majority of AWS’s data centers are located in hot or temperate climates that require cooling.)
“More help is needed to get transparency on the data,” Schulze says, explaining that some large cloud providers often decline to disclose the information businesses need to determine their overall power usage effectiveness.
Deployment alone won’t result in a reduction in carbon emissions from containers. At times, the ease with which cloud resources can be provisioned can lead to an increased consumption of resources. Provo says organizations often overprovision resources because they fear the reputational risk associated with service downtime. “Developers often have to make a trade-off between cost and performance,” he says. “Often, the decision to overprovision cloud resources is made knowingly, and this not only costs companies more, it has an impact on our environment.”
“Our biggest competitor to reducing cloud waste is the status quo.”
He notes that cloud bills are typically paid by finance departments, just like they pay the rent or utility bills for an office building, and there may be little instruction to individual developers to rethink how they use resources. “Our biggest competitor to reducing cloud waste is the status quo,” he says. “We have to be able to connect the consumption of cloud resources to business outcomes. Developers are very influential at bringing in and advocating for new tooling. So I think at the individual contributor level, developers have to play a part in advocating for a mindset change that shifts the thinking to only using an appropriate amount of cloud resources.”
Most important in reducing an organization’s carbon footprint is intention: The organization must actively want to reduce their emissions, and have a strategy in place for doing so.
When Mozilla decided to become a carbon-neutral company, it brought in the boutique sustainability consulting firm Point380 to audit its existing operations and measure its current carbon emissions. It took more than 50 staff within Mozilla—including product managers, legal counsel, and engineers—to assemble the data required for the audit, which considered every aspect of Mozilla’s operations, from heating offices to the energy involved in sending marketing emails.
Point380 found that Mozilla’s overall emissions in 2019 amounted to 799,696 metric tons of carbon dioxide equivalent, or the greenhouse gas emissions of 172,000 cars being driven for over a year. While most of these emissions were attributed to the use of Mozilla’s Firefox web browser by millions of people around the world, cloud services were ultimately responsible for 36.3 percent of the company’s internal business emissions—more than was accrued in 2019 through a year’s worth of business travel by over 1,100 workers, daily commutes, and maintaining office space in 16 locations.
“In order to be carbon neutral today, we invested in high-quality carbon offsets to mitigate our 2019 impact for business services and operations,” wrote Cathleen Berger, sustainability steward at Mozilla, in a company blog post. “While these offsets are an important tool to mitigate emissions that we are not yet able to avoid, they do not provide or stimulate the sort of transformation that our societies need in order to truly be sustainable. The most effective climate mitigation strategy is avoiding emissions… Such a transformation requires new mindsets and a high degree of organizational and cultural change.”
Throughout 2021, Berger wrote, Mozilla will be considering various options for cloud optimization to help reduce emissions. As the organization rolls out new cloud-dependent products like the email alias generator Firefox Relay, containers will play a role in making the product more performant and resilient.
Implementing these strategies can be complex, and balancing business considerations with sustainability goals is often challenging. Some organizations have restrictions on the geographic locations data can be stored or processed in, which can limit developers’ ability to run containers on the most eco-friendly servers.
“Data localization is a big issue for us, because we work a lot with public clients who have to have data stored in France,” says Cyrielle Willerval, a Paris-based agile web developer at the software development agency Theodo. “That’s okay environmentally because French energy is basically nuclear, so it doesn’t emit a lot of carbon, but from an agency perspective, client specifications can sometimes conflict with our environmental sustainability objectives.”
Latency can be another issue. One Netflix engineer, who asked not to be named in this article, says, “While we use containers, since we run on AWS, most of the savings on emissions are AWS’s end. There are limits to what we can do, because no one wants to watch a movie that’s constantly pausing and buffering. If we use an AWS facility too distant from the user, they’ll notice.” Finding the right balance between performance, cost, and environmental sustainability isn’t easy, especially for companies that face drastic spikes in usage at particular times of the day and for which higher server utilization can come with costs to the service profile.
Additionally, not all strategies result in straightforward cost savings. Running Kubernetes on an Azure cluster in the UK rather than in Ireland, for example, will cut overall emissions by 15 percent but cost 4 percent more. In such a scenario, organizations would only achieve cost savings if their overall cloud usage decreases. This could well be achievable: In a November 2020 report, the cloud security platform Datadog studied 1.5 billion containers run by organizations like Peloton, Samsung, and 21st Century Fox and found that “49 percent of containers are using less than 30 percent of their requested CPU, and 74 percent of containers are using under 80 percent.” If cloud spend is being allocated to overprovisioned and unused infrastructure, it may be possible to more closely align this spend with actual usage patterns to achieve cost savings while moving workloads to facilities with a lower emissions intensity.
Sustainable software engineering isn’t about making one change—it’s about looking across the full stack of optimizations that can be made to an application and weighing the effort required against the possible benefits. Some elements will be harder to decarbonize than others. Even if the cost of hardware and electricity is only indirectly factored into the cost of an application, adopting containers may help lower operating costs while minimizing carbon emissions.
Sustainable software engineering isn’t about making one change—it’s about looking across the full stack of optimizations that can be made to an application.
Ali Fenn, president of ITRenew, a company seeking to extend the life of data center hardware, says hyperscale data centers like those owned by Facebook, Microsoft, or Google “decommission equipment in three and four-year time frames, which leaves a lot of remaining life in systems.” These data centers upgrade their hardware frequently because newer machines afford them more computing per floor tile, allowing them to use their space more efficiently and save on buying and expanding the size of existing data centers. But Fenn estimates that three times as many carbon emissions are generated during a server’s manufacturing as it will emit during the course of its life in a data center.
“There’s a tremendous amount of energy impact that goes into mining, manufacturing, and assembling all of the systems that ultimately get deployed,” she says. “And then, once [a server] leaves a data center, it typically goes through some sort of end-of-life process that includes sorting, shredding, smelting, and recycling processes that generate additional carbon impact and landfill.”
However, for smaller data centers like those owned by financial institutions or government agencies, the computing power of these retired servers is sufficient for their needs. Companies like ITRenew support a circular economy for internet infrastructure by refurbishing and reselling the servers that leave hyperscale data centers. “If we could enable a second life… we’re deferring new manufacturing,” Fenn said in a May 2020 presentation for the Open Compute Platform Virtual Summit. In an email exchange, she added, “Now, of course, the operational and energy usage goes up slightly because the equipment is running slightly longer in a data center. But this approach creates no new CO2, slashes e-waste, and also delivers significantly better economics.”
Schulze concurs. “Given the short life span of most servers,” he says, “increasing their utilization has to be a key priority.”
Even the smallest changes can have a significant impact if we all make them, says Provo: “It’s pretty clear that if we aren’t using cloud spend as efficiently as possible, we’ll face severe consequences on everything from the health of our planet to the health of our technology.” With a little ambition and a plan for action, companies can harness containers to help move the world toward a net-zero carbon economy, applying creativity and systems thinking to develop more resilient—and greener—software.