LLM Training Infrastructure: A Practical Guide to Scheduling, Networking, and Storage
A practical guide for teams using cloud resources to train large language models. Learn how to define data and access boundaries, schedule heterogeneous GPU resources in Kubernetes, validate high-speed networks, and organize storage for dataset reads and checkpoint writes. Includes configuration examples and a troubleshooting checklist.
Scope and Prerequisites
This guide is for technical teams that already use—or plan to use—cloud compute for large language model training. It assumes familiarity with Linux, Kubernetes, and basic GPU operations. It does not cover model architecture, training hyperparameter tuning, commercial contracts, or financing.
The main infrastructure challenges fall into four areas: fine-grained compute scheduling, networking for distributed communication, storage that can keep pace with checkpoint reads and writes, and control over data and code on external infrastructure.
1. Define Boundaries for Data, Code, and Access
Whether compute comes from an on-premises data center or a cloud provider, first identify which assets must remain under your organization’s control.
Separate Data and Code
Create a dedicated virtual private cloud (VPC) for training datasets, cleaned corpora, and fine-tuning data. Use network access control lists (ACLs) and security groups to restrict inbound and outbound traffic.
Keep core training framework code in private repositories. External compute clusters should retrieve tasks and report metrics through controlled APIs rather than directly holding the source code.
Apply Least Privilege and Manage Keys
Developers should have access only to their assigned resource pools or namespaces. The following policy is illustrative; consult your cloud provider’s documentation for valid action names and resource formats.
{"Version": "2012-10-17","Statement": [{"Effect": "Allow","Action": ["compute:CreateTrainingJob", "compute:DescribeTrainingJob"],"Resource": "arn:cloud:compute:region:account:pool/partner-pool-a/*"},{"Effect": "Deny","Action": "storage:GetObject","Resource": "arn:cloud:storage:::core-corpus/*"}]}
Support these permissions with three operational controls:
- Encrypt storage. Use a key management service (KMS) to encrypt object storage and disks, with separate keys for different datasets.
- Use short-lived credentials. Replace long-term access keys with temporary credentials whose lifetimes are measured in hours.
- Rotate keys and retain audit logs. Set a key rotation schedule and retain logs according to organizational compliance requirements. A common practice is to retain logs for at least 180 days. Configure alerts for suspicious logins and unauthorized access attempts, and assign owners to respond.
2. Schedule Heterogeneous GPU Resources
Prerequisites
The example below requires all of the following:
- Kubernetes 1.26 or later.
- NVIDIA GPU Operator, or a separately deployed NVIDIA device plugin, to register
nvidia.com/gpuresources. - Node Feature Discovery (NFD) or custom scripts to label nodes with GPU models and NVLink topology information.
- An RDMA device plugin configured to register
rdma/ibresources. - For MIG partitioning, GPUs that support MIG and a partitioning strategy configured according to the device plugin documentation.
GPU time-slicing does not provide GPU memory isolation. Workloads sharing a GPU can interfere with one another, making it unsuitable for large-model training. MIG is better suited to small-model inference and experimental workloads.
Example Configuration
This configuration is for single-node training with eight GPUs. For multi-node training, use a dedicated job controller such as PyTorchJob or Volcano Job rather than creating a standalone Pod.
apiVersion: v1kind: Podmetadata:name: llm-training-podlabels:job: llm-pretrainspec:priorityClassName: training-highaffinity:nodeAffinity:requiredDuringSchedulingIgnoredDuringExecution:nodeSelectorTerms:- matchExpressions:- key: gpu-topologyoperator: Invalues:- NVLink-Enabledcontainers:- name: trainerimage: registry.example.com/train/base:2026.11resources:requests:cpu: "32"memory: 256Ginvidia.com/gpu: 8rdma/ib: 1limits:cpu: "32"memory: 256Ginvidia.com/gpu: 8rdma/ib: 1securityContext:capabilities:add: ["IPC_LOCK"]volumeMounts:- name: shmmountPath: /dev/shmvolumes:- name: shmemptyDir:medium: MemorysizeLimit: 64Gi
Key configuration details:
priorityClassNamecontrols preemption priority when resources are constrained. Training and evaluation workloads should use different priorities.requestsandlimitsdefine resource reservations and limits for the container. Extended resources such as GPUs must either be specified only underlimitsor have equalrequestsandlimits.gpu-topologyis a label generated by NFD or a node-level script. It must reflect the actual NVLink connections; otherwise, placement based on that label is not meaningful.IPC_LOCKand sufficient/dev/shmcapacity are common runtime requirements for RDMA and NCCL. Check the documentation for your communication libraries for specific requirements.
More advanced topology-aware scheduling also requires supporting scheduling components, such as Volcano or Kueue. The default scheduler handles resource quantities at the node level rather than detailed GPU interconnect topology.
Troubleshooting Checklist
| Symptom | What to check | Common causes |
|---|---|---|
| GPUs are not visible inside the Pod | Run kubectl describe node <node> and check the nvidia.com/gpu count; run nvidia-smi on the node |
Driver not loaded; device plugin not running; container runtime not configured to use the NVIDIA runtime |
| RDMA resources are not registered | Check rdma/ib in kubectl describe node <node>; run ibv_devinfo inside the container |
RDMA plugin not deployed; device names in the configuration do not match the actual network adapters |
| Topology does not match labels | Run nvidia-smi topo -m and compare the results with node labels |
Outdated labeling script; physical GPU connections differ from the labeled topology |
| Cross-node bandwidth is low | Run perftest tools such as ib_write_bw; set NCCL_DEBUG=INFO to check whether communication uses IB or TCP; inspect packet-drop and pause-frame counters on switches and network adapters |
Communication falling back to TCP; incomplete lossless-network configuration; incompatible adapter firmware or driver versions |
3. Build and Validate High-Speed Networking
Tensor parallelism and data parallelism are sensitive to both bandwidth and latency. Network planning involves two main decisions.
Choose the Network Protocol
For the RoCEv2 configuration described here, enable Priority Flow Control (PFC) and Explicit Congestion Notification (ECN) on both switches and network adapters. Tune congestion-control parameters according to vendor guidance. These settings must be consistent end to end; missing configuration on part of the path can lead to packet loss and retransmissions.
InfiniBand requires a subnet manager, such as opensm or a switch-integrated subnet manager, to handle routing and address assignment.
Choose the Network Topology
Medium-sized clusters commonly use a fat-tree topology, while larger deployments may use leaf-spine designs. Training networks generally need an oversubscription ratio close to 1:1. Higher oversubscription can make cross-rack communication a bottleneck.
Validate the network with tests rather than relying on design documents alone. Use all_reduce_perf from nccl-tests for multi-node load testing and compare measured bandwidth with the network adapters’ rated bandwidth.
If measured performance falls below a threshold agreed upon by the team—for example, 85% of rated bandwidth—work through the troubleshooting checklist above.
Smart network adapters can also offload protocol-stack processing to hardware and reduce CPU usage. Measure the benefit under actual workloads before deciding whether to invest.
4. Design Distributed Storage and Data Movement
Large-model training creates two distinct I/O workloads:
- Reading datasets made up of large numbers of small files.
- Periodically writing large checkpoints.
Because these workloads have different requirements, a tiered storage design is common.
| Storage tier | Throughput | Latency | Unit cost | Consistency | Typical uses |
|---|---|---|---|---|---|
| Local NVMe SSD | Highest per-node throughput | Lowest | Relatively high; capacity must be planned per node | Local to the node; cross-node use requires synchronization | Hot-data caching, checkpoint staging |
| Parallel file system | High | Low to moderate | Moderate | Product-dependent; consult vendor documentation | Highly concurrent small-file reads, shared checkpoints |
| Object storage | High aggregate throughput | Higher | Low | Product-dependent; consult vendor documentation | Cold data, archives, dataset version management |
Both managed services from major cloud providers and self-managed parallel file systems can meet these requirements. Base the choice primarily on budget, the team’s operational capabilities, and data compliance requirements.
Asynchronous saving is a common approach to checkpoint writes.
