Hey,
I have a problem: We (i.e. my company) is right in the middle of
preparing
the live release of our first major project for a client. We’re using
JRuby
1.7.2 running Rails on a Tomcat 6 Application Server under Debian
Squeeze
with Java 6. The application is basically a small search engine which
wraps
a SOLR-Server with a nicer interface, presenting the enduser certain
local
Offers within their reach, displaying the locations as well.
So far, performance was fine (“good enough”) as far as we could tell,
but
that was before we did our load tests.
Long story short: My main Problem right now is the view rendering, which
is
terribly slow:
INFO: Rendered layouts/_footer.html.erb (37.0ms)
INFO: Rendered base/_messages.html.erb (0.0ms)
INFO: Rendered search/_offer.html.erb (33.0ms)
INFO: Rendered search/_offer.html.erb (27.0ms)
INFO: Rendered search/_offer.html.erb (26.0ms)
INFO: Rendered search/_offer.html.erb (26.0ms)
INFO: Rendered search/_offer.html.erb (22.0ms)
INFO: Rendered search/_infowindow.html.erb (1.0ms)
INFO: Rendered search/_shop.html.erb (178.0ms)
INFO: Rendered search/_offer.html.erb (28.0ms)
INFO: Rendered search/_offer.html.erb (27.0ms)
INFO: Rendered search/_offer.html.erb (26.0ms)
INFO: Rendered search/_offer.html.erb (27.0ms)
INFO: Rendered search/_offer.html.erb (20.0ms)
INFO: Rendered search/_infowindow.html.erb (1.0ms)
INFO: Rendered search/_shop.html.erb (168.0ms)
INFO: Rendered search/_offer.html.erb (27.0ms)
INFO: Rendered search/_offer.html.erb (25.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (25.0ms)
INFO: Rendered search/_offer.html.erb (19.0ms)
INFO: Rendered search/_infowindow.html.erb (1.0ms)
INFO: Rendered search/_shop.html.erb (174.0ms)
INFO: Rendered search/_offer.html.erb (25.0ms)
INFO: Rendered search/_offer.html.erb (25.0ms)
INFO: Rendered search/_offer.html.erb (26.0ms)
INFO: Rendered search/_offer.html.erb (25.0ms)
INFO: Rendered search/_offer.html.erb (20.0ms)
INFO: Rendered search/_infowindow.html.erb (1.0ms)
INFO: Rendered search/_shop.html.erb (160.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (25.0ms)
INFO: Rendered search/_offer.html.erb (26.0ms)
INFO: Rendered search/_offer.html.erb (23.0ms)
INFO: Rendered search/_offer.html.erb (18.0ms)
INFO: Rendered search/_infowindow.html.erb (1.0ms)
INFO: Rendered search/_shop.html.erb (156.0ms)
INFO: Rendered search/_offer.html.erb (23.0ms)
INFO: Rendered search/_offer.html.erb (23.0ms)
INFO: Rendered search/_offer.html.erb (23.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (18.0ms)
INFO: Rendered search/_infowindow.html.erb (0.0ms)
INFO: Rendered search/_shop.html.erb (150.0ms)
INFO: Rendered search/_offer.html.erb (25.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (25.0ms)
INFO: Rendered search/_offer.html.erb (28.0ms)
INFO: Rendered search/_offer.html.erb (31.0ms)
INFO: Rendered search/_infowindow.html.erb (1.0ms)
INFO: Rendered search/_shop.html.erb (168.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (25.0ms)
INFO: Rendered search/_offer.html.erb (29.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (19.0ms)
INFO: Rendered search/_infowindow.html.erb (1.0ms)
INFO: Rendered search/_shop.html.erb (158.0ms)
INFO: Rendered search/_offer.html.erb (25.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (25.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (19.0ms)
INFO: Rendered search/_infowindow.html.erb (1.0ms)
INFO: Rendered search/_shop.html.erb (156.0ms)
INFO: Rendered search/_offer.html.erb (25.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (20.0ms)
INFO: Rendered search/_infowindow.html.erb (1.0ms)
INFO: Rendered search/_shop.html.erb (155.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (25.0ms)
INFO: Rendered search/_offer.html.erb (35.0ms)
INFO: Rendered search/_offer.html.erb (20.0ms)
INFO: Rendered search/_infowindow.html.erb (1.0ms)
INFO: Rendered search/_shop.html.erb (167.0ms)
INFO: Rendered search/_offer.html.erb (25.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (26.0ms)
INFO: Rendered search/_offer.html.erb (20.0ms)
INFO: Rendered search/_infowindow.html.erb (1.0ms)
INFO: Rendered search/_shop.html.erb (159.0ms)
INFO: Rendered search/_offer.html.erb (26.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (23.0ms)
INFO: Rendered search/_offer.html.erb (23.0ms)
INFO: Rendered search/_offer.html.erb (18.0ms)
INFO: Rendered search/_infowindow.html.erb (1.0ms)
INFO: Rendered search/_shop.html.erb (156.0ms)
INFO: Rendered search/_offer.html.erb (26.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (25.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (19.0ms)
INFO: Rendered search/_infowindow.html.erb (1.0ms)
INFO: Rendered search/_shop.html.erb (154.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (34.0ms)
INFO: Rendered search/_offer.html.erb (25.0ms)
INFO: Rendered search/_offer.html.erb (19.0ms)
INFO: Rendered search/_infowindow.html.erb (1.0ms)
INFO: Rendered search/_shop.html.erb (164.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (19.0ms)
INFO: Rendered search/_infowindow.html.erb (1.0ms)
INFO: Rendered search/_shop.html.erb (155.0ms)
INFO: Rendered search/_offer.html.erb (26.0ms)
INFO: Rendered search/_offer.html.erb (25.0ms)
INFO: Rendered search/_offer.html.erb (25.0ms)
INFO: Rendered search/_offer.html.erb (25.0ms)
INFO: Rendered search/_offer.html.erb (19.0ms)
INFO: Rendered search/_infowindow.html.erb (1.0ms)
INFO: Rendered search/_shop.html.erb (159.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (19.0ms)
INFO: Rendered search/_infowindow.html.erb (1.0ms)
INFO: Rendered search/_shop.html.erb (153.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (35.0ms)
INFO: Rendered search/_offer.html.erb (26.0ms)
INFO: Rendered search/_offer.html.erb (23.0ms)
INFO: Rendered search/_offer.html.erb (19.0ms)
INFO: Rendered search/_infowindow.html.erb (1.0ms)
INFO: Rendered search/_shop.html.erb (167.0ms)
INFO: Rendered search/_offer.html.erb (26.0ms)
INFO: Rendered search/_offer.html.erb (25.0ms)
INFO: Rendered search/_offer.html.erb (26.0ms)
INFO: Rendered search/_offer.html.erb (25.0ms)
INFO: Rendered search/_offer.html.erb (20.0ms)
INFO: Rendered search/_infowindow.html.erb (1.0ms)
INFO: Rendered search/_shop.html.erb (161.0ms)
INFO: Rendered search/_offer.html.erb (25.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (25.0ms)
INFO: Rendered search/_offer.html.erb (20.0ms)
INFO: Rendered search/_infowindow.html.erb (1.0ms)
INFO: Rendered search/_shop.html.erb (155.0ms)
INFO: Rendered search/_offer.html.erb (25.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (25.0ms)
INFO: Rendered search/_offer.html.erb (19.0ms)
INFO: Rendered search/_infowindow.html.erb (1.0ms)
INFO: Rendered search/_shop.html.erb (154.0ms)
INFO: Rendered search/_offer.html.erb (34.0ms)
INFO: Rendered search/_offer.html.erb (28.0ms)
INFO: Rendered search/_offer.html.erb (25.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (19.0ms)
INFO: Rendered search/_infowindow.html.erb (0.0ms)
INFO: Rendered search/_shop.html.erb (169.0ms)
INFO: Rendered search/_offer.html.erb (25.0ms)
INFO: Rendered search/_offer.html.erb (25.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (19.0ms)
INFO: Rendered search/_infowindow.html.erb (1.0ms)
INFO: Rendered search/_shop.html.erb (155.0ms)
INFO: Rendered search/_offer.html.erb (25.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (24.0ms)
INFO: Rendered search/_offer.html.erb (25.0ms)
INFO: Rendered search/_offer.html.erb (18.0ms)
INFO: Rendered search/_infowindow.html.erb (1.0ms)
INFO: Rendered search/_shop.html.erb (161.0ms)
INFO: Rendered search/search.html.erb within layouts/application
(9703.0ms)
INFO: Rendered base/_top_menu.html.erb (23.0ms)
INFO: Rendered layouts/_header.html.erb (100.0ms)
INFO: Rendered base/_bottom_menu.html.erb (10.0ms)
INFO: Rendered layouts/_footer.html.erb (31.0ms)
INFO: Rendered home/index.html.erb within layouts/home (29.0ms)
INFO: Rendered base/_top_menu.html.erb (34.0ms)
INFO: Rendered layouts/_header_start.html.erb (60.0ms)
INFO: Rendered base/_bottom_menu.html.erb (11.0ms)
INFO: Rendered layouts/_footer.html.erb (28.0ms)
It’s the list of search results. In summation, the rendering takes about
ten 10 seconds on average, which is far too long considering everything
else (ActiveRecord/SOLr query) takes about .5 to 1 second. MRI runs fine
btw. the whole thing renders in about 2-3 seconds which is okay. Funny
enough, using WEBrick on JRuby locally takes about 4-6 seconds. The
views
do not contain any voodoo, as in calling to the database and what not.
Aside from asking here I already looked around a bit and found several
performance tips for JRuby (including the wiki and a stackoverflow
answer)
which all seem to recommend increasing memory options for Tomcat and
JRuby
through options. Problem is, I am not a experienced administrator and i
am
pretty new to Tomcat.
So, could anyone of you give me a starting point/any other performance
tips? I have full access to a copy of the acceptance/production server,
so
i can basically play around as much as I want.
I’d really like to see going this project into production with JRuby
instead of switching to MRI.
Anyway,
thanks,
flo