Pools
On this page
What is a Pool?
Pool Types
Configuration Options
Managing Pools
Best Practices
Related Concepts
What is a Pool?
A pool is a collection of compute nodes (virtual machines) that Azure Batch uses to run tasks. Pools define the target compute environment, including VM size, OS image, scaling behavior, and networking.
Pool Types
Azure Batch supports several pool types to match workload requirements:
- Dedicated: Standard VMs that you pay for regardless of utilization.
- Low‑priority: VMs offered at a discounted rate, pre‑emptible when capacity is needed elsewhere.
- Spot: Similar to low‑priority but with dynamic pricing and higher pre‑emptibility.
Configuration Options
Key pool properties you can configure:
{
"id": "myPool",
"vmSize": "Standard_D2_v3",
"targetDedicatedNodes": 5,
"targetLowPriorityNodes": 0,
"maxTasksPerNode": 4,
"osFamily": "WindowsServer",
"cloudServiceConfiguration": { "osFamily": "6" },
"containerConfiguration": { "type": "DockerCompatible" },
"networkConfiguration": { "subnetId": "/subscriptions/.../subnets/mySubnet" }
}
Managing Pools
Typical lifecycle operations:
Create a pool
az batch pool create \
--id myPool \
--vm-size Standard_D2_v3 \
--target-dedicated-nodes 5 \
--image canonical:UbuntuServer:18.04-LTS:latest
Resize a pool
az batch pool resize \
--pool-id myPool \
--target-dedicated-nodes 10
Delete a pool
az batch pool delete --pool-id myPool
Best Practices
- Use autoscaling to match demand and reduce cost.
- Prefer low‑priority or spot for fault‑tolerant workloads.
- Set maxTasksPerNode based on node memory and CPU.
- Enable deallocation timeout to gracefully handle pre‑emptions.