2

Back in the PHP 4 Jurassic Era, I often installed a PHP extension called 'eaccelerator' to boost the performance of PHP by caching the compiled byte code.

I've read elsewhere that with PHP 5, the need for add-ons like eaccelerator has decreased, but is there still enough of a speed difference to make it worth installing on Linux servers?

Charles Johnson
  • 691
  • 1
  • 7
  • 19

2 Answers2

5

Yes, opcode caches still make a dramatic performance difference.
Most are using APC over eAccelerator these days, though.

ajreal
  • 46,720
  • 11
  • 89
  • 119
ceejayoz
  • 176,543
  • 40
  • 303
  • 368
  • -1, if you able to indicate eaccelerator is still active, I will more than happy to take that back – ajreal Dec 19 '11 at 02:13
  • @ajreal Your comment doesn't make much sense. eAccelerator's website doesn't seem to even work anymore. http://eaccelerator.net/ APC benefits from being installable via PECL and documented on PHP.net, too. – ceejayoz Dec 19 '11 at 02:29
  • I dun know what is more making sense by recommend something semi-retired – ajreal Dec 19 '11 at 02:34
  • Uh, I didn't recommend eAccelerator. I recommended an opcode cache, and specified APC. Please read before downvoting. – ceejayoz Dec 19 '11 at 02:35
  • 1
    I think I'd tend to agree with ceejayoz, @ajreal. I suspect you may have simply misread/misinterpreted/mistaken what this answer is saying. `:)` – Jared Farrish Dec 19 '11 at 04:02
  • Yes, as I've tried to explain via a half dozen comments thus far - that's the key underlying bit of this question that needed answering. That he mentioned one particular opcode cache is pretty irrelevant. – ceejayoz Dec 19 '11 at 04:15
  • 1
    @ajreal, I read this answer as saying *yes, opcode caching still offers a tremendous benefit in current PHP releases, and APC is more popular than eAccelerator*. It's two sentences that answer the two points raised by the OP in the question, albeit the last perhaps in a bit of a roundabout way. – Jared Farrish Dec 19 '11 at 04:16
  • Does HipHop count as an opcode cacher, or is it something else altogether? – Jared Farrish Dec 19 '11 at 04:19
  • 1
    Ok, point taken. Soli for the dispute. But I still thinking, OP is asking whether eAccelerator is a good move (as per the title suggest). Just my opinion. – ajreal Dec 19 '11 at 04:26
  • @JaredFarrish My understanding is that HipHop actually turns PHP into optimized, compiled C++ code. – ceejayoz Dec 19 '11 at 04:27
  • Is it just that compiled C++ is more efficient than PHP opcode? – Jared Farrish Dec 19 '11 at 04:29
  • That's my understanding, yeah. It comes with some fairly significant complexities though, so for the 99.9...% of the sites out there without Facebook's traffic APC may be the better option. – ceejayoz Dec 19 '11 at 04:30
  • Yeah, I was either watching or reading something the other day that was talking about the complexities their developers have to go through to work on Facebook. They developed a HipHop virtual machine to do development work on, for instance, and HipHop is supposedly pretty quirky and only about 60% complete. – Jared Farrish Dec 19 '11 at 04:35
  • Here is the article: [Facebook looks to fix PHP performance with HipHop virtual machine](http://arstechnica.com/business/news/2011/12/facebook-looks-to-fix-php-performance-with-hiphop-virtual-machine.ars), in case you're interested... – Jared Farrish Dec 19 '11 at 04:37
1

No, eAccelerator is no longer actively maintained (as no evidence exists demonstrate it is).

I would say it's worth the effort to go forward with APC or another, more modern and actively maintained accelerator technology. If you are looking for OP code caching technology, go with APC, which is popular, has more library support, and is actively maintained. It will also apparently be included in a future PHP 6 release.

You might read this answer to another similar question, which suggests that eAccelerator may be viable if you take into account the deficiencies (probable lack of PHP 6 support, older and apparently unmaintained, etc.) and still want to use something you have a certain preexisting comfort level. It just depends on your needs and the environment you work in.

Community
  • 1
  • 1
ajreal
  • 46,720
  • 11
  • 89
  • 119
  • I gave my vote to APC, too, so I'm not sure where this little persecution complex tantrum is coming from... – ceejayoz Dec 19 '11 at 03:05
  • I said yes, an opcode cache is beneficial. It was quite clear, and no, I'm not voting to close, as "is an opcode cache beneficial" has an empirical yes/no answer. – ceejayoz Dec 19 '11 at 03:12
  • This question is asking for an opinion, can't you just vote to close? – ajreal Dec 19 '11 at 03:13
  • Again, this question is about eAccelerator worth to install. – ajreal Dec 19 '11 at 03:17
  • And the answer is that while eAccelerator is a bad idea, the underlying tech of opcode caching is an absolutely good idea to install. Just because it was an overly specific question to start doesn't means something positive and educational can't come of it. – ceejayoz Dec 19 '11 at 03:25
  • This is dispute, OP is well aware on the caching is to boost performance. – ajreal Dec 19 '11 at 03:41
  • If that were the case, the question wouldn't say "I've read elsewhere that with PHP 5, the need for add-ons **like** eaccelerator has decreased". – ceejayoz Dec 19 '11 at 03:44
  • No, you have to refer to the previos sentence `Back in the PHP 4 Jurassic Era, I often installed a PHP extension called 'eaccelerator' to boost the performance of PHP by caching the compiled byte code.`. – ajreal Dec 19 '11 at 03:49
  • 1
    Just to make life confusing, development on eAccelerator seems to have restarted, with a new site and a bunch of commits over the last couple of months – benz001 Aug 02 '12 at 23:20