Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Twitter's JVM startup template
# Courtesy @marius, April 2012
#
# "Our most common type of system are mostly stateless, high volume,
# low latency RPC systems. For these, we generally use this template:"
HEAP_OPTS="-Xmx17G -Xms17G -XX:NewSize=15G -XX:+UseNUMA"
GC_OPTS="-XX:+UseConcMarkSweepGC -XX:SurvivorRatio=40 -XX:+CMSScavengeBeforeRemark"
GC_LOG_OPTS="-verbosegc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:+PrintTenuringDistribution -XX:+PrintHeapAtGC"
GC_LOG="-Xloggc:/var/log/$APP_NAME/gc.log"
DEBUG_OPTS="-XX:ErrorFile=/var/log/$APP_NAME/java_error%p.log"
JAVA_OPTS="-server -Djava.net.preferIPv4Stack=true -Dstage=$STAGE $GC_OPTS $GC_LOG_OPTS $GC_LOG $HEAP_OPTS $DEBUG_OPTS"
APP_OPTS="-f /usr/local/macaw/current/config/config.scala"
ROTATE_GC_CONF="${APP_HOME}/config/rotate-gc.conf"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.