Rainbows! Rack HTTP server user/dev discussion
 help / color / mirror / code / Atom feed
* rainbows slower?
@ 2012-06-08 16:04 Joseph McDonald
       [not found] ` <CAKN4AWvqRyxTMOVNjc5bGzrkOKGZJ6TsTwBuYu_ZekXaeqT9ag-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Joseph McDonald @ 2012-06-08 16:04 UTC (permalink / raw)
  To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-06-08 23:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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

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).