-
Notifications
You must be signed in to change notification settings - Fork 201
Memory issues
Below we describe a tool to do RSS (resident-set size) and native memory tracking measures. These measures can be complementary to a heap dump.
Download memory-agent-1.jar.
After, start the application with and without the Application Insights with the following configurations:
1)
-javaagent:memory-agent-1.jar -Dapplicationinsights.diagnostics.mem.duration-in-s=1000 -Dapplicationinsights.diagnostics.mem.interval-in-ms=5000 -Dapplicationinsights.diagnostics.mem.rss=true -XX:+AlwaysPreTouch
2)
-javaagent:memory-agent-1.jar -Dapplicationinsights.diagnostics.mem.duration-in-s=1000 -Dapplicationinsights.diagnostics.mem.interval-in-ms=10000 -Dapplicationinsights.diagnostics.mem.ntm=true -XX:NativeMemoryTracking=summary -XX:+AlwaysPreTouch
-javaagent:memory-agent-1.jar -javaagent:applicationinsights-agent-<version>.jar
Each time, the measures will take applicationinsights.diagnostics.mem.duration-in-s
seconds. The tool will display a message on the console to indicate the location of the zip file containing the results. Example:
You can adjust the value of applicationinsights.diagnostics.mem.duration-in-s
to a duration for which you estimate the memory level should have reached its maximum value.