Sometimes during the troubleshooting process of web applications such as Sitecore, it is necessary to use the Performance Monitor application to collect values of some of the Windows and .NET performance counters.
In certain scenarios, it may be difficult to determine the correct performance counters to collect, especially when running a few processes with the same name.
Current article describes techniques needed to correctly determine which performance counters correspond to a specific Sitecore instance.
For some of the performance counters, Windows uses Process Name to differentiate counters of one process from another. When there are processes with the same names, it provides incremental names to the counters, such as w3wp#1, w3wp#2, w3wp#3.
Given that all the ASP.NET processes use the w3wp process name, some additional efforts are needed to identify a correct performance counter instance when running multiple Sitecore instances on a single server.
The following article from the Microsoft Knowledge Base describes how to configure Windows to use Process IDs in the Performance Monitor instead of incremental process names:
Also, the following article describes how to identify the process ID of a running Sitecore instance:
These IDs can be used to match a specific running Sitecore instance to a counter instance in the Performance Monitor.
For some of the performance counters, Windows uses values that originate from the .NET Application Domain name to differentiate performance counter instances.
Consider the following example:
Such counters require knowledge of .NET Application Domain name that corresponds to the specific Sitecore instance. The following approach may be used to handle such situation:
- Identify the Process ID, as described in the https://kb.sitecore.net/articles/467088 article.
- Download and run the Process Explorer (http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx).
- Open process details for w3wp.exe with Process ID from point 1 and check what application domains it contains.
For example, this is how Process Explorer output may look:
- As in the examples above, match the AppDomain name of the process ID 7176 to the _LM_W3SVC_10_ROOT instance of the performance counter to identify the correct performance counter instance.