The simple version
A coach books the gym (GPUs) but forgets to bring the balls (data) until the team is already on court. Good schedulers make sure the balls arrive before, or right as, the team walks in.
Slurm
Slurm allocates nodes to jobs; storage is mostly the job's problem unless you make it the scheduler's. Common patterns:
- Stage data in a prolog or first job step (copy to node-local NVMe), then train.
sbcastcopies a file to every allocated node's local storage.- Burst buffer plugins let a job request fast staging space and stage data in and out around the job.
--constraintfeatures (node labels) steer jobs to nodes with the right local storage or network.
Kubernetes
In Kubernetes, data placement comes through volumes (Lesson 31), node affinity and labels, and topology-aware provisioning (WaitForFirstConsumer). Init containers can stage data before the main container starts. Batch frameworks add gang scheduling and queueing so a multi-node job starts all at once.
Data-aware placement
If a node already holds a warm cache of the dataset (Lesson 33), placing the next job there skips the copy. Few schedulers do this automatically; teams often encode it with labels ("dataset-x-cached") and affinity. The trade-off: waiting for a warm node vs starting now on a cold one and paying the staging time.
Tools
sbatch --constraint=FEATURESteer Slurm jobs to labelled nodes.
sbcast FILE DESTCopy a file to all nodes in a Slurm allocation.
kubectl label node / nodeAffinityMark and target nodes with warm caches.
Quiz
Lab
Lab 7.2 · Cold cache on a new node
The same training job runs on gpu-a with GPUs 100% busy, but on the newly added gpu-f they sit idle more than half the time. On each node the job reads /scratch/cache/video-shards if it exists, otherwise /nas/datasets/video-shards.
Try it now in the simulator (opens with the command ready; press Enter):
$ hosts$ ls -lh /scratch/cache