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.

    1. {
    2. "Version": "2012-10-17",
    3. "Statement": [
    4. {
    5. "Effect": "Allow",
    6. "Action": ["compute:CreateTrainingJob", "compute:DescribeTrainingJob"],
    7. "Resource": "arn:cloud:compute:region:account:pool/partner-pool-a/*"
    8. },
    9. {
    10. "Effect": "Deny",
    11. "Action": "storage:GetObject",
    12. "Resource": "arn:cloud:storage:::core-corpus/*"
    13. }
    14. ]
    15. }

    Support these permissions with three operational controls:

    1. Encrypt storage. Use a key management service (KMS) to encrypt object storage and disks, with separate keys for different datasets.
    2. Use short-lived credentials. Replace long-term access keys with temporary credentials whose lifetimes are measured in hours.
    3. 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/gpu resources.
    • 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/ib resources.
    • 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.

    1. apiVersion: v1
    2. kind: Pod
    3. metadata:
    4. name: llm-training-pod
    5. labels:
    6. job: llm-pretrain
    7. spec:
    8. priorityClassName: training-high
    9. affinity:
    10. nodeAffinity:
    11. requiredDuringSchedulingIgnoredDuringExecution:
    12. nodeSelectorTerms:
    13. - matchExpressions:
    14. - key: gpu-topology
    15. operator: In
    16. values:
    17. - NVLink-Enabled
    18. containers:
    19. - name: trainer
    20. image: registry.example.com/train/base:2026.11
    21. resources:
    22. requests:
    23. cpu: "32"
    24. memory: 256Gi
    25. nvidia.com/gpu: 8
    26. rdma/ib: 1
    27. limits:
    28. cpu: "32"
    29. memory: 256Gi
    30. nvidia.com/gpu: 8
    31. rdma/ib: 1
    32. securityContext:
    33. capabilities:
    34. add: ["IPC_LOCK"]
    35. volumeMounts:
    36. - name: shm
    37. mountPath: /dev/shm
    38. volumes:
    39. - name: shm
    40. emptyDir:
    41. medium: Memory
    42. sizeLimit: 64Gi

    Key configuration details:

    • priorityClassName controls preemption priority when resources are constrained. Training and evaluation workloads should use different priorities.
    • requests and limits define resource reservations and limits for the container. Extended resources such as GPUs must either be specified only under limits or have equal requests and limits.
    • gpu-topology is 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_LOCK and sufficient /dev/shm capacity 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.