user39732
user39732

Reputation: 205

How to measure cpu over-head introduced by the hprof profiler attached to a jvm

I'm running IBM's jvm (jdk 5.0) with the options -XrunHprof:format=b

I'm aware that instrumenting jvm with hprof involves a performance penality. I would like to quantify that penality. I know that one way to do this is to take off the hprof profiling and run the application, and compare the application's cpu utilization in both cases. But this option is not available to me

I have a running application that is instrumented with hprof. I need to find out what % of cpu is being consumed by the hprof profiler itself.

Upvotes: 0

Views: 532

Answers (2)

Mike Dunlavey
Mike Dunlavey

Reputation: 40659

You don't actually say you have a performance problem that you're trying to solve by profiling. But on the off chance that you do, you might try this.

Upvotes: 1

kdgregory
kdgregory

Reputation: 39606

I don't have any hard numbers, but I've always considered running under hprof to be an order of magnitude (or two) slower than without. It's very much dependent on what you track: larger stack frames, for example will increase the overhead.

But regardless, it's definitely not something you'd want running in anything other than a closely controlled test environment.

Upvotes: 1

Related Questions