This post may seem rambling but I need to know if I'm understanding some on-prem settings correctly.
Our on-prem servers frequently run in to Thread errors when creating and processing records in bulk - I won't get in to the specifics, but bring it up to say that it has caused us to examine various settings to troubleshoot it, including AsyncMaximumThreadsPerCPU. This is a very difficult setting to research, as there seems to be a single piece of documentation on the matter and every source on the internet copies it verbatim with no analysis or elaboration on the subject.
From what I can tell, the formula for configuring this is as follows:
AsyncMaximumThreadsPerCPU (an unknown number we have to solve for) * [Number of CPUs] * AsyncMaximumThreadsPercent [which is actually an unchanging constant equal to 0.6] = 100
As I understand it, the number at the end doesn't strictly need to be 100, but we want to configure AsyncMaximumThreadsPerCPU to get that number as close to 100 as possible without going over in order to operate fastest and most efficiently. So, let's rearrange this to solve for that.
100/(CPUs * AsyncMaximumThreadsPercent) = AsyncMaximumThreadsPerCPU
Plugging in the numbers...
100 / (4 * 0.6) = 41.66
We don't want to go over, so we set AsyncMaximumThreadsPercent to 41, meaning that instead of 100% the original equation equals 98.4%.
The first actual question I have is - did I understand all of that correctly? Or is there some kind of glaring error in my approach?
Second question - Our on-prem Dynamics environment has multiple backend servers. Should the "Number of CPUs" variable be the number of CPUs in a single backend server, or should it be the number of CPUs in all of our backend servers combined?
Third question: Is it even possible for thread errors to result from configuring these settings incorrectly? I accept the possibility that these configurations merely effect how efficient dynamics ends up being, with no bearing on potential errors.
I invite the wisdom of anyone who thinks they can answer any of these three questions. Just please - don't link me back to that same powerobjects blog article about MSCRM_CONFIG settings that everyone just copies and pastes the contents of without iterating on. I promise you I've already seen it.