[FASTCGI] very low performance

Matthew Weigel unique at idempot.net
Tue Jan 26 12:36:59 EST 2010


On Tue, 26 Jan 2010 20:25:18 +0300, Тарасов Евгений <tarasove at list.ru>
wrote:
> Hello, Fastcgi Developers!
> 
> I've just written small fastcgi program. It loads jpeg picture from file
> and sends it to client. 256 Kb picture is loaded in 2 sec in my machine.
> This picture as static file is loaded through apache2 in only 0.030 sec.
> 
> I start the program in apache2 with mod_fastcgi.
> 
> So, there is question, is fastcgi really so slow or I missed some
> configuration tricks?

FastCGI is not particularly appropriate for this task.  Apache is most
likely much more efficient at the fairly simple task of streaming files via
HTTP, and doesn't incur the overhead that FastCGI does in performing that
task.

FastCGI is more appropriate for tasks that you would otherwise write a CGI
program to do, and should be faster in those cases.  It is also appropriate
for tasks where you would consider loading mod_php, mod_perl, etc. into
your Apache configuration; in those cases, the performance difference will
probably be negligible, but you have a lot more control over the design in
terms of load-balancing and security.
-- 
 Matthew Weigel
 hacker
 unique & idempot . ent



More information about the FastCGI-developers mailing list