Thread:Project:Support desk/Very slow MW website, possibly due to database/reply (3)

Hi Lalit,

1) So MySQL is generally slow. There are plenty of different things you might want to check in order to make MySQL faster. There are a few tuning scripts around, e.g. "MySQLTuner.pl" or "Tuning-Primer.sh". They might give you first ideas of what to change. Note, however, that not everything, what these scripts propose, _must_ make sense in your case. For example adjusting "innodb_buffer_pool_size" might make sense. E.g. increase it to 80% of the memory of your dedicated host.

2) If a few single queries were slow, I would have run these queries with EXPLAIN . MySQL will then return its query plan, which will show you, how MySQL would execute the query. That will show you, if indeces are used (and if so: which ones), or if a complete table scan would be done. That would show you where you can optimize the query or the DB. (And these optimizations then would also make sense to be integrated in the MediaWiki core software). However, I think their database layout and queries are quite fine. ;-)

3) InnoDB for most tables is good. Which ones are not InnoDB?

4) Maybe MySQL optimizes tables by itself from time to time, e.g. every week or when it crashed, but I am not sure about that. In a time when your server is not used much (e.g. in the night) you should make a DB backup with mysqldump --opt .... This will make sure that your tables are optimized afterwards and you will get a backup of your DB (just in case)...

6) MediaWiki's fil cache would render Wiki pages to HTML files. You could try that; see, if it helps. What I mean is a PHP accelerator. There are several around like APC or XCache.