Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm looking for a tool or a script that will take the console log from my web app, parse out the garbage collection information and display it in a meaningful way.
I'm starting up on a Sun Java 1.4.2 JVM with the following flags:
-verbose:gc -XX:+PrintGCTimeStamps -XX:+PrintGCDetails
The log output looks like this:
54.736: [Full GC 54.737: [Tenured: 172798K->18092K(174784K), 2.3792658 secs] 257598K->18092K(259584K), [Perm : 20476K->20476K(20480K)], 2.4715398 secs]
Making sense of a few hundred of these kinds of log entries would be much easier if I had a tool that would visually graph garbage collection trends.
gcviewer does what you want.
IBM's GC toolkit does exactly what you ask.
https://www.ibm.com/developerworks/java/jdk/tools/gcmv/
I'm not sure if it's compatible with GC logs from Sun's JVM though.
I think some people are adding Java probes which don't really parse garbage collection logs as the question states...
I've tried others (gcviewer, gchisto, IBM's) and the best tool I found for analyzing GC logs is HPjmeter
It is mainly for HP-UX JVMs, but it also usually works with Sun JVMs and does a great job.
(source: xebia.com)
I tried a online tool http://gceasy.io , it can read my sun jdk 1.8 gc log.
Even better than jconsole is visualvm, which is developed and distributed freely by Sun. It has a GC analyzing plugin called gchisto which might help you.
Edit: Sorry, I didn't see your JDK 1.4.2 requirement. In that case visualvm won't help you, alas.
The most powerful tool I've found to work with both IBM and Hotspot JVM logs and visualize them is IBM's PMAT:
https://www.ibm.com/developerworks/mydeveloperworks/groups/service/html/communityview?communityUuid=22d56091-3a7b-4497-b36e-634b51838e11
I find it both faster and gives more details than the tool in IBM Support Assistant.
It is being continually updated, lastly July'12.
However seems to have some problems parsing logs with policy CMS but hopefully that can be fixed.
PrintGCStats is pretty good too, and gives good statistics, but not for visualization over time, that needs some work.
I use YourKit java profiler, which lets you measure this sort of thing, and much more, but using it's own format rather than analysing the log. It can do more under Java 5, but should work under 1.4.
Try VisualGC from Sun. There are JDK 4 and 5 versions that give you a nice visual of what's going on in the eden, generational, and perm spaces. You need to add a JAR and get a PID and Bob's your uncle.
A few years ago, John Coomes (Hotspot GC group) had released PrintGCStats, an awk script to "summarize statistics about garbage collection, in particular gc pause time totals, averages, maximum and standard deviations.". A copy of the script is hosted on java.net : http://java.net/projects/printgcstats
jconsole can help you a lot, but I think it's Java 5 and later only. Once I heard someone of SUN speaking at our university and he said that Java 6's garbage collector is A LOT better than the old ones which needed complicated tuning nearly all the time for big applications. Java 6 GC seems to scale a lot better on SMPs.
gchisto plugin for VisualVM doesn't work https://gchisto.dev.java.net/
I have a file with all details of printgc for jdk1.6 but couldn't find a tool to read that.
Previously with jdk1.5 we used HPjmeter it worked fine, but now with jdk1.6 it doesn't
Tried following: IBM Pattern Modeling and Analysis Tool for Java Garbage Collector -- it doesn't recognizes the file. GCCollector doesn't work, it keep on reading file for analysis.
How about trying out some profiling tool like JProbe Freeware (Eclipse plug-in).
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 9 years ago.
Improve this question
i am new to all this performance improvement thing. Can anyone provide names of some good tools or techniques for checking the performance of the web application and finding the bottlenecks in the application both on server side and client side. If any one can provide link examples or tutorials to such tools or techniques it will be very helpful. Thanks in advance for your help.
Using VisualVM i got following result
please do let me know how to find the code in my application which is responsible for this.
Improving the performance of a web application involves couple of things.
Improving the application code involves :
Apply caching - E.g. JCS, EHCache
Compression of HTTP requests
Avoid Embedding of Javascripts
Balance the load - Horizontal/Vertical Scaling
Cookie size reduction
Use profiling tools like JProfiler, jProbe, JRockit, VisualVM
EDITED for the changed question :
Are you getting Out of memory Error ?
To find Memory related issue, Take snapshot at regular interval and look for possible leaks. Using the Deltas mode you can easily watch newly allocated and disposed objects over a specific period of time or while an action is executed which makes it really easy to identify a memory leak. Also, the memory data can be saved as a .nps snapshot which can later be compared to other memory snapshots using the Compare function. Once the memory leak is identified, you can investigate the leak further by using the built-in HeapWalker. The HeapWalker has been enhanced to support displaying retained sizes and provides a powerful OQL scripting engine.
Furthermore, you can use other tools for heap analysis like :
HAT, The Java Heap Analysis Tool
YourKit Java Profiler
Memory Analyzer project at Eclipse, contributed to them by SAP.
HeapWalker is a good option too.
Have you tried visualVM, its free and powerful tool to track the J2EE performance application, some of its features:
Provide a CPU profiling.
Provide all info about Threads.
Provide the JVM Heap and the memory states.
Provide Info about the GC activities.
Its come with the JDK package, so you don't have to install it, for more info check this
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed last month.
Improve this question
I am looking for GC log analyzer for Garbage First collector. Many people have mentioned "IBM Pattern Modeling and Analysis Tool for Java Garbage Collector (PMAT)" but it doesn't seem to be compatible with G1 with Oracle JDK7. Can any one share which tools you have used for analyzing gc logs graphically.
Try GCViewer.
The fork on GitHub includes support for newer Garbage Collectors (including G1).
Here is a relatively up-to-date list of all various tools that you can use for GC log analysis : Garbage Collector Log Analysers :
(2013) JClarity's Censum Garbage Collection log analyser
(2013) GcViewer
(2012) IBM PMAT Pattern Modeling and Analysis Tool for Java Garbage Collector
(2012) IBM GCMV The GC and Memory Visualizer
(2012) verbosegcanalyzer
(2011) HPjmeter JVM performance analyser (includes the functionality from HPjtune which was the GC log analyser tool)
(2011) garbagecat
(2010) gclogviewer
(2010/2004) printgcstats (this may or may not be the PrintGCStats tool from 2004 which Sun created)
(2009) GCAnalysis
(2008) gchisto
(2008) gcview
(2008) the original GcViewer
(2005) Garbage Collection Analysis (GCA)
(2004) GCPortal
Look at the Memory Tab in Java Mission Control, it will graph heap usage, live set, GC pauses etc. for G1.
The latest Mission Control, available as part of Java 7u40, is compatible with all Hotspot GC algorithms and is able to analyze and view the GC activity.
R is a very powerful tool for the analysis of Java garbage collection log files. The primary difficulty is data cleansing so that information can be read into an R data frame. Once the data has been read into R, a rich set of tools may be used for thorough evaluation.
More details are available at my blog:
"Using R to analyze Java G1 garbage collector log files"
https://blogs.oracle.com/taylor22/entry/using_r_to_analyze_g1gc
HPJmeter 4.4.00.0 can read GC logs with the G1GC. Tested with the following JVM args.
-XX:+UseG1GC -Xloggc:c:/temp/eRGCLogs.txt -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps
Try Universal GC log analysing online tool http://gcloganalyzer.com
https://github.com/eclipse/jifa is the best tool that i tried.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I'm looking for a Java Profiler for use in a very high demand production environment, either commercial or free, that meets all of the following requirements:
Lightweight integration with code (no recompile with special options, no code hooks, etc). Dropping some profiler specific .jars alongside the application code is ok.
Should be able to connect/disconnect to the JVM without restarting the application.
When profiling is not active, no impact to performance
When profiling is active, negligible impact to performance. Very slight degradation is acceptable.
Must do all the 'expected' stuff a profiler does - time spent in each method to find hotspots, object allocation/memory profiling, etc.
Essentially I need something that can sit dormant in production when everything is fine without anyone knowing or caring that it is there, but then be able to connect to it hassle (and performance degradation) free to pinpoint the hard to find problems like hotspots and synchronization issues.
Have you tried YourKit? It has almost all of the features you are looking for.
Java VisualVM is a tool that provides a visual interface for viewing detailed information about Java technology-based applications (Java applications) while they are running on a Java Virtual Machine (JVM). Java VisualVM organizes JVM data that is retrieved by the Java Development Kit (JDK) tools and presents the information in a way that enables you to quickly view data on multiple Java applications. You can view data on local applications and applications that are running on remote hosts. You can also capture data about the JVM software and save the data to your local system, and view the data later or share the data with others. This comes with Oracle JDK it self...
$ jvisualvm
I have been happy with jProfiler.
I prefer Java Flight Recorder. It causes almost no performance overhead and has a nice GUI. Add JVM parameters
-XX:+UnlockCommercialFeatures -XX:+FlightRecorder
-XX:StartFlightRecording=name=test,filename=test.jfr,dumponexit=true
and open the record with JMC.
Checkout CA Wily.
http://www.ca.com/us/application-management.aspx
I use Eclipse TPTP - Eclipse Test & Performance Tools Platform Project. Whether it is suitable for production use or not, it depends on the user. For me, it's fine and it does meet your needs.
http://www.eclipse.org/tptp/
Another option is http://www.newrelic.com/. We have been using it in production for some time, and it seems to be pretty reliable and performant. Simple to setup (one .jar and a -agent commandline option).
There's another new option called javosize
When I looked for "best java profiler" on google, I saw on the first non-paid link (it's a blog), the same tool on the comments to the post:
https://blog.oio.de/2014/03/07/java-profilers-a-short-comparison-between-jprofiler-yourkit-and-javas-visualvm/
Hope it helps!
Edit: As comments say, linkedin link is to a private forum. Sorry for it. Here is the link to main site:
http://www.javosize.com/gettingStarted.html
FusionReactor Java Application Performance Monitor, also includes a very low overhead Java Profiler as part of its feature portfolio.
http://www.fusion-reactor.com/production-java-profiler/
FusionReactor can be installed in a couple of minutes & they have a free 14 day trial to test it out.
Take a look at Java Mission Control in conjunction with Flight Recorder. Starting with the release of Oracle JDK 7 Update 40 (7u40), Java Mission Control is bundled with the HotSpot JVM, so it is highly integrated and purports to have small effects on run-time performance. It has call tree functionality like Callgrind.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
What can you guys recommend to use with Java?
Only requirement is it should be open source, or has not too expensive academic licence .
The VisualVM which comes with jdk6 has a basic profiler inside it.
VisualVM is provided with the jdk, so if you have the jdk6 installed, you likely have it installed as well.
https://visualvm.github.io/
you've got a list here (listing them below, in-case link gets broken)
JMemProf
JMP
DrMem
JTreeProfiler
NetBeans Profiler
JAMon API
JBoss Profiler
MessAdmin
InfraRED
TomcatProbe
Java Interactive Profiler (JIP)
Profiler4j
Stopwatch
JMeasurement
DJProf
TIJmp
Allmon
Appspy
EurekaJ
japex
OKTECH Profiler
Perf4j
Ah. Netbeans Profiler, developer.com's "Product of the Year" winner, in 2009.
Java has a basic built in profiler called HProf. I find it useful to compare the results it provides with results from more fully features profilers.
The open-source tool jvmtop does include a basic console profiler.
Example output:
JvmTop 0.7.0 alpha - 15:16:34, amd64, 8 cpus, Linux 2.6.32-27, load avg 0.41
http://code.google.com/p/jvmtop
Profiling PID 24015: org.apache.catalina.startup.Bootstrap
36.16% ( 57.57s) hudson.model.AbstractBuild.calcChangeSet()
30.36% ( 48.33s) hudson.scm.SubversionChangeLogParser.parse()
7.14% ( 11.37s) org.kohsuke.stapler.jelly.JellyClassTearOff.parseScript()
6.25% ( 9.95s) net.sf.json.JSONObject.write()
3.13% ( 4.98s) ....kohsuke.stapler.jelly.CustomTagLibrary.loadJellyScri()
Eclipse TPTP
Here's an article about Java Application Profiling using TPTP and here's a tutorial Profiling J2SE 5.0 based applications using Eclipse TPTP.
If you are looking for a no-frills, easy to use open source profiler, you may want to take a look at Jip (Java Interactive Profiler). It's published under a BSD license. I found it to be quite useful for small programs. At least, the results it gives are way more easy to understand than hprofs output.
Java Mission Control, it's free to use for development and it integrates with Eclipse. It has very low overhead (<1%) since it piggybacks on the data the JVM is gathering anyway.
It's very easy to use and it can also give a lot information you typically won't find in other profiling tools, e.g. latency profiling, online memory inspection, detailed gc statistics
This is quick, dirty, and very effective: just take a few thread dumps, or pause the program several times, and look at the stack traces.
Consider cutting-edge https://github.com/jvm-profiling-tools/async-profiler
This project is a low overhead sampling profiler for Java that does not suffer from Safepoint bias problem. It features HotSpot-specific APIs to collect stack traces and to track memory allocations. The profiler works with OpenJDK, Oracle JDK and other Java runtimes based on HotSpot JVM.
It's also built-in into IntelliJ IDEA Ultimate: https://www.jetbrains.com/help/idea/cpu-profiler.html.
There is also similar https://github.com/jvm-profiling-tools/honest-profiler.
The comparison between async-profiler and honest-profiler: https://github.com/jvm-profiling-tools/async-profiler/issues/77
JVM Monitor is a Java profiler integrated with Eclipse to monitor CPU, threads and memory usage of Java applications.
If further deep analysis is needed, you may use other tools (e.g. TPTP, Memory Analyzer) as a next step.
Netbeans IDE includes a free profiler.
Also, if I remember correctly, the academic license for JProfiler is (relatively) inexpensive.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Which profiler is better for general purpose profiling and heap analysis? 90% of our apps are standalone command line programs with substantial database and numeric processing. The other 10% are webapps/servlet container apps (with very little JSP and NO SCRIPLETS!). Target user would be Sr Software Engineer with 5-10 years of industry experience. We need support only for Sun JDK 5 and.
As of writing this question (2008-10-02), JProfiler was at 5.1.4 and YourKit was 7.5. Looks like YourKit 8.0 will be released soon.
I've used both JProfiler 4 and YourKit 7.5, and YourKit wins hands down. It's so much less invasive than JProfile, in that I'll happy run production servers with the YourKit agent installed, which I would never do with JProfiler.
Also, the analysis tool that comes with YourKit is more intuitive (in my opinion), making it easier to get the root cause of problems.
If you're on jdk >=1.6_07 you might also want to look at jvisualvm which comes bundled.
Having used both JProfiler and Yourkit recently I find that yourkit is far superior for memory problem analysis and strongly prefer jprofiler for performance analysis. Yourkit's memory analysis seems to be much easier and intuitive. For performance analysis on yourkit I have been unsuccessful in resolving any performance issue I have tried to resolve with yourkit. JProfiler shows more accurate and concise information for performance analysis with the exact number of method invocations and percent time spent in each method. I have yet to find this in yourkit. It seems yourkit just gives sampling information which is not accurate unless you are measuring thousands of invocations.
I've used JProbe, OptimizeIt, and YourKit all extensively and they're all capable tools. Of the 3, my all around favorite is YourKit.
The one killer feature in JProbe is the ability to move from a perf snapshot to annotated source (with counts and timings). I found that to be exceptionally useful.
None of the tools other than JXInsight perform real database transaction analysis:
http://www.jinspired.com/products/jxinsight/concurrency.html
http://www.jinspired.com/products/jxinsight/olapvsoltp.html
JXInsight's Probes technology is also the only one that could even run in production considering that we out perform netbeans profiler by 20x and yourkit 100x in SPECjvm2008 benchmarks.
http://blog.jinspired.com/?p=272
I am the architect of JXInsight so of course I am completely biased but at the same time I am probably more qualified than most in the Java industry to make such a claim since I have devoted the last 8 years to performance analysis for some of the most demanding of Java/J2EE application in production.
I should be point out that JXInsight is designed for software performance engineers and not just for the occasional adhoc profiling session. We have more than 4000+ system properties to configure the runtime and 600+ technology extensions libraries so it might be overkill unless one has a complex problem to solve and/or using the same tool across development, test and production is paramount.
Kind regards,
William
With Java 7 Update 40, Oracle included Java mission control (originally part of the JRockit JDK) - a very powerful performance tuning tool which is able to compete with yourkit/jprofiler.
Take a look and be surprised.
I have used both and my vote now is definitely JProfiler (in the current version 6) as it is easier to use and has a lot of useful additional features. In previous releases YourKit had some advantages with larger snaphots, but this is gone now.
Definitely YourKit ... It was able to open 4 gigs heap dump with just 1g of heap used. While Jprofiler with same heap allocation crashed!
i've used yourkit and it is a very nice profiler, the best i've ever used in java (i've used a variety of others over the years). that being said, i've never used jprofiler, so i can't give a direct comparison.
For quick and dirty profiling of command-line programs, JIP works really well.
Been using JProfiler for years and very happy with it. IntelliJ seems to switch their recommendation back and forth between YourKit and JProfiler so I would guess their feature sets are similar. I believe they both have trial version.
DISCLAIMER : Alternate answer.
they have various products for production monitoring/profiling UNLIKE other mostly development time tools : http://www.jinspired.com/products/jxinsight/
This post on theserverside on JDBInsight : http://www.theserverside.com/news/thread.tss?thread_id=13488
DISCLAIMER : I am NOT associated with this company at any level.
I have used YourKit. I have not used JProfiler. I have used OptimizeIt before. I have very good opinion about YourKit. It is very stable and good GUI and good feature list. One unique feature I have noticed is CPU profiling with and without wait time (like I/O wais) including.
It is priced also very reasonably (about about $1100 for 5 licenses I think)
YourKit is great. You might also want to check out the profiler built into NetBeans--it's pretty cool.
Yourkit
It's low overhead, stable, easy to install on the JVM to be profiled (just one dll) and powerful.
For analyzing heap dumps it's the only profiler that comes close to the Eclipse Memory Analyzer.
I've only used JProfiler (and some JProbe). As far as I can tell, one limitation of YourKit is that they don't appear to support JDK 1.4.2. That's not an issue for many people, but it might be.
+1 for yourkit --- using 7.0 on dev boxes in windows
not used JProfiler for a while -- cannot comment since they might have improved in the meantime.
Just as an aside, you may want to consider the Netbeans profiler -- it's pretty good. But I've not used either of the two you mentioned.
I am using JProfiler and find it overall OK. It's "dynamical instrumentation" feature is terribly biased for small methods, though.
I am using the TPTP profiler. the best feature it has that this can be integrated very easily in Eclipse but the bad thing is that it makes the Eclipse run slower.
Definitly YourKit. It is the most intuitiv and stable!