We’ve seen a lot of improvements to the product since it was released as AX7, and some name changes too 😝 And one of the areas where we’ve seen more enhancements is the batch framework.

And since the currently live last version of Dynamics 365 Finance and Operations, 10.0.28, we have a new feature that will be enabled by default for all new instances, and it will be enabled for all existing instances in 10.0.29: the priority-based batch scheduling.

Priority at the amusement park
Priority at the amusement park

You can learn more about the past improvements to the batch framework reading this post by Paul Heisterkamp: Improvements to the batch framework of MSDyn365FO.

A better batch

Priority-based batch scheduling was introduced in version 10.0.7 for a reduced number of customers, and that’s a long, long time ago for F&O standards.

So what changes? Once we enable the feature, the group configuration goes from this:

Batch group form
Batch group form
Batch servers in batch groups form
Servers in batch groups form

To this:

The new batch groups form
The new groups form

Before, we could assign each group to one or more batch servers. After enabling the feature, we still see the groups, but we cannot assign them to any server.

Instead, we can assign a priority to the group:

Batch priority
Priority

The batch scheduling framework will take the different groups and assign them to the servers depending on the priority each group has.

Scaling is the key

After Finance and Operations went from a classic monolithic infrastructure to using Azure service fabric containers, we got a new feature: automatic scaling. This means that if Microsoft’s telemetry shows there’s a high AOS usage, we’ll (hopefully) get another container with an AOS to ease the load of the other AOSes.

Before priority-based scheduling, we could get an additional AOS for batches but not notice it until we were informed by support. Thanks to the new framework, this new AOS will get workload automatically assigned.

Little by little, we’re getting changes that are moving Dynamics 365 F&O to a real SaaS product.

Setting it up

When we create a new group with the new experience, we can set a scheduling priority for the group:

Batch scheduling priority
Scheduling priority

What do these priority levels mean? If we go to the docs page, we see the following table:

Priority batch table
Priority table

If we have for example 100 jobs queued, the framework will take 40 from the ones that have “reserved capacity” assigned, 30 from critical, 15 from high, 10 from normal and 5 from low priority.

All existing groups will have the “Normal” priority assigned after enabling the feature, so we need to change this to take advantage of it.

Additionally to assigning each batch job to the desired group, we can also override the priority in the batch job configuration:

Scheduling priority override
Scheduling priority override

Dedicated threads???

Now, some of you might be wondering what’s that “Dedicated X threads” thing in the reserved capacity level. If you go to the system parameters, you’ll notice a new tab:

Batch reserved capacity level
Reserved capacity level

Here we can set the number of threads assigned to the reserved capacity level:

  • No reserved capacity: means 0 threads.
  • Low: 10% of threads will be reserved.
  • Medium: 15% of threads will be reserved.
  • High: 25% of threads will be reserved.

Which threads? Go to the Server configuration form and look for the bottom tab:

Batch threads
Number of threads

This is the maximum number of threads each batch server will have. If you have 5 batch servers with 8 maximum threads per server, that makes a total of 40 threads available. If we apply the percentages from the list above, we’ll end up with the following number of dedicated threads:

  • No reserved capacity: 0 threads.
  • Low: 4 threads will be reserved.
  • Medium: 6 threads will be reserved.
  • High: 10 threads will be reserved.

And that’s all! Many customers rely on batches to run critical processes of their business, and there are other processes that are not critical at all. With this new priority schedule functionality, we can make sure that the important ones run first, and even enable dedicated capacity for that.

If you want to learn more about this feature and some best practices, you can watch this Dynamics 365 FastTrack TechTalk: Priority-based batch scheduling (PBS)

Subscribe!

Receive an email when a new post is published

Write A Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

ariste.info