Skip to main content

3 Ways Salesforce Uses AI to Drive Sustainability

Boris Gamazaychikov
Aug 19 - 6 min read

By Boris Gamazaychikov and Nicholas Liu-Sontag.

As AI transforms industries worldwide, organizations are working to harness its great potential while minimizing its negative impacts. Among these concerns, the environmental footprint of AI stands out as a critical challenge, with energy-intensive computing processes already contributing to increased carbon emissions. Guided by our core values of trust, customer success, innovation, equality, and sustainability, Salesforce has emerged as a leader in responsible AI, publishing a comprehensive AI sustainability strategy exemplified by our Sustainable AI Policy Principles.

A recent Salesforce survey revealed a crucial insight: 65% of sustainability professionals believe their companies must balance AI’s benefits with its environmental costs. While unchecked AI implementation can lead to increased energy consumption and carbon emissions, these same professionals see the potential in leveraging AI to drive sustainability innovation.

At Salesforce, we’re already turning this potential into reality across multiple fronts. Our data center infrastructure teams use AI to optimize server usage and energy consumption, while our carbon emission forecasting leverages AI to analyze millions of data points for smarter decision-making. We’re even extending these capabilities to customers through Net Zero Cloud and improving Salesforce deployment efficiency with our AI-powered tools like ApexGuru.

This article explores how Salesforce is using AI to drive sustainability, showcasing our multifaceted approach to leveraging technology for a more sustainable future.

Optimizing the Cloud through Predictive Autoscaling

Our Core Application Performance Engineering team harnesses the power of AI to improve energy efficiency while ensuring that our products run smoothly for customers. By using AI to predict and anticipate our customers’ usage patterns, we automatically scale the volume of servers required. This allows us to tailor cloud infrastructure usage, preventing energy waste. This automation saves time, reduces carbon emissions, and maintains optimal product performance for our customers.

At the heart of this innovation is our Predictive Autoscaling system, which uses sophisticated statistical models to anticipate and respond to fluctuations in customer usage patterns. This AI-powered solution analyzes historical data to forecast peak traffic conditions and automatically adjusts the number of cloud servers (known as kpods) required to meet demand. Importantly, this analysis is region and instance-specific, accommodating different time zones, cultural norms, and working patterns across our global customer base.

CPU usage fluctuation of one region throughout a typical week.

The system operates on two key principles: scaling down during off-peak hours to conserve energy and reduce costs, and scaling up proactively before peak hours to ensure seamless performance. By shifting our peak start time predictions by two standard deviations, we achieve a remarkable 97.7% accuracy in our forecasts, helping to ensure reliable service while minimizing waste.

Our approach goes beyond simple reactive autoscaling. It takes into account complex factors such as CPU usage, API counts, and even scheduled jobs that can cause short-term spikes in demand. This holistic view allows us to fine-tune our infrastructure with unprecedented precision.

The results have been impressive. We have already started seeing benefits and anticipate that Predictive Autoscaling will reduce approximately 1,128 tons of carbon emissions this fiscal year, equivalent to getting 268 gas-powered cars off the road. Moreover, we have experienced enhanced operational efficiency through increased server utilization, reduced performance incidents, and optimization of our on-demand capacity reservations.

Looking ahead, we’re continually refining our AI models. Future enhancements will include multi-variate analysis, burst predictions, and automatic capacity forecasting, further improving our ability to balance performance and sustainability.

By leveraging AI to tailor our infrastructure usage, we’re not just saving energy and reducing our carbon footprint — we’re setting a new standard for responsible, efficient data center management in the tech industry.

Empowering Customers to Improve Scalability and Sustainability

ApexGuru provides AI-powered insights and code recommendations for increased performance and decreased carbon emissions.

Powering ApexGuru is CodeGen, an internally developed LLM specifically designed for code analysis and optimization. This AI-driven tool automatically scans customer code, identifying critical anti-patterns and performance hotspots. It then provides prescriptive, AI-generated recommendations for code improvements, pinpointing exact classes and lines where optimizations can be made.

The latest iteration, CodeGen 2.5, showcases Salesforce’s commitment to efficiency. Optimized through multi-epoch training and flash attention techniques, it delivers performance comparable to larger models while operating at less than half the size. This approach not only enhances code efficiency for customers but also demonstrates Salesforce’s dedication to sustainable AI practices.

By enabling customers to build more efficient, high-performing applications, ApexGuru and CodeGen are driving both improved performance and reduced energy consumption across the Salesforce ecosystem, marking a significant step towards more sustainable software development practices.

Improving Emissions Forecasting to Provide Decarbonization Insights

Long-term greenhouse gas emissions forecasting is crucial for Salesforce’s strategic decision-making, resource allocation, and performance tracking against targets. Our corporate sustainability team leverages Net Zero Cloud for carbon accounting, reporting, and forecasting, maintaining a comprehensive model composed of dozens of AI-powered sub-models based on Salesforce activity data. As Customer Zero, we continuously collaborate with our product and sustainability teams to incorporate innovative approaches, ensuring these AI advancements benefit our customers as well.

One example of AI-powered forecasting is for air travel, a critical area for emissions forecasting. Not only is air travel a significant emissions source, but it is also an indicator for other emission sources like hotels and car rentals. Forecasting air travel using a predictor-based approach, where emissions are forecasted based on input predictors, is challenging due to the complexity and quantity of predictors for these activities. However, seasonal models effectively capture trends and seasonality based on historical observations without needing numerous input features. In simpler terms, AI helps us predict future air travel emissions by looking at patterns from past data, rather than trying to account for every possible factor that might influence travel.

General Additive Models (GAMs) are an excellent choice for this type of modeling due to their flexibility in modeling non-linear relationships and seasonal trends. GAMs work by detecting and decomposing data into its underlying trend and periodic components. For example, it can detect the overall upward or downward trend in the data as well as quarterly, monthly, weekly, or daily patterns.

In modeling air travel, we used historical data of weekly flight counts going back to 2017, incorporating company revenue and key Salesforce event dates (e.g., World Tour, Dreamforce) to improve accuracy. On never-before-seen test data, our GAM achieves a percent error of 3.8%. This means that on never-before-seen data, on average it accurately predicts the total number of flights over a given time interval to within 3.8%. This model allows us to track our progress mid-year against our goals and to update our annual emissions forecast in real time.

Results of our flight prediction GAM on four months of never-before-seen data.

This type of AI model along with a whole host of other machine learning and statistical models is helping us perform sophisticated forecasting of our own carbon emissions by analyzing millions of data points from our supply chain, business travel, data center infrastructure, real estate, and more. These insights help us make better, smarter decisions as we work to reduce our emissions.

Learn More

Related Articles

View all