[FASTCGI] very low performance
jsprenkle at gmail.com
Tue Jan 26 13:18:11 EST 2010
> FastCGI is not particularly appropriate for this task. Apache is most
> likely much more efficient at the fairly simple task of streaming files
> HTTP, and doesn't incur the overhead that FastCGI does in performing that
FastCgi is overkill for serving static images or static pages. It's not for
serving dynamic pages or images. The overhead should NOT be 2 seconds per
page in any case.
I don't know Haskell, but my guess would be that the file read and write is
inefficient, or you're just seeing startup lag.
There will be always be a lag when the first request is made using fastcgi.
The web server must start the haskell program and then pass the request to
As long as the web server keeps the program in memory all further requests
will be much faster.
Here's what I'd try:
Profile the code or write to logs with timestamps
Change the code to return a string instead and see if the string takes 2
seconds. This will tell if it's the image or the setup.
On Tue, Jan 26, 2010 at 12:07 PM, Тарасов Евгений <tarasove at list.ru> wrote:
> Thanks for your answers!
> > How did you write the code to read the file?
> > What language did you write it in? You haven't provided enough
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the FastCGI-developers