Rainbows! Rack HTTP server user/dev discussion
 help / color / mirror / code / Atom feed
From: Joseph McDonald <superjoe-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
Subject: rainbows slower?
Date: Fri, 8 Jun 2012 09:04:48 -0700	[thread overview]
Message-ID: <CAKN4AWvqRyxTMOVNjc5bGzrkOKGZJ6TsTwBuYu_ZekXaeqT9ag@mail.gmail.com> (raw)

Hi,

I have a "hello world" sinatra app, benchmark:
ab -n 1000 -c 100 http://$mysite/

Total transferred:      264000 bytes
HTML transferred:       13000 bytes
Requests per second:    308.76 [#/sec] (mean)
Time per request:       323.871 [ms] (mean)
Time per request:       3.239 [ms] (mean, across all concurrent requests)

If I put rainbows in front of it, I get:

Total transferred:      272000 bytes
HTML transferred:       13000 bytes
Requests per second:    61.62 [#/sec] (mean)
Time per request:       1622.745 [ms] (mean)
Time per request:       16.227 [ms] (mean, across all concurrent requests)

rainbow config looks like:

worker_processes 7  # i'm on an 8 core system
Rainbows! do
  use :EventMachine   # sinatra app using "thin"
  worker_connections 1024
end

config.ru looks like:
require './webserver'
run Sinatra::Application

ruby version is: ruby 1.9.3p194

I tried telling apachebench to use keepalives (-k) and that slowed
rainbows down more (and sped up the straight sinatra app).
I have changed worker_processes and worker_connections with no effect.
 I added keepalive_timeout 0 to the Rainbows! block with no effect.

any idea why rainbows is slower?  I'd like to take advantage of all my cores.

thanks,
Joe
_______________________________________________
Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
http://rubyforge.org/mailman/listinfo/rainbows-talk
Do not quote signatures (like this one) or top post when replying


             reply	other threads:[~2012-06-08 16:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-08 16:04 Joseph McDonald [this message]
     [not found] ` <CAKN4AWvqRyxTMOVNjc5bGzrkOKGZJ6TsTwBuYu_ZekXaeqT9ag-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-06-08 17:39   ` rainbows slower? Eric Wong
     [not found]     ` <20120608173920.GA20100-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
2012-06-08 23:31       ` Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/rainbows/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKN4AWvqRyxTMOVNjc5bGzrkOKGZJ6TsTwBuYu_ZekXaeqT9ag@mail.gmail.com \
    --to=superjoe-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/rainbows.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).