We have a MediaWiki installation and are getting complaints that it is becoming slower. How can we increase the speed / performance?

I have one tip (which I'll add below) but I'm really interested in hearing more. Preferably one tip per answer.

link|improve this question

1  
Here's a useful link I found: dom.as/2007/01/26/mediawiki-performance-tuning – Wikis Nov 12 '10 at 10:25
feedback

5 Answers

up vote 1 down vote accepted

Switch on caching in LocalSettings.php. Do this by adding / changing this line:

$wgMainCacheType = CACHE_ACCEL;

See Manual:Cache and this mwusers page.

link|improve this answer
feedback

First of all you have to Be sure That You use Apache Server'''. Mediawiki is slower if you have installed on Windows Server Or IIS. If it is on the Windows Server Move the Application Folders to Linux Server. Windows and Linux Server for Mediawiki Guide

link|improve this answer
feedback

This may not be relevant with current versions of MW, but check the php setting mbstring.func_overload. I set it to 2 (as a re-requisite for a small zabbix installation) and it killed the performance of a 1.12 install of MW on the same server.

link|improve this answer
thx! Will check it out. – Wikis Nov 12 '10 at 10:53
according to :mediawiki.org/wiki/PHP_configuration mbstring.func_overload This option causes errors and may corrupt data unpredictably; MediaWiki will refuse to install if this option is turned on. So I guess this is not applicable. – Wikis Nov 19 '10 at 10:50
feedback

Use a php opcode cacher, make sure dB is not the bottleneck, consider using a http cacher like varnish.

link|improve this answer
can you give me a bit more detail here? E.g. links, how to know whether the DB is the bottleneck, what an http cacher is? I'm not that knowledgeable of the back end details. – Wikis Nov 12 '10 at 19:59
Google for mysqltuner.pl, or use mysql-tuner.sh from day32.com/MySQL, they'll tell you if you need to beef up buffers, if queries are running slow etc. Varnish is a reverse proxy type service which can cache dynamic web pages, the learning curve is a bit steep but it's a high end service so it's really worth checking out. The order of how you should investigate is (a part from the obvious like network throughput) probably 1) opcode cacher 2) determine how db is doing/performing and 3) varnish. – 3molo Nov 12 '10 at 20:04
Mediawiki even have an article about caching with varnish! mediawiki.org/wiki/Manual:Varnish_caching – 3molo Nov 12 '10 at 20:04
Forgot to mention that mediawiki also suggests using memcached for caching between the database and the actual site, see mediawiki.org/wiki/Memcached – 3molo Nov 12 '10 at 20:06
OK, thanks will check these out. – Wikis Nov 19 '10 at 10:28
feedback

See these tips: MediaWiki is slow, how can I make it faster?

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.