Aus SatriaWiki
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: „== Geschwindigkeit erhöhen == # Use [http://www.mediawiki.org/wiki/Manual:Cache cache]. # To [http://www.mediawiki.org/wiki/Manual:LocalSettings.php LocalSetting…“)
 
K
Zeile 1: Zeile 1:
 
== Geschwindigkeit erhöhen ==
 
== Geschwindigkeit erhöhen ==
 
# Use [http://www.mediawiki.org/wiki/Manual:Cache cache].
 
# Use [http://www.mediawiki.org/wiki/Manual:Cache cache].
# To [http://www.mediawiki.org/wiki/Manual:LocalSettings.php LocalSettings.php], add (replace paths as needed):<syntaxhighlight lang="php" enclose="div">
+
# To [http://www.mediawiki.org/wiki/Manual:LocalSettings.php LocalSettings.php], add (replace paths as needed):
# Shared memory settings<br>
+
<i>Shared memory settings</i><br>
## $wgMainCacheType = CACHE_ACCEL;<br>
+
$wgMainCacheType = CACHE_ACCEL;<br>
## $wgMessageCacheType = CACHE_ACCEL;<br>
+
$wgMessageCacheType = CACHE_ACCEL;<br>
## $wgCacheDirectory = '<SOME DIRECTORY>';<br>
+
$wgCacheDirectory = '<SOME DIRECTORY>';<br>
## $wgParserCacheType = CACHE_ACCEL;<br>
+
$wgParserCacheType = CACHE_ACCEL;<br>
## $wgMemCachedServers = array();<br>
+
$wgMemCachedServers = array();<br>
## $wgUseGzip = true;<br>
+
$wgUseGzip = true;<br>
## $wgEnableSidebarCache = true;<br>
+
$wgEnableSidebarCache = true;<br>
  
# NO DB HITS!
+
<i>NO DB HITS!</i><br>
## $wgDisableCounters = true;<br>
+
$wgDisableCounters = true;<br>
## $wgMiserMode = true;<br>
+
$wgMiserMode = true;<br>
  
# Text cache
+
<i>Text cache</i><br>
## $wgCompressRevisions = true;<br>
+
$wgCompressRevisions = true;<br>
## $wgRevisionCacheExpiry = 3*24*3600;<br>
+
$wgRevisionCacheExpiry = 3*24*3600;<br>
## $wgParserCacheExpireTime = 14*24*3600;<br>
+
$wgParserCacheExpireTime = 14*24*3600;<br>
  
 
# Diffs
 
# Diffs
## $wgDiff = 'C:/Server/xampp/htdocs/MW/bin/GnuWin32/bin/diff.exe';<br>
+
$wgDiff = 'C:/Server/xampp/htdocs/MW/bin/GnuWin32/bin/diff.exe';<br>
## $wgDiff3 = 'C:/Server/xampp/htdocs/MW/bin/GnuWin32/bin/diff3.exe';<br>
+
$wgDiff3 = 'C:/Server/xampp/htdocs/MW/bin/GnuWin32/bin/diff3.exe';<br>
  
 
# '''Set [http://www.mediawiki.org/wiki/Manual:$wgCacheDirectory $wgCacheDirectory]''' (above) to use interface message caching.
 
# '''Set [http://www.mediawiki.org/wiki/Manual:$wgCacheDirectory $wgCacheDirectory]''' (above) to use interface message caching.
Zeile 37: Zeile 37:
  
 
== Quellen ==
 
== Quellen ==
http://www.mediawiki.org/wiki/User:Aaron_Schulz/How_to_make_MediaWiki_fast
+
http://www.mediawiki.org/wiki/User:Aaron_Schulz/How_to_make_MediaWiki_fast<br>
 
http://www.siteground.com/tutorials/websiteperformance/optimize_mediawiki.htm
 
http://www.siteground.com/tutorials/websiteperformance/optimize_mediawiki.htm

Version vom 16. April 2012, 10:53 Uhr

Geschwindigkeit erhöhen

  1. Use cache.
  2. To LocalSettings.php, add (replace paths as needed):

Shared memory settings
$wgMainCacheType = CACHE_ACCEL;
$wgMessageCacheType = CACHE_ACCEL;
$wgCacheDirectory = '<SOME DIRECTORY>';
$wgParserCacheType = CACHE_ACCEL;
$wgMemCachedServers = array();
$wgUseGzip = true;
$wgEnableSidebarCache = true;

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

Text cache
$wgCompressRevisions = true;
$wgRevisionCacheExpiry = 3*24*3600;
$wgParserCacheExpireTime = 14*24*3600;

  1. Diffs

$wgDiff = 'C:/Server/xampp/htdocs/MW/bin/GnuWin32/bin/diff.exe';
$wgDiff3 = 'C:/Server/xampp/htdocs/MW/bin/GnuWin32/bin/diff3.exe';

  1. Set $wgCacheDirectory (above) to use interface message caching.
  2. Set up caching squid servers if possible. Otherwise, at least enable file caching.
  3. 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.
  4. Run php maintenance/rebuildFileCache.php if you use file caching (not squids).
  5. 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.
  6. Set $wgDiff and $wgDiff3 to gnu diff utility (download as needed). This is recommended. The default PHP diff code is slow and crashy.
  7. Edit the MediaWiki:Aboutsite and MediaWiki:Pagetitle system messages by changing {{SITENAME}} into your site name. This avoids extra parsing on each hit.
  8. If you really need hitcounters, use $wgHitcounterUpdateFreq instead of the $wgDisableCounters setting above.
  9. In the webserver's php.ini file. Make sure realpath_cache_size is set, perhaps to 512k or more.
  10. Consider enabling EnableMMAP and EnableSendfile in httpd.conf (for Apache). Please read the apache docs for NFS and compatibility issues first.
  11. [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.

Quellen

http://www.mediawiki.org/wiki/User:Aaron_Schulz/How_to_make_MediaWiki_fast
http://www.siteground.com/tutorials/websiteperformance/optimize_mediawiki.htm