Skip to content

Getting T4 GPU quota on AWS and Azure for CI

A GPU job on your own cloud account needs GPU quota, and most new AWS accounts and Azure subscriptions have none. Until it’s raised, the cloud refuses the VM and the job waits. Here are the quotas a T4 CI runner counts against, how much to ask for, and where.

Both clouds count GPU quota in vCPUs, per region. One T4 runner, AWS’s g4dn.xlarge or Azure’s Standard_NC4as_T4_v3, uses 4. Ask for 4 times the GPU jobs you want running at once. On AWS, backmesh uses g4dn.2xlarge, the same T4 with 8 vCPUs, when no g4dn.xlarge is free, so ask for 8 per job to leave room for it.

Ask in each region your runners use. backmesh’s backmesh install --plan and backmesh status list the regions, print each GPU quota, and name the one to raise.

Runner Quota Code
Spot g4dn All G and VT Spot Instance Requests L-3819A6DF
On-demand g4dn Running On-Demand G and VT instances L-DB2E81BA

In the Service Quotas console, pick the region, search for “G and VT”, open the quota and choose Request increase at account level. Or with the AWS CLI, for example 16 vCPUs, room for four g4dn.xlarge jobs or two g4dn.2xlarge, in us-west-2:

Terminal window
aws service-quotas request-service-quota-increase \
--service-code ec2 --quota-code L-3819A6DF \
--desired-value 16 --region us-west-2

Request the spot and on-demand quotas separately; a spot label (backmesh-ubuntu-2404-gpu-t4) uses the on-demand quota only when it falls back on demand, and the on-demand label (backmesh-ubuntu-2404-gpu-od-t4) uses only the on-demand quota.

Runner Quotas
Spot Standard_NC4as_T4_v3 Total Regional Low-priority vCPUs
On-demand Standard_NC4as_T4_v3 Standard NCASv3_T4 Family vCPUs, and Total Regional vCPUs

Spot VMs have no family quota on Azure: they count against “Total Regional Low-priority vCPUs” with every other spot VM in the region, so a spot GPU runner shares it with your CPU spot runners. Ask for enough for both. On demand, a T4 VM needs room in both its family quota and the regional total.

In the portal, open Quotas → Compute, filter by region, search for “NCASv3_T4” or “Low-priority”, select the quota and request a new limit. To see where you stand:

Terminal window
az vm list-usage --location westus2 -o table

backmesh’s Azure T4 runners use the regions that offer the type: eastus, centralus, eastus2, southcentralus, westus2 and westus3.

Once the quota is there, a waiting GPU job starts on its own; on AWS a cold backmesh-ubuntu-2404-gpu-t4 job took a median of about 2 minutes 10 seconds from queued to started in our benchmark. Quota is only permission: spot capacity can still run short, and then a spot job waits for a T4 while an on-demand one doesn’t.

The GPU runners page has the labels and prices; How to run CUDA and PyTorch tests in GitHub Actions has a workflow to run on them.

Which AWS quota covers g4dn instances? Spot g4dn instances count against “All G and VT Spot Instance Requests” (L-3819A6DF), on-demand ones against “Running On-Demand G and VT instances” (L-DB2E81BA). Both are in vCPUs per region.

Which Azure quota covers Standard_NC4as_T4_v3? On demand, “Standard NCASv3_T4 Family vCPUs” and “Total Regional vCPUs”. Spot VMs count against “Total Regional Low-priority vCPUs” instead, shared with every other spot VM in the region.

How many vCPUs of GPU quota does a CI runner need? 4 per T4 job running at once for g4dn.xlarge or Standard_NC4as_T4_v3. On AWS, backmesh falls back to g4dn.2xlarge, 8 vCPUs, when no g4dn.xlarge is free.