How to fix Azure resource group when nodes was provisioned in the Azure batch pool with user subscription mode

Korawich Anuttra 30 Reputation points
2023-08-02T04:56:27.36+00:00

I was setting up my Azure Batch Account in user subscription mode, using all networks in public network access, and using managed identity in this Azure batch account and pool.

When I create some batch pools in this account and start provisioning a node, it will create a new Azure resource group that has a name like azurebatch-{HashID}-C.

Can I fix the Azure resource group for this node provisioning process?

I do not want to sum up the pricing in my Azure subscription when I have a lot of Azure batch temp resource groups, which it creates and deletes when it autoscales a node from 0 to N.

User's image

Azure Batch
Azure Batch
An Azure service that provides cloud-scale job scheduling and compute management.
320 questions
0 comments No comments
{count} votes

Accepted answer
  1. kobulloc-MSFT 25,731 Reputation points Microsoft Employee
    2023-08-21T17:23:07.3266667+00:00

    Hello, @Korawich Anuttra ! Thank you for being patient!

    How do I reduce the number of Azure Batch temp resource groups when using autoscale?

    Each time a pool resizes from 0 to 1 node, Azure Batch will create a new resource group which will then need to be cleaned up when the pool resizes from 1 to 0 nodes. When a pool has 0 nodes, all its resources will be deleted and then recreated when it grows again.

    To avoid a long queue of resources and resource groups that need to be cleaned up as shown in your screenshot, the recommendation is to have a smaller number of large Batch pools rather than a larger number of small pools. When you do this, it reduces the overhead of necessary resources for each pool that would otherwise need to be frequently created and then deleted.

    So while the automatic creation of these resource groups cannot be avoided, you can dramatically reduce the number of resource groups by increasing the pool size.


    I hope this has been helpful! Your feedback is important so please take a moment to accept answers.

    If you still have questions, please let us know what is needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A!

    User's image


0 additional answers

Sort by: Most helpful