Re: Benchmark for fastcgi
Max Campos <[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Message-ID | <[email protected]> |
> Do any of you have any data on benchmarking of fastcgi. What I am
> primerily
> interested in is sending 5k html data embedded in C printf statements
> in a C
> fcgi application. From what I have read fastcgi could even be faster
> than direct
> seb server API. Is this true? From the benchmark below it does not
> seem true.
I think an Apache C module would be faster than a FastCGI C module.
FastCGI does have overhead. OTOH, there are also advantages to using
FastCGI over an Apache module, such as:
- Being able to run your app on a different server than the web server
- Being able to run your app under web server software other than Apache
- If your app crashes, it won't take down the web server
etc.
> I have seen this benchmark,
> http://chamas.com/bench/
> There it states [Apache server],
> 214 byte output:
> C Apache API 4285.2 hits/sec
> mod_php PHP 1601.2 hits/sec
> mod_fastcgi 911.9 hits/sec
>
> As you can see php is actually faster! What I wonder from these
> results is if
> how the fastcgi app was done, was it a perl interpreted page or was it
> a C
> application?
It describes this test as:
mod_fastcgi CGI::Fast
CGI::Fast is a perl module, part of the (rather bloated) CGI.pm family.
If you download the source to the module you'll see the contents of
hello.fastcgi:
#!/usr/local/bin/perl
use strict;
use CGI::Fast;
while (my $cgi = new CGI::Fast) {
print $cgi->header();
print "Hello";
print " World";
}
A better test of FastCGI under perl would have been mod_fastcgi with
FCGI.pm. My guess is that, in general, a C FastCGI app would far out
pace PHP. Of course "Hello World" is hardly a good benchmark.
- Max
___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/