A Case For Carbon-Aware Datacenter Software
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:00 Okay, there we go. Okay, so this is a project that Irene, who's in the back, you can ask her about, as well as Asaf, Mosharaf, and Adam and I are working on. And if you're at OSDI, some of them will be there. And the project name is Treehouse, but a set of ideas around it. So the first idea is mostly common for the things that we've been talking about today, so I won't spend a huge amount of time on it. But, and I have to thank Simon for this slide. But this, you can think of this as this graph as being a, on the y axis, essentially the efficiency or compute efficiency per megawatt on a log scale. And for all of the time that I've been a computer scientist, so we've been on this path that your energy and energy efficiency increased on an exponential rate, on a rapid exponential rate.
1:05 And as a consequence, we didn't really need to worry about energy over the years. So we kept making decisions, design decisions that said, we would just arrange for us to choose, if we had a choice between what was cheaper, easier for programmers, we would choose that, even if it was less energy efficient. So that, that set of decisions with the end of Dennard scaling and potentially the sort of tailing off of Moore's law is not necessarily going to continue in the future. And certainly this gap has sort of started to open up and is likely to continue. So we still have exponential improvement, increase in the demand for computing. And the only way we're going to be able to accommodate that if we don't get exponential improvements in the rate at which we can improve the energy efficiency of computing is to get exponentially better at making our systems more efficient.
2:00 And there's no magic bullet for that. The only question is, okay, what technologies we might put together. And as people have pointed out to date, over the last decade or so, we've been successful at bridging that gap, primarily moving to hyperscalers, getting better at PUE, getting better at a set of different things. But those decisions, those things that we've been doing aren't necessarily things that we're going to be able to continue to, and we'll continue to do them, but they're not going to give us exponential improvements over time. There might be other things that we might be able to do. So the talk just now was talking about, well, okay, we'd make serverless computing more efficient. Well, that might make things differently, but you can think essentially as our sort of this being an argument for all of the above sort of approach to the world.
2:48 Like, let's try to figure out all of the things we might do. Normally, systems designers, we try to do the most efficient thing first. But in reality, I think in the space, we're going to end up having to do everything if we're going to keep ahead of the curve. And now the question is, okay, what are those, what are the sort of most, what are the set of things that are worth doing? Okay, so this is just some of the things that we might be able to do. So one of them that really pops out is this notion of we're spending about half of all total data center cycles on system software. So as somebody who builds system software, it's kind of embarrassing, but it's sort of understandable why this is the case.
3:26 We use Linux not because it's an efficient mechanism, but because it's convenient. It's the one that we've got all our IP in. There's a huge community building on it and so forth. But if we're going to get something that's energy efficient, maybe we need to do something differently. Same thing goes for libraries. So there's a huge amount of overhead on sort of system libraries, becoming even worse with respect to service meshes and other things like that. So can we make those types of things more efficient? Even on the application logic side, there's a lot of inefficiency on that, just like layers and layers of software that we ought to be addressing. So what we might we do about this? Well, there's a couple of things that you might think of places to start.
4:07 One of them would be, you know, oh, if you were to try to build a more efficient kernel, how much of a performance improvement? So there's just a couple of different studies that have come up over the last few years that, you know, roughly a factor of five, a factor of ten performance improvement, that can get more efficiency improvement, energy efficiency improvement, that can come from building more efficient operating system services. And so there's a large gap of opportunity to be to be around there. Now, of course, this isn't a total solution because, OK, you improve things by a factor of two or something like that, you know, because you're only a factor of two, depending on the kernel. And that doesn't solve all of your problems, but it does sort of start you in the right direction.
4:50 So another thing that really pops out about this is the notion that there's a lot of stranded resources in data centers. So this is a study of various companies, so Google back in 2011 and then Google again in 2019, as well as Alibaba a few years ago, that we're getting better at utilizing CPU resources, certainly more efficient in CPU and memory resources for hyperscalers than for less hyperscaler-like systems. So if you look at the CPU and memory utilization of systems like at an on-prem settings, they're much, much worse. But we're getting better at it, but there's still quite a large realm for improvement and sort of reasons for why it's not 100%. So why aren't they using their systems 100% of the time? Well, any time you have sort of any variability in the workload that you have, then that's going to imply that you have to somehow figure out how to sort of provision for that in some way.
5:55 And so actually some of Andrew's points about, oh, well, maybe we can burst mode for efficiency is, I think, one of the things that you could do in this space. But what else could we do? So one of the arguments that we make in the paper is this notion of micro functions or something that's a little bit like serverless computing, but where we can now essentially compact pieces of functionality in a different way. So on the left-hand side, that's sort of how things are today. You allocate your virtual machine or your serverless engine, and it allocates a certain fixed amount of resources. And then whether you're using all of it or not, okay, the rest of it ends up being underused. And so there's a large amount of stranded resources as a consequence of that.
6:42 But if you were to decompose your programs, and of course, this is going to take extra time, extra costs, because we're actually asking programmers to do different things, then the implication of that is, well, maybe now I could piece together both computation and the memory that it needs in a way that I could move them around dynamically and be able to fill in the gaps that I had before. So instead of thinking, I have to grab this whole big block of data that has a certain number of cores and a certain amount of memory and a certain amount of storage, maybe I could make some more fine-grained schedule, schedulable entity that I could move around. And there's a sort of analogy with this, with respect to some of the things that were talked about earlier.
7:24 You know, if the price of carbon, the price of energy was, is going to be sometimes free and sometimes expensive and sort of carbon intensity. Well, it's also true that the carbon intensity of free memory in a data center is, if you can move your, there's sort of a locality benefit. So if I can move my computation to where I have underused memory, then maybe that becomes free memory for me to use. Or if there's underused CPU cycles, then maybe that becomes free. So my ability to migrate things becomes important. And so one of the points that we wanted to make in the paper was this notion that you should think of there being a spectrum of adaptation timelines, that I might be able to adapt to things on a sort of microsecond or millisecond level, where I can move computation around.
8:12 But I could also potentially migrate things on a, you know, hourly basis. Okay. If I'm going to move things between some time when there's a carbon energy is carbon neutral and other times when it's very intensive. Well then, okay, maybe the course of the day, I'm going to be able to move things around. That's a, that's a different set of optimizations than if you're trying to optimize at a more fine-grained level, which is mostly what we've been looking at. And again, this isn't meant as a either or solution. We really want to be thinking that we're going to address the problem as a group. So a final point or sort of another group of things that we're, we're looking at is this notion that a lot of systems end up having this sort of curve of optimization.
8:59 That there's often, you'll see systems papers that are making decisions where we're optimizing for performance, sort of at the exclusion of every other consideration. And so like typical systems papers, like really push on performance as much as possible. And often that with the implication of those kind of performance oriented systems is that they're really energy inefficient. By contrast, if you're totally energy efficient, then maybe actually your performance is really terrible. So you might think of there being this sort of curve that we might be able to optimize differently or operate at different points. If we were to only know how latency tolerance some application was within a certain timeframe. And so if we had that information, which certainly most application developers may have, then maybe we can make better decisions on the sort of the, on the system design side.
9:57 So an example of that kind of concrete example of that is you might think of the operational expense of different storage medium. Well, okay. If I'm using D, if I want to store my data in DRAM, then it's really going to be fast from, you know, access will have high performance, but it'll be really energy intensive. But if I'm going to store it at NVM, or maybe if I'm going to store it in SSDs, then maybe I can end up being more energy efficient, even if it's slower. And now the question is, well, maybe I want to choose to choose to put my applications in SSD or do an out of core implementation so that I can be more energy efficient. So a similar kind of example for this is you might think of like optimizing for machine learning.
10:41 So machine learning papers, like a really common thing to say is time to accuracy. How long does it take me to converge to accuracy with respect to some ML application? And you could also think of this sort of the equivalent version of this as energy to accuracy. So could we optimize for how much energy it took to get to some level of accuracy with respect to some training data set? And now if we could do that, well, what are the operating points that are most energy efficient for it? And well, this curve here is essentially the ISO bands of that. And you may think, oh, okay. In terms of time to accuracy on the right, on the x-axis and energy to accuracy on the y-axis.
11:25 And there might be operating points sort of in this corner over here that are both, you may think of trade-offs between time to accuracy and energy to accuracy. It really depends on how, how, how, where your trade-offs are of how latency tolerant you might be in a single system. And essentially it's like, okay, your batch size is going to affect this. Okay. So the sort of final point I would make, and then we could open up for more questions. A few of the sort of summary slide. I haven't talked about software provenance. It did actually come up a couple of times while we were in other talks. So I didn't think it was a super important thing for me to talk about, but it does seem to me as trying to understand where your time, where your energy is going or where your carbon is going while you're executing needs to be something that's pretty important.
12:14 We've been building tools along these lines, actually. One of the really interesting things about that is where there's a gap between the performance optimal thing to do and where the energy optimal thing to do is. And in particular, one of the things that the energy like memory use is expensive, whereas it might not be expensive from a time perspective, if you have a lot of instructional level parallelism, for example. So there'd be this sort of gap between those two as possible. So the second thing I sort of mentioned is this notion of SLA, so aware energy optimization, which is if the programmer tells you what its tolerance is, then potentially allows you to do different things than you could otherwise. And the rest we've already talked about.
12:58 So I'll open it up to questions. Thanks, Tom. Questions for Tom? Since this question came up many times, I thought, and you have some experience, I'll ask it again. What is the right level of granularity for measuring energy provenance in your experience? So we're really, I'm trying to build something that's like GPROF. So there was this tool built in 75 or so that's basically how we do performance optimization. That's the same idea, right? You can ascribe the time that a program takes down to the procedure level or even down to the instruction level. And you do it by sampling. And I think that if you want to provide better tools for programmers, ultimately the part that we do, the system software side that we do, is only a small portion of it.
14:04 I can maybe go back to the slide that I started with, which is, you know, we're going to be able to do some portion that's going to bridge a gap for a while. But eventually it's software overheads, application software overheads that we're going to need to focus on. So tools to make application developers more aware of energy use and carbon use so that they can make better decisions is going to be a key thing. And what kinds of decisions do they make? Well, they make data structure decisions like, oh, is this B tree better than this hash table? How do we build tools that allow for us to do that? So that is part of what we talk about in the paper. Thanks. Yeah, it seems to be great. Right place to start.
14:46 Yeah, I mean, not that you don't want to also do it at other timescales, but I think, really, I think you want to be doing it at the procedure level. Yeah. So this relies on the ability to measure energy at runtime in real time to a degree, it seems. And we've talked before about how we don't have the hardware to do that, at least in extant compute. But we figured out how to do it more than a decade ago. Quanto did it. The iCount stuff did it like we know how to do precision measurement of energy income and the utilization on fairly complex compute substrates. We just haven't built it into anything. So what's missing to incentivize hardware manufacturers to include this capability? So one of the things that we were doing and I don't know that it's a real I don't know that it's a long term solution.
15:37 I think ultimately the hardware manufacturers will build it into their systems. I'm really optimistic in some ways about maybe I'm among the more optimistic people in this community in terms of how industry is going to evolve over time. I think if you look at how much Intel and AMD or whatever have in terms of measurement infrastructure in the hardware level for doing performance optimization, it's immense. OK, they've been doing it for 20, 30 years. So now it's like, oh, if you want to know how many level one TLB misses I have or how many cycles I'm spending on branch prediction, like I can just know that it's like, oh, well, that's nice. So if you're doing really fine grained inner loop optimization of something for performance, you have all the information you need.
16:31 There's no reason why I can't get that on an energy level. We've been trying to backport it. It's like, oh, what do you do in the meantime? So can you figure out how to take those performance numbers and turn them into energy? And it was essentially by inference or sort of special for each particular process or architecture. But I think ultimately we'll have that at a really fine grained level from the hardware vendors. We sort of have to build something. But sometimes what we do in systems is we build systems, they show that there's a market for it. And then industry comes along and builds a more efficient version of what we do. And then we don't need it anymore. I think that's a great answer.
17:18 Another way to think about it is create benchmarks that force them to be able to optimize this. And then they'll have to have the infrastructure. Well, I think that's also true. I think that's a good point, which is this notion that if type three accounting becomes standard, then everyone is going to want to know exactly how much energy you're using for all of the applications you're running. And you even saw that in the keynote. There was this graph that they wanted to show. Here's all the energy you were using in your, you're running this application in my data center. And here, let me tell you all the carbon intensity of this, the carbon use of this over time. If you want to be able to do that type of accounting, I think it's just going to drive this.
18:12 I think that the providers really are interested in doing things in this space. Just, you know, that some, just taking an example of it, you might think, oh, well, if only 60% of the DRAM is being used in the data center, why aren't we just turning off the other 40%? It turns out actually today you can't turn off DRAM chips. Like, even if you're not using them, you can't turn them off. But that's just a hardware thing. No particular reason why it's hard to be able to turn off DRAM chips. Like if they're storing something important, you want to keep them. But otherwise, maybe not. Okay. I can do one more for you. I was going to move on. Oh, yeah, sure. Go ahead. So I think I've heard you say that at some point you're talking about these proclets, and you're going to ask the application developers to give you more information or perhaps program things in a different way.
19:02 So I'm curious because, you know, we're living at this, you know, 50 year, you know, evolution of higher and higher and less and less prescriptive kinds of application programs. So do you see this as something that, you know, maybe people do for the system software level or something that is more broadly important to do? Right. So I'll point that the real person you should talk to about this is Adam. And he has a particular domain, but I'm sort of trying to channel an answer that he would give for it. I we're not actually this notion of proclets isn't really all that different for those of you who know a little bit more of history of systems from emerald. But the idea is if you could do, I know everybody's got what?
19:47 And Andrew's going, yeah. Anyway, so the just like, so, and it was like, Emerald was a system for essentially global addresses, but within an object-oriented framework. So you could have some object that you could migrate around at a sort of fine-grained level. And as a consequence of that, you could have your code and data at the right place wherever you wanted it. And sometimes it'd be good to have it local in your system. Sometimes it'd be better to put it somewhere else. It really depends on the structure of the program as to when that's appropriate or not. Now, we don't currently use Emerald because it required its own programming language, but you might be able to get there with some of the new programming languages techniques that we have, some of the more advanced programming systems that we have today. You might be able to build something that's sort of similar to Emerald. And anyway, that's where this was going. So the object-oriented programming, and so they're not necessarily harder to program, but just a little different than what you're currently used to.
20:51 So the other thing I was thinking about was you put up that nice graph that said, look, a huge part of the overhead is system work and library work and applications aren't doing so much. And as we start to get into... Sorry, well, that's not what I meant. They're providing the value... That's not the way I meant that. But as we get... That's Facebook there, that's Google. That's the value layer. That's the value layer. Yeah. Sorry, we're... It's good. As we try to start doing energy apportioning and try and start charging energy to applications and people who are using them, this is a problem we've been wrestling with in battery-powered embedded systems for ever and a half. And it's been a really unsettled debate of if you have to have the radio on because this application needed to receive a packet, do you charge at the full cost of the radio? But then when you turn on two more applications, this is one-third is expensive. How do you apportion system service overhead fairly to applications in a system like this?
21:45 Yeah, I think... I think there's the easy answer to that and then there's the harder answer to it. Okay, so the easy answer to it is, you know, to the extent that you're doing an RPC, then you're doing some marshalling and then you're dropping into the kernel or maybe you're doing user-level bypass operations. Anyway, you're doing some amount of computation, some amount of overhead to get the packet out to the network. All of that ends up being energy intensive and so you can sort of count it up that way. It becomes a lot more interesting when you start talking about memory use because, okay, you get some stuff that's in DRAM and you're refreshing it because your system software decided that it made sense for you to hold on to it because your performance would be better in the future if you did. And under what circumstances does it make sense to charge? Who is it you should charge for memory use? I think that part is totally open. I think it would be a really great paper to write. As far as I know, sort of an open...
22:50 For those of you who are graduate students, good thing to go work on. So that's what I think what I'd say about that. Thanks Tom. Okay. Let's thank our speaker again.