Inhaltsverzeichnis
XCache
XCache is a fast and stable PHP opcode cacher.
Installation (Debian)
aptitude install php5-xcache
Konfiguration
⇒ /etc/php5/conf.d/xcache.ini:
Gegebenenfalls Speicherlimit anpassen.
Administration
/usr/share/xcache/admin
In ein web Verzeichnis kopieren oder symlink erstellen.
Tests
ab -n 500 http://foo.bar/
Ohne XCache
Server Hostname: foo.bar Server Port: 80 Document Path: /hp/ Document Length: 6535 bytes Concurrency Level: 1 Time taken for tests: 55.526 seconds Complete requests: 500 Failed requests: 0 Write errors: 0 Total transferred: 3521500 bytes HTML transferred: 3267500 bytes Requests per second: 9.00 [#/sec] (mean) Time per request: 111.053 [ms] (mean) Time per request: 111.053 [ms] (mean, across all concurrent requests) Transfer rate: 61.93 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.0 0 0 Processing: 105 111 12.3 108 193 Waiting: 84 98 11.4 95 171 Total: 105 111 12.3 108 193 Percentage of the requests served within a certain time (ms) 50% 108 66% 109 75% 109 80% 110 90% 114 95% 118 98% 162 99% 190 100% 193 (longest request)
Mit XCache
Server Hostname: foo.bar Server Port: 80 Document Path: /hp/ Document Length: 6535 bytes Concurrency Level: 1 Time taken for tests: 21.309 seconds Complete requests: 500 Failed requests: 0 Write errors: 0 Total transferred: 3521500 bytes HTML transferred: 3267500 bytes Requests per second: 23.46 [#/sec] (mean) Time per request: 42.618 [ms] (mean) Time per request: 42.618 [ms] (mean, across all concurrent requests) Transfer rate: 161.38 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.0 0 0 Processing: 38 43 7.4 41 93 Waiting: 20 34 6.6 33 86 Total: 38 43 7.4 41 93 Percentage of the requests served within a certain time (ms) 50% 41 66% 42 75% 43 80% 43 90% 43 95% 50 98% 76 99% 78 100% 93 (longest request)
Ergebnis
XCache beschleunigt PHP im Test um ~60%.