Azure Batch – Pool Auto scale forumulas

Just playing around with some Azure Batch Auto-scaling formulas.
See the Azure documentation here :

Time based – Static

Between 8am and 6pm, Monday – Wednesday (0=Sunday) 5 nodes will be allocated to the pool.

Task based – Dev/Economical

Restrict capacity to 0 unless there is a waiting task – then allocates a single vm node to take the job.
This will built up to 5 minutes of latency before the pool autoscales, not including node boot time, and any pre-tasks the pool has associated. In my case this took up to 12 minutes before the scale occurred, originally going over my coded task schedulers timeout of 10 minutes.

Combination of task and time

On Monday (8am-6pm) ensure a minimum capacity of 1. When there is a waiting task in the queue, increase the pool capacity by 1 node.

Hard limit

As above, but ensuring that the maximum pool size never exceeds 10.

2 Replies to “Azure Batch – Pool Auto scale forumulas”

  1. Just a quick FYI… I think your “Task based – Dev/Economical” formula is incorrect. You mention that it will allocate an additional node. It does not, if I run 4 tasks (for example) it still only creates 1 node. You might want to adjust the formula 🙂

  2. The “Task based – Dev/Economical” formula will de-allocate the VM if there are no tasks left in the queue…regardless of whether the existing task has completed or not. I believe you should add this to the end of your script:

    $NodeDeallocationOption = taskcompletion;

Leave a Reply to Dom Cancel reply

Your email address will not be published. Required fields are marked *