Maximize Efficiency: The Ultimate Guide to Batch Jobs & Threads in D365 Finance & Operations
Batch processing in Dynamics 365 Finance & Operations (D365FO) is a powerful feature that allows users to automate and streamline various tasks, enhancing overall efficiency and productivity. By leveraging batch jobs, you can schedule and execute tasks such as printing reports, performing system maintenance, and sending electronic documents without manual intervention.
In my experience, I utilized batch processing to execute the master planning engine nightly, after all users had completed their tasks. This approach ensured that all necessary data was present and remained unchanged during the execution of the master planning engine. Additionally, running the batch job during off-peak hours optimized system performance, as no users were active on the system at that time.
The batch platform provides an asynchronous, server-based batch processing environment that can process tasks across multiple instances of Application Object Server (AOS). This means that tasks are not executed immediately but are scheduled to run at a specific time.
You should become familiar with the following aspects of the batch platform:
To navigate to Batch Group, Follow that path : System Administration > Setup > Batch Group
You may observe a field that might not have been previously noticeable. This field, enabled through a feature, has been set to default since version 10.0.36 for existing instances. The field in question is “Scheduling Priority.”
This priority is defined for batch groups but can be overridden for specific batch jobs. The scheduling priority classifications are utilized to declare relative priorities and determine the processing order of jobs and business processes. The available values for scheduling priority are Low, Normal, High, Critical, and Reserved Capacity.
Example Scenario
Imagine you have 100 batch jobs that need to be processed. These jobs are categorized into different priority levels:
Priority Levels and Processing Order
In this section, we have defined the job scheduling priorities for job groups. To specify system threads for reserved capacity jobs, this can be configured through a parameter within the Batch Global Settings.
Recommended by LinkedIn
let’s assume that we have defined the priority for jobs and also specified the batch reserving capacity for threads. In this scenario, we have only defined the percentage of threads to be reserved from total threads . But what is the actual number of threads used in the Application Object Server (AOS)?
Batch capacity refers to the maximum number of batch tasks that can be processed at a time. It depends on both the number of batch servers and the number of batch threads available for processing these tasks.
To calculate the batch capacity, multiply the number of batch servers by the number of batch threads per server:
Batch capacity = Number of batch servers × Number of batch threads per server
To determine the number of threads on your running Application Object Server (AOS), navigate to System Administration > Setup > Server Configuration.
In this environment, you will observe that there are two Application Object Servers (AOS) listed on the left pane.
In the Batch Server Configuration for this instance section, you will typically find that the default number of threads ranges between 8 and 12. The maximum number of threads you can use in most environments is 15. If you attempt to enter a larger number, the system will display a warning message indicating that the value exceeds the allowable limit.
How to increase batch capacity
To increase the batch capacity in a production environment, you must acquire more user licenses and update subscription estimates in Microsoft Dynamics Lifecycle Services. For updated user licenses, Microsoft automatically increase the batch capacity by adjusting the thread count per existing server.
The platform adds more batch servers after the existing batch servers reach their threshold limits for CPU and memory utilization.
To increase the batch capacity in a sandbox environment, you need a Tier-4 or Tier-5 sandbox. This action isn't possible in Tier-2 or Tier-3 sandboxes.