New thread: Caching issue makes MediaWiki painfully slow
New page
Hi folks,
MediaWiki behaves very differently with PHP op-code caching enabled/disabled: WITH caching, page loads take roughly 10s each; WITHOUT caching, page loads take less than 1s.
First off, stack info:
* nginx 1.2.6 with PHP handled by PHP-FPM
* MySQL 5.5.29-1
* PHP 5.3.21-1 with XCache 3.0.1, Suhosin 0.9.33
* MediaWiki 1.20.2 with Nuke 1.1.7, Renameuser, ParserFunctions 1.4.1, Vector 0.3.0, WikiEditor 0.3.1
So, I had a MediaWiki 1.15 setup working, and decided to upgrade to MediaWiki 1.20. After upgrading, I noticed a significant performance degradation in page load time (above 10s).<br/>
Investigation led me to try and comment out the <code>$wgMainCacheType = CACHE_ACCEL;</code> directive in LocalSettings.php. This seemed to solve the issue (below 1s load time).
However, this is more of a workaround than a real solution. So I'm asking for help here, to find the real cause to the problem, and a cure for it.<br/>
Here are links to profiling logs generated with and without caching:
* WITH caching: [http://pastebin.com/ALGsqm0D]
* WITHOUT caching: [http://pastebin.com/3uiB0Y6v]
Looks like most of the 10s loading time is being eaten up in function MessageCache::load().<br/>
The following message seems weird to me:
* WITH caching: <pre>MessageCache::load: Loading fr... cache is empty, loading from database, loading FAILED - cache is disabled</pre>
* WITHOUT caching: <pre>MessageCache::load: Loading fr... got from global cache</pre>
Could it be that MessageCache::load() waits for something and times out after 10s? If so, what would it be waiting for? How do I fix it?<br/>
During installation, MediaWiki did not report any issue with my setup.
At any rate, here is the XCache part of the phpinfo() output. XCache reports to be enabled indeed: [http://pastebin.com/LnGw73uN].
Can anyone suggest a course of action to further investigate this issue?<br/>
Unfortunately, the wiki is private and I cannot provide a URL for accessing it.
Thanks a bunch in advance,<br/>
Quentin
MediaWiki behaves very differently with PHP op-code caching enabled/disabled: WITH caching, page loads take roughly 10s each; WITHOUT caching, page loads take less than 1s.
First off, stack info:
* nginx 1.2.6 with PHP handled by PHP-FPM
* MySQL 5.5.29-1
* PHP 5.3.21-1 with XCache 3.0.1, Suhosin 0.9.33
* MediaWiki 1.20.2 with Nuke 1.1.7, Renameuser, ParserFunctions 1.4.1, Vector 0.3.0, WikiEditor 0.3.1
So, I had a MediaWiki 1.15 setup working, and decided to upgrade to MediaWiki 1.20. After upgrading, I noticed a significant performance degradation in page load time (above 10s).<br/>
Investigation led me to try and comment out the <code>$wgMainCacheType = CACHE_ACCEL;</code> directive in LocalSettings.php. This seemed to solve the issue (below 1s load time).
However, this is more of a workaround than a real solution. So I'm asking for help here, to find the real cause to the problem, and a cure for it.<br/>
Here are links to profiling logs generated with and without caching:
* WITH caching: [http://pastebin.com/ALGsqm0D]
* WITHOUT caching: [http://pastebin.com/3uiB0Y6v]
Looks like most of the 10s loading time is being eaten up in function MessageCache::load().<br/>
The following message seems weird to me:
* WITH caching: <pre>MessageCache::load: Loading fr... cache is empty, loading from database, loading FAILED - cache is disabled</pre>
* WITHOUT caching: <pre>MessageCache::load: Loading fr... got from global cache</pre>
Could it be that MessageCache::load() waits for something and times out after 10s? If so, what would it be waiting for? How do I fix it?<br/>
During installation, MediaWiki did not report any issue with my setup.
At any rate, here is the XCache part of the phpinfo() output. XCache reports to be enabled indeed: [http://pastebin.com/LnGw73uN].
Can anyone suggest a course of action to further investigate this issue?<br/>
Unfortunately, the wiki is private and I cannot provide a URL for accessing it.
Thanks a bunch in advance,<br/>
Quentin
No comments:
Post a Comment