Understanding Compute Targets
This lesson explains which compute target suits each stage of the life cycle, how VM families and sizes differ, and how quotas limit what can be created.
Learning outcomes
After completing this lesson, you will be able to:
- Choose a compute target for development, training and inference.
- Distinguish NC and ND GPU families and InfiniBand sizes.
- Explain how VM family quotas cause OutOfQuota errors.
- Describe the quota headroom endpoints need.
Compute in the life cycle
Different stages of the machine learning life cycle need different compute. Interactive exploration needs one machine that a person can work on for hours. Training needs many machines for a short time, then none. Real-time inference needs machines that are always available and scale with requests. Azure Machine Learning offers a compute type for each of these patterns.
| Compute type | Purpose | Billing pattern |
|---|---|---|
| Compute instance | Development: notebooks, VS Code, testing scripts | While running; stop it when idle |
| Compute cluster | Training jobs, pipelines and batch scoring | Per node while nodes exist; can scale to zero |
| Serverless compute | Jobs without managing a cluster | Per job for the compute it uses |
| Kubernetes compute | Training and inference on your own AKS or Arc-enabled cluster | The cluster you operate |
| Managed online endpoint compute | Real-time inference | Per instance while the deployment exists |
VM sizes and families
Every compute target uses Azure VM sizes. CPU sizes such as the D and E series suit data preparation, classical algorithms and small models; memory-optimized E sizes suit large in-memory datasets. GPU sizes in the NC, ND and NV families suit deep learning: NC sizes for single-node training and inference, ND sizes for large-scale multi-GPU training with high-bandwidth interconnects, and NV sizes for visualization workloads.
Sizes with an r in their name, such as Standard_NC24rs_v3, support InfiniBand networking between nodes, which matters for multi-node distributed training because gradient synchronization between nodes is otherwise slow. Choosing the smallest size that meets the memory and time needs is the main lever on training cost.
Quotas
Azure limits how many cores of each VM family a subscription can use in a region. Azure Machine Learning applies these quotas per VM family across compute instances, clusters and managed online endpoints, and a request for more nodes than the quota allows fails or waits. GPU quota in particular is often zero by default and must be requested.
Managed online endpoints reserve extra quota for upgrades: a deployment needs roughly 20 percent more cores than its instance count implies, calculated as ceil(1.2 x instances) x cores per VM. An OutOfQuota error during deployment usually means this calculation exceeds the remaining quota, and the fix is a quota increase, a smaller size or fewer instances.
Queued jobs and quota
When a job sits in the Queued state for a long time on a cluster that has not reached its maximum node count, check the regional quota for the VM family before suspecting the job itself.
Choosing a compute target
A few questions decide the target in most scenarios. Is the work interactive? Then a compute instance. Is it a batch of jobs that should cost nothing between runs? Then a cluster with a minimum of zero nodes, or serverless compute if the team does not want to manage clusters at all. Must the work run on infrastructure the company already operates, for example for data residency or because GPUs are already owned? Then attached Kubernetes compute.
Matching compute to work
A team needs compute for three activities: two data scientists exploring data in notebooks during working hours, a nightly retraining pipeline that runs for 40 minutes on four CPU nodes, and a real-time scoring API that must answer within 100 milliseconds at all times. The team wants to minimize cost without losing these capabilities.
Each activity has its own compute. The data scientists each get a compute instance with idle shutdown and a schedule that stops it in the evening. The nightly pipeline runs on a compute cluster with a minimum of 0 and a maximum of 4 nodes, or on serverless compute, so nothing is billed outside the 40 minutes. The scoring API runs on a managed online endpoint deployment with enough instances for availability and autoscale for load.
Running the pipeline on the compute instances would save a resource but compete with interactive work and depend on the instances being on. Keeping a cluster at a minimum of four nodes would make the nightly run start faster but bill all day. Serving the API from a compute cluster is not possible, because clusters run jobs, not real-time endpoints.
Creating a GPU cluster succeeds, but jobs fail to scale out with an OutOfQuota error. What should be checked?
Show answer
The subscription's quota for that VM family in the region. Quota is assigned per VM family in vCPUs, and creating a cluster does not reserve it, so the job fails when nodes are requested.
Exam Tips
Remember for the exam
- Compute instances for development, clusters or serverless for jobs, endpoints for real-time inference.
- GPU families: NC for single-node work, ND for large multi-GPU training.
- Sizes with r in the name support InfiniBand for multi-node training.
- OutOfQuota errors mean the VM family quota is too small; endpoints need about 20 percent extra.