Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the overhead of BTrace

It is mentioned in BTrace docs that BTrace has almost no overhead when idle. Does that mean BTrace has overhead only and only when some probe is met and it is being processed?

Also, when the Probe is being processed, it would take some CPU to do the processing. But does it have any impact in the JVM memory or any other thing that could impact original JVM process processing?

like image 566
Sandeep Jindal Avatar asked Jul 26 '11 14:07

Sandeep Jindal


1 Answers

The CPU overhead BTrace adds is following:

  • the actual probe code
    • in safe mode the overhead you can incur is minimal with exception of getting timestamps - it can be really sluggish, depending on the OS)
    • when using the unsafe mode you are free to shoot your leg off - the overhead will depend on what you put in the probe handlers
  • JMX handling, if applicable (using a @Property annotated attribute)

In terms of memory BTrace tries its best to avoid any overhead. However, if you use aggregations, profiler or custom collections the memory footprint will grow accordingly to the amount of data you store there.

Also, BTrace puts some additional requirements on PermGen - redefining classes too often might lead to permgen depletion.

like image 163
JB- Avatar answered Oct 14 '22 14:10

JB-