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 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
Please note that with equal hardware conditions, BlueSpice empirically runs more performantly on Linux than on Windows servers.
Indicate Cache-Directory
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.
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 <installpath-bluespice>
/LocalSettings.php and locate the variable $wgDBserver. The line should ideally be:
$wgDBserver = "127.0.0.1";
Activate Memcached
Create the file <installpath-bluespice>
/settings.d/001-Memcached.php and 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
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.so (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 (means 512 MB - varies from the available memory) opcache.max_accelerated_files=5000 opcache.validate_timestamps=1 opcache.revalidate_freq=2
After saving and closing php.ini, the web server must be restarted.
Deactivate JobQueue
For this, read the paragraph "runJobs.php" in the "Cronjobs" article.