Greetings.
[following Stas' suggestion I have subscribed to the list and
posted the patch there, so I am crossposting]
>Do you know if FastCGI is multi-threaded or multi-process on
Windows?
Multi process. Each process speaks to mod_fastcgi over a
named pipe. As you mention, this (being multithreaded) avoids the problem
to which mod_perl succumbs.
[...]
>Also, which FastCGI implementation do you recommend for
Windows?
I am in the process of testing mod_fastcgi, and that being
the only one I have seen so far, I should probably reccomend it...
;) It appears to be the only apache implementation by the
way. Also www.fastcgi.com
says that implementations for IIS and Iplanet were withdrawn by the firm that
was producing them.
Setting up is a bit of a pain (though recompiling perl with SFIO
is no longer required) Recompilations may be required for apache,
mod_fastcgi, FCGI.pm. Also the Apache configuration can be a little
delicate.
After setup is taken care of, however, all it took to convert
the application was changing:
use CGI;
my $q=new CGI;
to
use FCGI;
use CGI::Fast;
my $q;
while($q=new CGI::Fast) {
}
So it wasn't bad, though I have to say that the app already
clears mod_perl and straight CGI, so it is exceptionally clean (by my
standards, at least).
I did run some tests - which basically check activation times, I
am working on getting more significant number on concurrency etc. Some patterns
do already emerge though:
Testing from a Linux box with:
ab -c 30 -n 60 (30 concurrrent sessions, two requests each)
I get:
mod_perl (already compiled):
Concurrency Level: 30
Time taken for tests: 5.463 seconds Complete requests: 60 Failed requests: 0 Total transferred: 292080 bytes HTML transferred: 280620 bytes Requests per second: 10.98 Transfer rate: 53.47 kb/s received Fast CGI (throttled at 4 concurrent servers already
running):
Concurrency Level: 30
Time taken for tests: 8.018 seconds Complete requests: 60 Failed requests: 0 Total transferred: 292440 bytes HTML transferred: 280980 bytes Requests per second: 7.48 Transfer rate: 36.47 kb/s received Straight CGI gave me a server timed out with the same values. So
I lowered it to:
ab -c 10 -n 60
Concurrency Level: 10
Time taken for tests: 139.580 seconds Complete requests: 60 Failed requests: 0 Total transferred: 292140 bytes HTML transferred: 280680 bytes Requests per second: 0.43 Transfer rate: 2.09 kb/s received So mod_perl has a slight speed edge over fastcgi (which is
overthrottled a little with four servers). CGI is glacial as exepcted
- well, a little more actually, probably accounting for the catastrophic
event entailed by starting a process on NT.
I plan to run some tests also on IIS with CGI and PerlEx and if
they're interesting I'll post them.
Cheers,
alf
|
- Re: Fastcgi on win [Was: Re: Documentation patch for ... Alessandro Forghieri
- Re: Fastcgi on win [Was: Re: Documentation patch... Alessandro Forghieri
- Re: Fastcgi on win [Was: Re: Documentation p... Perrin Harkins