ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Alexander Bokovoy <a.bokovoy@sam-solutions.net>
To: community@altlinux.ru
Subject: Re: [Comm] ruby
Date: Tue, 15 Oct 2002 16:44:41 +0300
Message-ID: <20021015134441.GC3560@sam-solutions.net> (raw)
In-Reply-To: <200210151449.52843.kosha@Kp.ru>

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.


  reply	other threads:[~2002-10-15 13:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-15 10:49 Korshunov Ilya
2002-10-15 13:44 ` Alexander Bokovoy [this message]
2002-10-15 13:54   ` Korshunov Ilya

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021015134441.GC3560@sam-solutions.net \
    --to=a.bokovoy@sam-solutions.net \
    --cc=community@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git