Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt

Profiling Procedure

  • YourKit 12 (committers are eligible for a free Open Source license)

Tomcat

Local

  • Download YourKit bundle
  • Install YourKit, in this example, at: /opt/yourkit
  • Update JAVA_OPTS (/etc/default/tomcat7)

    Code Block
    JAVA_OPTS="${JAVA_OPTS} -agentpath:/opt/yourkit/yjp-2016.02/bin/linux-x86-64/libyjpagent.so=delay=10000"
  • If error in catalina.out such as: "Cannot create log file: /usr/share/tomcat7/.yjp/log/Tomcat-24495.log", then create the appropriate .yjp directory with owner of the Tomcat7 user

Remote

Running Profile

  • With either the local or remote server, then run in the directory where you installed the YourKit bundle locally

    Code Block
    ./bin/yjp-12.0.5/bin/yjp.sh

Jetty

  • To profile fcrepo4 with mvn jetty:run (as opposed to profiling a deployment of the webapp in another container)
    • Determine the path to your profiler agent library (platform dependent), see: http://www.yourkit.com/docs/12/help/agent.jsp
    • include -agentpath in your MAVEN_OPTS, for example, on OS X:
      • export MAVEN_OPTS="-Xmx512m Xmx1024m -XX:MaxPermSizeMetaspaceSize=128m 256m -agentpath:/Applications/YourKit_Java_Profiler_12.0.5.app/bin/mac/libyjpagent.jnilib=delay=10000"
    • cd fcrepo4/fcrepo-webapp
    • mvn jetty:run
    • YourKit should now display "Launcher" application as "Ready for profiling".

JMX Reporting

To enable Metrics reporting to JMX with mvn jetty:run

  • Add "-Dcom.sun.management.jmxremote" to MAVEN_OPTS, e.g.:
    export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=256m -Dcom.sun.management.jmxremote"
  • Set the System Property "fcrepo.metrics.jmx" to "true", e.g.:
    mvn jetty:run-war -Dfcrepo.metrics.jmx=true
  • Invoke jconsole, select the Local Process
    • "
    org
    • .
    codehaus.plexus.classworlds.launcher.Launcher", and connect
    • Select the MBeans tab and navigate to "org.fcrepo"
Image Removed