From: Eric Wong <normalperson-rMlxZR9MS24@public.gmane.org>
To: Rainbows! list <rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org>
Cc: Joseph McDonald <superjoe-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: rainbows slower?
Date: Fri, 8 Jun 2012 16:31:31 -0700 [thread overview]
Message-ID: <20120608233131.GB6086@dcvr.yhbt.net> (raw)
In-Reply-To: <20120608173920.GA20100-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
Eric Wong <normalperson-rMlxZR9MS24@public.gmane.org> wrote:
> What is your RACK_ENV set to? I'm not sure how Thin sets it or defaults
> to, but you can pass the "-E" switch to Rainbows!:
>
> rainbows -E none ...
>
> (or use the RACK_ENV environment variable)
I suspect it's RACK_ENV being "development" by default and slowing
things down heavily (Rack::Lint). I wasn't able to reproduce the
drastic differences between thin and Rainbows with RACK_ENV=none on
Rack::Lobster. Not a real app I know, but in the absence of a real one,
it's all I've got.
I used the following config.ru
------------------------------
require "rack/lobster"
use Rack::ContentLength
use Rack::ContentType
run Rack::Lobster.new
------------------------------
and my rainbows.conf.rb
------------------------------
worker_processes 2 # only 2 cores on this machine, I also tried with 1
Rainbows! do
use :EventMachine
worker_connections 1024
end
------------------------------
thin 1.3.1
rainbows 4.3.1
rack 1.4.1
Ruby 1.9.3-p194
Linux 3.4.1 on x86-64
Commands used:
ab -n 1000 -c 100 -k http://127.0.0.1:3000/
RACK_ENV=none thin start -R config.ru
RACK_ENV=none rainbows -c rainbows.conf.rb config.ru -p 3000
I tested without keepalives (-k), too but again, it's too close
to say one server is faster than another based on Rack::Lobster.
For "hello world"-type apps, Rainbows! will use worker_processes
more effectively with keepalives.
_______________________________________________
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
prev parent reply other threads:[~2012-06-08 23:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-08 16:04 rainbows slower? Joseph McDonald
[not found] ` <CAKN4AWvqRyxTMOVNjc5bGzrkOKGZJ6TsTwBuYu_ZekXaeqT9ag-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-06-08 17:39 ` Eric Wong
[not found] ` <20120608173920.GA20100-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
2012-06-08 23:31 ` Eric Wong [this message]
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=20120608233131.GB6086@dcvr.yhbt.net \
--to=normalperson-rmlxzr9ms24@public.gmane.org \
--cc=rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org \
--cc=superjoe-Re5JQEeQqe8AvxtiuMwx3w@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).