文档章节

9 个帮助你进行Java性能调优的工具

ihaolin
 ihaolin
发布于 2014/06/16 18:21
字数 988
阅读 235
收藏 20

NetBeans Profiler

netbeans-logo-300x65.gif

NetBeans Profiler is found in NetBeans

 

The NetBeans profiler is a modular add on which is used to provide the profiling functionality for the NetBeans IDE, which is an open-source integrated development environment. NetBeans IDE supports development of all Java application types (Java SE (including JavaFX), Java ME, web, EJB and mobile applications) out of the box.

This profiler includes functions such as CPU, memory and threads profiling but also provides additional tools and functionality for basic JVM monitoring, which is extremely useful for developers who need to solve memory or performance-related issues.

JProfiler

r_jp002.gif

JProfiler  was previously mentioned in my previous article but remains a extremely good Java profiler combining CPU, Memory and Thread profiling into one application and is useful for developers as it can be used to analyze performance bottlenecks, memory leaks, CPU loads  and resolve threading issues and supports local profiling (analysis of applications that are running on the same machine on which the JProfiler software is installed) and remote profiling (this is where it allows for the analysis of Java applications which are running on remote machines which JProfiler software is not installed on.).

JProfiler is a commercially licensed Java profiling tool developed by ej-technologies GmbH, and is mainly designed for use with Java EE and Java SE applications.

GC Viewer

 

gcviewer-screenshot-300x229.png

Screenshots of GC viewer in action

 

GC Viewer is available to be downloaded for free (from its website and GitHub)and is a open sourced tool which can be used to visualize data produced by the Java VM options using the vmflags -verbose:gc and -Xloggc:. GC Viewer can be used to calculate garbage collection related performance metrics which include throughput, accumulated pauses, longest pause and more. It is often very useful for when you want to tun the garbage collection of a particular application by changing generation sizes or setting up the initial heap size.

GC Viewer is an open sourced tool by tagtraum industries incorporated is a tiny Raleigh, North Carolina based software and consulting company founded in 2004 from the not-for-profit project tagtraum industries started in 1999.

VisualVM

visualvm.png

VisualVM is a tool derived from the NetBeans platform and its architecture is modular in design meaning its easy to extend through the use of plugins.

Visual VM allows you to get detailed information about your Java applications while they are running on a Java Virtual Machine (JVM). Data generated can be generated and retrieved by the Java Development Kit (JDK) tools and all the data and information on multiple Java Applications can be viewed quickly both local and remote running applications.  It is possible to also save and capture the data about the JVM software and save the data to the local system, and then view the data later or share it with others.

Visual VM can do CPU Profiling, memory Profiling, run garbage collections, take snapshots and more.

Java Performance Analysis Tool (Patty) *Beta

 

patty-in-action.jpg

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

 

The “Patty” project is a open source project available to download from Source Forge and is aimed at providing a profiling tool for the Java 1.5.0 and higher Virtual Machines. It differentiates itself from other profilers through maintaining a very high emphasis on targeted profiling and allows users to switch profiling features on and off at runtime.

Currently its in state of beta but as some strong features such as analyses of method execution, code coverage, thread contention can be used for profiling overheads (memory CPU, etc) an have its information sent to other computers via the TCP/IP Socket, as a easy to use GUI and can be used to analyze heaps, and can instrument and de-instrument classes while your application is running. (preparation steps in a Java build cycle.

JRockit – Mission Control

oracle-jrockit.jpg

JRockit is a proprietary Java Virtual Machine (JVM) originally developed by Appeal Virtual Machines and acquired by BEA Systems in 2002 and later became part of Oracle via Sun Microsystems.

Oracles JRockit is a complete solution for Java SE which includes a high-performance JVM, profiling, monitoring and 
diagnostics tools, and can be used for predicting latency in Java applications.

The current iteration of JRockit is bundled with a set of tools called JRockit Mission Control.The tools include: a console used for management and is capable of visualizing garbage-collection and other performance statistics. It can also be used as a runtime performance profiling tool called Runtime Analyzer and can also analyze memory issues.

Eclipse Memory Analyzer

eclipse_bckgr_logo_fc_lg-300x166.jpg

Memory Analyzer (MAT) is found in the Eclipse IDE.

 

The Eclipse Memory Analyzer is a Java heap analyzer that helps you find memory leaks and reduce memory consumption. It is more suited for being a general purpose toolkit to analyze Java heap dumps and calculation of its size.  It can be used also reports leak suspects and memory consumption anti-patterns.

Java Interactive Profiler

jip-300x108.jpg

JIP is a high performance, low overhead profiler that is written and developed in Java, it currently operates under a BSD licence and is available from Source Forge to download.  For developers using JIP there is the the ability to turn the profiler on and off while the VM is running also it is possible to also filter out classes and packages and control the output.

Profiler4J

profiler4j-300x95.jpg

Profiler4j is a a dedicated CPU profiler Java that is user friendly and supports remote profiling and can be configured “on the fly”. Notable features include that its based on dynamic bytecode instrumentation, it as no native library nor requires an executable. Further notable features are that its done 100% in Java, can provide graphical information with a call graph, call tree, memory monitor, and class list. and supports fine-grained configuration. It is currently released under theApache License v2.0 and is available to download from Source Forge.

本文转载自:http://www.open-open.com/news/view/1ec20f6

共有 人打赏支持
ihaolin
粉丝 259
博文 164
码字总数 106524
作品 4
朝阳
高级程序员
成为Java GC专家(5)—Java性能调优原则

这是“成为Java GC专家”系列的第五篇文章。在第一篇深入浅出Java垃圾回收机制中,我们已经学习了不同的GC算法流程、GC的工作原理、新生代(Young Generation)和老年代(Old Generation)的...

stefanzhlg
2014/12/05
0
1
如何合理的规划一次jvm性能调优

这是jvm优化系列第三篇: jvm优化——垃圾回收 jvm优化——监控工具 JVM性能调优涉及到方方面面的取舍,往往是牵一发而动全身,需要全盘考虑各方面的影响。但也有一些基础的理论和原则,理解...

wier
2017/10/25
0
9
深入理解JVM学习笔记(一、总览)

1、JVM历史 2、JVM内存结构 3、JVM垃圾回收机制 4、JVM性能监控工具 5、JVM性能调优案例时间 6、JVM类文件结构 7、JVM类加载机制 8、JVM字节码执行引擎 9、JVM虚拟机编译及其运行时优化 10、...

jintaohahahaha
05/28
0
0
编写高性能 Java 代码的最佳实践

摘要:本文首先介绍了负载测试、基于APM工具的应用程序和服务器监控,随后介绍了编写高性能Java代码的一些最佳实践。最后研究了JVM特定的调优技巧、数据库端的优化和架构方面的调整。以下是译...

这篇文章
06/20
0
0
怎样写出高性能的 Java 代码?

在这篇文章中,我们将讨论几个有助于提升Java应用程序性能的方法。我们首先将介绍如何定义可度量的性能指标,然后看看有哪些工具可以用来度量和监控应用程序性能,以及确定性能瓶颈。 我们还...

程序员之家_
08/24
0
0

没有更多内容

加载失败,请刷新页面

加载更多

shell特殊符号、cut、sort、uniq、wc、tee、tr、split命令

10月15日任务 8.10 shell特殊符号cut命令 8.11 sort_wc_uniq命令 8.12 tee_tr_split命令 8.13 shell特殊符号下 cut 命令 cut作用:截取字符串 用法如下:cat /etc/passwd |head -2 |cut -d ...

hhpuppy
24分钟前
0
0
Springboot实现filter拦截token验证和跨域

背景 web验证授权合法的一般分为下面几种 1使用session作为验证合法用户访问的验证方式 使用自己实现的token 使用OCA标准 在使用API接口授权验证时,token是自定义的方式实现起来不需要引入其...

funnymin
58分钟前
2
0
linux使用ntfs-3g操作ntfs格式硬盘

Linux内核目前只支持对微软NTFS文件系统的读取。 NTFS-3G 是微软 NTFS 文件系统的一个开源实现,同时支持读和写。NTFS-3G 开发者使用 FUSE 文件系统来辅助开发,同时对可移植性有益。 安装 ...

linuxprobe16
今天
1
0
kubeadm部署kubernetes集群

一、环境要求 这里使用RHEL7.5 master、etcd:192.168.10.101,主机名:master node1:192.168.10.103,主机名:node1 node2:192.168.10.104,主机名:node2 所有机子能基于主机名通信,编辑...

人在艹木中
今天
14
0
Shell特殊符号总结以及cut,sort,wc,uniq,tee,tr,split命令

特殊符号总结一 * 任意个任意字符 ? 任意一个字符 # 注释字符 \ 脱义字符 | 管道符 # #号后的备注被忽略[root@centos01 ~]# ls a.txt # 备注 a.txt[root@centos01 ~]# a=1[root@centos01...

野雪球
今天
3
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部