Java Application Performance Monitoring

Performance Tools for Java

Keeping track of your application’s performance is an ongoing task, so it is important to have the right tools. What works in development might not be quite as helpful in a production environment. Here, I will go over some great tools and the best time to use them. The goal is to help you make reliable and high-performing apps as fast as possible.

1. Java Profilers

  • Java Application Performance Management (APM) Application Performance Management (APM) tools take on the task of tracking all requests on a production system. The trick with these profilers is to provide the right information in a smart way to not impact production performance. This is done by aggregating timing statistics and sampling traces.
  • APM is application performance management for monitoring and managing the performance of your code, application dependencies, transaction times, and overall user experience. There are three types of monitoring and managing apps and the list of top application performance monitoring tools.

Java Performance Monitoring. Application slowdowns are revenue-impacting and can be complex to understand and solve. Many interdependent factors affect application performance and thereby the user experience (and your business): Issues at the user end, in the application code, in the database, in external services, and across the underlying infrastructure. Monitor Java application performance — focused on business transactions — end-to-end in the most complex and distributed environments. Auto-discovered business transactions, dynamic baselining, code-level diagnostics, and Virtual War Room collaboration ensure rapid issue identification and resolution to maintain an ideal user experience for any Java application, running on-premises or in cloud. Unlike other Java application monitoring tools, the eG Enterprise unified monitoring console provides visibility into every layer and every tier of the supporting IT infrastructure. A patented auto-correlation engine analyzes performance insights from disparate components, presents a visual topology map of the infrastructure including interdependencies across the various tiers, and pinpoints the root cause in seconds.

JVM Profiles offer a ton of raw data by tracking all method calls, allowing you to find CPU and memory consumption hotspots. A good scaling test is to set up an Apache JMeter job to hit an endpoint you are developing a few thousand times while linked to a profiler. This allows you to spec out memory and CPU requirements for production.

Screenshot of VisualVM CPU and Heap Size

Pros: Great for tracking down memory leaks, the ability to manually run garbage collection and then review memory consumption can easily shine a spotlight on classes and processes that are holding on to memory in error.

Cons: Requires a direct connection to the monitored JVM; this ends up limiting usage to development environments in most cases. (Note: some profilers can work off thread and memory dumps in a limited fashion.)

Popular Tools: VisualVM, JProfiler, YourKit and Java Mission Control.

2. Tracing Java Web Requests and Transactions

Standard profilers are focused on the performance of all methods across the entire application. These tools are focused on the performance of individual web requests or transactions.

Prefix provides deep level performance details about your app. Including ORM calls with generated SQL, SOAP/REST API calls, and trace details from the most commonly used third-party libraries and frameworks.

XRebel is set up using a Java Agent on your web application’s container and provides an overlay on your application that gives details about the current request.

Tools like Prefix can provide very detailed traces of what your code is doing:

Pros: These tools give order to the vast amount of data available in a JVM profiler. By helping you follow the flow of a request, you can see what types of method calls are responsible for your response time.

Cons: Designed for the development cycle only. QA and Production environments will require an APM solution.

3. Java Application Performance Management (APM)

Application Performance Management (APM) tools take on the task of tracking all requests on a production system. The trick with these profilers is to provide the right information in a smart way to not impact production performance. This is done by aggregating timing statistics and sampling traces. This gives you method level visibility to your code that is running in production.

Pros: The ability to monitor your most critical environment: Production. Identify issues before going into production by monitoring QA/Staging. Debug production live by analyzing traces and exceptions. Aggregate summaries to see highly used requests to help focus development time.

Cons: Typically expensive to run on all QA/Staging and Production servers. Some tools lack support for async queries or are not tuned properly and slow down your application.

Popular Tools: New Relic, Microsoft, Stackify, AppDynamics, Dynatrace, and others

Note: Some providers, including Stackify, provide free trials that can be used to help identify immediate problems.





4. Real User Monitoring (RUM)

It’s not uncommon for webapps to be very client side heavy; providing an interactive experience can require a good deal of dependencies, such as Javascript/CSS frameworks, web fonts and images.

RUM provides insight into your application’s dependencies by giving visibility to asset download and page rendering time.

Some APM products include this as an additional feature. There are also standalone products, such as Google PageSpeed.

Screenshot: Google PageSpeed Overview

5. JVM Performance Metrics

The JVM provides a great deal of valuable information such as garbage collection, memory usage, and thread counts. This data is made available via JMX.

Stackify Retrace provides JVM metric monitoring via App Monitors and automatically applies smart defaults based on the type of application discovered.

Screenshot of Stackify JVM smart default monitors

Screenshot of Stackify Retrace JVM metric dashboard

Pros: Available in any application running on the JVM and easy to connect to with apps such as JConsole.

Cons: Can be difficult to connect to in a staging and production environment. Aggregation and comparing data might be time-consuming. Stats are only gathered while the monitor is connected to the JVM.

Java Application Performance Monitoring

Read more:Java Virtual Machine: Critical Metrics You Need to Track

6. Web Server (Apache/Nginx) Access Logs

If you have Apache or Nginx proxying requests to your Java application server, you can monitor access logs. This is a quick way to see how long requests are taking. You can aggregate the access logs to see what the most popular/fastest/slowest endpoints are. Doing this via the command line can be time-consuming, though.

For small datasets, you can use a desktop tool like Apache Viewer, but for staging and production environments, a hosted logging solution is ideal.

Tracking Failed Requests is also very useful, which can be done by aggregating on HTTP Response Codes.

Pros: Quick way to get some simple stats by tailing access logs, or – if more info is needed – push into a log analyzer.

Cons: Doesn’t give you any details as to why the request took as long as it did. Lack of POST data and response content that could help point you to the cause of a performance issue.

Desktop Tools: AWStats and Apache Viewer

Application Performance Management

Hosted Tools: ELK stack, Stackify, Splunk, LogEntries

Read more: 13 Ways to Tail a Log File on Windows & Linux

7. Tracking All Java Exceptions

Java based application performance monitoring tools

One of the biggest causes of performance problems can be application exceptions. When an exception is thrown, it causes the thread to pause while the stack trace is collected. Even handled exceptions that seem innocent can cause huge performance bottlenecks under heavy server load. It is important to aggregate and monitor all of your exceptions to find critical problems, new errors, and monitor error rates over time.

Read more: How GWB Found Hidden Exceptions and Application Performance Problems

Pros: Easy to setup if you are using a logging framework such as Log4j or Logback.

Cons: None

Popular Tools: APM providers, Raygun, Stackify

8. Memory Analysis

Application memory analysis after a crash can help with identifying the cause of a memory leak. You can instruct the JVM to dump the heap on an OutOfMemoryError exception by adding the following argument to the JVM:

-XX:+HeapDumpOnOutOfMemoryError

The heap dump file can be loaded into an analyzer – Eclipse MAT. You can dive into the Overview or Leaks Suspects reports to help identify the cause of the memory exception.

Screenshot of Eclipse MAT: Biggest Objects by Retained Size

Conclusion on Java Performance Tools

The big takeaway is that making and keeping your Java application performance is easier than ever with all these tools. Don’t be overwhelmed by all the things you should be doing. Start with the low hanging fruit first, like exception tracking. It is really good to at least know what options are available to you, and I hope you found this list helpful.

Monitor everything about your Java applications with one tool

Retrace integrates code profiling, error tracking, application logs, and more

Quickly troubleshoot problems and identify ways to optimize your code

Retrace collects detailed snapshots of what your code is doing and how long it takes

Monitor your containerized applications quickly and easily

Retrace goes beyond APM to give developers all the tools they need in one easy to use solution

Retrace uses lightweight profiling to automatically track key methods in your code. Detailed performance data helps you understand how your code is performing and how to improve it.

  • Low application overhead
  • Safe for production usage
  • SaaS based solution

Our monitoring agent is installed on each of your servers or containers. Please review our docs to learn more.

Retrace automatically instruments dozens of common Java frameworks and application dependencies.

You can make a at any time. Even if you choose not to have your activity tracked by third parties for advertising services, you will still see non-personalized ads on our site.By clicking continue below and using our sites or applications, you agree that we and our third party advertisers can:. You can find much more information about your privacy choices in. To avoid personalized advertising based on your mobile app activity, you can install the. We partner with third party advertisers, who may use tracking technologies to collect information about your activity on sites and applications across devices, both on our sites and across the Internet.You always have the choice to experience our sites without personalized advertising based on your web browsing activity by visiting the, the, and/or the, from each of your browsers or devices. How to install new windows.

Retrace is designed to work well with cloud based workloads that automatically scale up and down. Barco driver download pc. Multiple cloud deployment options are supported.

Retrace also works with any physical server or virtual machine.

Quickly identify which part of your application stack is the bottleneck and which web requests are being affected.

  • Slow application dependencies
  • Slow SQL queries
  • Slow web requests
  • Top application errors

Retrace uses lightweight profiling to capture critical details about what your code is doing. Get deep, code-level insights into your application’s health. We call it Retrace because you can literally retrace what your code is doing!

  • Key methods in common libraries
  • SQL queries
  • External HTTP calls
  • Exceptions
  • Log messages
  • .. and much more

Java Application Performance Monitoring System

Sending your logs to Retrace is easy with log4j, logback or our library.

  • Integrated error & web request profiling traces
  • Support for log tags & structured logging
  • Log monitoring

Quickly find exceptions in your code before your customers do.

Sending your logs is easy via log4j, logback or our library.

  • Get alerted about new and regressed errors
  • View related logging to an exception
  • Identify unique exceptions
  • Monitor exception rates

Java Based Application Performance Monitoring Tools

Monitor everything about your servers and applications in one place. Retrace includes powerful monitoring capabilities.

  • Charting, alerts, & notifications
  • Server monitoring
  • Custom application metrics via Stackify SDKs
  • Error rates

Open Source Application Performance Moni…

Download our free eBook to learn all of our advanced tips for monitoring your .NET applications.

Download Prefix, our free Java profiler to understand what your code is doing and find bugs.

Best Application Performance Monitoring T…

Learn why developers love Retrace’s APM + logging solution in one affordable solution.