We installed .NET Agent and noticed a 15% increase in server memory utilization.
Is this normal?
How to insure that the agent doesn't use all server memory and crashes the applications?
DX APM .NET Agent
The Agent provides a default Agent instrumentation and some extensions, each of them can be customized depending on your needs and requirements.
For testing you can enable the full agent instrumentation and its extension in a Development environments, then review the results and decide which kind of instrumentation you need for their applications
The .NET agent has some requirements for CPU, memory and there will be an impact in response time but this overhead can be controlled and reduced by adjusting the instrumentation and extensions, for more information refer to Techdocs - .NET Agents
To demonstrate how you can adjust the .NET Agent overhead, you can run the below tests:
TEST 1:
a- Open the IntroscopeAgent.profile , set introscope.autoprobe.enable=false ( this will not uninstall the agent but only disable the instrumentation part)
b- Stop the Perfmon collector service. ( this is the agent component that collect stats from Windows Perfmon service)
c- Restart IIS or the .NET instrumented application.
d- Verify the overhead
TEST #2:
a-Enable back the instrumentation introscope.autoprobe.enable=true and keep the Agent Perfmon collector service
b-Verify the overhead
TEST #3:
Let say you need .NET Perfmon collector service enabled but would like to reduce the instrumentation.
For example, you can disable the webservices instrumentation as below
a.Edit the webservices.pbd and MVC.pbd and disable all the lines that start with TurnOn as below:
#TurnOn: WebServicesProducerTracing
#TurnOn: WebServicesClientTracing
#TurnOn: WCFServerFaultTracing
#TurnOn: WCFClientFaultTracing
b. Save the file and restart the app, exe or IIS
c-Verify the overhead
TEST #4:
If you are monitoring .NET standalone apps, you can limit the # of monitored applications, try to monitor only specific application by updating the "introscope.agent.dotnet.monitorApplications" property, for example, to limit the agent to monitor IIS and DummyWinApp.exe application for example, you would need to update the monitorApplications property as below:
introscope.agent.dotnet.monitorApplications=w3wp.exe,aspnet_wp.exe,DummyWinApp.exe
TEST #5:
You can reduce Perform metric collection in IntroscopeAgent.profile to prevent CPU overhead / spikes,
a- Open the IntroscopeAgent.profile,
set:introscope.agent.perfmon.category.browseEnabled=false
introscope.agent.perfmon.metric.pollIntervalInSeconds=150
introscope.agent.perfmon.metric.filterPattern=|Processor|*|*,Process|{osprocessname}|*,|ASP.NET*|*
Purpose: you might need to reduce the # of perfmon metrics being gathered. Depending on your application load the default setting could instruct the agent to collect a huge amount of metrics, introscope.agent.perfmon.metric.filterPattern=|Processor|*|*,|.NET Data Provider*|*|*,|.NET CLR*|{osprocessname}|*,|.NET CLR Data|*|*,|Process|{osprocessname}|*,|ASP.NET*|*
b. Save the file and restart the app, exe or IIS
c .Restart the PerfMonCollectorAgent service
d-Verify the overhead
For more test and troubleshooting, refer to .NET Agent Troubleshooting KB