=?iso-8859-1?q?=E2=C5=DA_=D4=C5=CD=D9?=


Вт Окт 21 16:11:16 MSD 2008


a) 400 request/sec with mod_ruby and cached Ruby script
b) 200 request/sec with fastcgi.so (the mixed C/Ruby version)
c) 100 request/sec with FCGI (clean Ruby version)
d) 70 request/sec with mod_ruby naive.

a) requires Apache reboot when script is changed.

Given this, it seems to me that the fastcgi.so version is the best Ruby
solution because it is by far the most flexible solution while maintaining
decent speed, and if you want real speed you probably shouldn't go with
Ruby in the first place.  This should be balanced against the actual
execution time of the script - if it takes the major part of the execution
time, the choice of deployment becomes less relevant.

If we take Jim's PHP/Ruby result Ruby is only 41% slower than PHP in the
d) solution (I presume), meaning that PHP is probably comparable to solution
c) in performance.

Thus Ruby should compare favorably to PHP, but only if deployed carefully.

It would still be nice to know the script performance of PHP vs. Ruby thus
I turned to Bagleys shootout that revealed relative CPU numbers: PHP 197,
Ruby 546. In other words, Ruby is more than 100% faster than PHP in that
benchmark.

FastCGI can also be executed on a separate box not disturbed by Web
traffic. On a 100 or 1000 Mbit network, it should be able to handle a fair
number of request.

According to the links transmitted by MoonWolf, there is the Nora
framework on RAA, which appears to contain an FCGI solution.

---------------------------------------------------------------------------

Настройка для варианта a) описана в
http://www.modruby.net/doc/index.en.html и файлах apache/ruby-run.rb,
apache/eruby-run.rb

> И второй вопрос по глюкам - много ли их ? Можно ли его 
> использовать в серьёзных проектах или пока только в качестве
> ознакомления ?
В серьезных проектах использовать можно. Из серьезных глюков за последнее
время обнаруживались только проблемы в посторонних модулях.

-- 
/ Alexander Bokovoy
---
Only two of my personalities are schizophrenic, but one of them is
paranoid and the other one is out to get him.



Подробная информация о списке рассылки community