Question about installing / configuring APC

I'm on Debian 5 / MySQL 5.1.49 / PHP 5.2.x / Apache 2

First installed APC via:

pecl install apc

That seemed to work okay. But then I read somewhere that you didn't need PECL and could just do:

apt-get install php-apc

So I did this too. It asked if I wanted to keep my apc.ini file and I said yes.

Have I screwed anything up? Should I have uninstalled the PECL stuff?

Also, right now I've got my apc.ini looking like this:

extension=apc.so

apc.enabled=1

apc.shm_segments=1

apc.optimization=0

apc.shm_size=128

apc.ttl=7200

apc.user_ttl=7200

apc.numfileshint=1024

apc.mmapfilemask=/tmp/apc.XXXXXX

apc.enable_cli=1

apc.stat=on

apc.stat=1

Are there any recommended settings for better performance? I'm using a Drupal 6.x site.

THANKS.

5 Replies

Anyone have a comment on this? Do I need to remove the PECL stuff or am I okay you think?

Well, PECL stuff, from my understanding, is downloaded as source and compiled on your server.

So, IMO, yes, it'd be better to kill it and use the prepackages module, which will be always in sync with your (also prepackaged) PHP runtime.

Of course, Debian 5 offers APC 3.0.19 with back-ported security fixes, while the current version you can compile off PECL is 3.1.4… but, is the newer version worth the "compile manually, keep secured and up to date manually" hassle?

Thanks - can you help me a tad more? How exactly do I uninstall the PECL version correctly? Do I uninstall them both and then use the normal apt get install one?

I never used pecl… but seems that

pecl uninstall apc
aptitude purge php-apc
aptitude install php-apc

should do the trick… make sure you don't have any lingering references to apc in the main php.ini, and edit /etc/php5//conf.d/apc.ini to set your sizes.

All this assuming you can live with a bit of downtime in case of something going bad. >.>;

Good luck!

PS. The reinstall of the repo version with aptitude might be actually unnecessary… but it's a way to start from hopefully-clean state.

You rock….i'll give this a shot.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct