Skip to content

Instantly share code, notes, and snippets.

@arielvalentin
Last active December 9, 2015 23:18
Show Gist options
  • Save arielvalentin/4343178 to your computer and use it in GitHub Desktop.
Save arielvalentin/4343178 to your computer and use it in GitHub Desktop.
JRuby 1.7 startup with JDK 7
[torquebox@n3 myapp]$ uname -a
Linux n3 2.6.32-279.14.1.el6.x86_64 #1 SMP Mon Oct 15 13:44:51 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
[torquebox@n3 myapp]$ java -version
java version "1.7.0_09"
Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode)
[torquebox@n3 myapp]$ file `which /etc/alternatives/java`
/etc/alternatives/java: symbolic link to `/usr/lib/jvm/jre-1.7.0-oracle.x86_64/bin/java'
[torquebox@n3 myapp]$ jruby -v
jruby 1.7.1 (1.9.3p327) 2012-12-03 30a153b on Java HotSpot(TM) 64-Bit Server VM 1.7.0_09-b05 [linux-amd64]
[torquebox@n3 myapp]$ time jruby -e 'puts "Hello"'
Hello
real 0m4.534s
user 0m5.985s
sys 0m0.201s
[torquebox@n3 myapp]$ time jruby -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -e 'puts "Hello"'
Hello
real 0m2.373s
user 0m2.983s
sys 0m0.185s
[torquebox@n3 myapp]$ time jruby -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 bin/rails runner 'puts "Hello"'
Hello
real 0m30.242s
user 0m44.707s
sys 0m2.525s
[torquebox@n3 myapp]$ time jruby bin/rails runner 'puts "Hello"'
Hello
real 0m31.621s
user 0m49.211s
sys 0m2.260s
[torquebox@n3 myapp]$ time jruby -X-C -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -e 'puts "Hello"'
Hello
real 0m2.546s
user 0m3.161s
sys 0m0.199s
[torquebox@n3 myapp]$ time jruby -X-C -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 bin/rails runner 'puts "Hello"'
Hello
real 0m29.616s
user 0m44.994s
sys 0m2.321s
[torquebox@n3 myapp]$ bundle exec gem list
actionmailer (3.2.9)
actionpack (3.2.9)
activemodel (3.2.9)
activerecord (3.2.9)
activeresource (3.2.9)
activesupport (3.2.9)
akami (1.2.0)
ansi (1.4.3)
arel (3.0.2)
beefcake (0.3.7)
bouncy-castle-java (1.5.0146.1)
builder (3.0.4)
bundler (1.2.3)
distinguished_name (0.1.1)
erubis (2.7.0)
gyoku (0.4.6)
hashie (1.2.0)
hike (1.2.1)
httpi (1.1.1)
i18n (0.6.1)
innertube (1.0.2)
journey (1.0.4)
jruby-openssl (0.7.7)
json (1.7.5 java)
mail (2.4.4)
metaclass (0.0.1)
mime-types (1.19)
minitest (4.3.3)
minitest-reporters (0.13.1)
mocha (0.13.1)
multi_json (1.5.0)
nokogiri (1.5.5 java)
nori (1.1.3)
polyglot (0.3.3)
powerbar (1.0.11)
rack (1.4.1)
rack-cache (1.2)
rack-ssl (1.3.2)
rack-test (0.6.2)
rails (3.2.9)
railties (3.2.9)
rake (10.0.2)
rdoc (3.12)
riak-client (1.1.0)
ripple (1.0.0.beta2)
savon (1.2.0)
sprockets (2.2.2)
thor (0.16.0)
tilt (1.3.3)
treetop (1.4.12)
tzinfo (0.3.35)
wasabi (2.5.1)
[torquebox@n3 myapp]$ cat Gemfile
source 'http://rubygems.org'
gem 'rails', '3.2.9'
gem 'jruby-openssl', '0.7.7'
gem 'savon', '1.2.0'
gem 'ripple', :git => 'http://github.com/basho/ripple.git', :ref => '676cf259590ad000511202a7fa95cd0327ac8d9d'
gem 'distinguished_name'
group :test do
gem 'mocha', :require => false
gem 'minitest'
gem 'minitest-reporters', '>= 0.5.0'
end
[torquebox@n3 myapp]$ time jruby -X-C -J-noverify -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 bin/rails runner 'puts "Hello"'
Hello
real 0m30.679s
user 0m45.792s
sys 0m2.364s
[torquebox@n3 myapp]$ time jruby -X-C -J-noverify bin/rails runner 'puts "Hello"'
Hello
real 0m31.865s
user 0m49.450s
sys 0m2.291s
[torquebox@n3 myapp]$ time jruby -J-Djruby.debug.loadService.timing=true bin/rails runner 'puts "Hello"'
2012-12-21T03:23:39.065Z: LoadService: -> jruby
2012-12-21T03:23:39.175Z: LoadService: -> java
2012-12-21T03:23:39.305Z: LoadService: -> jruby/java
2012-12-21T03:23:39.487Z: LoadService: -> jruby/java/java_module
2012-12-21T03:23:39.527Z: LoadService: <- jruby/java/java_module - 40ms
2012-12-21T03:23:39.528Z: LoadService: -> jruby/java/java_package_module_template
2012-12-21T03:23:39.559Z: LoadService: <- jruby/java/java_package_module_template - 31ms
2012-12-21T03:23:39.560Z: LoadService: -> jruby/java/java_utilities
2012-12-21T03:23:39.595Z: LoadService: <- jruby/java/java_utilities - 34ms
2012-12-21T03:23:39.595Z: LoadService: -> jruby/java/core_ext
2012-12-21T03:23:39.605Z: LoadService: -> jruby/java/core_ext/module
2012-12-21T03:23:39.676Z: LoadService: <- jruby/java/core_ext/module - 70ms
2012-12-21T03:23:39.677Z: LoadService: -> jruby/java/core_ext/object
2012-12-21T03:23:39.832Z: LoadService: <- jruby/java/core_ext/object - 155ms
2012-12-21T03:23:39.833Z: LoadService: -> jruby/java/core_ext/kernel
2012-12-21T03:23:39.896Z: LoadService: <- jruby/java/core_ext/kernel - 63ms
2012-12-21T03:23:39.897Z: LoadService: <- jruby/java/core_ext - 301ms
2012-12-21T03:23:39.898Z: LoadService: -> jruby/java/java_ext
2012-12-21T03:23:39.909Z: LoadService: -> jruby/java/java_ext/java.lang
2012-12-21T03:23:40.044Z: LoadService: <- jruby/java/java_ext/java.lang - 134ms
2012-12-21T03:23:40.045Z: LoadService: -> jruby/java/java_ext/java.util
2012-12-21T03:23:40.129Z: LoadService: <- jruby/java/java_ext/java.util - 83ms
2012-12-21T03:23:40.130Z: LoadService: -> jruby/java/java_ext/java.util.regex
2012-12-21T03:23:40.225Z: LoadService: <- jruby/java/java_ext/java.util.regex - 95ms
2012-12-21T03:23:40.226Z: LoadService: -> jruby/java/java_ext/java.io
2012-12-21T03:23:40.287Z: LoadService: <- jruby/java/java_ext/java.io - 61ms
2012-12-21T03:23:40.288Z: LoadService: -> jruby/java/java_ext/java.net
2012-12-21T03:23:40.325Z: LoadService: <- jruby/java/java_ext/java.net - 37ms
2012-12-21T03:23:40.326Z: LoadService: -> jruby/java/java_ext/org.jruby.ast
2012-12-21T03:23:40.439Z: LoadService: <- jruby/java/java_ext/org.jruby.ast - 112ms
2012-12-21T03:23:40.439Z: LoadService: <- jruby/java/java_ext - 541ms
2012-12-21T03:23:40.440Z: LoadService: <- jruby/java - 1134ms
2012-12-21T03:23:40.462Z: LoadService: <- java - 1286ms
2012-12-21T03:23:40.812Z: LoadService: <- jruby - 1639ms
2012-12-21T03:23:40.858Z: LoadService: -> thread
2012-12-21T03:23:40.879Z: LoadService: <- thread - 21ms
2012-12-21T03:23:41.046Z: LoadService: -> jruby
2012-12-21T03:23:41.046Z: LoadService: <- jruby - 0ms
2012-12-21T03:23:41.291Z: LoadService: -> thread.jar
2012-12-21T03:23:41.292Z: LoadService: <- thread.jar - 1ms
2012-12-21T03:23:41.466Z: LoadService: -> java
2012-12-21T03:23:41.466Z: LoadService: <- java - 0ms
2012-12-21T03:23:41.532Z: LoadService: -> rubygems
2012-12-21T03:23:41.765Z: LoadService: -> rubygems/defaults
2012-12-21T03:23:41.781Z: LoadService: <- rubygems/defaults - 15ms
2012-12-21T03:23:41.782Z: LoadService: -> rbconfig
2012-12-21T03:23:41.827Z: LoadService: <- rbconfig - 45ms
2012-12-21T03:23:41.828Z: LoadService: -> rubygems/deprecate
2012-12-21T03:23:41.840Z: LoadService: <- rubygems/deprecate - 12ms
2012-12-21T03:23:41.898Z: LoadService: -> rubygems/exceptions
2012-12-21T03:23:41.914Z: LoadService: <- rubygems/exceptions - 15ms
2012-12-21T03:23:41.915Z: LoadService: -> rubygems/defaults/operating_system
2012-12-21T03:23:41.925Z: LoadService: <- rubygems/defaults/operating_system - 10ms
2012-12-21T03:23:41.926Z: LoadService: -> rubygems/defaults/jruby
2012-12-21T03:23:41.944Z: LoadService: -> rubygems/config_file
2012-12-21T03:23:41.982Z: LoadService: -> rbconfig
2012-12-21T03:23:41.983Z: LoadService: <- rbconfig - 1ms
2012-12-21T03:23:41.984Z: LoadService: -> etc
2012-12-21T03:23:41.995Z: LoadService: <- etc - 11ms
2012-12-21T03:23:42.005Z: LoadService: <- rubygems/config_file - 61ms
2012-12-21T03:23:42.006Z: LoadService: -> rbconfig
2012-12-21T03:23:42.006Z: LoadService: <- rbconfig - 0ms
2012-12-21T03:23:42.007Z: LoadService: -> jruby/util
2012-12-21T03:23:42.009Z: LoadService: <- jruby/util - 2ms
2012-12-21T03:23:42.012Z: LoadService: -> rubygems/specification
2012-12-21T03:23:42.203Z: LoadService: -> rubygems/version
2012-12-21T03:23:42.221Z: LoadService: <- rubygems/version - 18ms
2012-12-21T03:23:42.222Z: LoadService: -> rubygems/requirement
2012-12-21T03:23:42.236Z: LoadService: -> rubygems/version
2012-12-21T03:23:42.237Z: LoadService: <- rubygems/version - 1ms
2012-12-21T03:23:42.237Z: LoadService: -> rubygems/version
2012-12-21T03:23:42.238Z: LoadService: <- rubygems/version - 1ms
2012-12-21T03:23:42.239Z: LoadService: -> rubygems/deprecate
2012-12-21T03:23:42.240Z: LoadService: <- rubygems/deprecate - 1ms
2012-12-21T03:23:42.249Z: LoadService: <- rubygems/requirement - 27ms
2012-12-21T03:23:42.250Z: LoadService: -> rubygems/platform
2012-12-21T03:23:42.282Z: LoadService: -> rubygems/deprecate
2012-12-21T03:23:42.289Z: LoadService: <- rubygems/deprecate - 7ms
2012-12-21T03:23:42.302Z: LoadService: <- rubygems/platform - 52ms
2012-12-21T03:23:42.303Z: LoadService: -> rubygems/deprecate
2012-12-21T03:23:42.304Z: LoadService: <- rubygems/deprecate - 1ms
2012-12-21T03:23:42.361Z: LoadService: <- rubygems/specification - 349ms
2012-12-21T03:23:42.369Z: LoadService: -> rubygems/defaults/jruby_native
2012-12-21T03:23:42.374Z: LoadService: <- rubygems/defaults/jruby_native - 5ms
2012-12-21T03:23:42.375Z: LoadService: <- rubygems/defaults/jruby - 449ms
2012-12-21T03:23:42.375Z: LoadService: -> rubygems/custom_require
2012-12-21T03:23:42.387Z: LoadService: <- rubygems/custom_require - 12ms
2012-12-21T03:23:42.396Z: LoadService: <- rubygems - 863ms
2012-12-21T03:23:42.428Z: LoadService: -> bundler/setup
2012-12-21T03:23:42.477Z: LoadService: <- bundler/setup - 49ms
2012-12-21T03:23:42.482Z: LoadService: -> rails/cli
2012-12-21T03:23:42.487Z: LoadService: -> rbconfig
2012-12-21T03:23:42.488Z: LoadService: <- rbconfig - 0ms
2012-12-21T03:23:42.488Z: LoadService: -> rails/script_rails_loader
2012-12-21T03:23:42.497Z: LoadService: -> pathname
2012-12-21T03:23:42.762Z: LoadService: <- pathname - 265ms
2012-12-21T03:23:42.768Z: LoadService: <- rails/script_rails_loader - 280ms
Hello
real 0m32.280s
user 0m49.368s
sys 0m2.321s
[torquebox@n3 myapp]$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment