Hiya.
The Nottingham OpenGuide[1] takes a considerable time to load the front page; if the machine it's on is using its CPU for anything else, at the time, it takes even longer. While it's loading, mysqld is taking up ~90% of the CPU time according to 'top', running (as far as I can tell) the query that generates the list of recent changes.
I had just put it down a One Of Those Things, but I noticed that the other, larger guides such as Oxford and London *don't* have this problem. So, I'm left thinking it's something I've not configured properly -- has anyone got any clues what that might be? People have mentioned MySQL indexes to me, but my understanding of what's going on with them is roughly nil.
Any suggestions are very welcome indeed...
Cheers, James.
[1] http://nottingham.openguides.org/
On Sun 12 Sep 2004, James Green jkg@earth.li wrote:
The Nottingham OpenGuide[1] takes a considerable time to load the front page; if the machine it's on is using its CPU for anything else, at the time, it takes even longer. While it's loading, mysqld is taking up ~90% of the CPU time according to 'top', running (as far as I can tell) the query that generates the list of recent changes. [...] People have mentioned MySQL indexes to me, but my understanding of what's going on with them is roughly nil.
Could be indexes - see the SQL in CGI::Wiki::Setup::MySQL - http://search.cpan.org/src/KAKE/CGI-Wiki-0.54/lib/CGI/Wiki/Setup/MySQL.pm
The relevant line is CREATE INDEX metadata_index ON metadata(node, version, metadata_type, metadata_value(10))
The MySQL docs at http://dev.mysql.com/doc/mysql/en/index.html might be of help. In particular, depending on when you ran cgi-wiki-setupdb, you may not actually have the index there; I can't remember when I added it to the SQL.
Kake
On Sun, Sep 12, 2004 at 04:20:30PM +0100, Kake L Pugh wrote:
Could be indexes - see the SQL in CGI::Wiki::Setup::MySQL - http://search.cpan.org/src/KAKE/CGI-Wiki-0.54/lib/CGI/Wiki/Setup/MySQL.pm
Yup, creating that index has improved the response time immensely. Thanks!
[..] In particular, depending on when you ran cgi-wiki-setupdb, you may not actually have the index there; I can't remember when I added it to the SQL.
Looks like it was roughly February this year. Anyway, sorted now. Thanks again :)
James. -- jkg((-.+)?@(|the.)earth.li|@(jimbo|wonky).org.uk|03u@cs.nott.ac.uk) I didn't do it! Nobody saw me do it! Can't prove anything! -- Bart Simpson
openguides-dev@lists.openguides.org