Skip to content

Instantly share code, notes, and snippets.

@thoughtchad
Last active August 29, 2015 13:57
Show Gist options
  • Save thoughtchad/9650542 to your computer and use it in GitHub Desktop.
Save thoughtchad/9650542 to your computer and use it in GitHub Desktop.
java 8, jruby 1.7.11, rails 4, startup times, jvm options
JAVA 8
export JRUBY_OPTS=--2.0
export JAVA_OPTS=
time bundle exec rake environment
157.76s user 13.05s system 270% cpu 1:03.15 total
export JRUBY_OPTS=--2.0
export JAVA_OPTS="-XX:TieredStopAtLevel=1 -XX:CICompilerCount=3 -Djruby.jit.threshold=500 -XX:+TieredCompilation -noverify -XX:+UseG1GC -XX:ReservedCodeCacheSize=256m -Xss2048k -Xms2048m -Xmx2048m"
time bundle exec rake environment
43.18s user 8.15s system 132% cpu 38.839 total
export JRUBY_OPTS=--2.0 -Xcompile.invokedynamic=true
export JAVA_OPTS="-XX:TieredStopAtLevel=1 -XX:CICompilerCount=3 -Djruby.jit.threshold=500 -XX:+TieredCompilation -noverify -XX:+UseG1GC -XX:ReservedCodeCacheSize=256m -Xss2048k -Xms2048m -Xmx2048m"
time bundle exec rake environment
42.82s user 8.12s system 133% cpu 38.249 total
export JRUBY_OPTS=--2.0
export JAVA_OPTS="-Djruby.compile.invokedynamic=true -XX:TieredStopAtLevel=1 -XX:CICompilerCount=3 -Djruby.jit.threshold=500 -XX:+TieredCompilation -noverify -XX:+UseG1GC -XX:ReservedCodeCacheSize=256m -Xss2048k -Xms2048m -Xmx2048m"
time bundle exec rake environment
42.76s user 8.22s system 132% cpu 38.573 total
export JRUBY_OPTS=--2.0
export JAVA_OPTS="-Djruby.compile.invokedynamic=false -XX:TieredStopAtLevel=1 -XX:CICompilerCount=3 -Djruby.jit.threshold=500 -XX:+TieredCompilation -noverify -XX:+UseG1GC -XX:ReservedCodeCacheSize=256m -Xss2048k -Xms2048m -Xmx2048m"
time bundle exec rake environment
29.77s user 7.58s system 127% cpu 29.198 total
29.47s user 7.43s system 128% cpu 28.804 total
export JRUBY_OPTS=--2.0
export JAVA_OPTS="-Djruby.compile.invokedynamic=false -XX:TieredStopAtLevel=1 -XX:+CICompilerCountPerCPU -XX:CICompilerCount=4 -Djruby.jit.threshold=500 -XX:+TieredCompilation -noverify -XX:+UseG1GC -XX:ReservedCodeCacheSize=256m -Xss2048k -Xms2048m -Xmx2048m"
time bundle exec rake environment
29.57s user 7.34s system 129% cpu 28.540 total
export JRUBY_OPTS=--2.0
export JAVA_OPTS="-Djruby.compile.invokedynamic=false -XX:TieredStopAtLevel=1 -Djruby.jit.threshold=500 -XX:+TieredCompilation -noverify -XX:+UseG1GC -XX:ReservedCodeCacheSize=256m -Xss2048k -Xms2048m -Xmx2048m"
time bundle exec rake environment
29.70s user 7.38s system 128% cpu 28.961 total
export JRUBY_OPTS=--2.0
export JAVA_OPTS="-Djruby.compile.invokedynamic=false -XX:TieredStopAtLevel=1 -XX:+TieredCompilation -noverify -XX:+UseG1GC -XX:ReservedCodeCacheSize=256m -Xss2048k -Xms2048m -Xmx2048m"
time bundle exec rake environment
31.10s user 7.97s system 132% cpu 29.429 total
export JRUBY_OPTS=--2.0
export JAVA_OPTS="-Djruby.compile.invokedynamic=false -noverify -XX:+UseG1GC -XX:ReservedCodeCacheSize=256m -Xss2048k -Xms2048m -Xmx2048m"
time bundle exec rake environment
74.08s user 8.65s system 271% cpu 30.436 total
export JRUBY_OPTS=--2.0
export JAVA_OPTS="-Djruby.compile.invokedynamic=false -XX:TieredStopAtLevel=1 -XX:+TieredCompilation -XX:ReservedCodeCacheSize=256m -Xss2048k -Xms2048m -Xmx2048m"
time bundle exec rake environment
29.49s user 8.15s system 133% cpu 28.225 total
export JRUBY_OPTS=--2.0
export JAVA_OPTS="-Djruby.compile.invokedynamic=true -XX:TieredStopAtLevel=1 -XX:+TieredCompilation -XX:ReservedCodeCacheSize=256m -Xss2048k -Xms2048m -Xmx2048m"
time bundle exec rake environment
53.93s user 10.26s system 133% cpu 48.015 total
JAVA 7
export JRUBY_OPTS=--2.0
export JAVA_OPTS=
time bundle exec rake environment
28.11s user 7.34s system 86% cpu 40.788 total
export JRUBY_OPTS=--2.0
export JAVA_OPTS="-Djruby.compile.invokedynamic=false -XX:TieredStopAtLevel=1 -XX:+TieredCompilation -XX:ReservedCodeCacheSize=256m -Xss2048k -Xms2048m -Xmx2048m"
time bundle exec rake environment
26.80s user 7.42s system 131% cpu 26.115 total
export JRUBY_OPTS=--2.0
export JAVA_OPTS="-Djruby.compile.invokedynamic=true -XX:TieredStopAtLevel=1 -XX:+TieredCompilation -XX:ReservedCodeCacheSize=256m -Xss2048k -Xms2048m -Xmx2048m"
time bundle exec rake environment
42.76s user 7.87s system 133% cpu 38.046 total
@thoughtchad
Copy link
Author

It appears that java 8 has much more aggressive defaults in regards to warming up.
Overall J8 is a bit slower, and invokeDynamic is still much slower.
??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment