speedier cgi and perf monitoring

Josiah Carlson jcarlson at uci.edu
Sun Oct 24 19:29:02 EDT 2004


> I've seen a couple solutions for making CGI faster without significant 
> rewrite.  The only one I've been able to locate is fastCGI.  I seem to 
> recall something like speed CGI or speedy CGI but I can't find I thought 
> I saw (not a puddytat).  References to this other CGI speedup tool would 
> be appreciated.

There is a fastCGI-like mechanism called LRWP through a web server
called Xitami.


> But I've also been playing with performance monitoring to try and 
> improve performance with a couple of CGI that are very very hard on disk 
> storage.  Even so, performance isn't what I think it should be.  On the 
> simple, non disk intensive CGI, running the profiler on the CGI shows 
> only 0.2 seconds execution time but in reality is takng 10 seconds from 
> button click to page redisplay.  The HTML is only three or four 
> kilobytes of relatively simple stuff as well so transmission or 
> rendering time is not a big factor.
> 
> I have some disk intensive CGI which I have measured which showed only a 
> few tenth of seconds execution time but also takes sometimes 15 or 20 
> seconds elapsed time.
> 
> what's curious is that I'm not seem anyway a detecting which methods are 
> taking large amounts of elapsed time.  I've tried a different (albeit 
> simplistic) time bases to try and measure elapsed time rather than CPU 
> time but with no luck.

There are many reasons why it could be slow in displaying.  If you want
to make sure that display isn't slowing it down, telnet to the proper
server and port and execute the fetch manually (knowing HTTP helps here).

Once you are absolutely certain that it is not display, test how long it
takes to transfer from your application to your fastCGI server (start a
timer just before you start, and stop it when it is done transferring).

Tell us how this works out.

 - Josiah




More information about the Python-list mailing list