Wikipedia clone runs very slow
We are having an issue with page access on our Wikipedia clone.
We used the latest MediaWiki, v. 1.16.2 as well as the January 15, 2011 Wikipedia dump fromdownload:enwiki/20101011/ Our server is running Ubuntu 10.10 64bit Desktop Edition. In addition, we are using PHP v. 5.3.3, MySQL v. 5.1.49, and Apache v. 2.2.16.
Depending on the page we query, response time varies from 15 second to simply timing out.
Has anybody seen this issue or know how we can achieve a query time on par with the actual Wikipedia website?
You can access the webpage from http://66.253.205.138/wikipedia
Thank You, TJ
Thank you for replying to our post Bryan.
We installed php-apc, but this did not have any noticeable effect on the first time load speeds of our Wikipedia webpages.
Do you have any idea what could be causing our load speed to be so slow?
Thank You, TJ
Check the tips in Manual:Performance_tuning
Have you tried reducing the number of calls on the parser? For instance, if you have say 400 {{cite...}} templates on a Wikipedia page, it may take 30 seconds for the page to load because of all the #if's in the citation template.
Thank you all for the responses.
We installed memcached and enabled it in LocalSettings.php, however there was no noticeable gain in load times. We then attempted to enable output caching according to the Performance_tuning page, but the webpages are not being cached either.
The settings we used in LocalSettings.php are the following:
$wgMainCacheType = CACHE_MEMCACHED; $wgParserCacheType = CACHE_MEMCACHED; $wgMessageCacheType = CACHE_MEMCACHED; $wgMemCachedServers = array(); $wgSessionsInMemcached = true; $wgUseFileCache = true; $wgFileCacheDirectory = "/var/www/wikipedia/cache";
We created the cache directory with full read/write/execute (777) permissions for all users, so it should not be a permissions problem.
Thank You, TJ
If $wgMemCachedServers is set to an empty array, I don't think memcached will end up actually being used.
Thanks for responding Emufarmers.
We've changed out MediaWiki LocalSettings file as you suggested and added our server to the list of memcached servers:
$wgMemCachedServers = array("127.0.0.1:11211");
We then rebooted the server and tested to see if there was any noticeable changes.
Unfortunately, there was no noticeable change in load speeds. The web pages are being successfully cached in the cache directory, however it does not appear that they are being used when initially loading the websites (initial load takes up to 10 minutes).
Refreshing the pages is very fast, however it pales in comparison to the initial load time.
You need an opcode cache, among other things. Look at Manual:Performance tuning and Manual:Cache more carefully.