Tracer vs. Sampling in Java Flight Recorder

From JFR "Start FR wizard -->event options for profiling" and the profiling results,  I can tell that JFR is a sampling based profiler when analyzing methods. What I could not find out for sure is, how about I/O, GC and others? It is hard for me to believe those are sampling based as well. Instead I tend to believe those are actual counts that are being traced and recorded.
I copied  page #5 on below side. If I understand correctly, it basically says that "GC, I/O and so on" are tracer based, not sampling based actual stats. While when it says "Sampling-based profiler", it only means "methold sampling".  Also page 16 on this slide seems to confirm my understanding, as JFR is built into JVM, and is able to instrument and get status for GC, I/O stuff.
The reason I am interested is, actual stats for GC & I/O seem to be more valuable than sampled stats. So curious to know about it for sure.
Java Flight Recorder Behind the Scenes
Tracer and Profiler
Captures both JVM and application data
–  Garbage Collections
–  Synchronization
–  Compiler
–  CPU Usage
–  Exceptions
–  I/O
Sampling-based profiler
–  Very low overhead
–  Accurate data

You are correct. Only the method profiler is sampling based, the other metrics are "real" metrics. The only caveat is that we throw away things that are shorter than a certain threshold. For example, in the default settings all I/O events shorter than 20ms are discarded.
/Staffan

Similar Messages

  • Flight Recorder does not provide Method Profiling Samples on CentOS 5

    Flight recorder from jdk 1.8.0_05 does not collect information about methods then running under CentOS 5.
    But jdk1.7.0_55 provides "Method Profiling Samples" events on the same machine.
    Steps to reproduce:
    1. Download test class - https://gist.github.com/evsinev/0b136693ef7549ddc9b5
    2. compile it
    3. Run it:
    NOW=$(date +"%H-%M-%S")
    export JAVA_OPTS="$JAVA_OPTS -XX:+UnlockCommercialFeatures -XX:+FlightRecorder"
    export JAVA_OPTS="$JAVA_OPTS -XX:StartFlightRecording=duration=120s,filename=data/profile-startup-${NOW}.jfr,name=Startup,settings=profile"
    export JAVA_OPTS="$JAVA_OPTS -XX:FlightRecorderOptions=samplethreads=true,stackdepth=64"
    /opt/jdk1.8.0_05/bin/java $JAVA_OPTS -cp . Test
    Running with jdk 1.8.0_05 does not provide "Method Profiling Samples"
    Running with jdk 1.7.0_55 provides "Method Profiling Samples"
    Environment:
    CentOS release 5.9 (Final)
    uname:Linux 2.6.18-348.1.1.el5 #1 SMP Tue Jan 22 16:19:19 EST 2013 x86_64
    libc:glibc 2.5 NPTL 2.5

    I've spoken to the developers of the JVM/JDK parts of JFR, and I'm afraid they say this is a known issue
    (https://bugs.openjdk.java.net/browse/JDK-8036090, https://bugs.openjdk.java.net/browse/JDK-8037340)
    that happens on Linux only.
    It will be fixed in 7u60 and 8u20 which will be released later this year.

  • Java Mission Control 5.2  Using Flight Recorder with GlassFish 4

    Hello,
    I followed the steps in the following link to monitor a GlassFish Application with Flight Recorder .
    Enterprise Software Development with Java: Java Mission Control 5.2 is Finally Here! Welcome 7u40!
    But I am getting the following Error when double click the "MBean Server":
    Could not connect to GlassFish (3376) : Unable to resolve connection URL
    Unable to resolve connection URL
    can you help me?
    Thanks in advance,
    Roger Solano.

    I downloaded Glassfish 4.0 to try this, also following the setup instructions for adding the jvm flags.
    I could however connect with the MBean Server.
    Could you send us the full error message, and possible also start JMC with
    jmc -consoleLog
    (add "| more" on Windows)
    Are you running JMC 5.2 or 5.3?

  • 30 mins flight recording shows 1 hour 30 mins  in published dashboard of Java mission control

    Hi,
    We are facing some issue during flight recording using Java Mission Control (version: 5.4.0 (M5.4.0-102, 162463)).We have set flight recording interval for 30 mins in java mission control. But after completion, it showed 1 hour 30 mins in published dashboard. Though the flight recording has been completed within 30 mins. The issue is happened  for 15 mins,20 mins flight recording  also.
    In published dashboard, some extra time has been added before starting of actual test.
    Because of this extra time, we are bemuse to find out the actual result.
    Please help us.
    Thanks
    Debraj

    Hi,
    Sorry for late reply.
    We are doing flight recording for OSB performance testing.
    We have followed below steps during testing
    a. Disabled all the services.
    b. Then we start flight recording.
    c. After 20 seconds gap we are enabling the services to poll data.
    but after completion of flight recording it is showing wrong time interval in dashboard.
    Regards,
    Debraj

  • Blocked thread with no events does not show up in Flight Recording

    When there is no event in a thread and the thread is blocked during the entire duration of a flight recording, the thread does not show up in the flight recording. How to check the state of such a thread from the flight recording?

    Hi,
    I am not sure I understand the question correctly, but events (like Java Blocked) are only saved to file when the thread is not longer blocked. So if you have an event that goes on during the whole recording it won't show up. It's a known limitation of flight recorder.
    If you are really desperate to find out the state of the thread you could look at the Method Profiling events that samples the thread.
    1) In the Event Types remove all the events that are checked.
    2) Check the Method Profiling Sample.
    3) Go to Events-> Threads. Select the thread you are interested in
    4) Right click and select Operative Set -> Set Selection
    5) Go to Events -> Log and check Show only Operative Set
    6) Click on an event in the log and look at Event Attributes below. There is a field called Thread State which will tell you the state thread.
    That's the best that you could do.
    Erik

  • JMC flight recording code analysis

    Hello,
    I am having trouble understanding my flight recording of an ADF application. I have profiled an ADF app built in 11g R2 running on a stand alone server. The JMC recording returns everything it should.
    I need to know how to analyze my ADF methods to address problem areas to increase performance.  The majority of the code being recorded are java methods and not instances of my ADF app. How can I better understand what's going on so I can tweak the code for better performance results?
    Thank you,

    I'm working on trying to understand the mission control output a bit better with OP up there.  We have watched the youtube series from Oracle called Java Mission Control and Flight Recorder Demo Series, among a couple other videos, blog entries, etc.
    We originally tried to use VisualVM but had difficulty getting it running remotely, so we switched to JMC.  When we ran VisualVM locally though, we were able to add filters to the output to get rid of certain classes, allowing us to concentrate on the packages that were directly related to our application's code.  For example we did not profile these packages:
    java.*, javax.*, sun.*, sunw.*, com.sun.*,org.*,groovy.*,groovyjarjarantlr.*,org.*,ice.*, kodo.*,netscape.*,shemacom_bea_xml.*,weblogic.*,commonj.*,oracle.*
    I see that there is a filter field in some areas of mission control, but if we put in our package prefix and a wildcard we only get like 1 result.
    Is there any output that we could provide that would help illuminate this further?  Thanks!

  • Pre Flight Record Check List  Alesis Firewire, Creative Sound Card, Adobe Audition

    I was having many crashes on my computer, Windows Vista, so I made a check list to put a stop to all the crashes. This is what has worked for me I hope it works to you. Just so you all know since the recording I do is for the church radio shows that we produce. We start and end with a prayer. God Bless
    Pre Flight Record Check List: To RECORD
    Disconnect all Periphials
    Reboot: Computer
    Printer: OFF (not connected to recording copmptuer)
    Speakers: All OFF
    Closet Light: OFF
    Cell Phones: OFF
    Lockdown Internet
    Disable Firewall
    Computer Volume Settings: Alesis Microphone
    2 Ch, 16 Bit, 44,100 Hz Cd Quality
    * Do not allow applications to take control
    Level- 100
    Alesis Control Panel
    Sample Rate: 44.1 Khz
    Buffer 256
    Rate: Any
    System Sound: enable
    System Latency: High
    Open Adobe Software: Multitrack View
    Adobe Audio Hardware Setup
    Edit View: Alesis 44,100 Hz, Buffer Size: 256
    Multimix View: Creative
    Surround Encoder: Creative
    Adobe Multi Track:
    Monitoring: External
    Adobe Edit Mode: Record in this mode
    Click New: for Settings
    Sample Rate:44100
    * Stereo
    * 16 Bit
    Alesis Multimix 12
    Main Mix
    x- Pressed
    x-Not Pressed
    Alt 3/4
    x-Pressed
    x-Not Pressed
    x-Not Pressed
    x-Not Pressed
    Sound Check:
    Level
    Pot: 1
    Pot: 3
    Main Mix:
    ALT: 3/4

    Alesis stuff is generally pretty good and the Alesis is correct in that it is generally accepted that the TI chips are better and it is good advice.
    PCI-e firewire800 card at ARC...
    http://www.arc.com.au/?IOFIREPCIE1394B
    I paid a $104 AUS it is now $77.90 (go figure)
    Unfortunately there is no image on the web site. Without pulling my PC out I'm pretty sure it has 2 outputs and 2 inputs but don't quote me on that.
    You should be able to pick something like this up anywhere in the world pretty cheap.
    If it was me I would say that it would be a small investment and worth it to see if you can get the Alesis stuff stabalised.

  • Enable Flight Recorder

    Hello,
    I am searching for the solution of the below warning where it is not clear to me, where exactly the parameter should be stored.
    in Step 6.3.4 "Enable Flight Recorder" I don't know where the lines should be stored in (path/file)
    jstartup/recorder = java -classpath ../j2ee/cluster/bootstrap/launcher.jar
    com.sap.engine.offline.OfflineToolStart com.sap.engine.flightrecorder.core.Collector
    ../j2ee/cluster/bootstrap -node %nodeID% %startTime% -bz $(DIR_GLOBAL) –exitcode
    %exitcode%
    Error description in setup wizard in SMD:
    The profile parameter jstartup/recorder could not be checked in the Java profile of <host>/<SID>/<abap instance number> [CI] (full host name)
    Any hint will be highly appreciated.
    Thank you in advance,
    Best regards,
    Rastislav

    Thank you for answer,
    Just to be correct, does it has to be visible via RZ10 or only on OS level in file for the J2EE Instance profile, because by the setup wizard in SMD it is looking for the instance profile XX and by the name its looking for the ABAP instance profile, where this parameter is already stored (only on OS level, not visible through SAP).
    Thanks,
    Rastislav

  • Activate flight recorder

    Hello,
    I'm configuring solution manager (SOLMAN_SETUP) and in the step activate flight recorder, the customizong documentation says:
    Use
    On the managed system the flight recorder needs to be enabled by adding a parameter to the J2EE instance profile.
    Requirements
    The managed system is a J2EE based system or a dual stack with ABAB and Java. Skip this check in all other cases.
    Default Settings
    Activities
    Set the following profile parameter:
    jstartup/recorder = java -classpath ../j2ee/cluster/bootstrap/launcher.jar com.sap.engine.offline.OfflineToolStart com.sap.engine.flightrecorder.core.Collector ../j2ee/cluster/bootstrap -node %nodeID% %startTime% -bz $(DIR_GLOBAL) u2013exitcode %exitcode%
    On a dual stack system you can use transaction RZ10 to maintain the profile parameter, on a J2EE only system you need to enter the parameter manually to the J2EE instance profile in the file system.
    Attention: As this parameter exceeds one line in transaction RZ10, please ensure the line breaks and that no additional characters (like a space) are added to the parameter when you insert the string.
    The problem is that the system is not a dual stack, it is only ABAP, and I have installed the Diagnostic agent DAA. So, how can I add the profile parameter? How do I add the parameter in the J2EE instance profile if there isn't a Java instance?

    Hi,
    You can get an overview about flight recorder from the below link:
    http://help.sap.com/saphelp_sm32/helpdata/de/56/a945412c98f323e10000000a155106/content.htm
    For more details, you might be intersted  in reading about E2E Exception Analysis documents or SAP Course E2E100.
    Rajeev

  • SolMan Diagnotics - Flight Recorder

    For the setup of the Root Cause Analysis in SolMan Diagnostics, we need to "enable Flight Recorder" by
    adding "jstartup/recorder = ..." to the instance profile of the managed system.
    No issue with doing this BUT does anyone have an insight into what the "Flight Recorder" is?   And where we can see any of its results in the SMD?
    We've searched all over the place and can't find any background info.
    TIA ... Bart

    The Flight Recorder is used in the analysis of system shutdowns.
    It contains all the startup framework log files from the instance's work folder as well as the work folder of the message server and enqueue server. It also collects the default traces from all nodes so can be useful in analysis of issues relating to EP, BI or other J2EE web based apps

  • Has anyone tried sample SDKCommandLineSSO.java in JES2005Q1 and succeed?

    I tried to run the sso sample:
    SDKCommandLineSSO.java
    under JES2005Q1(installed on Solaris 10), but failed, meanwhile another sso sample:
    CommandLineSSO.java
    can run successfully!
    These two samples can be found at the location:
    SUNWam//samples/sso
    I just make them and modifed the run bat file to run SDKCommandLineSSO instead of CommandLineSSO, but it throws an exception as following:
    # pwd
    /export/home/sunone/SUNWam/samples/sso
    # . ./run
    CLASSPATH IS:.:/etc/opt/SUNWam/config:/export/home/sunone/SUNWam/lib/am_logging.jar:/export/home/sunone/SUNWam/lib/sax.jar:/export/home/sunone/SUNWam/lib/jaxp-api.jar:/export/home/sunone/SUNWam/lib/dom.jar:/usr/share/lib/mps/secv1/jss3.jar:/export/home/sunone/SUNWam/lib/servlet.jar:/export/home/sunone/SUNWam/lib/am_services.jar:/export/home/sunone/SUNWam/locale
    Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/identity/authentication/internal/InvalidAuthContextException
    at com.iplanet.sso.providers.dpro.SSOTokenImpl.<init>(SSOTokenImpl.java:86)
    at com.iplanet.sso.providers.dpro.SSOProviderImpl.createSSOToken(SSOProviderImpl.java:140)
    at com.iplanet.sso.SSOTokenManager.createSSOToken(SSOTokenManager.java:284)
    at SDKCommandLineSSO.main(SDKCommandLineSSO.java:58)
    However, I can find com/sun/identity/authentication/internal/InvalidAuthContextException in am_services.jar, which has already been in CLASSPATH. Can anyone help?

    This problem has now been solved by a stackoverflow user. Visit here if you are interested:
    checkbox - JavaFX: compatibility issue between Java 7.4 and Java 8 - Stack Overflow

  • Enable Flight Recorder During Wily Install&Config

    Dear Experts,
    for the installation of the wily e2e tools we follow the "root cause analysis installation and upgrade guide".
    In Step 6.3.4 "Enable Flight Recorder" we don't know where to put these lines in.
    @ "Config Tool -> Instance -> Parameters" doesn't work...
    Its not clear too, if those 4 lines are 1 parameter or not?!
    Unfortunately it's not described very well. Can anyone help us?
    Thx a lot...
    EDIT Was already standing in the instance.properties file...
    Edited by: Timm Funke on Feb 7, 2008 3:19 PM

    I am facing the exact same issue.  Can anyone tell me where i should set up the jstarup/recorder parameter?
    I will appreciate your help.
    Thank you.

  • Diffrence between JRA recording and Flight recording?

    The latest jrockit has two recording options JRA and Flight recording. What is the difference?
    Thanks
    Manoj

    Hi Manoj,
    In the latest version (R28.x) you can only make flight recordings. JRA was the predecessor to Flight Recorder, used by R27.x and earlier releases.
    The main differences are
    * Flight Recorder can always be turned on (and we recommend you have it on) so you can flush the last x minutes of data to disk when you run into problems.
    * Flight Recorder can record information higher up in the stack, e.g database qúeries, EJB calls, webservices etc
    * Flight Recorder has more information about the JVM, e.g exception profiling and more detailed GC-data.
    * Flight Recorder has less overhead (<1% with the default settings) and there are more ways to configure it so you only record what you need.
    * Flight Recorder has a better GUI for viewing the recorded data, a GUI that is continously improved upon.
    Best regards
    Erik

  • Ask for helps and comments for a practicing ADF sample: Entering bank transaction records

    Dear experts:
    I'm redeveloping a practicing ADF sample application based on an exist application system of  my company.
    Here is the goal for this redeveloping:
    What degree of productivity can adf achieve compare to eclipse?
    And hereby is a small example I began from last Monday. some progress has been achieved, but pretty lot of difficulties remained,
    so I post all neccessary informations to this forum, and ask for your kind helps and comments.
    Thank you all in advance!
    Introduction                                                      
    The X company has some bank accounts in different banks, also it’s customers may have more than one bank account in different banks. Transactions between the X company’s bank accounts and it’s new or regular customers’ bank accounts happened heavily in daily. Bank transfer records in paper form will be collected and need to be entered into an in-house Financial System(NX1)  of the X company every day.
    This module will implement the function of Entering Bank transactions records for NX1.
    In future, this Data Entering work for NX1 will be handled by some data exchange interface automatically.
    And the following implementation will be based on ORACLE XE 11g,  Jdev/ADF 12c.
    This link can download  the document for the example, I will upload Database scripts and JDEV application files tonight.
    http://223.4.132.24:8180/BlobUtilServlet?tableName=FILE_TABLE&columnName=BODY&stuffID=020010110000001481&strNO=1&type=downfile&fileName=NXDemo1.doc&directOpen=true
    (The above link is a website of our own. if you meet any difficulty when access it, please let me know: [email protected]).

    Hi, Timo and Frank,
    Thank you all for your kind replies and sound suggestions!
    Now let me talk freely on this thread-and I will limit my topic scope within this Jdev/ADF Space’s theme but maybe in a more broad perspectives. And I will separate topics into different posts to avoid over length of each post. Hope you will have enough patience to read through this some long story!
    Notice: Links in this article will refer to somewhere of OTN itself or a website of our own. There is no security concern on the server. For example:
    http://223.4.132.24:8180/webfavorite.do?method=index&topTag=shou_A&txtTitle=ADF
    (This link is collection of internet links and some abstract for each article on ADF. Not much contents on ADF in Chinese can be found.)
    What you are up to?
    First of all, I need to make some introduction of myself to answer “what you are up to”.
    I come from China, living and working at Shenzhen city which is close to Hong Kong. And now I am running a small software company with 20 employees, our main business is to develop database centered applications which include in-house workflow/information management systems and websites/portals for organizations.
    I have a pretty strong conviction that software technology should emancipate people from routine trivial mental works, just like engines in the industry revolution free people from heavily physical works. So I have a strong inclination for everything to be “automated”.
    For running a company, this “automation” will not only bring the “aesthetics of everything running by itself”, but also will mean more productivity, quality and profits.—After all, no-living stuff is always cheaper than living creatures, let alone to say human beings.
    However, when we software industry tried to automate business fields for our clients, the process of making software itself was still a manpower intensive, less-automation business. and this result a expensive products.
    More than 15 years ago, when I began to work in an IT department of a big organization, I got to know the Oracle Designer/Developer 2000, and have being a diligent FORM/REPORT programmer for more than 4 years. I like the concept and practice of declarative design and automated generation.
    And then more years past, and I left that organization and began to run a software company myself. And during these days, the mainstream technology of software development had been web oriented, Java/J2EE which I had no idea totally. But we have other guys who had expertise on it. So I just leave these works and decisions to them. And it seemed works at the beginning.
    But after several years of business operation of application development for clients, I found this was a difficult-money-earn business. Even if our guys had worked hard, project schedules’ delay, over budget, clients’ complain was easily happened. Sometime we had more projects/contracts than what we can undertake, but we dare not to hire more people. I was confused:
    -Was it a common situation in this field all over the world?
    -What’s the key factor should responsible for?
    -Where to start to improve the situation?
    I know there are many factors should responsible, it’s a complex situation. Find more talented people and give better incentives for them to work hard is one choice—but it’s also a difficult task especially for a small company like ours. So to start from easy and confine solution’s scope is:
    -We have these guys now, what we can do best?
    (To be continued)

  • A sample code to check records of a system table?

    hi ABAP4 experts,
    We are pretty new at ABAP4.  We would be appreciated if you can provide a sample code to check how many records and calculate a total amount for a specific field, e.g., DMBTR in a system table, e.g., BSEG.  Note: there is no any selection for this table BSEG, we just want to get the total record count in this table and also the total amount for a specific field e.g. DMBTR in this table.
    Do we have to use an internal table to transfer all the records of BSEG into the internal table to get the result?
    We will give you reward points!

    Hi Kevin,
    Using SUM directly in SQL will NOT work for table BSEG because BSEG is pool table. You will get an ABAP error.
    "Aggregate functions and the addition DISTINCT are not supported in field lists for pooled and cluster tables".
    You need an internal table to transfer all data from BSEG and perform calculation for count and sum.
    Concerning about performance running perhaps you can code something like this.
    REPORT ZZFLTEST NO STANDARD PAGE HEADING.
    TABLES: BSEG.
    DATA: CURS          TYPE CURSOR,
          PACKAGE_SIZE  LIKE RMCS4-MC_CM_PSIZE VALUE '10000'.                                                                               
    DATA: BEGIN OF I_BSEG OCCURS 0,
            BELNR TYPE BSEG-BELNR,
            BURKS TYPE BSEG-BURKS,
            GJAHR TYPE BSEG-GJAHR,       
            BUZEI TYPE BSEG-BUZEI,       
            DMBTR TYPE BSEG-DMBTR,
            SHKZG TYPE BSEG-SHKZG.
    DATA: END OF I_BSEG.
    DATA: TOT_DMBTR TYPE BSEG-DMBTR,
          TOT_REC   TYPE I.
    SELECTION-SCREEN BEGIN OF BLOCK B01 WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN SKIP.
    PARAMETERS: P_SIZE LIKE RMCS4-MC_CM_PSIZE DEFAULT '10000'.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN END OF BLOCK B01.
    START-OF-SELECTION.
      PACKAGE_SIZE = P_SIZE.
      OPEN CURSOR WITH HOLD CURS FOR
      SELECT BELNR BURKS GJAHR BUZEI DMBTR SHKZG
      FROM BSEG
      WHERE BELNR <> SPACE
        AND BURKS <> SPACE
        AND GJAHR <> SPACE
        AND BUZEI <> SPACE.
    *Fetch internal table I_BSEG for every 10000 records.
      DO.
        FETCH NEXT CURSOR CURS
        INTO TABLE I_BSEG PACKAGE SIZE PACKAGE_SIZE.
        IF SY-SUBRC <> 0.
          EXIT.
        ENDIF.
      ENDDO.
      CLOSE CURSOR CURS.
      LOOP AT I_BSEG.
        TOT_REC = TOT_REC + 1.
        IF I_BSEG-SHKZG = 'S'.
          TOT_DMBTR = TOT_DMBRT + I_BSEG-DMBTR * -1.
        ELSE.
          TOT_DMBTR = TOT_DMBTR + I_BSEG-DMBTR.
        ENDIF.
      ENDLOOP.
      WRITE: / 'TOTAL BSEG-DMBTR:', TOT_DMBTR,
             / 'TOTAL RECORD:    ', TOT_REC.
    END-OF-SELECTION.
    Hope this will help.
    Regards,
    Ferry Lianto

Maybe you are looking for