Alternative PHP Cache

APC - Opcode Cache zur Performancesteigerung

Um die Performance serverseitig weiter zu steigern kann man noch eine Opcode Cache installieren.

Bist jetzt hat mir APC gute Dienste geleistet.

Meine Erfahrungen mit APC:

  • einfache Installation
  • einfache Konfiguration
  • dadurch gutes Aufwand/Nutzen-Verhältnis

Performance Steigerungen um 300% sind keine Seltenheit.

Hier mal 2 Logs von ApacheBench

Ohne APC:

ab -c5 -n500 wiki.t3easy.de

Server Software:        Apache
Server Hostname:        wiki.t3easy.de
Server Port:            80

Document Path:          /
Document Length:        5987 bytes

Concurrency Level:      5
Time taken for tests:   197.733777 seconds
Complete requests:      500
Failed requests:        0
Write errors:           0
Total transferred:      3148000 bytes
HTML transferred:       2993500 bytes
Requests per second:    2.53 [#/sec] (mean)
Time per request:       1977.338 [ms] (mean)
Time per request:       395.468 [ms] (mean, across all concurrent requests)
Transfer rate:          15.55 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:   263 1975 4247.0   1503   40440
Waiting:      263 1974 4247.0   1502   40440
Total:        263 1975 4247.0   1503   40440

Percentage of the requests served within a certain time (ms)
  50%   1503
  66%   1638
  75%   1735
  80%   1807
  90%   2009
  95%   2205
  98%   7548
  99%  32439
 100%  40440 (longest request)

Mit APC:

ab -c5 -n500 wiki.t3easy.de

Server Software:        Apache
Server Hostname:        wiki.t3easy.de
Server Port:            80

Document Path:          /
Document Length:        5987 bytes

Concurrency Level:      5
Time taken for tests:   63.106239 seconds
Complete requests:      500
Failed requests:        0
Write errors:           0
Total transferred:      3148000 bytes
HTML transferred:       2993500 bytes
Requests per second:    7.92 [#/sec] (mean)
Time per request:       631.062 [ms] (mean)
Time per request:       126.212 [ms] (mean, across all concurrent requests)
Transfer rate:          48.71 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:    75  629 1201.7    553   18601
Waiting:       75  629 1201.6    553   18600
Total:         75  629 1201.7    553   18601

Percentage of the requests served within a certain time (ms)
  50%    553
  66%    650
  75%    703
  80%    730
  90%    803
  95%    893
  98%    960
  99%   1630
 100%  18601 (longest request)

APC installieren

# Abhängigkeiten installieren
apt-get install php-pear php5-dev apache2-threaded-dev
# Neustes, stable markiertes APC Packet aus pecl repository laden und übersetzen
pecl install apc
# APC laden
echo extension=apc.so > /etc/php5/conf.d/apc.ini
echo apc.shm_size=128M >> /etc/php5/conf.d/apc.ini
# Apache 2 Konfiguration neu laden
/etc/init.d/apache2 force-reload
Stichwörter zu dieser Seite: 
Generator: TYPO3 CMS 6.2
Google Page Speed
@t3easy_de folgen
Google+