{"id":233,"date":"2009-01-27T09:32:56","date_gmt":"2009-01-27T17:32:56","guid":{"rendered":"http:\/\/jaredrobinson.com\/blog\/?p=233"},"modified":"2009-01-27T09:32:56","modified_gmt":"2009-01-27T17:32:56","slug":"jdk-6s-best-kept-secret-jvisualvm","status":"publish","type":"post","link":"https:\/\/jaredrobinson.com\/blog\/jdk-6s-best-kept-secret-jvisualvm\/","title":{"rendered":"jvisualvm: A free Java memory and CPU profiler"},"content":{"rendered":"<p>I needed to profile a Java application, and since we had a JProfiler floating license, I used it. JProfiler works well, although it&#8217;s pricey. I was googling for other Java profiling tools, and [stackoverflow.com](http:\/\/stackoverflow.com\/search?q=visualvm) made mention of [jvisualvm](https:\/\/visualvm.dev.java.net\/), which comes bundled with JDK 6 release 7. I noticed that on my Fedora 10 box, the java-1.6.0-openjdk package includes jvisualvm. None of my coworkers had heard of it.<\/p>\n<p>JProfiler introduces a significant performance penalty into the code it profiles, whereas other tools including jvisualvm and YourKit have a much lower impact. I&#8217;m going to give jvisualvm a try, once I get the target environment set up properly with the new JDK.<\/p>\n<p>UPDATE: jvisualvm won&#8217;t profile remote applications like JProfiler can. jvisualvm is not quite as easy to use, and I haven&#8217;t figured out how to get stack traces on the CPU and memory hot spots. Overall, I like the tool.<\/p>\n<p>UPDATE 2: jvisualvm can be configured to give a stack trace of memory hot spots. I&#8217;ve learned that performance between the Java 1.5 and 1.6 jvms can be very different. I&#8217;ve learned that I can run &#8216;kill -3 <java pid>&#8216; to print a stack trace of my running java processes. It&#8217;s helped me to narrow down bottlenecks in an application when the profiler wasn&#8217;t granular enough.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I needed to profile a Java application, and since we had a JProfiler floating license, I used it. JProfiler works well, although it&#8217;s pricey. I was googling for other Java profiling tools, and [stackoverflow.com](http:\/\/stackoverflow.com\/search?q=visualvm) made mention of [jvisualvm](https:\/\/visualvm.dev.java.net\/), which comes bundled with JDK 6 release 7. I noticed that on my Fedora 10 box, the &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/jaredrobinson.com\/blog\/jdk-6s-best-kept-secret-jvisualvm\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;jvisualvm: A free Java memory and CPU profiler&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,12,17,19],"tags":[],"class_list":["post-233","post","type-post","status-publish","format-standard","hentry","category-java","category-programming","category-tech","category-work"],"_links":{"self":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/233","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/comments?post=233"}],"version-history":[{"count":6,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/233\/revisions"}],"predecessor-version":[{"id":235,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/posts\/233\/revisions\/235"}],"wp:attachment":[{"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/media?parent=233"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/categories?post=233"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jaredrobinson.com\/blog\/wp-json\/wp\/v2\/tags?post=233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}