Project

General

Profile

Actions

Feature #1355

closed

evaluate [[User:Aaron_Schulz/How_to_make_MediaWiki_fast]] and [[mw:Manual:Performance_tuning]]

Added by Dennis Roczek almost 9 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Category:
Wiki
Target version:
-
Start date:
Due date:
% Done:

0%

Tags:

Description

see https://www.mediawiki.org/wiki/User:Aaron_Schulz/How_to_make_MediaWiki_fast

check if something is usable for us (esp. on libreoffice helpwiki)

Actions #1

Updated by Dennis Roczek almost 9 years ago

  • Tracker changed from Bug to Feature
Actions #2

Updated by Dennis Roczek over 8 years ago

  • Status changed from New to In Progress
  1. Use cache.
  2. To LocalSettings.php, add (replace paths as needed):
    # Shared memory settings $wgMainCacheType = CACHE_ACCEL; $wgMessageCacheType = CACHE_ACCEL; $wgCacheDirectory = '<SOME DIRECTORY>'; $wgUseLocalMessageCache = true; $wgParserCacheType = CACHE_ACCEL; $wgMemCachedServers = array(); $wgUseGzip = true; $wgEnableSidebarCache = true; # NO DB HITS! $wgDisableCounters = true; $wgMiserMode = true; # Text cache $wgCompressRevisions = true; // use with care (see talk page) $wgRevisionCacheExpiry = 3*24*3600; $wgParserCacheExpireTime = 14*24*3600; # Diffs (defaults seem ok for Ubuntu and others) $wgDiff = 'C:/Server/xampp/htdocs/MW/bin/GnuWin32/bin/diff.exe'; $wgDiff3 = 'C:/Server/xampp/htdocs/MW/bin/GnuWin32/bin/diff3.exe';
  3. Set $wgCacheDirectory (above) for use with interface message caching. Make sure that the webserver has permission to make files there.
  4. Set up squid servers if possible. Otherwise, at least enable file caching.
  5. Set up Memcached if possible. If you do, set $wgMainCacheType and $wgParserCacheType to CACHE_MEMCACHED in LocalSettings.php instead. This is recommended if you have a cluster of servers.
  6. Run php maintenance/rebuildFileCache.php if you use file caching (not squids).
  7. Set $wgJobRunRate to 0 and set up a crontab or shell script to run jobs (like this with this for example). With $wgJobRunRate at 0 and the above changes, you should be able to avoid db hits on many requests.
  8. Set $wgDiff and $wgDiff3 to gnu diff utility (download as needed). This is recommended. The default PHP diff code is slow and crashy.
  9. Edit the MediaWiki:Aboutsite and MediaWiki:Pagetitle system messages by changing {{SITENAME}} into your site name. This avoids extra parsing on each hit.
  10. If you really need hitcounters, use $wgHitcounterUpdateFreq instead of the $wgDisableCounters setting above.
  11. Set up a 404 handler for $wgLocalFileRepo. If not, then at least set $wgShowArchiveThumbnails = false.
  12. Set $wgSessionsInObjectCache to true to avoid the default PHP session handler, which uses files and serializes page views for the same user. This also lets thumbnails be rendered in parallel if 404 handling is enabled.
  13. In the webserver's php.ini file. Make sure realpath_cache_size is set, perhaps to 512k or more.
  14. Consider enabling EnableMMAP and EnableSendfile in httpd.conf (for Apache). Please read the Apache docs for NFS and compatibility issues first.
  15. [MySQL] Set your mysql server config files to only use server modes corresponding to $wgSQLMode (default is "" for no modes). Restart the mysql server, and then set $wgSQLMode = null.
  16. Use FastStringSearch.

17 and 18 are tips for sql lite

all further comments in this tickets will rely on the numbers above. The MediaWiki.org page has wikilinks to the configs for the case you are interested. ;-)

Actions #3

Updated by Dennis Roczek over 8 years ago

Dennis Roczek wrote:

  1. To LocalSettings.php, add (replace paths as needed):
    > # Shared memory settings > $wgMainCacheType = CACHE_ACCEL; > $wgMessageCacheType = CACHE_ACCEL; > $wgCacheDirectory = '<SOME DIRECTORY>'; > $wgUseLocalMessageCache = true; > $wgParserCacheType = CACHE_ACCEL; > $wgMemCachedServers = array(); > $wgUseGzip = true; > $wgEnableSidebarCache = true; > > # NO DB HITS! > $wgDisableCounters = true; > $wgMiserMode = true; > > # Text cache > $wgCompressRevisions = true; // use with care (see talk page) > $wgRevisionCacheExpiry = 3*24*3600; > $wgParserCacheExpireTime = 14*24*3600; > > # Diffs (defaults seem ok for Ubuntu and others) > $wgDiff = 'C:/Server/xampp/htdocs/MW/bin/GnuWin32/bin/diff.exe'; > $wgDiff3 = 'C:/Server/xampp/htdocs/MW/bin/GnuWin32/bin/diff3.exe'; >

Done what has to be done. ;-)

Actions #4

Updated by Dennis Roczek over 8 years ago

Dennis Roczek wrote:

> > # NO DB HITS! > > $wgDisableCounters = true; > > $wgMiserMode = true; > >

these were not activated for a reason at the moment. I do want to talk to Björn first.

And only for TDFWIKI atm.

Actions #5

Updated by Dennis Roczek over 8 years ago

Dennis Roczek wrote:

Dennis Roczek wrote:

> > > # NO DB HITS! > > > $wgDisableCounters = true; > > > $wgMiserMode = true; > > >

these were not activated for a reason at the moment. I do want to talk to Björn first.

And only for TDFWIKI atm.

As discussed in the infra-call: $wgDisableCounters = true; is now set or was already set. :-)

Stats can be accessed through piwik

Actions #6

Updated by Dennis Roczek over 8 years ago

  • Subject changed from evaluate [[User:Aaron_Schulz/How_to_make_MediaWiki_fast]] to evaluate [[User:Aaron_Schulz/How_to_make_MediaWiki_fast]] and [[mw:Manual:Performance_tuning]]
Actions #7

Updated by Beluga Beluga about 2 years ago

After 2015, new stuff has been added to the perf tuning article.

Also, I would like to see this activated: https://www.mediawiki.org/wiki/Manual:$wgNativeImageLazyLoading

Actions #8

Updated by Guilhem Moulin about 2 years ago

  • Assignee changed from Dennis Roczek to Guilhem Moulin

Beluga Beluga wrote in #note-7:

After 2015, new stuff has been added to the perf tuning article.

Wasn't aware of this ticket but AFAICT the suggested perf tunables have been implemented ages ago already. :-)

Also, I would like to see this activated: https://www.mediawiki.org/wiki/Manual:$wgNativeImageLazyLoading

Thanks for the pointer, done and closing.

Actions #9

Updated by Guilhem Moulin about 2 years ago

  • Status changed from In Progress to Closed
Actions

Also available in: Atom PDF