From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 15 Oct 2002 16:44:41 +0300 From: Alexander Bokovoy To: community@altlinux.ru Subject: Re: [Comm] ruby Message-ID: <20021015134441.GC3560@sam-solutions.net> References: <200210151449.52843.kosha@Kp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <200210151449.52843.kosha@Kp.ru> Sender: community-admin@altlinux.ru Errors-To: community-admin@altlinux.ru X-BeenThere: community@altlinux.ru X-Mailman-Version: 2.0.9 Precedence: bulk Reply-To: community@altlinux.ru List-Unsubscribe: , List-Id: List-Post: List-Help: List-Subscribe: , List-Archive: Archived-At: List-Archive: List-Post: On Tue, Oct 15, 2002 at 02:49:52PM +0400, Korshunov Ilya wrote: > Вопрос к тем кто уже использовал ruby. > > Если сравнивать его по скорости с PHP 4 - что быстрее ? (Ссылки на японские письма) [ruby-list:35881] CGI vs mod_ruby vs FastCGI http://blade.nagaokaut.ac.jp/cgi-bin/rcat.rb/ruby/ruby-list/35881 [ruby-list:35890] Re: CGI vs mod_ruby vs FastCGI http://blade.nagaokaut.ac.jp/cgi-bin/rcat.rb/ruby/ruby-list/35890 [ruby-list:35894] Re: CGI vs mod_ruby vs FastCGI http://blade.nagaokaut.ac.jp/cgi-bin/rcat.rb/ruby/ruby-list/35894 Комментарий из ruby-talk: ----------------------------------------------------------------- fast <- -> slow mod_ruby(RubyHandler) > FastCGI(fcgi.so) > mod_ruby > CGI >From what I can figure out - give and take comparable timings: 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.