[Moin-user] Diagnose and fix performance problems?

Paul Boddie paul at boddie.org.uk
Wed May 2 19:25:10 EDT 2012


On Thursday 03 May 2012 00:15:31 Thomas Waldmann wrote:
> > > Did you use apache/mod-wsgi or cgi? cgi is slow.
> >
> > Our servers do not offer mod_wsgi, so I think we're currently using
> > some sort of WSGI<--> Fast CGI wrapper. Could this be a major cause of
> > the problems?
>
> Well, I can't tell much about the layers below moin (esp. not for
> software I do not use myself), but in principle, fastcgi should be of
> almost same performance as mod-wsgi. A little more software (likely
> flup) in between moin and web server, but still fast.
>
> Plain CGI (not fastcgi) means loading and initializing all the code for
> each request and terminating after that one request is processed.

Although Thomas wrote that CGI is slow, it isn't necessarily super-slow, just 
slow compared to WSGI. Even then, there are lots of things that can overwhelm 
the overhead of CGI in terms of performance costs, even if you've switched to 
WSGI and are convinced that everything should be much faster.

The classic example of this is any functionality that makes use of page 
searching: perhaps long-running processes may be fortunate when scanning 
pages for, say, category information if it gets cached over time (although 
the filesystem cache would help for CGI processes, too), but enabling Xapian 
for Moin 1.x provides significant benefits regardless of the means of 
deployment.

> FastCGI as well as mod-wsgi means long-running processes which are only
> rarely terminated and restarted and thus is much faster and less
> overhead.

Agreed. Still, if things are taking 10 seconds and there isn't some kind of 
pathological script reloading going on, it may be something other than the 
deployment technology.

I have in the past enabled the timing information to spot bottlenecks, 
although this merely indicated that searches were slow and that I should 
enable Xapian support. On your site, the only unusual stuff looks like some 
banner-related JavaScript and the delightful Google Analytics code. Nothing 
like fancy but expensive Moin macros as far as I can tell.

Paul




More information about the Moin-user mailing list