How To Tune JVM Parameters

Goal

It may be necessary to tune Java Virtual Machine parameters to address specific java errors or to improve performance. Where can these parameters be applied?

Learn

Locate a file named das-env.sh under the <Datameer_Home>/etc directory. Within the file you will see a section similar to below:

export JAVA_OPTIONS="-Xmx2048m -XX:MaxPermSize=384m -Xms256m -XX:MaxNewSize=448m -XX:SurvivorRatio=6 -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=80 -XX:+HeapDumpOnOutOfMemoryError -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled"

Oracle's Java Performance Tuning Guide has explanations for the various parameters. Change them to suit your environment. If you end up changing a parameter such as Xmx (Max Heap), adjust other related parameters (such as MaxNewSize) as well proportionally.