yourkit

How do I connect to a Java command-line tool with the YourKit Java Profiler?

↘锁芯ラ 提交于 2019-12-10 19:55:43
问题 I've build a command-line tool in Java, which I would now like to profile with YourKit. I launch the command-line tool with something like: $ java -classpath .:foo.bar.jar com.foobar.tools.TheTool arg1 arg2 arg3 It runs to completion in less than 2 seconds. After reading http://www.yourkit.com/docs/80/help/agent.jsp, I tried the following: $ java -agentpath:/home/dspitzer/yjp-8.0.24/bin/linux-x86-32/libyjpagent.so -classpath .:foo.bar.jar com.foobar.tools.TheTool arg1 arg2 arg3 ...and I get:

How to measure I/O time for a java application running on ubuntu?

◇◆丶佛笑我妖孽 提交于 2019-12-10 19:44:35
问题 I would like to gather amount of time my application is waiting for I/O. I am running this java application on ubuntu/linux. I am using yourkit profiler. Suggest if there any other profiling tool for measuring I/O time. 回答1: Youtkit is excellent for having a zoom microscope in your application. In these situations it often pays to also look from the outside to a macroscopic view and take some very rough measurements to see if you are CPU bound or IO bound. If your app running at full throttle

heapdump size vs hprof size

纵饮孤独 提交于 2019-12-10 10:56:56
问题 I recently made a heapdump in a hprof format when my jboss server was running with a xms of 4096m and xmx of 4096m and a permsize of 512m. The hprof file generated is over 5gb. When I load the heapdump in visualvm, mat analyzer or yourkit, I only see a total bytes of approximately 1gb. I've tried changed the reachability scope in yourkit but it does not show more than 1 gb. Any idea what this big difference in filesize vs displayed heapdump size can cause? ps: I'm using jdk1.6.0_23

WebappClassLoader memory leak even with no gc roots

柔情痞子 提交于 2019-12-07 03:27:08
问题 HERE IS THE HEAD DUMP (UPDATED ON 10/29/2013) I'm working in a webapp with: Tomcat 7.0.24 Java 6 Spring 3 (with aop - cglib) SLF4J over Log4j Oracle Coherence After a lot of work, I managed to remove all the strong reference to the class loader and now it is a candidate for the garbage collector. So, memory leak solved? Of course not! Because after several hot deployments a OOME appears due to PermGen space. Thanks to Yourkit, I was able to check that the WebappClassLoader was Pending

heapdump size vs hprof size

こ雲淡風輕ζ 提交于 2019-12-06 07:00:08
I recently made a heapdump in a hprof format when my jboss server was running with a xms of 4096m and xmx of 4096m and a permsize of 512m. The hprof file generated is over 5gb. When I load the heapdump in visualvm, mat analyzer or yourkit, I only see a total bytes of approximately 1gb. I've tried changed the reachability scope in yourkit but it does not show more than 1 gb. Any idea what this big difference in filesize vs displayed heapdump size can cause? ps: I'm using jdk1.6.0_23 Unfortunately I'm not allowed to submit screenshots here. On the filesystem the hprof size is of 5.227.659 kb and

WebappClassLoader memory leak even with no gc roots

我们两清 提交于 2019-12-05 07:30:04
HERE IS THE HEAD DUMP (UPDATED ON 10/29/2013) I'm working in a webapp with: Tomcat 7.0.24 Java 6 Spring 3 (with aop - cglib) SLF4J over Log4j Oracle Coherence After a lot of work, I managed to remove all the strong reference to the class loader and now it is a candidate for the garbage collector. So, memory leak solved? Of course not! Because after several hot deployments a OOME appears due to PermGen space. Thanks to Yourkit, I was able to check that the WebappClassLoader was Pending Finalization which means that is waiting in the finalizer queue (actually, is not the WebappClassLoader itself

YourKit - The retained size of an object doesn't equal the retained size of all the objects referred by it

最后都变了- 提交于 2019-12-04 05:59:12
The retained size of an object doesn't equal the retained size of all the objects referred by it. Here is what is happening: Using YourKit to capture memory snapshot. click on an object & show instances by class type let's say the instance's retained memory is A bytes (600mb) expand and sum the retained size for the underlying instances let's say the sum is B (300mb) A >> B Let me give you an example. First of all, you need to understand what retained size is. From the official documentation : Retained size of an object is its shallow size plus the shallow sizes of the objects that are

Why does park/unpark have 60% CPU usage?

倾然丶 夕夏残阳落幕 提交于 2019-12-03 08:42:36
Recently we started stress testing our application (an XMPP based chat server) using YJP 11.0.9. During our test we noticed following strange behavior. Sampling shows sun.misc.Unsafe.unpark(Object) took 60% of CPU. For the same app Tracing shows that LockSupport.park(Object) took 52% of CPU. I did multiple tests to confirm results and every time I got similar results. I am unable to understand why unpark should take 60% time and why tracing shows exactly opposite results. Can someone help me understand these results. Am I missing something here? Environment: java -version java version "1.6.0

Profiled app with YourKit, still can't identify the CPU hog

放肆的年华 提交于 2019-11-29 11:40:29
I've got a Java application that is consuming 100% of the CPU most of the time (as indicated by cacti and top monitoring). We fired up YourKit (which confirms the CPU resource issue) and it identifies java.net.SocketInputStream.read(byte[], int, int) as the biggest hot spot at 15% of time. I believe they aren't accurately measuring CPU time for methods that perform blocking IO like SocketInputStream.read would. There are 6 other identified hot spots, but they account for less than 20% of accounted for CPU time combined. all in the 5%-1% range. So I know I have a problem, I can see the problem,

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

a 夏天 提交于 2019-11-28 15:14:48
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