April 23, 2020
Estimated Post Reading Time ~

AEM Tools for Monitoring and Analyzing Performance

The following gives a short overview of some of the tools available for monitoring and analyzing performance.

Some of these will be dependent on your operating system.

Tool
Used to analyze...
Usage / More information...
request.log
Response times and concurrency.
truss/strace
Page Loads
Unix/Linux commands to trace system calls and signals. Increase the log level to INFO.
Analyze the number of page loads per request, which pages, etc.
Thread dumps
Observe JVM threads. Identify contentions, locks and long-runners.
Dependent on the operating system:
- Unix/Linux: kill -QUIT <pid>
- Windows (console mode): Ctrl-Break
Analysis tools are also available, such as TDA.
Heap Dumps
Out of Memory issues that cause slow performance.
Add the:
    -XX:+HeapDumpOnOutOfMemoryError
option to the java call to CQ.
System calls
Identify timing issues.
Calls to System.currentTimeMillis() or com.day.util.Timing are used to generate timestamps from your code, or via HTML-comments.
Note: These should be implemented so that they can be activated / deactivated as required; when a system is running smoothly the overhead of collecting statistics will not be needed.
Apache Bench
Identify memory leaks, selectively analyze response time.
basic usage is:
ab -k -n <requests> -c <concurrency> <url>
See Apache Bench and the ab man page for full details.
Search Analysis

Execute search queries offline, identify response time of query, test and confirm result set.
JMeter
Load and functional tests.
JProfiler
In-depth CPU and memory profiling.
JConsole
Observe JVM metrics and threads.
Usage: jconsole
Note: With JDK 1.6, JConsole is extensible with plug-ins; for example, Top or TDA (Thread Dump Analyzer).
Java VisualVM
Observe JVM metrics, threads, memory and profiling.
Usage: jvisualvm or visualvm
Note: With JDK 1.6, VisualVM is extensible with plug-ins.
truss/strace, lsof
In depth kernel call and process analysis (Unix).
Unix/Linux commands.
Timing Statistics
See timing statistics for page rendering.
To see timing statistics for page rendering you can use Ctrl-Shift-U together with ?debugClientLibs=true set in the URL.
CPU and memory profiling tool
For example, YourKit.
The ongoing state of your installation.
Knowing as much as possible about your installation can also help you track down what might have caused a change in performance, and whether these changes are justified. These metrics need to be collected at regular intervals so you can easily see significant changes.



By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.