[Turn] Nine tools to help you play Java performance optimization

 This article was translated from  idrsolutions by  ImportNew  -  Chen Xiaoshun . Welcome to the Java team . For reprints, please see the requirements at the end of the article.

Java performance optimization tools can help you improve your Java code.Java performance optimization tools can help you improve your Java code.

Earlier I wrote an article about 5 tools to help write better Java code . The right tools can improve our code and make development more efficient. At IDR Solutions , we are always looking for ways to improve our code. But recently, when we thought about improving the PDF HTML5 converter and Java PDF class library code, we found that our focus has recently shifted to how to improve Java performance.

In this article, I will take you to look at 9 tools that can help us optimize Java performance. Some we already use in IDR Solutions, while others may be used in personal projects.

NetBeans Profiler

NetBeans profiler is a NetBeans IDE plug-in, which mainly provides performance analysis related functions for NetBeans IDE. NetBeans IDE is an open source integrated development environment. It supports the development of all Java application types including Java SE, JavaFX, Java ME, Web, EJB and mobile applications well.

This profiler includes features such as CPU, memory, and thread performance analysis, and provides some additional tools and functions for basic JVM monitoring. Very useful for developers who need to troubleshoot memory and performance related issues.

JProfiler

JProfiler was mentioned  in my previous article . Also, it is a good Java performance analysis tool. JProfiler integrates CPU, memory and thread performance analysis, which can be used to analyze performance bottlenecks, memory leaks, CPU load and solve thread-related problems, and supports local performance analysis (analyzing applications installed on the same machine as JProfiler software) and Remote performance analysis (it can analyze applications on remote machines without JProfiler installed), which is very useful for developers.

JProfiler is a commercially licensed Java performance analysis tool developed by ej-technologies GmbH, designed primarily for Java EE and Java SE applications.

GC Viewer

Screenshot of GC viewerScreenshot of GC viewer

GC Viewer is freely available (from the homepage and Github ). GC Viewer is an open-source tool that enables visual analysis of data generated by Java VM options such as vmflags -verboase:gc and -Xloggc:. GC Viewer can be used to calculate GC (garbage collection) related performance data records, including throughput, cumulative pauses, longest pauses, and more. It is especially useful when you want to tune the GC for a specific application by changing the build size and setting the initial heap size.

GC Viewer is an open source tool developed by Tagtraum Industries Incorporated. This is a small start-up software consulting firm based in Raleigh, North Carolina, founded in 2004 by Tagtraum Industries, a non-profit project founded in 1999.

VisualVM

VisualVM  is a tool derived from the NetBeans platform and follows a modular architecture idea. This means that it can be easily extended through plugins.

Visual VM allows you to get detailed information about a Java program as long as it is running on a Java Virtual Machine (JVM). The generated data can be generated and read by JDK tools, and all data and information of multiple Java programs can be easily viewed, including local and remote running programs. At the same time, data snapshots of the JVM software can be saved, and the data can be saved locally for later viewing or sharing with others.

Visual VM can perform CPU performance analysis, memory performance analysis, perform GC (Translator's Note: Can be forced to call GC), save snapshots, etc.

Patty * Beta

Patty in action (picture from http://patty.sourceforge.net.)Patty in action (picture from http://patty.sourceforge.net.)

The "Patty" project  is an open source project and can be downloaded from Source Forge . It is dedicated to providing performance analysis tools for Java 1.5.0 and later virtual machines. Unlike other profiling tools, it focuses on profiling and allows users to turn on and off profiling at runtime.

Currently Patty is in beta stage, but with the addition of more powerful features such as method execution, code coverage, and thread contention analysis, Patty can be used for performance tuning (memory, CPU, etc.) Information is sent to other computers via TCP/IP Socket. Patty has an easy-to-use GUI and can be used to analyze the heap. Classes can also be instrumented and de-instrumented during application runtime during the preparation phase of the Java compilation process.

JRockit - Task Management

JRockit  is a proprietary Java virtual machine originally developed by Appeal Virtual Machines. Acquired by BEA Systems in 2002, then moved to Oracle from Sum Microsystems.

Oracle's JRockit is a complete Java SE solution that includes a high-performance JVM, performance analysis, monitoring and troubleshooting tools. Can be used to predict latency in Java programs.

现在,JRockit打包有一系列的称为JRockit任务控制(JRockit Mission Control)的工具。这些工具包括:一个用于管理的控制台(console,译者注:此console跟终端不一样,是特指管理后台系统),进行GC数据可视化和其他的一些性能统计。它同样可以作为运行时性能分析工具Runtime Analyzer来使用,也可以分析内存问题。

Eclipse Memory Analyzer

Memory Analyzer (MAT) can be found in the Eclipse IDE.Memory Analyzer (MAT) 可以在Eclipse IDE中找到.

Eclipse内存分析器(Eclipse Memory Analyzer)是一个可以帮助你找到内存泄漏和减少内存损耗的Java堆分析器。它更适合作为一个分析Java堆栈和计算大小的工具集,也可以用于监测内存泄漏和反模式带来的内存损耗。

Java Interactive Profiler

JIP是一个用Java开发的高性能、低损耗性能分析器。基于BSD许可协议发布,可以从Source Forge下载。使用JIP的开发者可以在VM运行时开启和关闭性能分析,并且可以过滤类和包、控制输出。

Profiler4J

Profiler4j  is a tool focused on CPU performance analysis. It has a friendly user interface, supports remote performance analysis, and supports dynamic configuration modification. Interesting features of Profiler4j are: It is based on dynamic bytecode enhancements, which means that it does not require any native library and external executable support. What's more, it is written entirely in Java and can provide graphical call graph information, call tree structure, memory monitoring and class listing, and supports fine-grained configuration files. It is released under the Apache License v2.0 and can be downloaded from Source Forge

Hope you find these tools useful.

Let us know what tools you use to improve your code!

This article is part of our " Java Article Index " series. In these articles, we focus on diving into Java and JavaFx. Check it out!

If you are watching this series for the first time or want to be notified when we publish new articles and updates, you can follow through social media ( TwitterFacebook and Google+ ) or Blog RSS

Original link:  idrsolutions  translation:  ImportNew.com  Chen Xiaoshun's
translation link:  http://www.importnew.com/12324.html
For reprinting, please keep the original source, translator and translation link. ]

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326530315&siteId=291194637
Recommended