This article was written by Dr. Luigi Nardi with contributions from Jannik Endress.

The digital age is booming and data centers are the powerhouses keeping it all running. Yet, this power comes at a cost – a big environmental and financial cost. Data center operations can lead to skyrocketing energy and water consumption, and result in immense greenhouse gas emissions. This is a major issue for IT leaders, C-level executives, infrastructure managers, and FinOps professionals, as it significantly impacts a company’s Environmental, Social, and Governance (ESG) performance. Leveraging artificial intelligence database tuning presents a promising solution to mitigate these environmental and financial impacts.

A recent empirical investigation conducted by the Borderstep Institute, in collaboration with the EU, revealed that digital technologies already account for approximately five-nine percent of global electricity consumption and carbon emissions, a number expected to increase as the demand for compute power, driven by the rise of generative artificial intelligence (gen AI) and foundation models, continues to grow.

Goldman Sachs Research further estimates that data center power demand will grow by 160 percent by 2030. Currently, data centers worldwide consume one-two percent of overall power, but this is expected to rise to three-four percent by the end of the decade. In the US and Europe, this increased demand will drive electricity growth. Without viable alternatives for powering and cooling data centers, the AI revolution’s need for increased compute power will significantly raise greenhouse gas emissions, putting technology powerhouses, which are essential for storing, processing, and disseminating vast amounts of data, under intense environmental pressure to find innovative ways to optimize energy consumption in their data centers.

Databases are a significant contributor to data center workloads. They are critical for storing, managing, and retrieving large volumes of data, are computationally intensive, and significantly contribute to the overall energy consumption of data centers on thousands of database instances. Therefore, artificial intelligence database tuning will be central to any sustainability strategy to increase efficiency.

The EU steps in

ESG reporting has gained significant attention in recent years, as companies and investors recognize its importance in addressing global challenges and promoting sustainable business practices. The European Union and the United States have both introduced ESG reporting regulations to encourage transparency and responsible business conduct. While the Securities and Exchange Commission (SEC) in the US is taking steps in rolling out federal climate disclosure rules across the US, California is introducing climate laws in the Climate Corporate Data Accountability Act, requiring entities with annual revenues over $1 billion to disclose their GHG emissions. The European Green Deal, which is already in effect, aims to make Europe the world's first climate-neutral continent by 2050 while promoting sustainable economic growth and enhancing social well-being.

To support the implementation of the European Green Deal, the European Commission published a series of regulations and frameworks:

The Corporate Sustainability Reporting Directive (CSRD): This directive sets the standard by which nearly 50,000 EU companies will have to report their climate and environmental impact. Starting in 2025, CSRD will mandate that all companies have an emissions reduction plan to reach net zero in 2050. It requires companies with at least 250 employees and above €50m ($55m) in revenues to report on their ESG practices by 2026. CSRD aligns with the UN Sustainable Development Goal (SDG) 13 on Climate Action.

Non-Financial Reporting Directive (NFRD): This regulation, which has been revised and now replaced with the CSRD, obliges credit institutions & insurance companies, and large companies with more than 500 employees and €40m ($44m) in revenues to disclose their ESG performance to promote transparency and responsible business practices.

Energy Efficiency Directive: This directive aims to curb energy consumption and greenhouse gas emissions by promoting energy-efficient data center operations. For example, Germany is mandating annual reporting on data center energy efficiency from 2024 onwards, with minimum efficiency requirements kicking in by 2027.

Regulation on eco-design requirements for servers and data storage products (EU 2019/424): This regulation sets benchmarks for minimum energy efficiency standards for power supplies, emphasizing the need for efficient server operations.

DBtune 1
– DBtune

The message is clear. Sustainability is no longer optional, companies are under increasing pressure to make their data centers greener, and companies in general need to be more transparent and accountable for their environmental impact.

Databases are crucial to data center operations and hence, play a major role in sustainability. Among the most widely used database management systems is PostgreSQL, the most powerful open-source database. PostgreSQL is the database of the year in 2024 and 2023, utilized by 49 percent of developers, up significantly from 33 percent in 2018, according to the popular Stack Overflow survey. This open-source database is integral to many businesses’ data infrastructure, handling everything from transaction processing to complex analytics. However, the growing volume of data and variety of applications requires storage, processing, and retrieval operations, which can consume a substantial amount of energy, impacting a company’s overall environmental footprint.

Optimizing these critical pieces of the software-hardware stack can significantly enhance overall data center efficiency. With its extensive use across industries, even small improvements in PostgreSQL performance can lead to considerable energy savings at scale. This highlights a critical challenge for businesses: How to maintain optimal data center performance while minimizing the environmental impact, particularly of database operations?

AI tuning: The secret sauce for green data centers

The last decade has seen numerous success stories in AI-driven optimization of energy consumption of computer systems, both across academia and the industry. For example, researchers at Imperial College London have demonstrated that AI optimization can dramatically reduce energy consumption for mobile-embedded computer vision applications on small form factor computing platforms. Similarly, Google DeepMind has used AI to reduce energy usage for cooling in data centers by up to 40 percent. These studies exemplify a growing trend in autonomous energy optimization, which is only just beginning. However, one area historically overlooked is the optimization of database management systems, such as PostgreSQL.

Artificial intelligence database tuning offers a revolutionary approach to database management, enabling businesses to achieve high database performance while minimizing their environmental impact. By observing real-time data, AI can identify more effective PostgreSQL configurations that minimize energy usage. This approach detects and eliminates inefficiencies, automatically scaling resources to reduce a data center's overall energy footprint. Continuous optimization ensures high performance and efficiency even as data demands and workloads fluctuate over different times of the day or seasons. Hence, with AI tuning large database fleets of PostgreSQL databases, comprising thousands of database instances can be optimized by a handful of database administrators overseeing the tuning activity instead of an army of database administrators who are manually tuning these instances.

Beyond individual databases: The widespread impact

In a recent presentation at PGConf India 2024, DBtune demonstrated how AI tuning of PostgreSQL parameters can double the performance of a fully managed PostgreSQL database instance running on Amazon RDS. This performance boost allows for scaling down the database instance by half, effectively halving the overall energy consumption without compromising the quality of the end-user experience.

While the study focuses on one database instance, the environmental impact of database tuning extends far beyond individual databases.

Using automated database tuning on a single PostgreSQL instance can reduce the CO2e emissions of the instance by 50 percent. As a consequence, in a typical data center with tens of thousands of databases, this leads to a 32 percent CO2e emission reduction, factoring in that the tuning of the PostgreSQL instance mainly affects the server and its cooling system, while the networking and other aspects of the system are less affected as modeled in our study.

Snowballing this effect within Europe, an annual CO2e saving of up to seven million metric tons (seven megatons) can be achieved. This is roughly equal to the average annual emissions of 245 commercial airliners – an estimate based on the overall energy consumption of 76.8 TWh per year for all data centers in Europe and a CO2e emission factor of 0.275 kg/kWh. This substantial reduction supports the EU’s environmental targets, enhancing sustainability efforts and mitigating climate change impacts.

Improving the efficiency of your databases can make huge CO2 savings and help "green" your data center.