eAccelerator vs APC on PHP 5.2.9

June 7th, 2009 by Boštjan Škufca

Motivation

A year ago I was working on a website project which used PHP as a language of choice. The project development resulted in quite large amount of PHP code. iphone 7 plus phone case silver After a brief research we decided that organising our code the way Zend Framework is organized is our way to go. While ZF’s naming conventions are a nice and effective way to autoload classes and avoid naming conflicts, it is still a bit cumbersome at coding stage (long class names). purple iphone 6 case At that time I had my first glance at PHP 5.3 feature list and namespaces seemed a good step forward from current practice. 360 iphone 7 case green Unfortunately stable PHP 5.3 release was far from being released so I had to dump the namespace idea for that particular project. But I decided to migrate to PHP 5.3 as soon as possible. iphone 6 case rabbit iphone 6 case personalised amelia Another part of the story is server administration. iphone 7 transparent case iphone 7 plus otter box case rugged iphone 7 case On all the servers I manage I utilise PHP opcode caching. iphone 7 phone cases diamonds Currently I use eAccelerator and I am satisfied with it’s performance and stability. 360 case iphone 6 plus decoded iphone 8 case But eAccelerator’s website (at the moment of this writing) states nothing about PHP 5.3 support. Therefore I was forced to look elsewhere. iphone 6 case otterbox strada Many websites recommend APC with the suggestion that it is being actively maintained, unlike some other opcode caches. stripe iphone 7 phone cases iphone 6 phone case riverdale I remember back in year 2004 when I was testing it and comparing it to Turck MM cache that its performance sucked. iphone 8 plus case teal Unfortunately I have no evidence to support my claim, but it is also irrelevant in 2009. cherry iphone 7 plus case Yet “actively maintained” phrase implies hope that APC supports PHP 5.3. And its changelog confirms it. manna iphone 7 case dachshund iphone 6 case First stable PHP 5.3 version was released last week and I was psyched to at least test it, but I did not want to be held back by an opcode caching solution, so I decided to compare eAccelerator and APC again. iphone 7 plus phone cases shock proof iphone 6 ultra thin cases girls If APC performs as well as eAccelerator does (both on PHP 5.2.9), then I will seriously consider migration to PHP 5.3 and migration from eAccelerator to APC. iphone case iphone 7 iphone 7 plus phone cases deadpool

Goal

There is a single question to be answered: how does APC perform in comparison to eAccelerator on PHP 5.2.9?

System setup

I used exactly the same system with Apache web server as it is described in this article. iphone 6 skull phone case iphone 8 plus iron man case I only conducted “Application frontpage” test as it is the only relevant testcase. iphone 7 case military I installed APC with the following command

printf “no\n” | /usr/local/httpd/php/bin/pecl install apc

and only enabled it in php.ini by adding

extension=”apc.so”

and removing eAccelerator, with no additional configuration. iphone 6 case dancer

Why not PHP 5.3.0 or PHP 5.2.10?

  • PHP 5.3.0: simply because I have not yet tested it and upgraded the systems I manage.
  • PHP 5.2.10: simply because I tried to upgrade but the release is buggy.

Results

eAccellerator vs APC: application frontpage

eAccellerator vs APC: application frontpage

Analysis of results and conclusion

Performance results for both opcode cache solutions are almost identical, difference is negligible. orla kiely phone case iphone 7 stranger things phone case iphone 7 Results at concurrency level higher than 128 are not reliable, I am in a phase of fixing that anomaly. light up case iphone x From this test I can conclude that performance-wise you can safely choose any of these two opcode cache solutions. black case iphone 8 plus

Stability

I can not comment on the stability of APC more than that I have had no problems with it for this short period of testing time. iphone 6 rose gold marble case I have no stability (segfault) problems with eAccelerator in the production environments. light up selfie case iphone 8 pink sand iphone 8 plus case iphone 6 case with apple logo

Info/status/control script

What I DO miss with APC is a simple control.php which eAccelerator provides. It gives you an overview of caching statistics. Update (2009-12-01): Henrik Olsen notified me that APC also includes control script which provides an overview of caching statistics. fossil iphone 7 plus case See comments below for an URI of his article where he demonstrates the subject.


6 Responses to “eAccelerator vs APC on PHP 5.2.9”

  1. Aco says:

    what about xcache??

  2. Henrik Olsen says:

    You can see APC stats with the included script. See http://www.electrictoolbox.com/apc-php-cache-information/.

  3. Aco (about Xcache): I was only interested in comparing eAccelerator and APC. eAccelerator because it has been stable and high-performing for me since the days of TurckMM cache. APC for its entanglement in the PHP development process itself (it is part of PECL and Rasmus Lerdorf and Ilia Alshanetsky are its maintainers).

  4. Lumega says:

    i like EA, but last releases show me what EA slowly die… maybe APC win.

  5. bostjan says:

    @Lumega:
    My first respnse was:
    “It does seem so, I’ve just done a test install of PHP 5.3.1 and EAccelerator does not compile against it. APC does.”

    But then I checked EAC site and found 0.9.6 release, which works perfectly with PHP 5.3.1. And it was released not even a month ago, so I can not agree that it is dying. Maybe very slowly:)

  6. Phoenix says:

    If this helps anyone, eAccalerator rocks. Much better than APC and all its cumbersome PECL nonsense. Using it perfectly in 2011 with CentOS 64 bit on quad core with 8GB RAM. Not that that matters, but just to let you know that it works perfectly fine, and is still faster than APC and XCache in our homegrown tests.

Leave a Reply

 

*