The “Maximum batch threads” setting for batch servers
-
The “Maximum batch threads” setting for batch servers
Posted by DSC Communities on January 6, 2020 at 11:10 am-
Rudy Salcedo
MemberJanuary 6, 2020 at 11:10 AM
?Our Customer aging snapshot job takes several hours to complete, which sometimes causes a backlog ofĀ waiting jobs when it runs longer than usual.Ā So we’re looking for ways to decrease the runtime of that job.ĀRecently I increased the Maximum batch threads setting from 8 to 16 on the batch server that the job runs on, and it decreased the runtime by approximately 30%.
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā(The Customer aging snapshot job is scheduled to run a little after midnight, and no other jobs are scheduled to run during the timeframe that snapshot job is running.)
We’re hoping to decrease the runtime even more, so I’m thinking of increasing the Max batch threads again from 16 to 24 (original setting was 8).
But isĀ 24 considered to be “too many” batch threads?Ā What is considered to be a “reasonable” number for the Maximum batch threads setting?
——————————
Rudy Salcedo
Senior Programmer/Analyst
LaForce, Inc
Green Bay WI
—————————— -
Hi Rudy,
It depends on the hardware you have. You can “play” with the number to find the optimal value. You can monitor the CPU usage when using different numbers.
However, besides this setting, you can also monitor other performance counters like fragmented indexes, database locks, disk I/O.Ā
Eventually, you can use the Trace parser to find out the exact execution times on database calls, Business logic execution and caching. Probably you can gain time on other areas as well. E.g. a customer in the past had HDD drives for the TempDB. When they changed it to SSDs they really gained a lot of performance as the TempDB is heavily used by AX 2012.——————————
kind regards,AndrƩ Arnaud de Calavon
Product manager, Microsoft MVP – Microsoft Dynamics Business Solutions
——————————
——————————————- -
in D365 Microsoft if I remember correctly has a suggestion of 16. I believe this is the sweet spot. with it running long I have also seen where the execution plan in SQL gets wonky and might need to be cleared and recreated, at a previous job, we used a tool to track what was happening, and found that correcting an index made a huge difference. and adding an index for what seemed to be a small thing made a huge impact. Just a few other things to consider.
——————————
Paul Martin
Production Program Manager
Elite Comfort Solutions, LLC
Rutherfordton NC
——————————
——————————————- -
Mark Prouty
MemberJanuary 8, 2020 at 1:28 PM
Wouldn’t this be similar to setting threads for Master Planning? If so, there is a white paper out there with some tips. I have ours set to the number of cores-1 (so 7 for an 8 processor cores). Agree with Paul and Andre – there are several factors that can affect performance.
???——————————
Mark Prouty
Programmer / Analyst
ANGI Energy Systems
Janesville WI
——————————
——————————————- -
Rudy Salcedo
MemberJanuary 9, 2020 at 3:32 PM
?ThanksĀ everyone for allĀ your info & advice.Ā We’ve been experimenting with 20 & 24 batch threads this week, and it appears that 20 isĀ our magic number.Ā We’ve been able to reduce the job’s runtime by over 2 hrs, which was our goal.As mentioned, there are other ways that we could realize additional performance improvements.Ā If we find ourselves needing to shorten the runtime of this job again, we’ll look into those suggestions, as well as look into the possibility of processing the bigger customers with the most transactions separately via Customer Pools.
——————————
Rudy Salcedo
Senior Programmer/Analyst
LaForce, Inc
Green Bay WI
——————————
——————————————-
DSC Communities replied 5 years, 8 months ago 1 Member · 0 Replies -
-
0 Replies
Sorry, there were no replies found.
The discussion ‘The “Maximum batch threads” setting for batch servers’ is closed to new replies.