other register

Tuesday, April 30, 2013

Tuning Play Framework Application with JVM settings.

-Xms Sets the initial heap memory size for the JVM
-Xmx Sets the maximum heap memory the JVM allows grow up to.
-XX:+UserParalleGC This instructs the JVM to make better user of multiple processors or cores

For a Play Framework application. Edit the .bash_profile 

export _JAVA_OPTIONS="-Xms768m -Xmx1024m -XX:+UseParallelGC"

Then do: . ~/.bash_profile

When running the application by: play run

You will notice from the console that:

Picked up _JAVA_OPTIONS: -Xms768m -Xmx1024m -XX:+UseParallelGC

No comments: