3

I need to profile the CPU load of a commercial Java app, of which I don't have the source.

I can see that the app is CPU bound, but how can I understand if the CPU is busy doing FP operations, integers operations, or something else?

If I could find a typical load I could use some open source benchmark tools to simulate the load on different HardWare platform, to understand which CPU offers me the best value, which is my ultimate goal.

1
  • you can introspect using a tool like jprobe/ jprofiler - that will show you which methods/ operations are being invoked and what eats up time and memory. they may not do CPU per se though, but surely you could look at sar/ top/ mpstat for that purpose (i.e. wherever the CPU jumps up, take a snapshot)? Commented Nov 29, 2011 at 15:03

3 Answers 3

5

If you're using JDK 1.6.x, I highly recommend jvisualvm, which is an executable in $JAVA_HOME/bin.

This will help you identify your CPU bottleneck, although if you don't have the source you'll have limited ability to address the underlying issue.

Sign up to request clarification or add additional context in comments.

1 Comment

You either need to download the JDK (not the JRE) or the stand-alone version of jvisualvm. It can attach to a running program! Requires Oracle JVM.
3

The JProfiler program (commercial software) http://www.ej-technologies.com/products/jprofiler/overview.html served me well. (2-3 years ago. But the software should still be good :))

Comments

1

I've been using dynaTrace produciton edition and it help me a lot. Low overhead, high visibility into CPU and Memory bottlenecks.

I do recommend dynaTrace.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.