Open main menu

Changes

54 bytes added ,  17:31, 27 August 2018
no edit summary
[[Image:Preferences-system-performance.svg|200px|frameless|right]]
A [[wp:PHP_accelerator|PHP Acelerator]] is a tool that will enhance the [[Performance_tuning|performance]] of web applications written for the PHP scripting language. The free [http://php.net/apc Alternative PHP Cache] (APC) is distributed as a PEAR package.
== MediaWiki ==
MediaWiki can take advantage of the APC cache if you tell it to.
see [[mw:Manual:Configuration_settings#Cache|The Manual for cache settings]], and set [[mw:Manual:$wgMainCacheType]] in LocalSettings.php:
<source lang="php">
$wgMainCacheType = CACHE_ACCEL;
== Troubleshooting ==
If you notice sluggishness in your site after installing APC, then check out the front-end (apc.php). The sure sign that you need to increase your cache size is that the "cache full" count is greater than one.
[[Image:Apc-problems.png|200px|thumb|right|Cache is too small]]
# [[Performance_tuning|Check your memory]] # Increase the Shared Memory Size for APC in your php.ini file e.g. <code>apc.shm_size = 128</code>
# Restart Apache
# Use the Apache Bench tool to test performance with and without APC enabled.
Connection Times (ms)
min mean[+/-sd] median max
Connect: 1 1 0.1 1 2
Processing: 515 604 113.4 567 1030
Percentage of the requests served within a certain time (ms)
50% 568 66% 600 75% 608 80% 644 90% 734 95% 925 98% 1031 99% 1031 100% 1031 (longest request)
</pre>
[[Category:PHP]]
[[Category:Wiki]]
[[Category:SysadminSysAdmin]][[Category:Performance]]
4,558

edits