I just finished the first working version of the new abstract rendering
pipeline for Nitro. This new pipeline, allows for multiple adaptors
(webrick, fastcgi, cgi, modruby, etc) running the same web application.
Even though the new pipeline is not yet optimized, I run a benchmark to
compare webrick's performance vs fastcgi. I was quite shocked to see
the following results on my trusty old laptop:
On the topic of fastcgi, I always had the following question: Isn't an
apache-fastcgi-rubyserver configuration equivalent to an
apache-mod_proxy-rubyserver configuration?
Whats makes this performance difference more amazing is that I used the
pure-ruby fcgi library. I 'll try again with the C-version library
later.
hm, what are you doing that you only get 30 req/sec? On my Centrino 1300 laptop, I got 333 req/sec with a simple static WEBrick filehandler (3728 bytes), and still 85 req/sec when using Wee to render the same page, and 165 req/sec just for the action phase in Wee (the real req/sec is of course 1/(1/85 + 1/165) = 56 ).
I got 333 req/sec with a simple static WEBrick filehandler
I benchmark this simple page:
<html>test</html>
with Webricks FileHandler and I got 48 req/seq. This is exactly the
same as I get with the original Nitro benchmark if I dissable the
session from the page.
So the question remains, is Webrick sooo much slowet than
lighttpd/fcgi?
with large files the difference is theoretically
*much* lower. its the small files that suffer from
latency problems for a webserver written in pure ruby.
i imagine that ruby2c + some clever profiling will
get some damn impressive results.
Alex
···
On Jan 24, 2005, at 7:39 PM, Joao Pedrosa wrote:
When I think about serving large binary files with WEBrick, I soon
realize that we really need webservers.
Alexander Kellett <ruby-lists@lypanov.net> writes:
···
On Jan 24, 2005, at 7:39 PM, Joao Pedrosa wrote:
When I think about serving large binary files with WEBrick, I soon
realize that we really need webservers.
with large files the difference is theoretically
*much* lower. its the small files that suffer from
latency problems for a webserver written in pure ruby.
i imagine that ruby2c + some clever profiling will
get some damn impressive results.
Alex
Note that for raw IO, a well-tuned server can use OS-depended calls
like sendfile(2), which are not directly accessible through Ruby.