Re: [Trinidad] “Hello World” JRuby/Trinidad/Sinatra App Super Slow

Skip to first unread message

Tim Olsen

May 6, 2013, 9:39:31 AM5/6/13
Two things I would check.  

1. Make sure you are running Rails in production mode (either by passing "-e production" to trinidad or by setting "environment: production" in trinidad.yml).  

2. Use the latest version of jruby (currently 1.7.3). 


On Sat, May 4, 2013 at 2:49 PM, Jonah <> wrote:

I've deployed a "Hello World" sinatra app via trinidad, behind an apache load balancer on an AWS micro instance. When i use apache benchmark, the app will max out the CPU:

ab -kc 20 -n 500

Requests take an average of 0.5 seconds to serve, which seems really slow for a hello world app (the same app with nginx/unicorn on MRI is much faster on the same machine).

I also tried load testing it with "siege". The response times were identical, but the CPU was stayed under 20%, presumably because the requests are not concurrent.

I suspect I need to change some simple config option. Thanks for any advice.

Sinatra App

require "sinatra/base"

class MyApp < Sinatra::Base
  get '/' do
     "Hello World"

Apache httpd.conf

<Proxy balancer://trini>
  BalancerMember ajp://

ProxyPass / balancer://trini/


  port: 8099
  allowTrace: true
    context_path: /
    web_app_dir: .

start trinidad command

jruby -S trinidad --config trinidad.yml

Has recibido este mensaje porque estás suscrito al grupo "Rails Trinidad" de Grupos de Google.
Para anular la suscripción a este grupo y dejar de recibir sus correos electrónicos, envía un correo electrónico a
Para publicar una entrada en este grupo, envía un correo electrónico a
Visita este grupo en
Para obtener más opciones, visita

Reply all
Reply to author
0 new messages