Re: problems with fastcgi performance & ruby

Sam Vilain <sam-s9IUA/[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel
Message-ID <[email protected]>
Andrew Stuart wrote:
 > Can anyone throw any light for me on what sort performance I should
 > expect from ruby under mod_fastcgi?

FWIW, I think the performance levels you are seeing are about Apache's
limit.

I suggest you also try one or two of:

   - lighttpd, free (recently announced on this list)
   - LiteSpeed, from LiteSpeedTech.com (commercial, free for sites with
     <10 virtual hosts)
   - Premium thttpd (commercial, about 200E iirc)
   - Zeus (commercial, expensive - about GBP 1k last time I checked,
     but it really is the daddy)

These are all select/poll based, and should offer better performance.

I've just run these benchmarks on LiteSpeed on a similar system (Athlon
XP 2600+).  I hoped to have merry things to say, but while performance
is generally better, it seems that LiteSpeed does not cope very well
under high load, returning error pages and dropping the connection
frequently for high load of even flat files.

samv:/usr/src/http_load-04jan2002$ ./http_load -verbose -parallel 20 
-seconds 20 urls-flat
[ ... errors ... ]
10909 fetches, 20 max parallel, 5.83787e+07 bytes, in 20.0336 seconds
5351.43 mean bytes/connection
544.536 fetches/sec, 2.91404e+06 bytes/sec
msecs/connect: 1.7185 mean, 408.246 max, 0.127 min
msecs/first-response: 2.84504 mean, 214.752 max, 0.097 min
1701 bad byte counts
HTTP response codes:
   code 200 -- 9208
samv:/usr/src/http_load-04jan2002$ ./http_load -verbose -parallel 10 
-seconds 20 urls-flat
http://intranet.private.marketview.co.nz/files/gr/network.png: byte 
count wrong
13413 fetches, 10 max parallel, 8.50321e+07 bytes, in 20 seconds
6339.53 mean bytes/connection
670.65 fetches/sec, 4.2516e+06 bytes/sec
msecs/connect: 1.88251 mean, 3.37 max, 0.143 min
msecs/first-response: 2.24398 mean, 23.856 max, 0.62 min
1 bad byte counts
HTTP response codes:
   code 200 -- 13412

As you can see it doesn't handle high system load gracefully!

Here's the dynamic one:

samv:/usr/src/http_load-04jan2002$ ./http_load -parallel 10 -seconds 20 
urls
[ ... errors ...]
6968 fetches, 10 max parallel, 4.92419e+06 bytes, in 20 seconds
706.687 mean bytes/connection
348.4 fetches/sec, 246210 bytes/sec
msecs/connect: 0.378751 mean, 23.14 max, 0.123 min
msecs/first-response: 28.2874 mean, 684.901 max, 0.227 min
52 bad byte counts
HTTP response codes:
   code 200 -- 6916
samv:/usr/src/http_load-04jan2002$ ./http_load -verbose -parallel 5 
-seconds 20 urls
6959 fetches, 5 max parallel, 4.95481e+06 bytes, in 20 seconds
712 mean bytes/connection
347.95 fetches/sec, 247740 bytes/sec
msecs/connect: 0.270744 mean, 23.099 max, 0.127 min
msecs/first-response: 14.077 mean, 681.125 max, 3.054 min
HTTP response codes:
   code 200 -- 6959
samv:/usr/src/http_load-04jan2002$

The application is a hello, world for my acceptor class
(PSA::Acceptor::AutoCGI on CPAN).  I haven't really optimised it, maybe
it is introducing an overhead.

But anyway - as you can see it still handles 347 requests a second where
Apache is handling only 155.

 > It is all working a running but the performance is not what I had
 > expected and certainly not what is needed to run a production web
 > application.

It must be a pretty high volume site to see >100 requests per second!
-- 
Sam Vilain, sam /\T vilain |><>T net, PGP key ID: 0x05B52F13
(include my PGP key ID in personal replies to avoid spam filtering)

___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.