newsfilter
← Latest News
Earnings Call Transcripts·

SUNK: SLURM ON KUBERNETES PRESENTED BY NAVARRE PRATT AT SUPERCOMPUTING - COREWEAVE INC

Good afternoon, everyone. Like Beck said, my name is Navar Pratt. I've been a machine learning engineer for the past year here at CoreWeave. Today, I'm going to talk about how, why, what we developed our integration for Slurm on Kubernetes, which we call Sunk. So to get started, to figure out why we went and did this, we got to talk about who CoreWeav is. CoreWeaves is a cloud provider, so we rent GPUs to our clients. But we're a specialized cloud provider. So we specialize and optimize for GPU-enabled workloads. So in today's day and age, most of that is AI and ML. So we build very large training clusters. We also serve inference on those models. We also have business verticals in VFX, so CGI rendering, media entertainment, scientific computing, really anything that needs GPUs. CoreWeave is glad to do that. And at CoreWeav, everything we build, the way we deliver our compute, the way мы work with our compute internally, the way clients use our compute here at Coreweave is all built on top of Kubernetes. So, across our entire fleet, whether it's storage, networking, even if you want to run a VM, all of it is built on top of Kubernetes. So, CoreWeave is running bare metal Kubernetes clusters across all of our compute nodes. It's how our support team knows how to handle these nodes. And we really enjoy having that single entry point, single source of configuration, and our clients do too. They know that if they have a stack that works and runs on Kubernetes, most likely they could bring it over and run it on CoreWeav. There's no CoreWeave proprietary API. The API to access CoreWeav is the Kubernetes API. We have a number of data centers across the U.S. We started out this year with three on-demand multi-tenant clusters and we'll close out this year with 15. You'll see we're specifying between multi- tenant and single tenant data center locations. So what that means is multi- tenant is mostly for our on- demand pool of compute. So we still have reserved instance contracts there, but those data centers are serving a number of different clients, and most of them are serving bursty workloads. People are scaling up and down. A lot of those nodes aren't tied in contracts, where the single-tenant clusters are tied up in very large-scale single-client contracts. Most of them Are used for very large scale ML training clusters. And the thing that's powering those ML training clusters today are NVIDIA's H100 nodes. So in each node, there's eight NVIDIA H100s NV switched together for very fast bandwidth within the node. And to talk between the nodes, there is eight rail InfiniBand, so 400 gigabits per second per GPU, so 3.2 terabits of InfiniD band bandwidth per node. So as you can imagine, this is the best hardware to power the best training clusters. and like I alluded to because we're running everything on Kubernetes we have a lot of partnerships and leverage a lot of open source tools with products and companies that build on Kubernetes as well for customers who don't necessarily want to deal directly with Kubernetes we also lean on a lot of our partners to deliver products on top of Kubernetes so building on top of Kubernetes is something we're familiar with it's something our clients are familiar with And we didn't want to have to go and change the way we offer compute if we had to go and offer Slurm separately. So given all that context, I think you could start to understand why we went to go and build Slurm on top of Kubernetes in a typical environment that you might see at other places or even on-prem. You'll have a pool of compute running Kubernetes and a whole separate pool of compute learning Slurm. That reduces the overall complexity of the people who have to manage Kubernetes. They just worry about that. The people who are managing Slurm, they just worry about that. But it greatly reduces the flexibility you have to choose what workloads run on each. There will be some downtime, whether it's a few hours or a few days. If you have the bring nodes from that Slurm cluster into Kubernetes and vice versa, a lot of the time for these bursty autoscaling sort of workloads that you want to run in Kubernetes, like an autoscalling inference service, you don't know when you're going to go viral. You don't knows when that usage is going to burst. to be able to programmatically scale up and down into those nodes while at the same time being able to schedule those large-scale training jobs on that same pool is a big plus. And again, we didn't want to lose that single point of management. For CoreWeave, we do a lot of things internally that run on top of Kubernetes like our very in-depth node lifecycle and health check management system to make sure that everything is running properly. So we wanted to make certain that we were able to combine these two worlds. So to do that, we went out and built what we call Sunk, which stands for Slurm on Kubernetes. And what this means is we're packaging up everything you need to run a Slurm cluster and deploying it as various Kubernetes resources. And all of those Kubernetes resources to run the Slurm Cluster is packaged up into a very highly configurable Helm chart. So what that means is now you unlock the vast ecosystem of Kubernetes deployments, Kubernetes management. You could plug this Helm chart right into your various popular GitOps workflows and manage it from there. Not only are the Slurm components themselves, like Slurm Accounting, Slurm Controller, the Slurm Ds, running in Kubernetes, but also all the configuration that comes along with it. So the Slurn configuration file itself, topology, any prolog and epilog scripts are also all deployed in Kubernetes and you can manage it von there. And within that Helm Chart, it's very easy to configure different authentication schemes. So, you know, you're going to have researchers using this Slurm cluster potentially that aren't going to want to, you know, understand what's going on under the hood and go and know what's going on in Kubernetes. So we make it very easy to connect into the Slurm cluster. And from there, it's just Slurm. You're not losing any features of Slurm because it's deployed on Kubernetes. And once you're in that layer of abstraction, Kubernetes can completely abstract away. Also, because you're running on Kubernetes, you get all the good parts about Kubernetes. So what that means is, you know, high availability of those Slurm control plane services. So like the Slurm controller, you don't have to necessarily run two instances of the Slurm controller 24-7 and worry about failing over between those two if one goes down. You know, Kubernetes is going to do its thing and always make sure to restart the deployment if something's down. You know it's going to be running its liveness probes, readiness probes to make sure that everything is up and running. You also get easy scaling. So it's very easy to scale up the amount of nodes that are in, the amountof compute nodes that in the cluster. And of course, now you can manage shared file systems via persistent volume claims in Kubernetes, which makes it very easy to mount things into the login nodes you're using in Slurm into all those compute nodes. And if you want to, you could also mount those onto various Kubernetes resources. Again, all managed through a GitOps workflow. And a lot of the very cool features that come out of Sunk come from our state management. So what this means is we're making sure that everything that's happening within the Slurm cluster is known throughout the rest of the Kubernetes architecture. And things that happen in Kubernetes are propagated up into Slurm. And we'll go through some of the different use cases for that. But one of the very powerful ones which is listed here is the Kubernetes Slurm scheduler plugin. So when you go to deploy your Slurm cluster on top of Kubernetes, it also comes with a custom Kubernetes scheduler. And what this allows you to do is schedule Kubernetes workloads onto these nodes that are part of the Slurm Cluster by using the Slurm scheduler So within Slurm, you'll see a bunch of jobs. Some of those jobs might represent things that are running within Kubernetes, and some might represent normal Slurm jobs. You could deal with partitions, preemption, priorities, all that stuff through the Slurm scheduler to deal with everything running on these compute nodes. So now I'll walk through how exactly we're doing all these things. This is a high-level diagram, so it's not going to have everything, but I think it does a good job of giving you an idea of how we designed everything. First of all, I'd like to call out that everything you're looking here, All these little rectangles, all these boxes are different Kubernetes resources. Up at the top, we have everything that you need to deploy cluster-wide, or Kubernetes cluster-wise. So at the bottom is a one per Kubernetes deployment. In the middle, those are what's representing our compute nodes, those H100 nodes I talked about earlier. And the bottom represents everything you need for a single Slurm cluster. So theoretically and in practice, you could duplicate that bottom rectangle into different namespaces and have different Slurm clusters running in your single large Kubernetes cluster. So first, you'll recognize all the normal Slurm components, the Slurm REST API, the Slurm Controller, Slurm Accounting. Those are all running as Kubernetes pods. They could each have their own resource requests as you scale up the cluster, or if you don't use the Slumm REST APIs much, if you use it a lot, you could fine-tune the resources they're using, which, when you're working in the cloud, can save you money. Not pictured here, but we're also deploying... what we call Slurm login nodes as Kubernetes pods. So this acts as the entry point for any of your Slurm users. They'll connect through this through SSH or whatever authentication method you set up. And once they're connected into these Slurm log in pods, to them it's just a normal Slurm cluster. You have all your S commands, S info, S batch, all that stuff works normally. You don't have to know anything about Kubernetes if you don't want to from there. Like I mentioned earlier, all of the configuration needed for the Slurm clusters deployed as config maps and secrets, and then they get mounted everywhere they need to be for the Slurm cluster to be operational, so this includes topology that gets automatically generated, any prolog or epilogue scripts you want to run, the Slumm config itself. So what this means, if you want a change to the Slumn config, you could just change this config map directly, those changes will be synced to all the compute nodes, the login nodes, without having to restart anything, then all you need to do is run your S-control reconfigure. Next, probably the most important part of these very large clusters are the compute modes themselves. In the middle, what you see labeled as Cates nodes, that represents the physical node, that 8x H100 node I talked about earlier. Then you'll see how there's a one-to-one mapping between these Slurm node set pods, these Slurf compute pods. The node set is a custom resource definition we created as part of Sunk to manage the scheduling and tracking the status of what's going on with all those compute nodes. We'll get into the details about this in a bit. Next, we have the Slurm sinker. So I talked about how we manage the state. We sync the status from what's going on in Slurm. In Kubernetes, those two worlds come together. Well, the Slurm syncer is the gateway between those two. It clocks to the Slurm REST API to push and pull information from there. And it also propagates information throughout the rest of the Kubernetes cluster. Next, we'll jump up to the top. This is the things you need to deploy once per Kubernetes cluster, so there's lots of different places throughout the cluster that information about Slurm needs to live in. So there's a number of operators that are deployed that watch their respective type of Kubernetes resource, run reconcile loops, make sure that everything's staying consistent. Not pictured here, but there's that Kubernetes scheduler I talked about earlier that gets deployed per Slurm cluster. And then because we're running on Kubernetes, the metrics for everything that's going on is exposed via Prometheus. You can ingest it in a number of ways. CoreWeave has created a number of Grafana dashboards that ingest all these metrics that I'll show an example of later. that makes it really easy to see what's going on throughout your Slurm cluster. Okay, now I'll jump into the node sets. So again, this is what's managing the deployment of those Slurm D processes. So if you look over to the right, it's a little diagram of what each of those compute node set pods look like. Any of your shared file system volumes are mounted on the Slurm B process itself is running in a container here. You can configure a number of other containers to run here if you'd like. All of the config that is needed to run the Slumm D process is also mounted onto here. And we say it's a cross between a daemon set and a staple set because these node sets essentially run in the background. They're not requesting the normal GPU resource you use when you're deploying GPU workloads in Kubernetes. They're requesting a special sunk accelerator resource. So what this allows you to do is run these node set Slurm compute pods on all of the nodes that you want to be in the Slurm cluster, but then you could also deploy Kubernetes workloads on top of that as well. And if you look down at the bottom of the screen, you'll see two examples of what the node set looks like and all the statuses it keeps. Going from left to right, the first few, desired, feasible, current, ready, up-to-date, those are all standard Kubernetes statuses. It's showing how many can I possibly scale up into, how many do I want to have, how many are running right now, how many ready. And those final two all the way on the right represent the status within the Slurm cluster. So running here is showing you how many of those nodes are running Slurm jobs in the cluster, and then how many are drained. So as you can see, there's 10 total compute pods running, 10 nodes in that Slurm cluster, but only eight are being used because two of them are being drained. And having this status of what jobs are running on those nodes within Slurm and when they're drained allows us to do protected rolling updates of these node sets. So let's say, for example, a new version of Slurm comes out. You have a new container to run your Slurm deprocess with that new versionof Slurm. Or you want to change any sort of node-level Slurm configuration. you push an update and sync that change out to the node set itself and it won't just go and restart all of the pods and kill all those SlurmD jobs that are running. Because it's knowing what's running in Slurm, it's going to go into the Slurm cluster, it'll drain all the nodes it wants to restart and it's not going to restart those pods until the node is fully drained which means no jobs are running out within Slurm and no new jobs will start as long as it's drained. It could do its update it'll reach back into Slurm and undrain those nodes. So therefore, we could consistently be pushing updates to these node sets and know we won't impact any customer running jobs. And like I said earlier, the thing that's powering that state, the thing the allows the node set to reach in the Slurm and change what's going on is the sinker. So the Slurm sinker is broken down into two separate parts. There's the Slurn client. This is the thing calling out to the Slum REST API. It's pushing information like draining nodes or starting jobs. It's pulling information about the status of running jobs on which nodes. And the other part of the Slurm syncer is the syncer pod controller. So once new information comes in from Slurm, the syncher pod controller is running reconcile loops on all those notes at pods. It's applying annotations, labels, status updates. It's watching for annotations labels and product dates coming from the Kubernetes side that it needs to push into Slurm. All right, so let's walk through an example of how this information can flow from Slurm to Kubernetes. Let's say within Slurm a node is idle. There's no jobs running, but I want to launch a new job. When you launch a new Slurm job within Sunk, there's a special script that runs as part of the prologue that'll reach out to the Slurm syncer to lock down that node to make sure the only thing using it is the Slurm job at the time. And what that API call to the slurm syncher will do, it'll apply a taint to the actual Kubernetes node to make anything that doesn't tolerate that taint is evicted. And the only things that tolerate that tint are the node set pods themselves. So from Slurm, you could start a job that information will flow through to the Kubernetes side and lock down that node to make sure only the Slurm job is using it at the time. And then from the other direction, let's say our health checking system or our hardware team notices there's a problem with one of the compute nodes that's in a customer Slurm cluster, and we want to core-done it from the Kubernetes-side. So we do the core-doning from the kubernetes-side, which is going essentially to get all of customer workloads off of that node so we can take it offline. Once that node gets core-toned, that information Will flow up into the node set pods, into the Slurm sinker. It'll reach out in the Slurm, drain that node. It'll give a drain reason of Kubernetes admin maintenance mode. So from within Slurm you know why it's drained. And what's in strained? Only when it's strained our hardware team can go and take it offline and do maintenance, plug it back in. And again, this is not going to impact any running jobs because we're only going to take things offline when it strained within Slurm. And then another thing that benefits from that state management is our Kubernetes Slurm scheduler plugin. So one of the reasons we set out to make Sunk is so we were able to use those nodes for both use cases very seamlessly. And this is what allows us to do that. So let's say we have 100 compute nodes. All 100 nodes are within that CERN cluster. But let's see if we can do that Let's say our large-scale training job is only running on 80 of those nodes. And we want to run a Kubernetes workload like inference on the rest of those notes. So in that manifest, defining our inference service will specify that we want to use this custom scheduler that gets deployed as part of Sunk. When you go and deploy that manifest, that custom schedulor will then start a dummy job within Slurm. It'll match the resource request, the number of GPUs. You could apply labels on that Kubernetes manifest to specify anything you'd normally specify when launching a Slurm job, like the partition, the reservation, any settings you want to do. It'll create that dummy Slurm Job. The Slurm schedule will take over. it'll schedule it onto a compute node, and once it does that, once that Slurm job is running, it'll actually then go and deploy that Kubernetes job onto that node. And when either one is canceled, it'll make sure that the respective side of it is also canceled. So in Slurm, if a more higher-priority training job were to run, it could evict these Kubernetes workloads from these nodes, and we always know that there's only one process, either from Slurm or from Kubernetes, using those nodes at the same time. As you can imagine, we've been using Sunk here at CoreWeave to power our customer Slurm clusters for about the past year or so. I talked about how once you're deploying everything with a Helm chart, you really unlock the vast ecosystem of Kubernetes deployments. At CoreWeave, we've been using a tool called Argo CD to deploy all of our Slurm Clusters. So what this looks like in practice, you'll have a GitOps repo that's infrastructure as code. It's defining your desired state of the cluster. Argo, CD will watch this GitOps Repo. It'll also watch the state of Kubernetes cluster. You could one-click sync to roll out changes to the Slurm cluster. You could roll things back. And what this means in practice is you could very easily, within 10 minutes, deploy a new Slurm Cluster and take it down. If you want to test a new slurm controller parameter, a new SLURM config, you could roll out a Slurm staging cluster to test these changes and roll it back down all very seamlessly. Like I said when I was talking about how everything at Corv is built on top of Kubernetes, we have a system we call failings, which is a very in-depth node lifecycle and node health checking system that runs as Kubernetes workloads using Argo workflows. So these run on the hour, every hour, on all of our idle compute nodes. This will run various hardware checks. It also runs, you know, nickel-all reduced tests, even small-scale ML training to make sure everything is performing properly. So usually, when everything is running within Kubernetes, it's fine, we can run things, customer workloads will evict these processes to make certain that we never interrupt a customer workflow with this. But when those nodes are within Slurm, because we know the state of what's running in Slurm We could run these node health checks only on nodes that aren't actively being used by Java and Slurm And because of that process I talked about earlier with the sinker, with the prolog locks on that node If a customer didn't have a job running on a node at the start of the hour And one of our health checks started running, and then they went to deploy a Slurm job It'll automatically evict that health check, and the customer won't have any idea that there was something running there And the hope here is that we're able to detect hardware issues before it impacts any client jobs. And then we can take care of it. I also talked about how we expose all the Prometheus metrics for everything about the Slurm cluster. We build a number of Grafana dashboards. There's a screenshot that I'm showing here. So this really represents the entire state of your Slurm Cluster. We have a numberof Grafano dashboards built out for various other parts of our Kubernetes stack. So our customers are very used to coming to Grafana to visualize the state of everything running on CoreWeave Cloud. So as you can see, maybe you're running a job within Slurm, and maybe it starts to hang, but you're not exactly sure from the logs if it's still running or if it'S hanging. Well, from one screen looking at this Grafана dashboard, you could instantly know something's going on. You could instantly track down timestamps, everything you need to do to figure out what the problem is. This specific screenshot is from earlier this year. We have a separate talk about MLPerf, so you can go and check that out for more information. But we partnered with NVIDIA and used a chunk of Inflection AI's cluster that's running on CoreWeave to submit an MLPerF results, a benchmark, earlier this year in April. And we were by far the biggest H100 submission. We smashed a lot of the records at the time. And all of this was running on top of Sunk, Slurm on Kubernetes. A big part of our success here was getting all these H100s online. This was very early in the H100 life cycle. So because we were operating with Sunk, everything was on top of Kubernetes. We were able to diagnose hardware issues and work back and forth with NVIDIA very, very quickly. And it really helped us get to this large scale very, très fast. So we're proud to say that we're looking to open source Sunk early in 2024. I have to give a couple of shout outs to some core weavers that aren't here. Peter Selinke, our VP of Engineering, is really the visionary behind building this project. He really kicked it off. And Andrew Sanitar has been our lead developer on here. When we open source this and you guys are looking through the source code, you'll see Andrew wrote many, many lines of code in there. So we definitely owe a lot to him. So yeah, keep on the lookout for marketing material announcements coming out from CoreWeave over the next few months as we begin to roll this out and open source us. And, for now, I'll take any questions.

Company
COREWEAVE INC
Keywords
COREWEAVE INC