futtta's blog

Frank Goossens' Twitterless twaddle

Trading eAccelerator for APC

with 4 comments

Yesterday I somewhat reluctantly removed eAccelerator from my server (Debian Etch) and installed APC instead. Not because I wasn’t satisfied with performance of eAccelerator, but because the packaged version of it was not in the Debian repositories (Andrew McMillan provided the debs), and those debs weren’t upgraded at the same pace and thus broke my normal upgrade-routine. Moreover APC will apparently become a default part of PHP6 (making the Alternative PHP Cache the default opcode cache component). Installation was as easy as doing “pecl install apc” and adding apc to php.ini. Everything seems to be running as great as it did with eAccelerator (as most test seem to confirm).

Share this:
  • Digg
  • del.icio.us
  • Facebook
  • Google Reader & Buzz
  • LinkedIn
  • Twitter
  • FriendFeed
  • Posterous
  • StumbleUpon
  • Tumblr
Possibly related twitterless twaddle:

Written by frank

October 11th, 2008 at 12:36 pm

4 Responses to “Trading eAccelerator for APC”

  1. Pieter

    13 Oct 08 at 10:56

    Thanks for the tip, same problem here. I wasn’t able to install eaccelerator decently on Ubuntu either. So I replaced it with APC. Doesn’t look like the site is faster now, but maybe the throughput is just higher (since I have the impression the CPU load is now higher – maybe it is because the disk isn’t the bottleneck anymore).

  2. futtta's blog

    14 Oct 08 at 06:32

    Fun with caching in PHP with APC (and others)…

    After installing APC, I looked through the documentation on php.net and noticed 3 interesting functions with regards to session-independent data caching in PHP;

    apc_store; store a variable in cache
    apc_fetch; retrieve the variable from cache
    apc_delet…

  3. Pieter

    14 Oct 08 at 10:57

    I added this parameter to apc.ini:
    apc.shm_size = 64
    (see http://2bits.com/articles/high-php-execution-times-drupal-and-tuning-apc-includeonce-performance.html)
    which makes it much faster now (apparently the default value assigns not enough memory for my site which results in a lot of swapping).

  4. frank

    14 Oct 08 at 11:32

    you can check the usage of APC’s shared memory with the apc_sma_info-function, which will (a.o.) return the amount of available memory. monitoring that value should help you to finetune the size of shared memory.

    maar door al uw pets zit ik weeral op youtube eh man! must not click on related video’s, must not click on related video’s, … *click*

Leave a Reply