Vessim: A Testbed for Carbon-Aware Applications and Systems
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 Hey, my name is Philipp. I'm from the Technical University of Berlin, and I'm going to present to you a co-simulation testbed for carbon-aware applications and systems, which we've been developing for the last one and a half years. So, in carbon-aware computing, we try to reduce the operational carbon emissions caused by computing systems by better aligning their power usage with the availability of clean energy. So, we try to compute a bit more when and where energy is clean, and a bit less if it's dirty. Now, traditionally, most approaches in carbon-aware computing optimize for a metric called carbon intensity. And this, simply put, describes how dirty is energy from the public grid. And now, there are different methodologies on how to compute this metric. The most straightforward one is average carbon intensity, which is simply a weighted average over all energy producers in your system.
0:52 So, we weight the amount of energy that they produce by how carbon-intense the energy source is. Now, for example, here you can see that this metric is very low in regions like France, because they deploy a lot of nuclear power, a lot of hydropower, while it's quite high in Germany, because we burn a lot of brown coal. But it's also very variable in Germany, because we deploy a lot of renewables, a lot of solar and wind. Again, there are different methodologies for carbon intensity, but what they all have in common is that they try to reduce all the underlying complexities of how electric grids work and how energy markets work into a single number. And this oversimplification is problematic, as it hides many real-life effects like grid congestion and resulting energy curtailments and so on.
1:37 And additionally, we more and more see that data centers often come with their own microgrids. So, we more often see on-site deployments of renewable energy, direct power lines, or at least power purchase agreements with wind parks close by. Google states that they are equipping data centers with battery-based systems instead of diesel generators and so on. So, this is why, in recent years, several papers called for better interfaces between computing and energy systems. And in particular, we want to provide better visibility and better control over the energy system.
2:12 However, testing such new approaches is super difficult, because real testbeds are very expensive to build and to maintain. They don't scale, it's very hard to test edge cases, tests are really slow, so most carbon-aware approaches can only be tested over the course of days or weeks, so this can become really expensive. And this is why, really, 9 out of 10 papers that I read on carbon-aware approaches somehow implement their own energy system simulation for testing their approach, for testing their system. So, this does not only lead to repeated development efforts by researchers, but it also leads to very bad comparability of different approaches.
2:51 Now, our goal is to somehow unify these efforts into a common co-simulation testbed, which we call Vessim. And Vessim connects energy-domain-specific simulators, like simulators for solar power generation, wind power, batteries, maybe simply carbon-intensity APIs, and so on, with real software and hardware through software-in-the-loop simulation. So, you can connect your real computing system with a simulated energy system, and your applications can interact with it as if it was real. And on top of that, we want to provide some commonly used data sets to make experiments simpler to set up and also more comparable. And this is not a vision, so Vessim exists, and we're working on it for more than one and a half years now. It's, of course, still in an early stage, but we are using it across different projects, and you're very welcome to try it out and contribute as well.
3:47 Now, a quick overview of how Vessim works. So, Vessim is a co-simulation testbed. That means we connect already existing simulators in a way which we think makes it easy for users to simulate energy systems for computing systems. We built on Mosaik, which is an established co-simulation framework, and simply put, it takes care that all the simulators run at the same pace, and also enables message passing between simulators. So, at defined points, they can exchange information. In Vessim, we define four types of simulators. The first type are actors, which are all the producers and consumers in our system. So, a producer could, for example, be a simulator that is replaying solar production traces, and a producer could, for example, be a real server that is connected to a power meter.
4:39 And in this case, the actor would periodically query the real power demand of the server and feed this information into the co-simulation, into the energy grid. Second, we simulate a power grid, especially we simulate whether we have an excess or a deficit of power at the current time step. If there is an excess or a deficit, we can charge or discharge energy storage simulators, according to some user-defined policy. And lastly, we have controllers. And controllers are the most interesting because they offer users the possibility to define software interfaces to the computing system. So, you can, for example, like here, define a REST API, which lets you query the current output of renewable power generators, the state of charge of batteries, forecasts for carbon intensity. So, whatever you want to implement, you can make accessible.
5:32 So, this provides applications the possibility to interact with the energy system simulation, which, of course, has to be executed in real time for this use case. So, one second of simulated time is also one second of real time, wall clock time. Another use case of controllers we see here, which is a monitor, which periodically writes the state of the entire energy system to a CSV file or a database, or maybe it just pipes it to some visualization tool. So, we already integrated a bunch of basic functionality for replaying traces, for example, carbon intensity data or solar production data. But we are currently working on extending Vessim with more sophisticated simulators. Like, for example, we are working on integrating the system advisor model by the U.S. National Renewable Energy Laboratory.
6:24 So, this is really a large suite of simulators of different kinds related to renewable energy generation. Same goes for the Open Energy Modeling Framework. Also, we are working on, we are experimenting with more sophisticated battery simulators like PyBaMM. Regarding access to data sets, we've been collaborating with Solcast and WattTime to provide data sets for Vessim that are already included in the library. And we are planning to make it easy for you to integrate your own data sets from these data providers in your simulations. So, WattTime is providing carbon intensity data and Solcast is a solar data provider. And lastly, we are planning to integrate Vessim into existing software for distributed systems, such as Flower, which is a federated learning framework, or Prometheus, which is a monitoring system.
7:12 Before we conclude this, I want to show you an example of how such an experiment implemented in Vessim could look like. So, this is Vessim's Python API. Here, we first create an environment and then our first microgrid. By the way, Vessim is able to simulate multiple microgrids in parallel for if you're testing distributed systems, for example. And here in our example, we have three actors, two consumers and one producer. The first node is a physical node. So, in our example, it's a NVIDIA Jetson that is connected to a power meter. So, this actor periodically queries the power meter for the Jetson's current demand. The second node is a virtual node, which is running somewhere in the cloud. And here we use a power model to estimate the power usage based on the CPU load.
8:00 And lastly, we have a solar power simulator, which is replaying one of the data sets that has been provided by Solcast and that comes with Vessim. Furthermore, we're attaching a small battery and have two controllers, a monitor for visualization, and we implemented a custom controller. So, we executed this experiment twice, one time with the carbon aware controller and one time without. And I do not want to go into too much detail of what exactly we did here. So, we were adjusting the power demand a bit of the different nodes. And also, we were playing around with the minimum state of charge of our battery. So, for example, here we perform a forecast, which looks great. So, we decided to allow discharging the battery to 30%.
8:48 And this helps us to avoid drawing energy from the public grid during times where it's very carbon intensive. And we can do that, as I said, because we know it's going to be recharged soon. While in the base example, we always stay at 60% because we need it as a safety buffer for a power outage, for example. As I said, this is really just one example of what you can do with Vessim. But the bottom line is that in this example, we performed the same amount of work in both experiments. We consumed the same amount of power, but we caused more than 30% less carbon emissions.
9:21 With this, I conclude the talk. Vessim is a co-simulation testbed for testing carbon-aware applications and systems. And we would really like you to check it out and contribute. Because Vessim is, by design, since it's a co-simulation framework, very easily extendable. You can connect your own simulators and hardware to it. And feel free to reach out anytime if you have any questions. And lastly, if you want to know more about Vessim's software in the loop capabilities, which is a very interesting topic in itself because of the real-time constraints, we published a paper on this last year. And in FedZero, which is a paper we had at E-Energy this year, you can see also Vessim in action in a distributed setup. Thanks a lot for listening. Thank you.