Best and safest Java Profiler for production use? [closed] - java

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.

Related

Java for embedded systems? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I have recently learned some basic Java and was thinking of seeing if I can use these new skills for an embedded computing project.
I have been looking around but I can't seem to be able to find any microcontrollers that are capable of running Java.
Does such a thing even exist?
Because of Java virtual machine architecture, you need considerable resources just to run the JVM. The path of least resistance to getting an JVM is probably to run an OS on the target that already supports it such as Linux, but that itself requires relatively huge resources.
There are a few stand-alone JVMs that either work bare-metal or integrate with and embedded RTOS for threading support. I compiled a list a while ago in an answer to a similar question, but some of the links are now out of date.
Running Java on an embedded system will certainly hit performance, and is probably not suited to hard real-time applications without a great deal of care.
Microcontrollers are not made for this use. Controllers called "mini computers" can embed JAVA applications (Raspberry PI, BeagleBone, Intel Edison, etc, because they embed an OS, and so can use JRE).
For microcontrollers, C/C++ are really better and more reliable.
Microcontrollers are meant for real low level - they normally don't have much functionality and won't have enough memory/processor speed to run JAVA.
Most entry level microcontrollers use C/C++ and maybe even their own variant of it.
Arduino/Atmega uses Haiku VM to run java. Using the haiku VM you can compile your JAVA code into C - and this will be programmed into Arduino. This makes debugging a little difficult, but it's not that bad - and hey, a high level language like JAVA cuts down your coding time a lot. Issue with this is normally your memory will get over soon, and you cant write huge pieces of code.
PIC - Muvium claimed support for PIC, but they stopped supporting it after a while and have closed down now. I don't think PIC has JAVA support for now.
Renesas is another popular microcontroller provider which has it's own SDK called MicroEJ for java o n RX and RZ boards of theirs. I've never used it, but their boards boast more RAM and flash memory - which helps a lot.
Single board computers (basically, a microcontroller/processor which is more powerful + has more peripherals) is useful when using JAVA for embedded programming. The two most popular ones are Beagle bone and Raspberry Pi. These are basically computers on a chip - and can run a full fledged ARM Ubuntu + Java/Python/any other language.
The easiest to use is Raspberry Pi (in my opinion) - which has huge community support.
Recently I started working on a CM12001/1000000 board that runs Java. It contains two controllers on the same board. Currently I do not have much knowledge of this thing. I will update the answer as soon as I get more info.
To answer your question: Yes, such a thing exists, but it is quite rare. Python however is gaining popularity in the embedded field recently using MicroPython, that includes a small subset of the Python 3 standard library and is optimized to run on micro-controllers.
Edit: ATOP Modules from Telit provide such functionality. Generally they have good amount of both RAM and Flash(A few MB to a few hundred MB). They run Linux over which they load JVM (as pointed by Clifford). Telit provides Java APIs to so control stuffs like GPIO (though very limited) and do stuffs like serial communications, GPS, GSM control etc.
Yes, microcontrollers that are capable of running Java on the bare metal exist
But JVM on this microcontrollers optimized for speed, and low memory usage. It's mean optimized JVM have some limitation instead of regular JVM, it's like Python and MicroPython
But pure code on Java allow you to transfer code with ease from the desktop to a microcontroller or embedded system
For self education with embedded computing project you can try to use Javaino
allow execute Java programs on this development board, read data from sensors via i2c, UART, etc like Arduino

Tools for checking spring performance and bottlenecks with example [closed]

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

Good Options for Java Developer who needs Inexpensive Web Hosting [closed]

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 5 years ago.
Improve this question
As a programmer with limited experience, and interest, in server management, what are some good options for having space available online that makes getting to the actual development and deployment of Java web applications simple?
Needs:
- ability to create, or at least manage a database through non-command line interface, even if it just requires using a remote connection to the database manager
- deployments can be done from remote server
- hooking up a domain to a Java server context needs to be easily done (I don't want to manage something like mod_jk with Apache manually)
It all depends on how cheap you want to go. Google App Engine is the cheapest (free) for small sites, but if your site gets very little traffic you have to wait for the JVM to start up.
Here are some links to check out:
Inexpensive VPS/Cloud:
http://www.joyent.com/services/cloudhosting/
http://performancehosting.net/hosting.php
http://www.godaddy.com/hosting/virtual-dedicated-servers.aspx
A little less expensive, but very popular:
http://aws.amazon.com/ec2/
If you are a Java dev and are interested in a very fun, simple Java-based web framework and hosting package:
http://www.playframework.org/
http://www.playapps.net/
More reading:
http://mediatemple.net/
http://www.rackspacecloud.com/
http://mor.ph/products
http://www.rightscale.com/
http://www.cloudfoundry.com/
Virtual Private Server (VPS) - rather cheap, prices start at around 13 dollars / month
Google App Engine (but it imposes some limitations)
Jelastic (Java Elastic) provides an advanced cloud hosting platform for Java developers. It simplifies provisioning of dev, test and production environments for simple and complex Java projects, automates horizontal scaling, load balancing and clustering. It also provides a unique vertical scaling which actually saves a lot of money and enables scalability for legacy applications that were not designed as microservices.
Another cheap option in addition to others already listed:
http://vpsland.com/windowsplans.html
http://vpsland.com/linux_vps_plans.php
If you are looking for something cheap and at the same time you would like to deploy in a simple way, you should take a look at some PaaS providers as they usually offer a free tier and they also permit you to deploy without installing or configuring any software in the user end. You just need to have your .war file and to deploy it.
Not all the PaaS support the same stacks. If you are only interested in a specialized java a PaaS a simple search with the key words "java platform as a service" will give interesting results.
You can use IBM Bluemix It has a 30 day free trial and after that you are charged for the time that your apps run and the memory that is used, calculated as GB-hours, so you only pay for what you use. Also there are a lot of tutorial about how to use Bluemix, here you can find a Java,Ajax and Cloudant (database) example: http://www.ibm.com/developerworks/java/library/j-hangman-app/index.html
Also check out Oxxus.net java hosting offers. They have java-ready VPS servers that come loaded with whatever JVM you want and also clustered solutions for scalability. They've been hosting java since 2003 and have no negative reviews online so it's worth checking out.

Open Source Java Profilers [closed]

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.

Which Java profiler is better: JProfiler or YourKit? [closed]

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!

Categories