Debugging performance issues in production can be a pain and in some cases impossible without the right tools. Java profilers have been around forever, but the profilers most developers think about are only one type – there are actually three:
- Standard JVM Profilers that track every detail of the JVM (CPU, thread, memory, garbage collection, etc).
- Lightweight profilers that highlight your application with a bit of abstraction.
- Application Performance Management (APM) tools used for monitoring applications live in production environments.
Standard JVM Profilers
A standard Java profiler certainly provides the most data, but not necessarily the most usable information. This depends on the type of debugging task. These profilers will track all method calls and memory usage which allows a developer to dive into the call structure at whatever angle they choose.
Lightweight Java Transaction Profilers
Lightweight profilers take a different approach at tracking your application by injecting themselves right into the code. Aspect Profilers use aspect-oriented programming (AOP) to inject code into the start and end of specified methods. Java Agent profilers use the Java Instrumentation API to inject code into your application.
Low Overhead, Java JVM Profiling in Production (APM)
All the profilers so far have been great for development, but tracking how your system performs in production is critical. Production is always a different landscape – development and staging setups typically don’t have the same datasets and load.
Java APM tools typically use the Java Agent profiler method but with different instrumentation rules to allow them to run without affecting production performance. The trick with these profilers is to provide the right information in a smart way to not take up CPU cycles.
Why Are Some Java Profilers So Expensive?
XRebel is a cool tool, but it costs $365 a year. Stackify Prefix is free and provides much of the same functionality.
The biggest problem with APM solutions is definitely their pricing. They have traditionally been so expensive that only the largest enterprises could afford them. It doesn’t make a lot of sense to spend $100 a month on a server at Azure or AWS and then spend another $200 a month for a product like New Relic.
Monitoring tools shouldn’t cost more than the servers! Both Prefix and Retrace have profiling functionality and are incredibly affordable. Prefix is free for life and Retrace is free for the first two weeks.
Applications to manage Java profilers and other Java tools, books, websites and blogs, YouTube channels, podcasts, events, and LinkedIn can be found in our Comprehensive Java Developer’s Guide. Download it for free now:
- What are Microservices? Code Examples, Best Practices, Tutorials and More - September 13, 2019
- 9 Best Practices to Handle Exceptions in Java - August 22, 2019
- Stackify Named to Constellation ShortList for Digital Performance Management - August 19, 2019
- Stackify founder: Landing on Inc. 5000 brings validation, prompts reflection - August 16, 2019
- Inc. 5000 ranks Matt Watson’s Stackify among top fastest-growing companies in KC - August 15, 2019