I thought I would share a trick which might seem obvious to those who know it already, but should seem like an eureka moment to those who don’t.

How many of you have tried to use the Performance Monitor tool to try to track resource usage of a BizTalk application and have been stumped as to which Host Instances you are actually tracking?  The problem with Performance Monitor is that for many of the counters (especially the generic non-BizTalk specific counters such as Process or Memory) the Host Instance names are not listed, but instead all you see are the service names (BTSNTSVC or BTSNTSVC64) with a counter based on how many instances of that specific service are currently running, as in the below screenshot.

Random counters

You could be creative (you won’t believe the number of stories I’ve heard of how people work around this) and start your Host Instances one at a time and try to figure out which one relates to which Performance Monitor instance but there is a better way.  The key is to add the performance counter called “ID Process” under Process for each of the different BizTalk Services as in the below screenshot.

ID Process List

Now that you’ve added the ID Process performance counters, you can click on any of the specific instances in Performance Monitor and if you take a look at the values in the Last/Average/Minimum/Maximum columns (they’ll all have the same value) you’ll find that they contain the value of the PID (Process ID) for a specific host instance which you can find under the Services tab of the Windows Task Manager as per the below screenshot.  You have now built an association between the Performance Monitor Instance and the BizTalk Host Instance, and those associations will carry over to other Performance Monitor counters.


Something to keep in mind is that when you restart Host Instances they will get new PIDs, and if you restart all the Host Instances at the same time there is a possibility that the order of Instances in Performance Monitor might get swapped around.  My recommendation is that if you are currently profiling your BizTalk environment using Performance Monitor and you want consistent results, you should either track your Data Collector Sets to separate output files each time you restart your Host Instances, or you should look into restarting your Host Instances one at a time to maximize (I’m not sure if this is a guarantee) the chance that the order will stay the same.  Regardless which path you choose, it is important to take note of which Host Instance relates to which Performance Monitor instance, especially if you plan on studying the results in the future at which point it might no longer be possible to link the associations.