What’s Java Mission Control?

Java programming language is most popular programming languages (Tiobe Index)but Java applications are monster and eating computing resources easily if codes are not optimized and application not profiled. Monitoring Java applications has overhead on a system and in most of scenarios, test environments are different than production environments.

There is third-party solutions to monitor and profile Java applications to optimizing the applications and improve performance or even find how much resource does it need.

To find useful information about application and prepare optimization plan or tuning, Java Development Kit has two useful tool:

  • Java Flight Recorder
  • Java Mission Control

Java Flight Recorder

Java Flight Recorder (JFR) is a tool for collecting diagnostic and profiling data about a running Java application. It is integrated into the Java Virtual Machine (JVM) and causes almost no performance overhead, so it can be used even in heavily loaded production environments. When default settings are used, both internal testing and customer feedback indicate that performance impact is less than one percent. For some applications, it can be significantly lower. However, for short-running applications (which are not the kind of applications running in production environments), relative startup and warmup times can be larger, which might impact the performance by more than one percent. JFR collects data about the JVM as well as the Java application running on it.

Compared to other similar tools, JFR has the following benefits:

  • Provides better data: A coherent data model used by JFR makes it easier to cross reference and filter events.
  • Allows for third-party event providers: A set of APIs allow JFR to monitor third-party applications, including WebLogic Server and other Oracle products.
  • Reduces total cost of ownership: JFR enables you to spend less time diagnosing and troubleshooting problems, reduces operating costs and business interrupts, provides faster resolution time when problems occur, and improves system efficiency.

JFR is primarily used for:

  • ProfilingJFR continuously saves large amounts of data about the running system. This profiling information includes thread samples (which show where the program spends its time), lock profiles, and garbage collection details.
  • Black Box AnalysisJFR continuously saves information to a circular buffer. This information can be accessed when an anomaly is detected to find the cause.
  • Support and DebuggingData collected by JFR can be essential when contacting Oracle support to help diagnose issues with your Java application.

By default, JFR is disabled in the JVM. To enable JFR, you must launch your Java application with the -XX:+FlightRecorder option. Because JFR is a commercial feature, available only in the commercial packages based on Java Platform, Standard Edition (Oracle Java SE Advancedand Oracle Java SE Suite), you also have to enable commercial features using the -XX:+UnlockCommercialFeatures options.

For example, to enable JFR when launching a Java application named MyApp, use the following command:

java -XX:+UnlockCommercialFeatures -XX:+FlightRecorder MyApp

Java Mission Control

JMC is an advanced set of tools that enables efficient and detailed data analysis, and delivers advanced, unobtrusive Java monitoring and management. JMC provides sections for common analysis areas such as code performance, memory, and latency.

Java Mission Control
Java Mission Control

Java Mission Control now supports automated analysis of flight recordings. The provided rules and heuristics will help you find troubling functional and performance problems in your application and help provide tuning tips. Some rules that operate with relatively unknown concepts, like safe points, will provide explanations and links to further information. Some rules are parameterized and can be configured to make more sense in your particular environment. Individual rules can be enabled/disabled as you see fit. This is the very first cut – more rules and improved heuristics will be provided as part of JMC updates over time.

External Links

Java Components

Java Components – Testing Tools

Java Diagnostic Tools

Oracle Java Mission Control and Java Flight Recorder: Advanced Java Diagnostics and Monitoring without Performance Overhead (White Paper)

Davoud Teimouri

Professional blogger, vExpert 2015/2016/2017/2018/2019/2020/2021/2022/2023, vExpert NSX, vExpert PRO, vExpert Security, vExpert EUC, VCA, MCITP. This blog is started with simple posts and now, it has large following readers.

Leave a Reply

Your email address will not be published. Required fields are marked *