What is eAccelerator?

Started by [Unknown], September 19, 2005, 01:35:51 AM

Previous topic - Next topic

MAZZA

What is the advantage of APC over eAccellerator?

Bonk

None for me it would appear. APC degrades my server performance by about 10% compared to no caching at all and by about 300% compared to eAccelerator. I do not reccomend APC based on this experience. I'm going to give the Zend Optimizer another try...

Bonk

#42
It appears that the Zend Optimiser 2.5.10 is not compatible with php 5.1.0 either...  >:(

I'm thinking I'll give up on caching programs in order to allow me to keep my php up to date. I'm considering writing my own php caching application at this point if I will ever use one again.

Ben_S

Interesting, planning on doing my own APC testing tonight.
Liverpool FC Forum with 14 million+ posts.

MAZZA

Yesterday i read an article about PHP6 which stated APC would be added to PHP core distribution. Disabled by default but it will eventually be available for many people. http://www.php.net/~derick/meeting-notes.html#add-an-opcode-cache-to-the-distribution-apc [nofollow]

So i'm interested in your test results Ben_S :)

Ben_S

#45
APC seems to visibly perform about the same to me, I'm still using PHP 4.4.1 though.

Some tests with apachebench as follows which show a similar level of performance. I did two tests using each accelerator and for the sake of it, did two tests with no accelerator. These tests are pretty random given than in the last 10 minutes there are 100+ users active on my board. They do show how important an accelerator is though....

APC

Server Software:        Apache/1.3.34
Server Hostname:        www.redandwhitekop.com
Server Port:            80

Document Path:          /forum/index.php
Document Length:        35095 bytes

Concurrency Level:      2
Time taken for tests:   49.457821 seconds
Complete requests:      1000
Failed requests:        901
   (Connect: 0, Length: 901, Exceptions: 0)
Write errors:           0
Total transferred:      35470715 bytes
HTML transferred:       35002715 bytes
Requests per second:    20.22 [#/sec] (mean)
Time per request:       98.916 [ms] (mean)
Time per request:       49.458 [ms] (mean, across all concurrent requests)
Transfer rate:          700.37 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:    47   98  67.3     80     796
Waiting:       41   86  57.7     71     767
Total:         47   98  67.3     80     796

Percentage of the requests served within a certain time (ms)
  50%     80
  66%     89
  75%     98
  80%    108
  90%    161
  95%    217
  98%    315
  99%    380
100%    796 (longest request)

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Server Software:        Apache/1.3.34
Server Hostname:        www.redandwhitekop.com
Server Port:            80

Document Path:          /forum/index.php
Document Length:        33736 bytes

Concurrency Level:      2
Time taken for tests:   42.637633 seconds
Complete requests:      1000
Failed requests:        955
   (Connect: 0, Length: 955, Exceptions: 0)
Write errors:           0
Total transferred:      34174338 bytes
HTML transferred:       33706338 bytes
Requests per second:    23.45 [#/sec] (mean)
Time per request:       85.275 [ms] (mean)
Time per request:       42.638 [ms] (mean, across all concurrent requests)
Transfer rate:          782.71 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:    47   84  51.7     77     876
Waiting:       41   76  40.8     71     708
Total:         47   84  51.7     77     876

Percentage of the requests served within a certain time (ms)
  50%     77
  66%     84
  75%     89
  80%     93
  90%    105
  95%    140
  98%    222
  99%    288
100%    876 (longest request)

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

EA

Server Software:        Apache/1.3.34
Server Hostname:        www.redandwhitekop.com
Server Port:            80

Document Path:          /forum/index.php
Document Length:        34464 bytes

Concurrency Level:      2
Time taken for tests:   44.448606 seconds
Complete requests:      1000
Failed requests:        561
   (Connect: 0, Length: 561, Exceptions: 0)
Write errors:           0
Total transferred:      34930866 bytes
HTML transferred:       34462866 bytes
Requests per second:    22.50 [#/sec] (mean)
Time per request:       88.897 [ms] (mean)
Time per request:       44.449 [ms] (mean, across all concurrent requests)
Transfer rate:          767.45 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:    41   88  56.9     77     693
Waiting:       37   80  52.6     70     683
Total:         41   88  56.9     77     693

Percentage of the requests served within a certain time (ms)
  50%     77
  66%     84
  75%     91
  80%     97
  90%    126
  95%    173
  98%    258
  99%    325
100%    693 (longest request)


++++++++++++++++++++++++++

Server Software:        Apache/1.3.34
Server Hostname:        www.redandwhitekop.com
Server Port:            80

Document Path:          /forum/index.php
Document Length:        33952 bytes

Concurrency Level:      2
Time taken for tests:   44.242524 seconds
Complete requests:      1000
Failed requests:        956
   (Connect: 0, Length: 956, Exceptions: 0)
Write errors:           0
Total transferred:      34545864 bytes
HTML transferred:       34077864 bytes
Requests per second:    22.60 [#/sec] (mean)
Time per request:       88.485 [ms] (mean)
Time per request:       44.243 [ms] (mean, across all concurrent requests)
Transfer rate:          762.52 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:    45   87  53.0     77     698
Waiting:       40   80  49.8     71     530
Total:         45   87  53.0     77     698

Percentage of the requests served within a certain time (ms)
  50%     77
  66%     84
  75%     90
  80%     96
  90%    127
  95%    176
  98%    264
  99%    346
100%    698 (longest request)

++++++++++++++++++++++++++++++++++++++++++++++++++++

None

Server Software:        Apache/1.3.34
Server Hostname:        www.redandwhitekop.com
Server Port:            80

Document Path:          /forum/index.php
Document Length:        33600 bytes

Concurrency Level:      2
Time taken for tests:   122.362717 seconds
Complete requests:      1000
Failed requests:        894
   (Connect: 0, Length: 894, Exceptions: 0)
Write errors:           0
Total transferred:      33947676 bytes
HTML transferred:       33479676 bytes
Requests per second:    8.17 [#/sec] (mean)
Time per request:       244.725 [ms] (mean)
Time per request:       122.363 [ms] (mean, across all concurrent requests)
Transfer rate:          270.93 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:   111  244 231.2    164    2566
Waiting:      108  223 215.8    149    2321
Total:        111  244 231.2    164    2566

Percentage of the requests served within a certain time (ms)
  50%    164
  66%    214
  75%    264
  80%    295
  90%    415
  95%    559
  98%    869
  99%   1496
100%   2566 (longest request)

+++++++++++++++++++++++++++++++++++++++++

Server Software:        Apache/1.3.34
Server Hostname:        www.redandwhitekop.com
Server Port:            80

Document Path:          /forum/index.php
Document Length:        33428 bytes

Concurrency Level:      2
Time taken for tests:   107.556932 seconds
Complete requests:      1000
Failed requests:        907
   (Connect: 0, Length: 907, Exceptions: 0)
Write errors:           0
Total transferred:      33770194 bytes
HTML transferred:       33302194 bytes
Requests per second:    9.30 [#/sec] (mean)
Time per request:       215.114 [ms] (mean)
Time per request:       107.557 [ms] (mean, across all concurrent requests)
Transfer rate:          306.61 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:    84  214 120.7    163    1101
Waiting:       77  194 110.3    149    1088
Total:         84  214 120.7    163    1101

Percentage of the requests served within a certain time (ms)
  50%    163
  66%    208
  75%    244
  80%    274
  90%    353
  95%    446
  98%    589
  99%    719
100%   1101 (longest request)

APC and eA seem to offer similar performance but the APC team know what they are doing, not entirely sure the eAccelerator team know what they are doing since they are just tweaking / fixing bugs in the mmcache code (and very slowly @ that) and claim they have plans to rewrite it from scratch.

No accelerator is over half as slow which shows how importantan accelerator is.
Liverpool FC Forum with 14 million+ posts.

Ben_S

quick update, if anything, my real life load with APC is lower than with eAccelerator. Havent tweaked APC's settings yet either.
Liverpool FC Forum with 14 million+ posts.

MAZZA

Might even be quicker when it's added to the core distribution of PHP when it probably has less overhead. But that's for the future :)

Nice benchmark, there's indeed not much difference between APC and eA. APC might even be better if you run a highly stressed box considering it's lower CPU usage.

Bonk

Interesting because APC plain sucked on my server.  (Apache 2.0.55, php 5.1.1, Win32)

Ben_S, I assume since you're running Apache/1.3.34 you're running php 4.4.1 (as a cgi) and also running on a linux server? You must also have your cache programs cache to disk as caching to memory will not work running php as a cgi?

Which tells me that APC is coded only for php 4.x.  :(  (though I got it to compile against php5.1.0 source)

I'm, really tempted to roll our server back to Apache 1.3.x / php 4.4.x. We would lose a bunch of functionality but probably gain significant speed. (also considering the move from Windows Server 2003 to FreeBSD6)

Ben_S

I run php as an apache module & cache to memory.

Theres some benchmarks on the vB forums which show it works well with php5, although I've not tried it with PHP 5 myself. Last time I tried running php5 I found it slower than php4, although that was a while back so things may have changed, and probably have with the release of php 5.1.
Liverpool FC Forum with 14 million+ posts.

_cyclops_

i've installed it on our forum.. and it seems to work fine.. apache 1.3.xx and php5 compiled APC as DSO module...

Bonk

<wipes egg off face>

Well I tried APC again on php 5.1.1 and it does improve my server performance slightly. It does not seem to perform as well as eAccelerator on php 5.0.5 but it does help. This time I left all of its settings at the default, I must have buggered something up last time. (perhaps by turning slam defense on?)

The copy I compiled for php 5.1.1 on Win32 is here:
http://www.dynaverse.net/downloads/Utilities/php_apc-3.0.8_php-5.1.1.zip


Bonk

Note that the apc.gc_ttl setting should be set to zero for php versions greater than 5.1.0 as there is no garbage collection.

Bonk

#53
Had to ditch APC: http://www.simplemachines.org/community/index.php?topic=59528.0 Its not happy on Windows it seems (at least with php 5.1.1).

The performance gain was minimal and inconsistent anyway.  I want my eAcclerator back!  :(

Leipe Po

well i for one, belive that if the forum does not suffer by it(it wont get slower, coding is still being optimized for people without resellers and stuff), it can make a great contribution,
but as i said, if the forum load isnt comprimised for people without eAccellarator(or how its spelled),


Greetz, Leipe Po
There is only one thing more importend to me then coding:
My Girlfriend

Microsoft - "You've got questions.  We've got dancing paperclips."


Ben_S

What cpu? If it's a 32bit processor you want the top one, if it's 64nit the bottom one.
Liverpool FC Forum with 14 million+ posts.

Saku


Saku

now when i try the next step i got these errors:

[root@serverge11 eaccelerator-0.9.3]# /usr/bin/phpize
Configuring for:
PHP Api Version:         20031224
Zend Module Api No:      20041030
Zend Extension Api No:   220040412
/usr/bin/phpize: line 105: aclocal: command not found
[root@serverge11 eaccelerator-0.9.3]# ./configure --enable-eaccelerator=shared --with-php-config=/usr/bin/php-config
-bash: ./configure: No such file or directory

Oldiesmann

eAccelerator won't work as a shared extension. You will need to either use --with-eaccelerator or change "shared" to the actual path where eaccelerator can be found.
Michael Eshom
Christian Metal Fans

Advertisement: