SysArt
Book a briefing
SysArt

On-premises AI

GPU Resource Scheduling and Orchestration for On-Premises AI Workloads

How to schedule shared GPUs for on-premises AI: Kubernetes device plugins, MIG and time-slicing, Kueue and Slurm quotas, fair sharing and thermal limits.

Last reviewed by SysArt AI Architecture Team10 min readHow we review

In short

Schedule shared on-premises GPUs in layers: reserve capacity for production inference, let batch work and training fill the rest, and enforce quotas, borrowing and preemption in the scheduler. Share GPUs with MIG where workloads need isolation and with time-slicing only where they do not, and measure queue time and useful work per GPU-hour.

Key takeaways

  • Kubernetes allocates GPUs through device plugins as integer extended resources that cannot be overcommitted, and a device is not shared between containers; sharing works by advertising smaller units.
  • NVIDIA MIG splits supported GPUs into up to seven instances with dedicated memory paths and fault isolation; time-slicing shares a GPU with no memory or fault isolation.
  • Kueue gives teams guaranteed quotas per GPU model, lets them borrow idle quota within a cohort and reclaim it by preemption; Slurm ranks jobs on fair share, QOS and other factors.
  • Inside a running inference server, requests compete for the same batch and cache, so give service classes separate deployments, limits and explicit overload responses.
  • Treat thermal and power throttling as a monitoring and facilities problem first: watch the GPUs' clock event reasons and spread sustained heavy jobs across racks.
Close-up view of a computing tower representing GPU infrastructure for AI workloads

What does GPU scheduling have to solve on a shared platform?

It decides which workload gets which GPUs, when, and what happens when demand exceeds supply. On-premises the capacity is fixed, so the scheduler is where cost, fairness and service levels meet.

GPUs are the most expensive part of an on-premises AI platform, and every idle GPU-hour is capital already spent. The usual causes of idle capacity are familiar: teams reserve GPUs for exclusive use but only run inference during office hours, training jobs hold whole nodes while they load data, and batch work runs at night while daytime GPUs wait. A shared platform typically serves four kinds of work:

  • Real-time inference for user-facing applications, which needs guaranteed capacity and predictable latency.
  • Batch inference, such as embedding generation or document classification, where throughput matters more than any single request and work can be interrupted and resumed.
  • Training and fine-tuning, the heaviest consumers but the most flexible in timing, provided they checkpoint.
  • Experimentation by data scientists: bursty, unpredictable and rarely in need of sustained allocation.

The scheduling strategy follows from that mix. Reserve guaranteed capacity for real-time inference, let batch work use the remainder on a best-effort basis, and let training fill the gaps, especially at night and at weekends. The on-premises AI reference architecture shows where scheduling sits relative to the gateway, the inference engines and the GPU pools.

How does Kubernetes allocate GPUs?

Through device plugins. The GPU vendor’s plugin advertises the devices on each node to the kubelet as an extended resource, such as nvidia.com/gpu, and pods request that resource much as they request CPU or memory.

The Kubernetes documentation sets out the rules that matter for planning. Extended resources are supported only as integers and cannot be overcommitted, and a device cannot be shared between containers. A pod therefore receives whole devices: a small model that needs a fraction of a GPU still occupies all of it.

Two consequences follow. First, packing small inference services onto large GPUs needs one of the sharing mechanisms described below, which work by advertising smaller units than a whole GPU. Second, Kubernetes on its own places pods but does not hold jobs in a queue until a team’s quota allows them to start. Queueing layers add that: Kueue on Kubernetes, or Slurm in HPC-style clusters. Kueue also maps each GPU model to a group of nodes through a resource flavour, so that each model can be its own pool with its own quota.

How can several workloads share one GPU?

With hardware partitioning, NVIDIA Multi-Instance GPU (MIG), where workloads need isolation, or with time-slicing where they only need access. MIG gives each instance its own path to memory and fault isolation; time-slicing gives neither.

MechanismWhat it doesIsolationGood fit
Whole GPUOne container receives the entire deviceThe device is not shared between containersLarge models, training, latency-critical endpoints
MIGSplits a supported GPU into up to seven instancesDedicated memory paths, defined quality of service, fault isolationSeveral small inference services, multi-tenant production
Time-slicingAdvertises several replicas of one GPU that take turnsNo memory or fault isolation between replicasNotebooks, development, light workloads from one trusted team

MIG. NVIDIA’s MIG user guide describes partitioning a supported GPU into up to seven GPU instances, with L2 cache banks, memory controllers and DRAM address buses assigned uniquely to each instance. That gives each instance a defined quality of service and fault isolation from the others. MIG starts with the Ampere generation. NVIDIA lists it for data-centre GPUs such as the A100, H100, H200 and B200, while the RTX PRO 6000 Blackwell GPUs support up to four instances. It is not available on every GPU: the L40S, for example, is not on the list. Instances come in predefined sizes, so plan the mix of instance profiles on each node around the models you actually serve.

Time-slicing. NVIDIA’s GPU Operator can oversubscribe a GPU by advertising a set of replicas, each of which can be handed to a different pod. The documentation is explicit about the trade-off: there is no memory or fault isolation between replicas, the GPU gives an equal share of time to all processes, and a pod that requests more than one time-sliced replica is not guaranteed a proportional share of compute. Time-slicing suits development, notebooks and light inference from workloads that trust each other. It is a poor fit for production services from different teams, where one tenant’s memory use or crash can affect another.

Choose per pool rather than per cluster: whole GPUs for training and the largest models, MIG for multi-tenant production inference on supported GPUs, and time-slicing for development. Virtualising GPUs for virtual machines is a related but separate design decision.

How do quotas, queues and preemption keep sharing fair?

By putting the rules into the scheduler: each team gets a guaranteed share it can always reclaim, can borrow idle capacity from others, and loses borrowed capacity first when its owners need it back.

Kueue on Kubernetes. A ClusterQueue governs a pool of resources such as accelerators. It holds a nominal quota for each resource flavour, typically a GPU model, and Kueue admits a workload only if its requests fit within that quota. A namespace selector controls which teams’ namespaces may use the queue. ClusterQueues grouped in a cohort can borrow each other’s unused quota, bounded by a borrowingLimit on how much a queue may borrow and a lendingLimit on how much it lends. Preemption policies decide what happens when a team wants its guarantee back. With reclaimWithinCohort, a pending workload can preempt workloads from other queues in the cohort that are using more than their nominal quota, and withinClusterQueue governs the preemption of lower-priority work inside the team’s own queue. A ClusterQueue can also take part in fair sharing rules across queues.

Slurm. In HPC-style clusters, Slurm’s multifactor priority plugin ranks jobs on factors that include age in the queue, fair share, job size, partition, quality of service (QOS) and trackable resources. The fair-share factor compares the share of computing resources an account was allocated with what its jobs have already consumed. Jobs from under-served accounts are scheduled first, and jobs from over-served accounts run when the machine would otherwise sit idle, so there is no hard cut-off at a fixed allotment. PriorityDecayHalfLife sets how long past usage keeps counting.

Whichever scheduler you use, define three priority tiers and publish them:

  • Critical, never preempted: production inference endpoints and compliance-critical batch processing, backed by reserved capacity.
  • Standard, preemptible with checkpointing: training, fine-tuning, large batch inference and embedding generation. Checkpoint often enough that a preemption loses little work, but not so often that checkpointing itself becomes the cost.
  • Best-effort, preempted first: experiments, hyperparameter searches and ad hoc analysis, which run on spare capacity.

Explain the tiers to every team. A training job that will be checkpointed and resumed, not killed, makes a shared platform far easier to accept than an unexplained eviction. Distributed training adds one more requirement: all of a job’s workers must start together, or partial allocations sit idle while they wait for the rest, so admit multi-node jobs on an all-or-nothing basis.

How do you protect interactive inference inside a shared inference server?

Cluster scheduling decides where pods run, but inside a running inference server, requests from different teams compete for the same batch and the same key-value cache. Give each service class its own deployment or queue, cap batch concurrency per class, and make overload visible with explicit rejections rather than silent stalls.

Partitioning and quotas govern placement, but they do not decide which request gets GPU time inside a long-running inference process. A practical design:

  • Separate instances per tier. Run separate inference server instances or deployments for interactive and batch traffic, even on the same host. They interfere less than one process with a single queue.
  • Request classes with limits. Classify requests at the gateway as interactive, standard batch or opportunistic, and cap how many batch streams can be in flight per class.
  • Engine settings per class. Maximum batch size, maximum concurrent sequences and maximum context length should differ by tier. Keep a playbook of default values and who may change them, so that nobody retunes production at midnight for one team.
  • Defined overload behaviour. Decide in advance whether interactive traffic may preempt batch work, how long requests may queue, and what clients receive when capacity runs out. A fast, explicit “too many requests” response with a retry hint is better than a stall of several seconds.
  • Per-tenant signals. A busy GPU can still give one tenant very poor tail latency, so track queue time before the first token, time to first token, preemptions and out-of-memory events per namespace or API key.

When tail latency spikes or out-of-memory events cluster around one tenant, treat it as a capacity and tenancy incident, not only an application defect. Runbooks should state who may throttle which tenant class, how to drain a node without dropping long-lived sessions where possible, and how internal consumers are told about degraded service. Post-incident reviews should ask whether the problem was visible in existing metrics, and add a signal if it was not. Correlate inference metrics with upstream dependencies such as retrieval and authentication, so that GPU queues are not blamed for problems elsewhere. Our explainer on LLM inference serving covers batching and latency in more depth.

Should GPU scheduling be thermal-aware?

Rarely as a custom scheduler, more often as monitoring and placement rules. GPUs protect themselves by lowering their clock speeds when they reach thermal or power limits, so watch for those events, spread sustained heavy jobs across racks, and fix cooling problems with your facilities team instead of scheduling around them.

NVIDIA’s nvidia-smi tool reports why a GPU’s clocks are reduced. Its documented clock event reasons include HW Thermal Slowdown, which cuts core clocks by a factor of two or more because the temperature is too high; SW Thermal Slowdown, which applies when the GPU exceeds its maximum operating temperature; SW Power Cap, when the GPU draws too much power; and HW Power Brake, which is triggered externally, for example by the system power supply. Each of these reaches your users as latency variance that looks like a software problem.

Workloads differ in how they heat a GPU over time. Training, fine-tuning and long-context batch jobs keep GPUs at high power for hours, while interactive inference is burstier. A pragmatic thermal policy:

  • Measure first. Collect temperature, power draw and clock event reasons for each GPU alongside service latency, and check whether throttling coincides with missed service levels.
  • Spread sustained load. Avoid concentrating long, high-power jobs on GPUs in the same chassis, rack or cooling zone. Topology labels on nodes turn this into a placement rule rather than a manual decision.
  • Use time. If the facility runs warm in the afternoon, schedule heavy batch work for cooler hours.
  • Keep headroom. Do not plan power and cooling at the limit of the rated figures; leave room for growth and for the hottest days.
  • Escalate to facilities. Persistent thermal slowdowns on specific nodes point to airflow, liquid-cooling or rack-density problems that scheduling cannot fix.

A custom scheduler extension that scores nodes on temperature trends is possible, but it is one more component to maintain. Build it only if measurements show that throttling is a recurring cause of missed service levels.

How do you know the scheduling policy works?

Measure queue and admission time per service class, preemptions, GPU-hours allocated versus used, and useful work per GPU-hour, and review the results with the teams that share the platform.

  • Compute utilisation, as nvidia-smi reports it, is the share of time during which at least one kernel was running on the GPU. A slow, poorly optimised model can keep it high while achieving little.
  • Memory in use shows how much GPU memory is allocated. High memory use with little compute activity often means a model is loaded but idle, a candidate for sharing or consolidation. Do not confuse it with the memory utilisation figure in nvidia-smi, which is the share of time memory was being read or written.
  • Throughput per GPU-hour is the business measure: requests served, documents processed or training steps completed per GPU-hour. It shows whether a scheduling change produces more work or only higher utilisation figures.
  • Queue and admission time per class show whether the guarantees hold. Interactive work should not wait behind batch work.

Review the dashboards regularly with infrastructure and data science teams together. Look for GPUs that sit idle at particular hours, workloads that could be consolidated, and training jobs that would run better off-peak. The same data shows when contention has become structural; then the answer is more capacity, sized with the LLM GPU sizing calculator, not more tuning.

SysArt designs scheduling, GPU sharing and quota policies as part of an on-premises AI implementation, on your own infrastructure or in a dedicated environment through private AI hosting.

Featured image by GAMERCOMP.RU on Unsplash.

Frequently asked questions

What is the difference between MIG and time-slicing?

MIG partitions a supported NVIDIA GPU in hardware into as many as seven instances, each with its own path to memory, a defined quality of service and fault isolation. Time-slicing lets several workloads take turns on a whole GPU. NVIDIA's documentation states that there is no memory or fault isolation between time-sliced replicas, and that requesting more replicas does not guarantee proportionally more compute.

Can Kubernetes share one GPU between several pods?

Not through the basic device plugin model: GPUs are integer extended resources that cannot be overcommitted, and a device is not shared between containers. To share a physical GPU, the platform advertises smaller units instead, either MIG instances on supported GPUs or time-sliced replicas configured through NVIDIA's GPU Operator. Each pod then receives one of those units rather than the whole GPU.

What does Kueue add to Kubernetes for GPU workloads?

Quota management for batch and AI jobs. A ClusterQueue holds quotas per resource flavour, such as a GPU model, and admits a workload only if its requests fit. ClusterQueues in a cohort can borrow each other's unused quota within borrowing and lending limits, and preemption policies let a team reclaim its guaranteed share from workloads that are borrowing beyond their own quota.

How does Slurm decide which GPU job runs first?

With the multifactor priority plugin, a job's priority combines factors that include its age in the queue, fair share, job size, partition, quality of service (QOS) and trackable resources. The fair-share factor favours accounts that have used less than their allocated share, without cutting anyone off at a fixed allotment, and PriorityDecayHalfLife controls how long past usage keeps counting.

Why does inference latency vary on a busy GPU cluster?

Common causes are requests from several tenants competing for the same batch and key-value cache inside one inference server, a time-sliced GPU shared with other workloads, and a GPU that is lowering its clock speeds because it has reached a thermal or power limit. Per-tenant queue metrics, together with the clock event reasons that nvidia-smi reports, show which cause applies.

Related insights

Plan your private AI with people who build it

Book a briefing. We look at your use case, data and constraints, and you leave with the deployment options and governance steps that fit.