> ## Documentation Index
> Fetch the complete documentation index at: https://docs.expanse.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Scale and performance

> What Expanse's collector costs each node on SLURM and Kubernetes, and how much one deployment handles: GPUs, workloads a day and storage outages.

Expanse runs a collector on every node of your cluster. Before installing it, platform teams ask two questions: what does it cost the jobs on each node, and can one deployment keep up with the whole cluster? This page answers both.

## What the collector does

The collector is a small program that runs on each node beside your jobs. Every 5 seconds it reads counters that the operating system, the GPU driver and the scheduler already keep: what each job asked for, the CPU, memory and GPU it is using, and how it ends. It never changes a job. It sends what it reads to the data plane inside your network. If the data plane can't be reached, it keeps the readings on the node's disk and sends them later, and your jobs carry on as normal.

On each node, the collector reads counters from the jobs and GPUs every 5 seconds and sends them to the data plane in your network, which stores them for the dashboard and predictions.

Two profilers are optional. The GPU profiler reads the GPU's hardware counters, and the Python stack profiler records where a job's code spends its time. A rule can also trace one job's GPU work for about 25 seconds when it spots a likely problem, such as a GPU sitting idle while the CPU is busy.

## Cost on each node

The collector runs on every node, all the time, so even a small cost adds up across a cluster. We ran the same ResNet-50 training job many times with Expanse on and off, and compared how long it took. Each figure is how much longer the job took with Expanse on, with its interval in brackets. Where the interval includes zero, we found no measurable difference.

> [tab] SLURM
>
> One NVIDIA GH200 with 64 Arm vCPUs. Standard collection made no measurable difference to the GPU job and added about 3.8% to the CPU job, almost all of it from CPU hardware counters, which you can switch off.
>
> | What was on | GPU job, one GH200 | CPU job, 32 cores | Collector CPU, share of node |
> | - | - | - | - |
> | Collection | +0.37% (-0.04 to +0.78) | +3.81% (+2.27 to +5.37) | 0.08% |
> | Collection and the GPU profiler | +0.25% (-0.65 to +1.15) | Not reported | 0.09% |
> | Collection and the Python stack profiler | +0.45% (0.00 to +0.91) | +3.85% (+2.60 to +5.12) | 0.33% |
> | Collection and both profilers | +0.32% (-0.40 to +1.05) | +3.72% (+1.47 to +6.02) | 0.33% |
> | Deep GPU traces, on each request | +1.15% (+0.17 to +2.14) | Not reported | 0.69% |
>
> > [accordion] How we measured on SLURM
> >
> > * One cloud machine with one NVIDIA GH200 and 64 Arm vCPUs, running SLURM.
> > * ResNet-50 on the Imagenette dataset: 30 epochs on the GH200, about 164 seconds, and one epoch on 32 CPU cores, about 399 seconds.
> > * Each setup ran beside a run without Expanse, in random order, until the last three pairs agreed within half a percentage point. 228 runs in all.
> > * Collector memory peaked at 182 MiB with collection alone and 461 MiB with both profilers. It sent 5.7 to 7.3 KiB/s over the network.
> > * The longest gap between samples was 5.5 seconds. The newest sample in the data plane was a median 11.5 seconds old.

> [tab] Kubernetes
>
> Two NVIDIA H100 80GB GPUs with 52 vCPUs, running k3s. Standard collection made no measurable difference to the GPU job and added about 1.3% to the CPU job. CPU hardware counters were off in these runs. They are now on by default, and we have not yet measured them on Kubernetes.
>
> | What was on | GPU job, one H100 | CPU job, 32 cores | Collector CPU, share of node |
> | - | - | - | - |
> | Collection | +0.12% (-0.43 to +0.67) | +1.32% (+0.38 to +2.26) | 0.10% |
> | Collection and the GPU profiler | +0.06% (-0.59 to +0.72) | +0.81% (-0.66 to +2.31) | 0.12% |
> | Collection and the Python stack profiler | +0.71% (+0.52 to +0.90) | +3.08% (+1.40 to +4.79) | 0.83% |
> | Collection and both profilers | +0.50% (-0.03 to +1.03) | +2.50% (+1.37 to +3.64) | 0.83% |
> | Deep GPU traces, on each request | +1.02% (+0.51 to +1.54) | Not reported | 0.58% |
>
> > [accordion] How we measured on Kubernetes
> >
> > * One cloud machine with two NVIDIA H100 80GB GPUs, 52 vCPUs and 442 GiB of memory, running k3s.
> > * ResNet-50 on the Imagenette dataset: 30 epochs on one H100, about 200 seconds, and one epoch on 32 CPU cores, about 176 seconds.
> > * Each setup ran back to back with a run without Expanse, in random order, with 95% confidence intervals. All 76 runs finished.
> > * Collector memory peaked at 52 MiB with collection alone and 308 MiB with both profilers. It sent 19 to 50 KB/s over the network.
> > * Every 5-second sample arrived. The newest sample in the data plane was a median 4.6 seconds old.

Our benchmark kit runs the same test on one of your Kubernetes GPU nodes, with our training job or yours, and shows you what it will send us before it sends anything. Use a cluster you can spare: the test removes Expanse's collectors, which stops collection on every node until the kit puts them back. For SLURM, [talk to us](https://expanse.sh/contact) about a run on your nodes.

## What one deployment handles

One deployment serves one cluster. Every figure below is for one deployment.

The data plane queues readings from every collector and spreads them across storage servers. A larger cluster adds storage servers rather than a second deployment.

## Talk to us

> [card] [Book a call](https://expanse.sh/contact)
>
> We'll size a deployment for your cluster and plan a run on your own nodes.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.