This is yet another classic BizTalk Server performance optimization. The .NET threadpool for BizTalk Server has a finite number of threads allocated to each BizTalk process. Threads being the most basic unit of work available to a .NET process. If a process runs out of threads it can slow down without fully exploiting available resources. Conversely if too many threads are allocated to a process then excess context switching can occur which has the net effect of slowing down performance. Context switching is the overhead incurred when the windows kernal switches control between threads.
To view how many threads are currently allocated to a BizTalk host view the "Thread Count" BizTalk Host Throttling Performance Counter
. The values we need to tweak are within the registry. So as always ensure your registry is backed up before proceeding any further. The four properties we are going to change are
MaxIOThreads, MaxWorkerThreads, MinIOThreads, MinWorkerThreads. The value of each of these properties is multipled by the number of CPUs to give the number of threads available to a process. The conservative default values are MaxIOThreads = 20, MaxWorkerThreads = 25, MinIOThreads = 1, MinWorkerThreads = 1. The recommended values are MaxIOThreads = 100, MaxWorkerThreads = 100, MinIOThreads = 25, MinWorkerThreads = 25.
Add the below to a .reg file and run it being sure to tweak the BizTalkHostName value on the registry key path.
Windows Registry Editor version 5.00