Hi, all, I've been doing some quick and dirty shootouts running the Petstore app from TW-commons RubyForge project.
The purpose of this exercise was not to draw any conclusions, but to get a gut feel for the various factors that have significant impact on performance of a Rails application running under JRuby. Test procedure, in a nutshell was just repeatedly hitting a particular page and measuring response rate. More details below. I see a huge difference in favor of MRI so far. I am also a bit surprised that AR-JDBC is slower than a pure-Ruby MySQL driver from Rails. Thoughts? MRI / Mongrel / native mysql driver: 71 requests/sec MRI / Mongrel / Rails mysql driver: 57 requests/sec MRI / Webrick / native mysql driver: 52 requests/sec MRI / Webrick / Rails mysql driver: 43 requests/sec JRuby trunk / Mongrel / Rails mysql driver: 17 requests/sec JRuby trunk / Mongrel / AR:JDBC: 14 requests/sec JRuby trunk / Webrick / Rails mysql driver: 13 requests/sec JRuby trunk / Webrick / AR:JDBC: 11 requests/sec JRuby 1.0 / Mongrel / Rails mysql driver: 16 requests/sec JRuby 1.0 / Mongrel / AR:JDBC: 14 requests/sec JRuby 1.0 / Webrick / Rails mysql driver: 13 requests/sec JRuby 1.0 / Webrick / AR:JDBC: 12 requests/sec In all cases, even with MRI, performance is completely CPU-bound, with the app using 97-99% of CPU, and MySQL only 1-2%. System under test: * Petstore: SVN rev 22 from http://tw-commons.rubyforge.org/svn/trunk/ * Mongrel-jruby: 1.0.1 * Mongrel: 1.0.1 * Rails MySQL driver: pure Ruby driver included in Rails 1.2.3 * native MySQL driver: 2.7 * ActiveRecord-JDBC: 0.4 * JDBC MySQL driver: MySQL Connector/J, packaged in Ubuntu as libmysql-java 5.0.4+dfsg-2 * Ruby: ruby 1.8.5 (2007-03-13 patchlevel 35) [i686-linux] * JRuby trunk: SVN rev 4183 * Java: build 1.6.0-b105 * MySQL: 5.0.38 * OS: Ubuntu 7.0 desktop * Hardware: Dell Latitude D620 laptop Test procedure: * rake RAILS_ENV=production db:dataload (loads some small amount of test data) * Start the app * Warm up the JIT compiler: ab -c 1 -n 1000 http://localhost:3002/shop/viewProduct.shtml?product=K9-DL-01 * Test: ab -c 1 -n 100 http://localhost:3002/shop/viewProduct.shtml?product=K9-DL-01 -- Alexey Verkhovsky CruiseControl.rb [http://cruisecontrolrb.thoughtworks.com] RubyWorks [http://rubyworks.thoughtworks.com] --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email
