[moin-user] MoinMoin very slow

Paul Boddie paul at boddie.org.uk
Thu Nov 2 12:42:20 EDT 2017


On Thursday 2. November 2017 15.58.04 Volker Wysk wrote:
> Am Donnerstag, 2. November 2017, 13:11:36 CET schrieb Paul Boddie:
> > I imagine that we might need to dig deeper to see where Moin is spending
> > all its time. Did you look at the following page, by the way...?
> > 
> > https://moinmo.in/HowTo/Tune%20Performance
> 
> Now I have.
> 
> Can it because of using CGI instead of WSGI?

No, not for one page load being slow, as in this case. Although Moin probably 
gets some benefit having processes active rather than needing to have them 
spawned when a request arrives, it isn't like it is really slow because it 
needs to have a lot of expensively-computed content sitting in some buffer 
ready for subsequent requests.

In other words, Moin isn't really one of those Web applications that is so 
slow that it needs to permanently sit there taking up lots of memory, like a 
Java application server or something.

> I've also tried "log_reverse_dns_lookups = False", but it's still slow.

OK. Good to have that confirmed, anyway.

Was this performance issue something that just started to happen, or is it 
that you finally made a big page and then saw that it was slow?

Looking at your statistics again, I see that part of the block of time being 
consumed is this:

Page.execute = 20.668s

Now, this is supposedly concerned with just delivering the cached content 
(either generated previously or for this request). But I wonder whether it 
should really take very long given that what it should be doing is executing a 
compiled representation of the content. For me, it takes hardly any time at 
all within all the time used by a request.

I'm wondering if there's a convenient way of profiling Moin. The wiki has some 
old pages about profiling, but I see that in the CGI script, there's a way of 
generating a profile:

class Config(CgiConfig):
    # Server name - used to create .prof files
    name = 'moin'

    # Properties
    # Allow overriding any request property by the value defined in
    # this dict e.g properties = {'script_name': '/mywiki'}.
    ## properties = {}

    # Hotshot profile (default commented)
    ## hotshotProfile = name + '.prof'

If you change the last part to something like this...

    hotshotProfile = "/tmp/moin.prof"

...this will hopefully generate profiling information (without complaining 
about permissions), and it can be converted to readable information as 
follows:

hotshot2calltree -o /tmp/moin.tree /tmp/moin.prof

We can probably even use other tools to visualise this nicely:

kcachegrind /tmp/moin.tree

Although my brief tests don't provide so much useful information, maybe there 
is something more interesting in any data you can generate.

Paul


More information about the moin-user mailing list