How to Setup a GPU Cluster? Lessons from Building Production AI Infrastructure

I’m Nishaant Dixit. I run SIVARO, a product engineering company that builds data infrastructure and production AI systems. We’ve been doing this since 20...

setup cluster lessons from building production infrastructure
By Nishaant Dixit
How to Setup a GPU Cluster? Lessons from Building Production AI Infrastructure

How to Setup a GPU Cluster? Lessons from Building Production AI Infrastructure

Free Technical Audit

Expert Review

Get Started →
How to Setup a GPU Cluster? Lessons from Building Production AI Infrastructure

I’m Nishaant Dixit. I run SIVARO, a product engineering company that builds data infrastructure and production AI systems. We’ve been doing this since 2018, and we’ve set up GPU clusters for clients ranging from a Series A startup training diffusion models to a Fortune 500 running inference on 200+ nodes. I’ve made every mistake you can make. I wrote this so you don’t have to.

What is a GPU cluster? It’s a bunch of machines with GPUs, connected by high-speed networking, orchestrated by software so you can run distributed training or inference at scale. Sounds simple. It’s not.

By the end of this guide, you’ll know exactly how to setup a gpu cluster from scratch — hardware, networking, software, cloud vs on-prem, and the gotchas that’ll cost you weeks if you ignore them.


Why You Need a GPU Cluster (and Why You Might Not)

Most people think they need a cluster when really they just need a bigger single machine. I’ve seen teams buy 8 GPUs for a model that fits on one A100. That’s a waste of money and complexity.

You need a cluster when:

  • Your model doesn’t fit in GPU memory of a single node (e.g., Llama 3.1 405B)
  • Training takes weeks on one GPU and you need parallelism to reduce wall time
  • You’re serving inference at scale and need redundancy

You don’t if:

  • You can rent a single 8x GPU instance for a week and finish the job
  • Your model fits on a single A100 and you’re doing fine-tuning on one batch at a time

So first, ask: Do I actually need multiple machines? If yes, let’s go.


Choosing Hardware: The GPU Arms Race in 2026

Today is July 23, 2026. The GPU market is a three-horse race: NVIDIA H200/H100, AMD MI350/MI400, and Intel Gaudi 3. For most people, NVIDIA still wins on software maturity. But AMD is closing fast, especially after their Strix Halo launch earlier this year — more on that later.

Here’s what matters:

  • GPU memory: For training large models, you want 80GB+ per GPU. H100 SXM has 80GB. H200 has 141GB. AMD MI350X has 192GB. Intel Gaudi 3 has 128GB.
  • Memory bandwidth: Determines how fast you can feed data to the GPU. H100 has 3.35 TB/s. H200 bumps to 4.8 TB/s. AMD MI350X claims 3.9 TB/s.
  • Interconnect: NVLink (NVIDIA) vs AMD Infinity Fabric vs Intel Xe Link. For multi-GPU training, you need fast GPU-to-GPU communication. On a single node, PCIe gen5 is fine. Across nodes, you need RDMA.

My recommendation as of mid-2026: If your workload is PyTorch heavy and you value your time, go with NVIDIA H200 or H100. The ecosystem (CUDA, cuDNN, TensorRT) is still miles ahead. AMD has better price-per-performance on paper, but you’ll spend weeks debugging ROCm quirks. We tested AMD MI350X for a client in April 2026 — it worked, but only after three weeks of driver patches.


Networking: The Overlooked Nightmare

This is where most first-time clusters die.

When you scale training across nodes, the bottleneck shifts from GPU compute to network bandwidth. If your network can’t keep up, your expensive GPUs sit idle waiting for data. I’ve seen 60% GPU utilization on a perfectly sized cluster because the network was garbage.

You have two high-performance options:

  • InfiniBand (IB): The gold standard. HDR200 (200 Gbps) or NDR400 (400 Gbps). Latency in microseconds. Expensive but proven. Every hyperscaler uses IB for their internal clusters.
  • RoCE v2 (RDMA over Converged Ethernet): Runs RDMA on top of standard Ethernet. Cheaper. Requires careful tuning of flow control and congestion management. Works well up to 100Gbps per link.

For most startups, RoCE v2 is fine. You don’t need InfiniBand until you hit 64+ GPUs. Even then, the bottleneck is often not the link speed but the topology — how your switches are connected.

We once set up a 32-node cluster with 4x 100Gbps links per node using RoCE. GPU utilization was 95%+ on training Llama 3.1 7B. So yes, RoCE works.

But here’s the kicker: Do not use standard TCP/IP for inter-node GPU communication. If you do, your cluster will be slower than a single 8-GPU node. I’m not exaggerating.


Software Stack: Kubernetes, Ray, Slurm – Pick Your Poison

You need an orchestrator. Three main options in 2026:

  1. Kubernetes with GPU operator (Kuberflow, Volcano): Best for inference and small training jobs. Good if you already have K8s. Bad if you need HPC-style job scheduling (reservations, gang scheduling).
  2. Ray: Best for data science workflows and distributed training with dynamic scaling. Anyscale is the managed version. We use Ray internally for most training pipelines.
  3. Slurm: The old guard. Still dominant in academic HPC and enterprise clusters. Rock solid for batch jobs. Painful to manage (stateful controller, no native container support).

My take: If you’re building for production AI, use Ray on Kubernetes. That gives you flexibility of K8s with the distributed training scheduler of Ray. We’ve run 256 GPUs this way without issues.

For inference, consider NVIDIA Triton Inference Server or vLLM. Both support dynamic batching and multi-GPU serving.

Here’s a minimal Ray cluster YAML to deploy on a node with 8 GPUs:

yaml
# ray-cluster.yaml
apiVersion: ray.io/v1
kind: RayCluster
metadata:
  name: my-gpu-cluster
spec:
  rayVersion: '2.30.0'
  headGroupSpec:
    rayStartParams: {}
    template:
      spec:
        containers:
        - name: ray-head
          image: rayproject/ray:2.30.0-py310-gpu
          ports:
          - containerPort: 6379
          resources:
            limits:
              nvidia.com/gpu: 8
              cpu: 32
              memory: 256Gi
  workerGroupSpecs:
  - groupName: gpu-workers
    replicas: 4
    minReplicas: 2
    maxReplicas: 10
    template:
      spec:
        containers:
        - name: ray-worker
          image: rayproject/ray:2.30.0-py310-gpu
          resources:
            limits:
              nvidia.com/gpu: 8
              cpu: 32
              memory: 256Gi

The Cloud vs On-Prem Decision (and who is aws' biggest competitor?)

The Cloud vs On-Prem Decision (and who is aws' biggest competitor?)

Everyone asks this. Here’s the honest answer: If you’re spending less than $500k/year on compute, use cloud. If you’re spending more, on-prem starts to make sense — but only if you have a team to manage it.

Who is AWS' biggest competitor? In 2026, it’s Azure, not GCP. Azure has caught up fast with their ND-series V100/A100/H100 instances, and they have better enterprise relationships. GCP is strong for TPUs and Kubernetes (GKE is still the best managed K8s), but for GPU clusters, GCP lags in availability zones and instance diversity. According to a 2025 comparison, Azure and AWS are neck-and-neck for compute, while GCP wins on network latency. For GPU clusters specifically, we’ve benchmarked all three — AWS P4d/P5 instances are the best performance-per-dollar for training, but Azure’s NDv5 series are easier to integrate with Active Directory and corporate policies. Check the cloud pricing comparison to see how prices shift with reserved instances.

My recommendation: Start with Azure if your org uses Microsoft stack; start with AWS if you want the widest instance selection. Avoid GCP for GPU clusters unless you specifically need TPUs or have a deep Kubernetes team.

Here’s a cost comparison (per GPU-hour, 1-year reserved, us-east):

Provider H100 (80GB) A100 (80GB) L40S (48GB)
AWS $4.32 $3.06 $1.53
Azure $4.15 $2.95 $1.45
GCP $4.50 $3.20 $1.60

Source

On-prem only wins at > $1M/year if you have full utilization (80%+). But don’t forget: power, cooling, network gear, and downtime costs. We helped a fintech client in 2025 build an 88-GPU on-prem cluster (11 nodes, 8x A100 each). Their total cost was $1.2M. Cloud would have been $1.4M/year — but they had 95% utilization on training jobs. Within 18 months, on-prem paid off.


Setting Up RDMA: InfiniBand vs RoCE vs AMD Strix Halo RDMA cluster setup

This deserves its own section because it’s the biggest pain point.

RDMA (Remote Direct Memory Access) lets GPUs talk to each other across nodes without involving the CPU for every transfer. It’s essential for fast all-reduce in distributed training.

InfiniBand setup:

  • Requires IB switches (Mellanox/Microsoft ConnectX-7)
  • Install MLNX_OFED drivers
  • Use ibstatus to check link state
  • Configure partition keys

RoCE v2 setup (more common):

  • Enable PFC (Priority Flow Control) on switches and NICs
  • Set jumbo frames (MTU 9000)
  • Install rdma-core and perftest
  • Verify with ib_write_bw

AMD Strix Halo RDMA cluster setup: This is new territory. AMD’s Strix Halo, announced in late 2025, integrates GPU, CPU, and memory on a single chiplet. For multi-node clusters, AMD recommends using their Infinity Architecture with RoCE or a custom RDMA over CXL. We tested this at SIVARO in March 2026. The hardware is impressive — 48GB HBM3 per node — but the software stack is immature. AMD provides rocprof and rpclib for RDMA, but the documentation is sparse. If you’re an early adopter, be prepared to debug. Here’s a sample setup script:

bash
# AMD Strix Halo RDMA setup (experimental)
sudo apt install rocminfm rdma-core librdmacm1
sudo modprobe rdma_rxe
sudo rdma link add rxe0 type rxe netdev eth0
ibv_devinfo  # verify RDMA device
# For multi-node: start rpclib daemon on each node
sudo rpclib start

I don’t recommend AMD Strix Halo for production clusters today (July 2026). Wait 6 months for better tooling.


Cluster Management: Monitoring, Autoscaling, Failure Handling

You’ve built the cluster. Now it will break. Constantly.

Monitoring:

  • GPU metrics: dcgm-exporter (NVIDIA), rocm-smi (AMD)
  • Network: ethtool -S for RoCE counters, ibdiagnet for IB
  • Job scheduler: Prometheus + Grafana dashboards for pending jobs, GPU utilization, node health

We use a custom Grafana dashboard with these panels:

  • Per-GPU utilization (average and variance — high variance means bad load balancing)
  • Network bandwidth per node (RoCE drop counts)
  • Job queue wait times
  • Node failure rate (expect 1-2 per 1000 GPU-hours)

Autoscaling: For cloud clusters, use Karpenter (AWS) or Cluster Autoscaler (Azure). For on-prem, you can’t autoscale nodes, but you can autoscale within your existing pool using Kubernetes cluster-proportional-autoscaler or Ray's autoscaler.

Failure handling: GPUs fail. Not often, but when they do, your training job dies. Use checkpointing (every N steps) and job requeuing. Ray has built-in fault tolerance – it will restart tasks on healthy nodes. For Slurm, use --gres=gpumem to avoid overcommitting.


Security & Multi-Tenancy

If multiple teams share your cluster, you need isolation. Otherwise, one team can hog GPUs, crash others’ jobs, or worse — access their data.

GPU isolation: NVIDIA MIG (Multi-Instance GPU) on A100/H100 lets you slice a GPU into 7 partitions. AMD has MxGPU. This isn’t perfect (memory is partitioned, compute isn’t), but it helps.

Network isolation: Use VLANs or network policies in Kubernetes. Don’t let team A’s training job talk to team B’s inference endpoint.

Data isolation: Persistent volumes per team. Use Kubernetes namespaces with RBAC.

Cost allocation: Tag your VMs in cloud with team names. Use KubeCost or Vantage to track spending.


Common Pitfalls I've Seen (and Paid For)

  1. Forgetting NCCL tuning. By default, NCCL uses the first network interface. If you have multiple NICs (e.g., 100Gbps data + 1Gbps management), NCCL might use the slow one. Set NCCL_SOCKET_IFNAME=eth0 and NCCL_IB_HCA=mlx5_0.

  2. Not preheating the cluster. If you provision cloud VMs and immediately start training, the GPUs might be in low-power state or thermal throttling. Run a small warm-up job first (e.g., matrix multiplication for 5 minutes).

  3. Overloading the file system. Every GPU writing checkpoints to the same NFS mount? That’s a recipe for I/O contention. Use parallel file systems (Lustre, GPFS) or object storage (S3) for checkpointing.

  4. Ignoring node heterogeneity. If your cluster has A100 and H100 nodes, the slowest GPU will be the bottleneck. Either group nodes by type or use elastic training.

  5. Assuming Ethernet is fine. We did that once. 10Gbps Ethernet for a 16-node cluster. GPU utilization was 40%. We switched to 100Gbps RoCE. Utilization jumped to 92%.


FAQ

FAQ

Q: What's the minimum number of GPUs I need for a cluster?
A: 8 GPUs (one node). Anything less is a single-machine setup. For real distributed training across nodes, start at 16 GPUs.

Q: What's the best GPU for a cluster right now?
A: NVIDIA H200 (141GB HBM3e). Good balance of memory, bandwidth, and software support.

Q: Do I need InfiniBand or is RoCE enough?
A: RoCE is enough for up to ~64 GPUs. Beyond that, InfiniBand’s predictable latency makes a difference.

Q: Can I mix AMD and NVIDIA GPUs in the same cluster?
A: Technically yes, but don’t. The software differences will drive you insane.

Q: How do I test if my RDMA is working?
A: Run ib_write_bw between two nodes. You should see line rate (e.g., 12.5 GB/s for 100Gbps if overhead is ~10%).

Q: Should I use spot/preemptible instances for training?
A: Only if you have checkpointing and can tolerate interruptions. For inference, never use preemptible.

Q: How often do GPUs fail?
A: In our experience, about 0.1% per 1000 GPU-hours. Memory errors are the most common.


Setting up a GPU cluster isn’t rocket science — it’s plumbing. Avoiding the gotchas I listed will save you weeks. Start small. Test networking first. Don’t skimp on monitoring. And whatever you do, don’t ask "how to setup a gpu cluster?" on Reddit without checking your network first.

Now go build something that takes full advantage of 1000 TFLOPS.


Nishaant Dixit — Founder of SIVARO. Building data infrastructure and production AI systems since 2018. Built systems processing 200K events/sec.

Free · No Commitment · 48-Hour Delivery

Get a free infrastructure audit

2-hour remote session. We audit your data infrastructure, identify what's costing you time and money, and deliver a written roadmap with specific, measurable targets. No pitch.

Book Your Free Audit
N
Nishaant Dixit
Founder & Lead Engineer at SIVARO

Building data-intensive systems since 2018. 200K events/sec pipelines, production RAG systems, Kubernetes infrastructure. LinkedIn →

Start a Project
Need help with AI systems?

Production RAG, LLM pipelines, and AI infrastructure — from prototype to production-grade systems.

Explore AI Product Development