Date: Thu, 19 Feb 2004 07:32:04 GMT
From: gabriele renzi <
[email protected]>
Newsgroups: comp.lang.ruby
Subject: Re: speed benchmarks comparing Ruby to Py/Perl/PHP/etc?
all the benchmarks out there (i.e. doug's shootout) are really
outdated. ruby seem to be slower than python or perl, but faster than
php. Anyway, an apache benchmark against each plain mod_* or fastcgi
solution would be really interesting
something like this was posted - about a year ago - but i cannot seem to find
it...
this thread is interesting though
http://groups.google.com/groups?hl=...lm=20021006082518.A73241%40freeze.org&rnum=60
in particular
http://groups.google.com/groups?hl=...lm=20021006082518.A73241%40freeze.org&rnum=60
i have fastcgi and the lastest php installed on my machine. i could run some
bencharks if i intalled mod_ruby and have good enough test suite. imho a good
test would hit a database and generate some dynamic html from some sort of
templating library.
i can tell you now though that:
[ahoward@www ahoward]$ ab -n 1024
http://127.0.0.1/env.fcgi | egrep Requests
Requests per second: 221.74 [#/sec] (mean)
[ahoward@www ahoward]$ ab -n 1024
http://127.0.0.1/env.cgi | egrep Requests
Requests per second: 9.98 [#/sec] (mean)
and
[ahoward@www ahoward]$ cat /usr/local/httpd/htdocs/env.fcgi
#!/usr/local/ruby-1.8.0/bin/ruby
require 'cgi'
require 'fcgi'
FCGI.each_cgi do |cgi|
content = ''
env = []
cgi.env_table.each{|k,v| env << [k,v]}
env.sort!
env.each{|k,v| content << %Q(#{k} => #{v}<br>\n)}
cgi.out{content}
end
[ahoward@www ahoward]$ cat /usr/local/httpd/htdocs/env.cgi
#!/usr/local/ruby-1.8.0/bin/ruby
require 'cgi'
require 'fcgi'
FCGI.each_cgi do |cgi|
content = ''
env = []
cgi.env_table.each{|k,v| env << [k,v]}
env.sort!
env.each{|k,v| content << %Q(#{k} => #{v}<br>\n)}
cgi.out{content}
end
eg. they are the same exact program, which is nice too. for me this shows
that fastcgi is 'fast enough', though i can appreciate the desire for more
extensive testing.
-a
--
===============================================================================
| EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
| PHONE :: 303.497.6469
| ADDRESS :: E/GC2 325 Broadway, Boulder, CO 80305-3328
| URL ::
http://www.ngdc.noaa.gov/stp/
| TRY :: for l in ruby perl;do $l -e "print \"\x3a\x2d\x29\x0a\"";done
===============================================================================