Skip to content

Instantly share code, notes, and snippets.

@headius
Created September 20, 2012 21:02
Show Gist options
  • Save headius/3758342 to your computer and use it in GitHub Desktop.
Save headius/3758342 to your computer and use it in GitHub Desktop.
Startup times for base and loading ActiveRecord on JDK7 an JDK8 with various flags
Java 7 does not currently have tiered compilation on by default, and we do not enable invokedynamic.
Default settings (no indy, no tiered)
system ~/projects/jruby $ (pickjdk 4 ; time jruby -e 1)
New JDK: jdk1.7.0_07.jdk
real 0m1.255s
user 0m1.953s
sys 0m0.084s
No indy, tiered
system ~/projects/jruby $ (pickjdk 4 ; time jruby -J-XX:+TieredCompilation -e 1)
New JDK: jdk1.7.0_07.jdk
real 0m1.047s
user 0m2.315s
sys 0m0.137s
No indy, stop at tier 1 (-client, basically)
system ~/projects/jruby $ (pickjdk 4 ; time jruby -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -e 1)
New JDK: jdk1.7.0_07.jdk
real 0m0.891s
user 0m1.122s
sys 0m0.097s
With indy, no tiered
system ~/projects/jruby $ (pickjdk 4 ; time jruby -Xcompile.invokedynamic=true -e 1)
New JDK: jdk1.7.0_07.jdk
real 0m1.286s
user 0m2.044s
sys 0m0.090s
With indy, tiered
system ~/projects/jruby $ (pickjdk 4 ; time jruby -Xcompile.invokedynamic=true -J-XX:+TieredCompilation -e 1)
New JDK: jdk1.7.0_07.jdk
real 0m1.113s
user 0m2.508s
sys 0m0.139s
With indy, tiered stop at level 1
system ~/projects/jruby $ (pickjdk 4 ; time jruby -Xcompile.invokedynamic=true -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -e 1)
New JDK: jdk1.7.0_07.jdk
real 0m0.938s
user 0m1.252s
sys 0m0.105s
Loading active_record with default config
system ~/projects/jruby $ (pickjdk 4 ; time jruby -e "require 'active_record'")
New JDK: jdk1.7.0_07.jdk
real 0m2.701s
user 0m5.844s
sys 0m0.173s
Loading active_record with tiered
system ~/projects/jruby $ (pickjdk 4 ; time jruby -J-XX:+TieredCompilation -e "require 'active_record'")
New JDK: jdk1.7.0_07.jdk
real 0m2.173s
user 0m7.289s
sys 0m0.298s
Loading active_record with tiered stop at level 1
system ~/projects/jruby $ (pickjdk 4 ; time jruby -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -e "require 'active_record'")
New JDK: jdk1.7.0_07.jdk
real 0m1.524s
user 0m2.301s
sys 0m0.168s
Java 8 has tiered compilation on by default and we enable invokedynamic
Default (with indy, with tiered)
system ~/projects/jruby $ (pickjdk 5 ; time jruby -e 1)
New JDK: jdk1.8.0.jdk
real 0m0.924s
user 0m2.002s
sys 0m0.110s
Tiered stop at level 1
system ~/projects/jruby $ (pickjdk 5 ; time jruby -J-XX:TieredStopAtLevel=1 -e 1)
New JDK: jdk1.8.0.jdk
real 0m0.832s
user 0m1.047s
sys 0m0.088s
Loading active_record with tiered
system ~/projects/jruby $ (pickjdk 5 ; time jruby -e "require 'active_record'")
New JDK: jdk1.8.0.jdk
real 0m2.816s
user 0m9.832s
sys 0m0.343s
Loading active_record with tiered stop at 1
system ~/projects/jruby $ (pickjdk 5 ; time jruby -J-XX:TieredStopAtLevel=1 -e "require 'active_record'")
New JDK: jdk1.8.0.jdk
real 0m1.895s
user 0m2.960s
sys 0m0.203s
Loading active_record with indy disabled
system ~/projects/jruby $ (pickjdk 5 ; time jruby -Xcompile.invokedynamic=false -e "require 'active_record'")
New JDK: jdk1.8.0.jdk
real 0m2.212s
user 0m7.687s
sys 0m0.298s
Loading active_record with indy disabled and tiered stop at level 1
system ~/projects/jruby $ (pickjdk 5 ; time jruby -Xcompile.invokedynamic=false -J-XX:TieredStopAtLevel=1 -e "require 'active_record'")
New JDK: jdk1.8.0.jdk
real 0m1.526s
user 0m2.344s
sys 0m0.167s
Loading base with indy disabled, tiered
system ~/projects/jruby $ (pickjdk 5 ; time jruby -Xcompile.invokedynamic=false -e 1)
New JDK: jdk1.8.0.jdk
real 0m0.850s
user 0m1.753s
sys 0m0.109s
Loading base with indy disabled, tiered stop at level 1
system ~/projects/jruby $ (pickjdk 5 ; time jruby -Xcompile.invokedynamic=false -J-XX:TieredStopAtLevel=1 -e 1)
New JDK: jdk1.8.0.jdk
real 0m0.747s
user 0m0.914s
sys 0m0.082s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment