Difference between revisions of "Setup:Installation Manual/Optimization/Caching"
← Setup:Installation Manual/Optimization/Caching
[unchecked revision] | [quality revision] |
(Created page with "{{DISPLAYTITLE:Caching}} __TOC__ This document describes different caching options to enhance the performance of your BlueSpice installation. ==Tips for the Document== * Pl...") |
Fbaeckmann (talk | contribs) (Tag: 2017 source edit) |
Contents
- 1 Tips for the Document
- 2 Linux vs. Windows
- 3 Indicate Cache-Directory angeben
- 4 Namensauflösung der Datenbank Name Resolution of the Database
- 5 Activate Memcached aktivieren
- 6 Increase PHP Memory Limit erhöhen
- 7 Activate Bytecode Cache in PHP aktivieren
- 8 Deactivate JobQueue deaktiviere
This document describes different caching options to enhance the performance of your BlueSpice installation.
Tips for the Document[edit | edit source]
- Please, read this manual completely and work through the single installtion installation steps one after another.
- For editing the configuration files with a text editor, the files must be saved in UTF-8 coding without BOM (Byte Order Mark).
-
The placeholder
<installpath-bluespice>
stands for the path to your BlueSpice installation, e.gC:\inetpub\wwwroot\bluespice
(Windows) or/var/www/bluespice
(Linux).
Linux vs. Windows[edit | edit source]
Please note that with equal hardware conditions, BlueSpice empirically runs more performantly on Linux than on Windows servers.
Indicate Cache-Directory angeben[edit | edit source]
This forces BlueSpice to use the filesystem instead of the database for some internal caches. To do this, create the file <installpath-bluespice>
/settings.d/001-Directories.php and add the following content:
<?php
$wgCacheDirectory = "$IP/cache";
Save and close the file. left Beachten Sie, dass das Verzeichnis
<installpath-bluespice>
durch den Webserver beschreibbar sein muss. Nähere Informationen erhalten Sie auf der Seite Dateisystemrechte.Namensauflösung der Datenbank must be writable by the web server. For more information, read the file system permissions.
Name Resolution of the Database[edit | edit source]
Sofern Sie dies nicht beim Setup von MediaWiki bereits beachtet haben sorgen Sie dafür, dass der Datenbankserver, sollte er auf dem selben Server wie BlueSpice liegen, möglichst über die IP angesprochen wird. Insbesondere Windows hat sehr oft Probleme beim Auflösen von "localhost".
Öffnen Sie hierzu If this hasn't already been done while setting up MediaWiki, please make sure that the database server will be adressed via IP if it runs on the same server than BlueSpice. Especially Windows has problems with the resolution of "localhost".
To do this, open <installpath-bluespice>
/LocalSettings.php und suchen die Variable $wgDBserver. Die Zeile sollte im Idealfall lauten and locate the variable $wgDBserver. The line should ideally be:
$wgDBserver = "127.0.0.1";
Activate Memcached aktivieren[edit | edit source]
Erstellen Sie hierfür die Datei Create the file <installpath-bluespice>
/settings.d/001-Memcached.php und fügen Sie dort folgenden Inhalt ein: Speichern und schließen Sie die Datei.
left Voraussetzung hierfür ist ein installierter und konfigurierter Memcached-Server auf dem BlueSpice-Server. Informationen hierzu erhalten Sie auf der Seite Memcached.
PHP Memory Limit erhöhenand add the following content:
<?php
$wgMainCacheType = CACHE_MEMCACHED;
$wgSessionCacheType = CACHE_DB;
$wgMemCachedServers = [ "127.0.0.1:11211" ];
Save and close the file.
Increase PHP Memory Limit[edit | edit source]
Ein höheres Speicherlimit von PHP führt zu einer schnelleren Ausführung. Dies kann in der A higher memory limit of PHP results in a faster execution. ¶ This can be changed in php.ini geändert werden. Suchen Sie dort nach folgender Option und passen Sie diese an. Locate and adjust the following option:
memory_limit = 512M (entsp.means 512 MB - jevaries nachfrom verfügbaremthe Arbeitsspeicheravailable variabelmemory)
Nach dem Abspeichern und Schließen der After saving and closing php.ini muss der Webserver neu gestartet werden, the web server must be restarted.
Activate Bytecode Cache in PHP aktivieren[edit | edit source]
Seit PHP Since PHP 5.5 wird der Bytecode Cache the bytecode cache "opcache" mit ausgeliefertis included.
Dieser muss zunächst in der This needs to be activated in the php.ini aktiviert werden. Überprüfen Sie dort, ob das Modul eingebunden ist. Dies erfolgt über die Zeile first. Check if the module is integrated there. This is done via the line:
zend_extension=opcache.dll (Windows) zend_extension=opcache.so (Linux)
left Beachten Sie unter Linux bitte zusätzlich die jeweiligen Vorgaben des jeweiligen Distributors zum Aktivieren von PHP-Modulen.
Nehmen Sie folgende Konfiguration des opcache in der php.ini vor. Im Regelfall sollten alle Optionen bereits vorhanden, aber mit Semikolon (;) am Zeilenanfang auskommentiert sein. Suchen Sie die jeweilige Option in der php.ini, entfernen das Semikolon am Zeilenanfang und passen Sie die Einstellungen wie folgt an Please also note the specification of the distributor for activating PHP modules under Linux.
Please, do the following configuration of the opcache in php.ini. Normally, all options should already exist, but are commented out by semicolon (;) at the beginning of the line. Locate the respective option in php.ini, remove the semicolon at the beginning of the line and adjust the settings as follows:
opcache.enable=1 opcache.memory_consumption=512 (entsp.means 512 MB - jevaries nachfrom verfügbaremthe Arbeitsspeicheravailable variabelmemory) opcache.max_accelerated_files=5000 opcache.validate_timestamps=1 opcache.revalidate_freq=2
Nach dem Abspeichern und Schließen der After saving and closing php.ini muss der Webserver neu gestartet werden, the web server must be restarted.
Deactivate JobQueue deaktiviere[edit | edit source]
Lesen Sie hierzu den Abschnitt For this, read the paragraph "runJobs.php" auf der Seite in the "Cronjobs" article.
{{DISPLAYTITLE:Caching}} __TOC__ This document describes different caching options to enhance the performance of your BlueSpice installation. ==Tips for the Document== * Please, read this manual completely and work through the single installtioninstallation steps one after another. * For editing the configuration files with a text editor, the files must be saved in UTF-8 coding without BOM (Byte Order Mark). * The placeholder <code><installpath-bluespice></code> stands for the path to your BlueSpice installation, e.g <code>C:\inetpub\wwwroot\bluespice</code> (Windows) or <code>/var/www/bluespice</code> (Linux). ==Linux vs. Windows== Please note that with equal hardware conditions, BlueSpice empirically runs more performantly on Linux than on Windows servers. ==Indicate Cache-Directory angeben== This forces BlueSpice to use the filesystem instead of the database for some internal caches. To do this, create the file <code><installpath-bluespice></code>/settings.d/001-Directories.php and add the following content: <pre><source lang="php"> <?php $wgCacheDirectory = "$IP/cache"; </pre></source> Save and close the file. [[Datei:Hinweis.jpg|left]] '''Beachten Sie, dass das Verzeichnis [[File:Hint.jpg|left]] '''Note that the directory "cache" in <code><installpath-bluespice></code> durch den Webserver beschreibbar sein muss. Nähere Informationen erhalten Sie auf der Seite [[Setup:Installationshandbuch/Sicherheitseinstellungen/Dateisystemrechte|Dateisystemrechte]].''' ==Namensauflösung der Datenbank== Sofern Sie dies nicht beim [[Setup:Installationshandbuch/MediaWiki|Setup von MediaWiki]] bereits beachtet haben sorgen Sie dafür, dass der Datenbankserver, sollte er auf dem selben Server wie BlueSpice liegen, möglichst über die IP angesprochen wird. Insbesondere Windows hat sehr oft Probleme beim Auflösen von "localhost". Öffnen Sie hierzu must be writable by the web server. For more information, read the [[Setup:Installation Guide/Security Settings/File System Permissions|file system permissions]].''' ==Name Resolution of the Database== If this hasn't already been done while setting up MediaWiki, please make sure that the database server will be adressed via IP if it runs on the same server than BlueSpice. Especially Windows has problems with the resolution of "localhost". To do this, open <code><installpath-bluespice></code>/LocalSettings.php und suchen die Variable '''$wgDBserver'''. Die Zeile sollte im Idealfall lauten and locate the variable '''$wgDBserver'''. The line should ideally be: $wgDBserver = "127.0.0.1"; ==Activate Memcached aktivieren== Erstellen Sie hierfür die Datei == Create the file <code><installpath-bluespice></code>/settings.d/001-Memcached.php und fügen Sie dort folgenden Inhalt ein: Speichern und schließen Sie die Datei.<br /><br /> [[Datei:Hinweis.jpg|left]] '''Voraussetzung hierfür ist ein installierter und konfigurierter Memcached-Server auf dem BlueSpice-Server. Informationen hierzu erhalten Sie auf der Seite [[Setup:Installationshandbuch/Systemkonfigurationen/Memcached|Memcached]].''' ==PHP Memory Limit erhöhen== Ein höheres Speicherlimit von PHP führt zu einer schnelleren Ausführung. Dies kann in der php.ini geändert werden. Suchen Sie dort nach folgender Option und passen Sie diese an: memory_limit = 512M ''(entsp. 512 MB - je nach verfügbarem Arbeitsspeicher variabel)'' Nach dem Abspeichern und Schließen der php.ini muss der Webserver neu gestartet werden. ==and add the following content: <source lang="php"> <?php $wgMainCacheType = CACHE_MEMCACHED; $wgSessionCacheType = CACHE_DB; $wgMemCachedServers = [ "127.0.0.1:11211" ]; </source> Save and close the file.<br /><br /> [[File:Hint.jpg|left]]'''The prerequisite is an installed and configured memcached server on the BlueSpice server. Read the [[Setup:Installation_Guide/System_Preparation/Linux/Memcached|memcached]] article for more information.''' ==Increase PHP Memory Limit== A higher memory limit of PHP results in a faster execution. ¶ This can be changed in php.ini. Locate and adjust the following option: memory_limit = 512M ''(means 512 MB - varies from the available memory)'' After saving and closing php.ini, the web server must be restarted. ==Activate Bytecode Cache in PHP aktivieren== Seit PHP 5.5 wird der Bytecode Cache "opcache" mit ausgeliefert. Dieser muss zunächst in der php.ini aktiviert werden. Überprüfen Sie dort, ob das Modul eingebunden ist. Dies erfolgt über die Zeile == Since PHP 5.5 the bytecode cache "opcache" is included. This needs to be activated in the php.ini first. Check if the module is integrated there. This is done via the line: zend_extension=opcache.dll (Windows) zend_extension=opcache.so (Linux) [[Datei:HinweisFile:Hint.jpg|left]] '''Beachten Sie unter Linux bitte zusätzlich die jeweiligen Vorgaben des jeweiligen Distributors zum Aktivieren von PHP-Modulen.''' Nehmen Sie folgende Konfiguration des opcache in der php.ini vor. Im Regelfall sollten alle Optionen bereits vorhanden, aber mit Semikolon (''';''') am Zeilenanfang auskommentiert sein. Suchen Sie die jeweilige Option in der php.ini, entfernen das Semikolon am Zeilenanfang und passen Sie die Einstellungen wie folgt anPlease also note the specification of the distributor for activating PHP modules under Linux.''' Please, do the following configuration of the opcache in php.ini. Normally, all options should already exist, but are commented out by semicolon (;) at the beginning of the line. Locate the respective option in php.ini, remove the semicolon at the beginning of the line and adjust the settings as follows: opcache.enable=1 opcache.memory_consumption=512 ''(entsp.means 512 MB - je nach verfügbarem Arbeitsspeicher variabelvaries from the available memory)'' opcache.max_accelerated_files=5000 opcache.validate_timestamps=1 opcache.revalidate_freq=2 Nach dem Abspeichern und Schließen der php.ini muss der Webserver neu gestartet werden. ==JobQueue deaktiviere== Lesen Sie hierzu den [[Setup:Installationshandbuch/Optimierungen/Cronjobs#runJobs.php|Abschnitt "runJobs.php" auf der Seite "Cronjobs"]].After saving and closing php.ini, the web server must be restarted. ==Deactivate JobQueue== For this, read the [[Setup:Installation Manual/Optimization/Cronjobs#runJobs.php|paragraph "runJobs.php" in the "Cronjobs" article]]. [[en:{{FULLPAGENAME}}]][[de:Setup:Installationsanleitung/Optimierungen/Caching]]
(13 intermediate revisions by 5 users not shown) | |||
Line 6: | Line 6: | ||
==Tips for the Document== | ==Tips for the Document== | ||
− | * Please, read this manual completely and work through the single | + | * Please, read this manual completely and work through the single installation steps one after another. |
* For editing the configuration files with a text editor, the files must be saved in UTF-8 coding without BOM (Byte Order Mark). | * For editing the configuration files with a text editor, the files must be saved in UTF-8 coding without BOM (Byte Order Mark). | ||
* The placeholder <code><installpath-bluespice></code> stands for the path to your BlueSpice installation, e.g <code>C:\inetpub\wwwroot\bluespice</code> (Windows) or <code>/var/www/bluespice</code> (Linux). | * The placeholder <code><installpath-bluespice></code> stands for the path to your BlueSpice installation, e.g <code>C:\inetpub\wwwroot\bluespice</code> (Windows) or <code>/var/www/bluespice</code> (Linux). | ||
Line 13: | Line 13: | ||
Please note that with equal hardware conditions, BlueSpice empirically runs more performantly on Linux than on Windows servers. | Please note that with equal hardware conditions, BlueSpice empirically runs more performantly on Linux than on Windows servers. | ||
− | ==Indicate Cache-Directory | + | ==Indicate Cache-Directory== |
This forces BlueSpice to use the filesystem instead of the database for some internal caches. | This forces BlueSpice to use the filesystem instead of the database for some internal caches. | ||
To do this, create the file <code><installpath-bluespice></code>/settings.d/001-Directories.php and add the following content: | To do this, create the file <code><installpath-bluespice></code>/settings.d/001-Directories.php and add the following content: | ||
− | < | + | <source lang="php"> |
<?php | <?php | ||
$wgCacheDirectory = "$IP/cache"; | $wgCacheDirectory = "$IP/cache"; | ||
− | </ | + | </source> |
Save and close the file. | Save and close the file. | ||
− | |||
− | + | [[File:Hint.jpg|left]] '''Note that the directory "cache" in <code><installpath-bluespice></code> must be writable by the web server. For more information, read the [[Setup:Installation Guide/Security Settings/File System Permissions|file system permissions]].''' | |
− | |||
− | + | ==Name Resolution of the Database== | |
+ | If this hasn't already been done while setting up MediaWiki, please make sure that the database server will be adressed via IP if it runs on the same server than BlueSpice. Especially Windows has problems with the resolution of "localhost". | ||
+ | |||
+ | To do this, open <code><installpath-bluespice></code>/LocalSettings.php and locate the variable '''$wgDBserver'''. The line should ideally be: | ||
$wgDBserver = "127.0.0.1"; | $wgDBserver = "127.0.0.1"; | ||
− | ==Memcached | + | ==Activate Memcached== |
− | + | Create the file <code><installpath-bluespice></code>/settings.d/001-Memcached.php and add the following content: | |
− | + | <source lang="php"> | |
+ | <?php | ||
− | [ | + | $wgMainCacheType = CACHE_MEMCACHED; |
+ | $wgSessionCacheType = CACHE_DB; | ||
+ | $wgMemCachedServers = [ "127.0.0.1:11211" ]; | ||
+ | </source> | ||
− | + | Save and close the file.<br /><br /> | |
− | |||
− | |||
− | + | [[File:Hint.jpg|left]]'''The prerequisite is an installed and configured memcached server on the BlueSpice server. Read the [[Setup:Installation_Guide/System_Preparation/Linux/Memcached|memcached]] article for more information.''' | |
− | + | ==Increase PHP Memory Limit== | |
+ | A higher memory limit of PHP results in a faster execution. ¶ This can be changed in php.ini. Locate and adjust the following option: | ||
− | = | + | memory_limit = 512M ''(means 512 MB - varies from the available memory)'' |
− | |||
− | + | After saving and closing php.ini, the web server must be restarted. | |
+ | |||
+ | ==Activate Bytecode Cache in PHP== | ||
+ | Since PHP 5.5 the bytecode cache "opcache" is included. | ||
+ | |||
+ | This needs to be activated in the php.ini first. Check if the module is integrated there. This is done via the line: | ||
zend_extension=opcache.dll (Windows) | zend_extension=opcache.dll (Windows) | ||
zend_extension=opcache.so (Linux) | zend_extension=opcache.so (Linux) | ||
− | [[ | + | [[File:Hint.jpg|left]] '''Please also note the specification of the distributor for activating PHP modules under Linux.''' |
− | + | ||
+ | |||
+ | |||
+ | |||
+ | Please, do the following configuration of the opcache in php.ini. Normally, all options should already exist, but are commented out by semicolon (;) at the beginning of the line. Locate the respective option in php.ini, remove the semicolon at the beginning of the line and adjust the settings as follows: | ||
opcache.enable=1 | opcache.enable=1 | ||
− | opcache.memory_consumption=512 ''( | + | opcache.memory_consumption=512 ''(means 512 MB - varies from the available memory)'' |
opcache.max_accelerated_files=5000 | opcache.max_accelerated_files=5000 | ||
opcache.validate_timestamps=1 | opcache.validate_timestamps=1 | ||
opcache.revalidate_freq=2 | opcache.revalidate_freq=2 | ||
− | + | After saving and closing php.ini, the web server must be restarted. | |
+ | |||
+ | ==Deactivate JobQueue== | ||
+ | For this, read the [[Setup:Installation Manual/Optimization/Cronjobs#runJobs.php|paragraph "runJobs.php" in the "Cronjobs" article]]. | ||
− | + | [[en:{{FULLPAGENAME}}]][[de:Setup:Installationsanleitung/Optimierungen/Caching]] | |
− |