HotCarbon 2023

The War of the Efficiencies: Understanding the Tension between Carbon and Energy Optimization

Walid A. Hanafy, Roozbeh Bostandoost, Noman Bashir, David Irwin, Mohammad Hajiesmaili, Prashant Shenoy (University of Massachusetts Amherst)

This transcript was made by AI. The open source speech recognition model Whisper (large-v3-turbo) transcribed the recording with faster-whisper. Names and technical terms were checked against the paper, but it can still contain mistakes. The recording is the reference.

0:01 Hello, everyone. My name is Walid. I'm here to present our paper the War of the Efficiencies, understanding the tension between carbon and energy optimization. So this work is done with collaboration with Roozbeh, Noman, and David, and Mohammad, and Prashant. And the first thing I want to say is that data center energy demand is on the rise. So there are some estimates that by 2030, 8% of the world's energy consumption will be consumed by data centers. However, energy consumption in itself is not a problem. The environmental effects are what really matters. So for previous data centers or how people were focusing on the problem of sustainability, previously people were focusing on energy, where if you decrease your energy consumption, you are getting more sustainable. However, with the addition of renewables, the carbon intensity of electricity is varying.

0:59 So it is varying temporally. So over a course of a day, it can switch as much as 2x. And it's very spatially between different countries and different grids due to how the mixture changes. And with the availability of carbon signals like average and marginal intensity from companies such as Electricity Maps, WattTime, and so on, people can now know the current and the future carbon intensity and can react upon it.

1:28 So if we want to optimize sustainability or if we want to increase sustainability or want to be more sustainable, we should be able to measure it. So previously, people were mostly measuring sustainability in terms of energy efficiency, which is the cycles per unit of energy. So operators increase their energy efficiency by optimizing their hardware and software and cooling. So data centers now claim that they are running PUE near one. They are continuously buying better hardware and designing better hardware to be more energy efficient. However, due to the availability of signals and the awareness that what really actually matters are the environmental impact, so people have been focusing on carbon efficiency. So a term like carbon efficiency, which we define or we can measure as the cycles you can get per unit of carbon, have been an emerging signal.

2:18 And we believe that this is the right emerging as a new goal. And we believe that this is the right goal to optimize for. So, however, we have been measuring sustainability in two metrics. So is there a relation between these two metrics? So energy efficiency and carbon efficiency, are they related or are they efficiently the same thing? So the relation between carbon efficiency and energy efficiency can be defined by this simple equation. So carbon efficiency equals energy efficiency over carbon intensity. If carbon intensity is fixed and you are always running on the same source of energy all the time and this does not change, energy efficiency becomes an equivalent thing to carbon efficiency. But since carbon intensity changes and you want to increase carbon efficiency, you can do one of two things.

3:07 You can either increase your energy efficiency or you can decrease your carbon intensity. So given the status quo that energy efficiency is near the limit where PUE of the most data of hyper-scale dependence is already near optimal and Moore's law is slowing down and adding renewables to the grid is always a good thing, but it's more of a futuristic thing to do. What we can do is actually reacting or increasing the carbon intensity by computing more when carbon intensity is low and computing less when carbon intensity is high. So computing is well equipped with these flexibility mechanisms that allow us to do this. So it allows to do some sort of temporal shifting where if carbon is high, I should be running. If carbon is low, I should not be running.

3:57 And it can allow you to scale. So if carbon is very high, I should, if carbon is very low, I should not be just running. I should be running and running fast. Simply, if the job cannot be stopped and you want to have always, if you want to be always running, you can change your pace. You do not have to switch from zero to one or from zero to X. You can change your rate of running. So you can slow down when energy is high and sprint when energy is low. Or you can change where you are running. So these mechanisms have been shown today in multiple aspects. And this is what people have been focusing on for a very long time. So, however, how does this flexible execution actually affect carbon and energy efficiency?

4:40 So flexibility or flexible execution uses more energy. So if you suspend and resume your job, you're using more energy to suspend and you're using some energy to resume. If you migrated your data from one place to the other, you're using more energy to migrate and so on. So the relation becomes a little bit different. So increasing carbon efficiency through flexibility mechanisms decreases energy efficiency. And this is inevitable. And this gives us this relationship. So given a highly energy optimized job, if you want to increase the energy efficiency and you use one or two, one or more flexibility mechanisms, you have to decrease your energy efficiency. And this was all over the talk this morning. So for most of the talk, I wanted to shout, I would raise my hand.

5:33 Okay. By doing this, you are decreasing your energy efficiency. By doing this, you are decreasing your energy efficiency. And the same argument. So, okay. So we focus on this talk, at least. We focus on operational carbon. But the same argument can be made for embodied. So if you extend your lifetime of an energy efficient data center or an energy inefficient server, you are using more energy. Which contributes more to the problem of... It's not actually a problem, but it contributes more to the energy consumption of your workload.

6:09 So I hope you are convinced by my statement. And from now on, I will just throw a couple of examples how this applies in real life. And the paper has much more examples. So to evaluate this idea, we provide a couple of flexibility mechanisms and use state-of-the-art policies. And we use one trace because one trace was enough to show this effect from Canada, Ontario. And we have, like, some sort of a sample job that goes for 24 hours.

6:46 And we get the average by starting the job at every hour of the whole trace. And our metrics, of course, are energy efficiency and carbon efficiency. So we focus on... So the first example that we use is temporal shifting. So people have been using temporal shifting to run and stop when carbon is high and when carbon is low, effectively. However, most of the papers that actually implement these techniques assume that this is an immediate thing that does not have an overhead. But in reality, these have overhead. Whether you checkpoint to disk, you save to RAM, you are using power, you are saving... If you are putting things to RAM and just not doing anything, you're still using power and energy. So if you want to define flexibility in the regime of temporal shifting, we use flexibility...

7:38 We define flexibility as the job deadline. So if I have a one-hour job and I give it two hours to run, it has the option to run... It has two options to run at. If I give it 20 hours, it has more options. So by giving it more options, it has more flexibility. And of course, it doesn't give me more carbon reduction. So we use a policy from a state-of-the-art called Wait-A-While and the paper originally do not have a count for overhead. So we implement the same regime, but just add a count of overhead for non-continuous execution. So the result shows us that carbon efficiency, by increasing carbon efficiency... So the base case that we have is we have the most efficient implementation, which is not stopping, which is always running the job, which is carbon efficiency of one and energy efficiency of one because we are normalizing them.

8:25 And by increasing the carbon efficiency or having more flexibility by extending the deadline, you are getting more carbon efficient. But at the same time, you are getting less energy efficient. Of course, the graph shows 5% reduction. We are not showing that energy efficiency will drop to zero. But this 5% in the scale of a company like Google or a company like Microsoft, this can be a huge amount of energy.

8:54 So I hope you are convinced by the first example that extending the temporal flexibility increases carbon... Like extended flexibility increases carbon efficiency at the expense of reducing energy efficiency. So another example is resource scaling. So resource scaling is a technique that you can utilize. If you utilize effectively, you can increase your carbon efficiency by a higher factor. So the key idea of resource scaling, because the change might be higher and lower in certain periods. So pick the best periods and scale as much as possible. So after scaling, so the problem with scaling is that scaling effectively decreases energy efficiency. Whatever you know, whatever job you have, if you scale the job, you are decreasing energy efficiency. And the key idea of this stems from the non-linear relationship between power consumption and throughput.

9:50 So more, sorry, Amdahl's law tells us throughput do not increase linearly with adding more resources. However, the power increases linearly. So this relation creates this complex graph, where by adding more nodes, because the incremental throughput is not the same by every node you add. So this graph shows the x-axis, so that the number of nodes that you have, the throughput do not increase linearly. And by this relation, the energy efficiency decreases. Because if you want to do the same amount of work, instead of doing, if you have a job that requires two time slots, and you run a scale two, you will not run it in one time slot. You are less efficient. So you will run it in more than one slot. So by this effect, you are using more compute time and definitely more energy.

10:40 So by getting a job that actually looks very scalable, by running a 10 node, you are losing effectively 20% of your energy efficiency. So in resource scaling, flexibility can be defined as what scale you are running at. So if you have the option to go from 1 to 10, going 10 is definitely more flexibility, or at least this is how we define it. Of course, we can merge different mechanisms. So we do not have to just do elasticity or resource scaling or temporal shifting. We can mix. However, to just show the effect of this method, I assume that the same, I remove any effect of temporal shifting and the overhead of doing temporal shifting. So in this case, we use a policy called Wait&Scale.

11:30 So the policy appeared in an ASPLOS paper from our group in ASPLOS 2023 that uses Wait&Scale. So the job gets a scale factor from the user and runs similar to Wait-A-While, but runs at a higher scale. So as shown in this graph, yet I'm showing carbon efficiency and energy efficiency. And it shows that by increasing the carbon, by increasing the flexibility or number of nodes, you can get more carbon efficient. But at the same time, you are getting less energy efficient. However, scaling is showing a little bit different behavior than time shifting. Because if you are getting too much energy efficient, your carbon efficiency will be lower at the end. Because if you remember the relation, there is definitely a relation between energy efficiency and interplaying these two metrics is what we should be effectively doing.

12:31 So scaling yields a significant carbon efficiency. However, energy overhead might, energy overhead exists and may overtake the gains in carbon efficiency. So in conclusion, carbon efficiency is the key sustainability metric that we should be optimizing. However, and carbon and energy efficiency are in conflict. However, we should think more about how to manage the trade-off between these two metrics. And this is a rich space that we encourage everyone to work on in the future. So thank you, if you have any questions.

13:18 So, yeah, thank you. Great talk and work. So it all boils down to how you optimize. So what's the objective? And the objective can only be one. Meaning that how do you aggregate the two prices, the energy price and the carbon price? So it depends on, you know, what do you value more? Do you value carbon more or reducing carbon more? Or do you value the cost of the total cost of operation, right? In that, it's strictly dollar, no carbon, right? So depending on that alpha, which is the translation between carbon and dollar, that's what you get. That's the point you get on that graph with your operating point. So I definitely agree, but it boils down to the idea of incentives. So if I told you, okay, by saving your carbon efficiency by 10% or 20% or even more, you have to pay extra $100.

14:25 Would you agree? Yes. The price of carbon, right? It's about the incentives. So if this, and by the way, the same argument can be done for core, because if you're doing more compute time, you're paying more money. And companies will not be happy about that. Yeah. So what?

14:47 Okay. So I know the title of the paper is war of efficiencies, but we come in peace. Maybe just in the interest of time, we'll end it there. Thank you so much. A quick round of applause here.