From: Andreas Schwarz Date: 2004-03-02T00:24:46+09:00 Subject: Re: Why ist fastcgi so slow? Ara.T.Howard wrote: > On 29 Feb 2004, Andreas Schwarz wrote: > >> Ara.T.Howard wrote: >> > On 29 Feb 2004, Andreas Schwarz wrote: >> > >> >> Hi, >> >> >> >> I am using mod_fastcgi and ruby 1.8 with the following example script: >> >> >> >> #!/usr/local/bin/ruby >> >> require 'cgi' >> >> require 'fcgi' >> >> FCGI.each_cgi do |cgi| >> >> cgi.out{ "Test" } >> >> end >> >> >> >> This is extremely slow, I get exactly 1.00 requests per second (measured >> >> with ApacheBench). But why? >> > >> > what is the name of the file? foo.cgi or foo.fcgi? >> >> foo.rb, and yes, it is executed by mod_fastcgi. > > hmm. can you see it running with 'ps -elf'?? Yes. > can you show the assoc > httpd.conf sections? I only added "AddHandler fastcgi-script" to my .htaccess. > the reason i ask it that this performance seems only > explainable if the script we firing up the ruby interpreter each time... Even then it would be much faster.