Profiling an application for the Play platform (2.0.2) through VisualVM

I am having serious problems with my game! Application performance. I already tried to change the server and database, but the slowness persists.

Using Firebug to measure my HTTP requests, I found out that it takes about 20 seconds to start responding.

So, my last hope is to use VisualVM to profile my application and find its bottle neck. But I do not know the correct way to pass some arguments, such as "-Dcom.sun.management.jmxremote", without messing up the global variable JAVA_OPTS.

Thanks again!

+5
source share
2 answers

, Metrics .

Build.scala :

"com.yammer.metrics" % "metrics-core" % "2.1.2"

. "play run" - VisualVM JVM-, ( , VisualVM-MBeans). , 1.3.4. , :

Visualvm

xsbt.boot.Boot - .

, Akka , Play.

+5

- Play 2.3.x:

  • JAVA_OPTS ~/.activator/activatorconfig.txt(c.f. https://typesafe.com/activator/docs):

    -Dcom.sun.management.jmxremote.port=1234 
    -Dcom.sun.management.jmxremote.rmi.port=1234 
    -Dcom.sun.management.jmxremote.authenticate=false 
    -Dcom.sun.management.jmxremote.ssl=false 
    -Djava.rmi.server.hostname=127.0.0.1
    
  • VisualVM JMX localhost: 1234

+4

All Articles