Message from discussion
Poor performance with JRuby on Rails
Received: by 10.42.54.66 with SMTP id q2mr11631813icg.17.1346871331901;
Wed, 05 Sep 2012 11:55:31 -0700 (PDT)
X-BeenThere: jruby-users@googlegroups.com
Received: by 10.50.41.165 with SMTP id g5ls100640igl.2.gmail; Wed, 05 Sep 2012
11:55:31 -0700 (PDT)
Received: by 10.42.73.129 with SMTP id s1mr11586281icj.21.1346871331749;
Wed, 05 Sep 2012 11:55:31 -0700 (PDT)
Received: by 10.42.73.129 with SMTP id s1mr11586280icj.21.1346871331740;
Wed, 05 Sep 2012 11:55:31 -0700 (PDT)
Return-Path: <user-return-17919-jruby-users-garchive-14719=googlegroups....@jruby.codehaus.org>
Received: from mail.codehaus.org (mail.codehaus.org. [63.246.24.167])
by gmr-mx.google.com with ESMTPS id ba5si8116igb.3.2012.09.05.11.55.31
(version=TLSv1/SSLv3 cipher=OTHER);
Wed, 05 Sep 2012 11:55:31 -0700 (PDT)
Received-SPF: pass (google.com: domain of user-return-17919-jruby-users-garchive-14719=googlegroups....@jruby.codehaus.org designates 63.246.24.167 as permitted sender) client-ip=63.246.24.167;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of user-return-17919-jruby-users-garchive-14719=googlegroups....@jruby.codehaus.org designates 63.246.24.167 as permitted sender) smtp.mail=user-return-17919-jruby-users-garchive-14719=googlegroups....@jruby.codehaus.org
Received: (qmail 4762 invoked by uid 89); 5 Sep 2012 18:55:05 -0000
Mailing-List: contact user-h...@jruby.codehaus.org; run by ezmlm
Precedence: bulk
List-Post: <http://xircles.codehaus.org/manage_email>
List-Help: <http://xircles.codehaus.org/manage_email>
List-Unsubscribe: <http://xircles.codehaus.org/manage_email>
List-Subscribe: <http://xircles.codehaus.org/manage_email>
List-Id: <user.jruby.codehaus.org>
Reply-to: u...@jruby.codehaus.org
Delivered-To: mailing list u...@jruby.codehaus.org
Received: (qmail 4755 invoked by uid 89); 5 Sep 2012 18:55:05 -0000
Received-SPF: pass (63-246-24-167.contegix.com: SPF record at spf-1.redhat.com designates 209.132.183.28 as permitted sender)
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0 (Apple Message framework v1084)
From: Benjamin Browning <bbrown...@redhat.com>
In-Reply-To: <cf53e8a02ae5a4a6ee267718f166b...@ruby-forum.com>
Date: Wed, 5 Sep 2012 14:55:02 -0400
Content-Transfer-Encoding: quoted-printable
Message-Id: <186B0EBB-D9EA-41C4-AC45-E6EA68280...@redhat.com>
References: <cf53e8a02ae5a4a6ee267718f166b...@ruby-forum.com>
To: u...@jruby.codehaus.org
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
Subject: Re: [jruby-user] Poor performance with JRuby on Rails
Sounds like as a first step, which you may have already done to some =
extent, you need to figure out exactly where the differences are. Have =
you tried writing a simple script to exercise the relevant code paths of =
the web requests outside of a web server? That would isolate any =
differences between servers and compare raw JRuby vs MRI performance so =
you'd know what needs tracking down from there. Break the web request =
flow into manageable chunks and benchmark each chunk in isolation to see =
narrow down the possible culprits and make it easier for others to =
reproduce your results.
Ben
On Sep 5, 2012, at 1:46 PM, Andre Zelenkovas wrote:
> Hello
>=20
> I have a typical CRUD Ruby on Rails app with a fairly complex model =
and
> the performance in JRuby is 6 times slower than MRI considering median
> response times. I'm running 30 minute tests with a single-threaded
> client to ensure runtimes are warmed up. I've tried both Webrick,
> warbler on JBoss and Torquebox, to no avail. I'm reaching out to the
> forum hoping for some tips.
>=20
> Issue/fact summary:
>=20
> JRuby-Rack seems to take up to 150ms just to dispatch the request into
> the controller.
>=20
> ActiveRecord activity is much slower on JRuby (by a factor of 10
> sometimes.)
>=20
> JSON generation is actually faster in JRuby than MRI.
>=20
> Tried jruby.compile.mode=3DFORCE and jruby.frameless.mode =3D true.
> Frameless mode seems to improve performance to about 5%.
>=20
> YAML serialization is slower than JSON serialization in JRuby but the
> same in MRI.
>=20
> JRuby runtimes are using massive amounts of memory (up to 40 MB of
> garbage per request.)
>=20
> I've tested with a single runtime in JRuby with 2 GB max heap and 512 =
MB
> max perm size.
>=20
> Any tips are appreciated.
>=20
> Thanks
> Andre
>=20
> --=20
> Posted via http://www.ruby-forum.com/.
>=20
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>=20
> http://xircles.codehaus.org/manage_email
>=20
>=20
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email