Powered By Blogger

Dec 4, 2016


How to use JAVA Flight Recorder (JFR) with WSO2 Products

This blog post is about using JFR with WSO2 Products.  JFR collects events from a Java application from the OS layer, the JVM, and all the way up to the Java application. The collected events include thread latency events such as sleep, wait, lock contention, I/O, GC, and method profiling. We can use this JFR to do long run testing in effective way.

  • Enable JFR by adding below parameters in the wso2server.sh file  ( under $JAVACMD) located at <PRODUCT_HOME>/bin
          -XX:+UnlockCommercialFeatures \
          -XX:+FlightRecorder \
  • Then start the server
  • Then start JMC (Java mission control)  by executing the executable file located at JAVA_HOME/bin/jmc
  • Then you can see  org.wso2.carbon.bootstrap.Bootstrapin the UI, right click on that and click on start Flight Recording. Do relevant changes and click on finish.
  • Then run the load test
  • After the specified time you will get a .jfr file and you can see the memory growth, cpu usage, etc


No comments:

Post a Comment