1

I need a Java flight recording to diagnose a performance problem on production Weblogic servers. I'd like to also get the Weblogic events. Is there any difference between starting the flight recording from either Java Mission Control (or in my case JCMD) versus initiating a WLDF diagnostic image capture? I understand the WLDF contains zipped files in addition to the .jfr, but right now I'm only interested in the flight recording (.jfr) with both the HotspotJVM and Weblogic events.

The reason I ask is because I notice something in the WLDF docs called Configure WLDF diagnostic volume (off, low, medium, high) where you set what types of Weblogic events you want to record. Will starting a flight recording from JCMD on a weblogic java instance include the Weblogic events at the preconfigured diagnostic volume? Or do you need to start it from the Weblogic Admin Console?

public wireless
  • 767
  • 8
  • 20

2 Answers2

1

Everything recorded into the flight recorder is recorded into the same buffers. See http://hirt.se/blog/?p=370. That said, the WLDF instrumentation settings will throttle what is actually recorded. So, there are various different ways to achieve what you want. The first thing to do is to make sure that you've enabled the diagnostic volume in WLDF to record whatever you want the WLDF to record into the flight recorder. For example "high".

Next you can either:

  • Start a continuous recording using command line flags, with a template configured to record you are interested in. (For example, the profiling template minus the full thread stack dump events.)

  • ...or use jcmd to start a recording, again referring to the template that specify what, in addition to the WLDF events, you want to record.

  • ...or use JMC to do pretty much the same thing - start a recording with the template settings you are interested in.

The advantage of the first alternative is that the events you are interested in will always be available, even if you dump an arbitrary time period. In the other two alternatives, they will only be available for the time you are running your (presumably) time limited recording. The advantage of the other alternatives is that you only pay for the (usually tiny) additional overhead of the additional events when your recordings are running.

Hirt
  • 1,664
  • 10
  • 12
  • I'm being asked for advice to troubleshoot unknown performance degradation on production and I don't actually have access to the servers (yet). So I'd like to keep this as simple as possible by telling them to use the preconfigured 'profile' template, and it has to be via jcmd since their servers don't have windows. I remember seeing something about less than 1 percent overhead claim, is this accurate for the 'profile' template? – public wireless Mar 13 '18 at 19:08
  • 1
    The default configuration will keep the overhead below 1% even in pathological cases. For instance, you can create an application that is set up so it has 64 frames on the stack, spins in a loop and only allocate objects that are likely to trigger a new TLAB. For the default configuration, the overhead will not go above 1%. If you use the profile configuration, you may see more than 1%. The overhead of profile is typically 1%, or less, but in some cases it can be more. It is therefore recommended to use profile only for a shorter period of time on production servers. – Kire Haglin Mar 14 '18 at 02:11
1

There is no mechanism in WLS that continuously polls to see if a recording has been started, using jcmd or JMC, and if so enable the WLDF events.

You have to enable them separately in the WLDF GUI [1]. When you do that you will also get JVM events roughly corresponding to what you get when you create a default recording. If you want more detailed information (profile), you need to start two seperate recodings.

[1] It can be good to know that the WLDF events are added using bytecode instrumentation, so the events are not even in the code until you enable the diagnostic feature.

Kire Haglin
  • 6,569
  • 22
  • 27
  • I want the profile template and the WLDF medium settings. So you're saying I need to login to the Weblogic admin console, configure to say, medium volume, and start a flight recording, then also run JFR.start name=MyRecording settings=profile at the command line? – public wireless Mar 13 '18 at 18:58
  • If you want more detailed information (profile) you need to start two recordings, the one created by the WLDF framework when you set the medium volume, and one from command line where you can specify settings=profile. When the recordings are dumped to disk, they will contain the same information, so you only need to look at one of the files – Kire Haglin Mar 13 '18 at 19:17