Kubernetes ML Training: Overhead Benchmarks in Numbers
Kubernetes machine learning training is not inherently slow. The performance penalty depends on which layer is being measured.

Containerization alone usually removes 0–5% of CPU, memory, and network performance. The larger losses appear elsewhere: storage can lose 5–15% in containerized environments, Ethernet can add 10–30% overhead against InfiniBand in distributed training, and poor GPU placement can reduce performance by as much as 8x when scheduling separates GPUs connected by NVLink.
The strongest benchmark results do not support a universal claim that Kubernetes is unsuitable for high-performance ML. They support a narrower conclusion. Kubernetes preserves near-bare-metal performance only when the cluster exposes the hardware topology correctly and avoids inserting avoidable network, storage, and orchestration layers into the training path.
The measured gap is configuration-dependent
The most direct comparison between Kubernetes and bare metal reports an approximately 19% gap in training time, with bare metal consistently faster. The observed difference was attributed to higher CPU and RAM overhead and to fluctuations in GPU utilization under Kubernetes.
That result is material. It is also insufficient as a general estimate for Kubernetes ML training overhead.
A separate eight-GPU benchmark found an 8% performance advantage for bare metal over Kubernetes. The main difference was not container startup, process isolation, or the Kubernetes control plane. The bare-metal configuration used raw InfiniBand. The Kubernetes configuration used Flannel, carrying IP traffic over InfiniBand. The network path reduced available bandwidth and widened the training-time gap.
At the other end of the range, MLPerf Training v3.1 results on Red Hat OpenShift 4.13, running on a Supermicro server with eight NVIDIA H100 GPUs, were within 4% of bare-metal Ubuntu results for ResNet-50. Controlled tests with virtualized NVIDIA A100 GPUs have also reached approximately 97.5% of bare-metal performance, corresponding to a 2.5% overhead on standard ML training benchmarks.
These results describe different system designs. They should not be averaged into a single “Kubernetes penalty.”
| Benchmark condition | Reported result | Primary constraint |
|---|---|---|
| Kubernetes versus bare metal in a broad 2025 training comparison | Approximately 19% slower in Kubernetes | CPU and RAM overhead, GPU utilization variability |
| Eight-GPU Kubernetes setup using Flannel over InfiniBand | Bare metal approximately 8% faster | Network bandwidth reduction |
| OpenShift 4.13 versus bare-metal Ubuntu on eight H100 GPUs | Within 4% | Optimized enterprise deployment |
| Virtualized A100 versus bare-metal A100 | Approximately 2.5% overhead | Virtualization layer under controlled conditions |
| Ethernet versus InfiniBand for multi-node training | 10–30% overhead | Inter-node communication latency and bandwidth |
| GPUs separated from their NVLink peers | Up to 8x degradation | Incorrect topology-aware scheduling |
The practical range is therefore broad. A well-configured Kubernetes platform can remain close to bare metal. A platform with generic networking and topology-blind scheduling can lose a substantial portion of the hardware’s throughput.
Kubernetes does not impose one overhead. It exposes a stack of overheads, and the dominant term changes with the workload.
Containerization overhead is usually not the main problem
The CPU and memory cost of containers is frequently treated as the central explanation for slower ML training. Benchmark data does not support that simplification.
General containerization measurements show 0–5% losses in CPU, memory, and network performance. These values are small relative to the 19% training-time gap reported in a broader Kubernetes comparison. They can matter in tightly optimized workloads, but they rarely explain the full result on their own.
The distinction is architectural. A container shares the host kernel and does not emulate a complete machine. The container runtime adds process isolation, namespace management, cgroup enforcement, image handling, and lifecycle operations. None of these operations should dominate a long-running GPU kernel if the training job has direct access to the accelerator and the data path is efficient.
The situation changes with storage.
Containerized environments can lose 5–15% in disk operations. Virtualized environments can lose up to 35%. ML training pipelines are particularly sensitive when they repeatedly decode large image datasets, stream sharded data, materialize checkpoints, or perform frequent metadata operations. A GPU may remain available while waiting for the input pipeline. The resulting utilization loss is then attributed to “Kubernetes performance,” although the actual bottleneck is storage and data movement.
Several implementation details determine whether this loss is visible:
- Dataset access mode. Network-mounted volumes introduce latency and throughput variability that local NVMe storage avoids.
- File count. Millions of small objects create metadata pressure. Large shards reduce lookup overhead and improve sequential reads.
- Checkpoint frequency. Frequent writes expose containerized filesystem and volume behavior more clearly than infrequent checkpointing.
- Page cache behavior. Memory limits and eviction policies can change the effective data-loading pattern.
- Device locality. A fast local disk attached to one node does not solve a pipeline that repeatedly moves data across the network.
- Runtime configuration. Overlay filesystems are convenient for images. They are not automatically optimal for sustained training I/O.
The correct comparison is not “container versus no container.” It is a comparison of the complete data path: storage device, filesystem, volume driver, mount configuration, cache behavior, and loader parallelism.
For long-running compute-bound workloads, containerization can be close to neutral. For input-bound workloads, the storage layer may dominate the result. This explains why a benchmark focused on GPU kernel throughput can report minimal overhead while an end-to-end training benchmark reports a much larger gap.
Where the loss appears in the training loop
An ML training step combines several components:
1. Data is read from local or remote storage.
2. Samples are decoded and transformed.
3. Batches are transferred to GPU memory.
4. Forward and backward kernels execute.
5. Gradients are synchronized across GPUs or nodes.
6. Checkpoints and metrics are written.
Container overhead does not affect each component equally. The compute kernels may run at close to native speed. Storage operations and network synchronization may not.
This distinction matters for model classes with different execution profiles. A large transformer with long GPU kernels may hide small runtime costs. A smaller model with frequent synchronization barriers may expose them. A recommender system with substantial embedding-table traffic can be more sensitive to memory and network behavior than a dense vision model.
The benchmark must therefore report more than total training time. Useful measurements include GPU utilization, step-time variance, input wait time, storage throughput, interconnect bandwidth, CPU steal or throttling, and the percentage of time spent in synchronization.
Without those counters, “Kubernetes overhead” remains an aggregate label rather than an attributable result.
Network topology determines distributed training speed
The largest recurring penalty in Kubernetes ML training is often the network path between GPUs and nodes.
Distributed training requires repeated gradient exchange. Data-parallel configurations synchronize model updates after each training step or after a defined accumulation interval. The communication volume increases with model size, batch strategy, and parallelism configuration. When the network cannot sustain the required bandwidth, GPUs spend more time waiting for synchronization.
Multi-node benchmarks show a 10–30% overhead when standard Ethernet replaces InfiniBand. The range depends on the model, message size, number of nodes, collective communication pattern, and the quality of the Ethernet implementation. It is not a fixed property of Ethernet, but the penalty is consistent enough to affect infrastructure decisions.
InfiniBand provides high bandwidth and low latency with an ecosystem designed for HPC communication. RDMA allows data movement with reduced CPU involvement. Kubernetes can expose this capability, but it does not guarantee that the training process will use it. The network device plugin, CNI, RDMA configuration, NCCL settings, and pod placement policy must align.
A common failure mode is to install a functional CNI and assume that functional networking is equivalent to high-performance networking. It is not.
In the Dell eight-GPU benchmark, the Kubernetes setup used Flannel, with IP traffic carried over InfiniBand. The bare-metal setup used raw InfiniBand. The 8% performance difference was therefore linked to the software-defined network path rather than to the container boundary itself.
This is a critical distinction for infrastructure teams. The question is not whether Kubernetes supports InfiniBand. The question is whether the exact training job receives the same communication path, device access, and collective-communication behavior as the bare-metal baseline.
Ethernet, InfiniBand, and the measurement boundary
A distributed training benchmark should identify at least the following:
- Physical interconnect: Ethernet, InfiniBand, or another fabric.
- Link speed and effective application bandwidth.
- RDMA availability and whether the job uses it.
- CNI and overlay behavior.
- NCCL or equivalent collective backend.
- Number of nodes and GPUs per node.
- Placement of ranks across the topology.
- Message sizes and collective operations.
- CPU utilization during communication.
- All-reduce and all-gather latency.
A benchmark that reports only “Kubernetes on eight GPUs” omits the variables most likely to determine the result.
Network overhead is also nonlinear in practice. A job can tolerate modest latency when computation between synchronization points is long. The same latency can become expensive when the model performs frequent small collectives. Strong scaling creates another problem. As more GPUs are added to a fixed workload, computation per GPU falls while communication remains significant. The cluster then approaches a communication-bound regime.
For this reason, Kubernetes machine learning performance loss should be evaluated at the intended scale. Single-node measurements cannot validate a multi-node deployment. A one-node job may use NVLink and local memory efficiently while a multi-node job relies on Ethernet and incurs synchronization delays at every step.
A Kubernetes cluster can expose an InfiniBand device and still deliver an inferior training path. Device visibility is not the same as communication efficiency.
The control plane consumes resources, but usually not GPU time
Kubernetes adds a control plane. It schedules pods, maintains desired state, manages service discovery, processes events, and coordinates node-level operations. Enterprise distributions add further components for security, observability, lifecycle management, and policy enforcement.
OpenShift running on bare metal requires approximately 16–24 GB of memory and 8–12 CPU cores for the control plane. Vanilla Kubernetes requires approximately 8–16 GB of memory and 4–8 CPU cores under the cited deployment assumptions.
These resources are not free. They reduce the capacity available for system services or workload nodes. They also increase the operational footprint of a cluster. But control-plane memory consumption should not be confused with direct training-time overhead.
The API server does not participate in every GPU kernel. The scheduler does not coordinate each gradient exchange. Once a pod is placed and running, most training execution occurs through the container runtime, device plugins, network stack, storage layer, and distributed training framework.
The control plane becomes relevant in several conditions:
- Training jobs are short enough that scheduling and startup time becomes a significant share of total runtime.
- The cluster launches many workers simultaneously.
- Pods are repeatedly preempted, restarted, or rescheduled.
- Autoscaling reacts slowly to bursty training demand.
- The scheduler lacks topology awareness and places resources across inefficient paths.
- Node health checks or device discovery delay job readiness.
- The control plane is colocated with workload services on undersized nodes.
For a 72-hour training run, a minute of pod scheduling time is negligible. For thousands of short hyperparameter trials, the same minute multiplied across jobs changes utilization and cost. The relevant metric is therefore not only training throughput. It is end-to-end experiment throughput, including queue time, startup latency, failed retries, image pull time, and data staging.
This is where Kubernetes can create value despite a small execution penalty. Better queueing, quota enforcement, resource isolation, reproducibility, and automated recovery can increase cluster utilization. A slower individual run can still produce more completed experiments per day if the bare-metal workflow leaves accelerators idle between jobs.
That trade-off must be measured rather than assumed.
Resource overhead by layer
| Layer | Typical impact or requirement | What the benchmark should isolate |
|---|---|---|
| Container runtime | Usually small for CPU and memory | Kernel execution, process overhead, device access |
| Containerized storage | Approximately 5–15% disk-operation loss | Read throughput, write throughput, metadata latency |
| Virtualized storage | Up to 35% disk-operation loss | Hypervisor, virtual disk, filesystem, and queueing |
| Vanilla Kubernetes control plane | Approximately 8–16 GB RAM and 4–8 CPU cores | Cluster capacity, not per-step GPU throughput |
| OpenShift control plane | Approximately 16–24 GB RAM and 8–12 CPU cores | Enterprise platform capacity and service overhead |
| Overlay networking | Potentially material in distributed training | Latency, bandwidth, RDMA path, collective operations |
This separation prevents a common analytical error. A platform may consume more host memory while preserving near-native GPU throughput. Conversely, a lightweight control plane may coexist with poor network or storage performance. The two effects are independent.
GPU scheduling can erase the value of expensive hardware
GPU topology is a first-order performance variable.
Eight identical GPUs do not represent one interchangeable pool. The physical links between them determine communication cost. GPUs connected through NVLink can exchange data much faster than GPUs that must communicate through the host CPU or PCIe fabric. A distributed training process that is placed across the wrong subset of GPUs can therefore lose more performance from topology disruption than from containerization.
Benchmarks report up to an 8x degradation when Kubernetes scheduling separates GPUs connected by NVLink. This is not a marginal efficiency issue. It can invalidate the hardware selection itself. A node with high-end accelerators becomes functionally similar to a weaker configuration if collective communication is forced over a slower path.
The scheduling problem has several components:
1. Resource discovery. The cluster must know which GPU devices exist and how they are connected.
2. Topology representation. The scheduler must represent locality, not only device count.
3. Pod placement. The workload must receive a topology-compatible set of GPUs.
4. Process mapping. Distributed ranks must map to devices in a way that preserves fast links.
5. Communication configuration. NCCL or another backend must detect and use the available topology.
6. Failure behavior. Rescheduling must not silently move the job to a topologically inferior configuration.
A basic GPU resource request such as “eight GPUs” does not express all of these requirements. It may allocate the correct count while ignoring whether the devices share NVLink paths. Generic bin-packing can produce a valid allocation and a poor training topology.
This issue becomes more serious when multiple jobs share a node. A scheduler may divide GPUs into apparently balanced groups that fragment NVLink islands. The result is resource utilization by count, but not by effective bandwidth.
What topology-aware validation requires
A production validation run should compare at least three placement modes:
- All GPUs selected within the same NVLink-connected domain.
- GPUs distributed across separate domains on the same node.
- GPUs distributed across nodes with the configured interconnect.
The training benchmark should record step time, all-reduce time, GPU utilization, link utilization, and scaling efficiency. A simple wall-clock comparison can identify a regression but cannot establish its cause.
The result should also be tested under failure and rescheduling conditions. A configuration that is fast only when manually placed is not operationally complete. Kubernetes must preserve the placement policy through job restarts, upgrades, and node maintenance.
This is one of the clearest differences between a development cluster and an ML infrastructure platform. The former allocates GPUs. The latter allocates a communication topology.
Orchestration overhead depends on workload duration
Workflow orchestration introduces another variable. Engines such as Airflow can coordinate data preparation, training, evaluation, checkpoint handling, and deployment. Containers improve repeatability and isolation. Neither guarantees higher throughput for every workload.
Under light workloads, parallel execution through a containerized orchestration engine produced a speedup of only 0.71. Orchestration overhead dominated the useful work. Under heavy workloads, the same general approach produced a speedup of 1.90, reducing makespan from 1,013 seconds to 532 seconds.
The numbers show why the unit of analysis matters. A task that runs for a few seconds cannot amortize scheduler decisions, container startup, dependency resolution, logging, and communication between workflow components. A task that runs for hours can absorb those costs while benefiting from parallel execution and better resource utilization.
The same principle applies to distributed training jobs. Kubernetes overhead is often expressed as a percentage of compute time, but operational overhead is partly additive. Image pulls, pod initialization, volume attachment, rendezvous, and worker synchronization occur before useful training begins. For short jobs, these fixed costs dominate. For long jobs, they become less significant.
A useful model separates three categories:
- Fixed overhead. Scheduling, image pulls, volume mounts, worker startup, and rendezvous.
- Per-step overhead. Network communication, synchronization, data loading, and filesystem activity.
- Capacity overhead. Control-plane resources, daemonsets, monitoring agents, and reserved node capacity.
The total effect depends on job length and execution pattern. A long, compute-bound job can tolerate fixed overhead while remaining sensitive to per-step communication. A short hyperparameter trial may be limited almost entirely by fixed overhead. A data-heavy pipeline may be constrained by storage and CPU preprocessing.
End-to-end throughput is the operational metric
Individual training speed is not the only production objective. A platform team typically cares about:
- Completed experiments per day.
- GPU utilization over the full queue.
- Time from submission to first useful batch.
- Failed-job recovery time.
- Cost per trained model.
- Variance in step time.
- Reproducibility across nodes.
- Scheduling fairness and resource fragmentation.
Bare metal may win the narrow benchmark of one continuously running job. Kubernetes may win the broader benchmark of a mixed workload with multiple teams, priorities, retries, and deployment dependencies.
That does not excuse a 19% training-time regression. It changes the optimization target. If the platform incurs a 19% penalty on every job and does not improve utilization or reliability, the trade-off is weak. If the platform stays within 2.5–4% of bare metal while increasing accelerator occupancy and reducing operational intervention, the infrastructure case is stronger.
The comparison must use the same hardware, dataset, software versions, precision mode, batch size, checkpoint policy, and network path. It must also include queue and startup time when assessing platform productivity.
A benchmark methodology that can support an infrastructure decision
A credible Kubernetes ML training overhead benchmark should be designed as an ablation study. Each layer should be changed independently where possible.
The baseline should run the same model on bare metal and record:
- Total training time.
- Time per step and variance.
- GPU utilization and memory utilization.
- CPU utilization and throttling.
- Storage throughput and input wait time.
- Network bandwidth and collective-operation latency.
- Checkpoint duration.
- Scaling efficiency across GPU counts and node counts.
The Kubernetes test should preserve the baseline wherever the platform allows. The image should use the same framework and CUDA stack. The model, data shards, batch size, optimizer, and precision should remain constant. The network path must be documented rather than described only as “cluster networking.”
The ablation sequence should then isolate:
1. Bare metal versus container runtime on the same host.
2. Container runtime versus Kubernetes single-node execution.
3. Direct networking versus overlay networking.
4. InfiniBand or RDMA versus Ethernet.
5. Local NVMe versus the selected persistent volume.
6. Topology-aware versus topology-blind GPU scheduling.
7. One long training job versus many short trials.
8. Vanilla Kubernetes versus the enterprise distribution used in production.
The objective is not to produce a single favorable percentage. It is to identify the term that controls the result.
Reporting the result without hiding the trade-off
A useful report should present at least four numbers:
- Execution overhead: increase in training time for one job.
- Communication overhead: change in collective-operation time.
- Startup overhead: time from submission to first training step.
- Platform throughput: completed workload per unit of time and cost.
These values answer different questions. A platform can have low execution overhead and high startup overhead. It can have high single-job overhead and better aggregate throughput. It can preserve GPU kernel performance while losing time in the input pipeline.
The report should also include confidence intervals or repeated-run variance when the difference is small. A reported 2.5% overhead is not meaningful if run-to-run variance is 3%. Conversely, a consistent 4% gap across repeated MLPerf-style tests is operationally relevant for large training budgets.
Unknowns remain at larger scale. The exact Kubernetes overhead beyond 25,000 GPUs is not established by the cited results. The performance impact of eBPF-based CNIs relative to bare metal for multi-node training is also not resolved. The same is true for GPUDirect Storage in Kubernetes compared with bare-metal deployments. These areas require direct measurements under controlled configurations.
The practical boundary between acceptable and avoidable loss
The benchmark evidence supports a layered decision rule.
A 0–5% loss in CPU, memory, or network performance from containerization is usually an acceptable systems cost when the platform provides isolation and repeatability. A 2.5–4% end-to-end gap under an optimized GPU deployment is within the range many teams can justify.
A 10–30% penalty from replacing InfiniBand with Ethernet is different. It is an architectural decision, not an incidental container cost. The same applies to an 8x degradation caused by separating NVLink-connected GPUs. That loss should be treated as a scheduling failure.
Storage losses of 5–15% require workload-specific analysis. They may be invisible in a compute-bound benchmark and decisive in a data-loading pipeline. Virtualized storage losses approaching 35% should trigger a design review when training depends on sustained local or checkpoint I/O.
The 19% gap in the broad Kubernetes comparison is a diagnostic signal. It indicates that the platform configuration or workload path contains material overhead. It does not establish that Kubernetes itself is responsible for all of it.
The acceptable Kubernetes penalty is not a universal percentage. It is the residual after topology, networking, storage, and startup costs have been measured separately.
Final assessment
Kubernetes ML training overhead is measurable, but the term is too broad to guide engineering decisions without decomposition.
Containerization generally adds little CPU and memory cost. Storage can impose a larger penalty. Distributed training is highly sensitive to the interconnect, with Ethernet adding 10–30% overhead against InfiniBand in the cited benchmarks. GPU scheduling can produce the most severe failure mode: separating NVLink-connected devices can reduce performance by up to 8x. Control-plane resource consumption affects cluster capacity and job startup, but it is not equivalent to per-step GPU overhead.
The best results are conditional. OpenShift achieved results within 4% of bare metal on an eight-H100 ResNet-50 benchmark. Virtualized A100 configurations reached approximately 97.5% of bare-metal performance. These outcomes require disciplined hardware exposure, topology-aware placement, an appropriate communication backend, and a storage path that matches the workload.
The correct operational standard is therefore not “Kubernetes must match bare metal.” It is more precise: every material gap must have an identified cause and a measured business trade-off.
If the loss comes from an overlay network, replace or reconfigure the path. If it comes from topology-blind scheduling, fix placement. If it comes from storage, redesign the data pipeline. If it comes from short-job orchestration, batch work or change the execution model. Only the residual overhead should be attributed to Kubernetes itself.