The case for energy efficient code
The argument that the most efficient way to green your data center is through energy efficient hardware (servers, networking, communications) and efficient utilization of that hardware was furthered last year with an analysis in Nature Climate Change. It’s clear that for data centers interested in lowering their carbon footprint, examining a refresh at the server level and weighing a refresh versus the “embodied emissions” of manufacturing new hardware is step one.
But what about the millions of lines of code running on that hardware?
For years now, the efficiency impacts of software itself have been something that diehard green IT enthusiasts and some intelligent software engineers have wondered about. Could code be optimized to consume less power? Did the concentration of big enterprise IT companies where one piece of software served millions of end users mean that tweaking that software could have real energy returns?
While software will always play second fiddle to hardware, awareness of the energy impacts of code is growing. I spoke recently with John Chang, who works on product marketing at Cast. Founded in 1990 and headquartered in New York, Cast is a $50 million in revenue company with 220 employees that has built its business around analyzing code at the system level, assessing characteristics that include robustness, performance, security and reliability.
Chang noted to me that green IT isn’t the first question on the minds of the CIOs that work with Cast but that there was always an awareness among CIOs with regard to the carbon footprint of their systems. Cast recently rolled out its Cast Green IT Index which assesses 8 industry best practices related to efficiency and robustness of code. For example, is the code optimizing memory and disk space use? Is the SQL efficiently written? When there’s an error in software, how does the application handle and resolve it?
A proprietary weighting is then applied to give CIOs a picture of how efficiently their software is running. Cast works with large enterprise IT customers that are either building their own software or highly customizing off the shelf solutions. Think large banks or a company managing a sizeable SAP system. The analysis can be applied to 50 types of common programming languages.
“Instead of counting lines of code we can count the business value within a piece of software,” Chang said. “That helps customers measure productivity over time. We already have these rules that help us define what we call software efficiency and software robustness. Efficiency is basically how well the code is doing what it’s supposed to do without creating a lot of waste. Robustness is how well the system can stay up when something goes wrong.”
Cast eventually came to the conclusion that the core of its software analysis business had implications for the greening of the modern data center and that it had the in house analytical tools to provide measurements of how efficiently a given piece of software operates. Because the company is working with clients that either build their own software or have in house engineers that customize software, the results of the analysis can help those programmers re-engineer that software.
At this point Cast can’t produce measurements indicating the efficiency of code in terms of per kilowatt metrics because it’s not the code alone that determines energy use but it’s also the hardware on which the code runs. But the index can give CIOs a good snapshot of the overall efficiency of their software.
As we try to move beyond power usage effectiveness (PUE) as the sole data center metric, analyzing code could become part of the new wave of green IT. PUE doesn’t tell us how efficient hardware or software is running, merely how much power entering a data center is being used for infrastructure, namely cooling, and how much by IT.
The next evolutionary step is a compute per energy unit metric that takes us beyond PUE. Grading the efficiency of software is one step along that path.