• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

[Tip] Use APC

  • Thread starter Thread starter Floris
  • Start date Start date
so is running apc with suhosin not recommended then?
ive seen it said so in this thread, but my investigations into apc have not exposed this as a very common issue.
 
Is there anything I should know before I enable/install APC?

Currently running a few sites powered by SMF 1.11, vBulletin 4.0 and xF RC2.
I don't want to break anything in the process lol.

Thanks
 
Before APC
Timing: 0.1321 seconds Memory: 7.984 MB

After APC
Timing: 0.0833 seconds Memory: 5.782 MB

Running on Gentoo 64bit with 4GB RAM. PHP 5.3.5, APC 3.1.7, nginx 0.8.53 with php-fpm.

Granted, my board is not that busy but you can see the benefit right there.
 
Is there anything I should know before I enable/install APC?

Currently running a few sites powered by SMF 1.11, vBulletin 4.0 and xF RC2.
I don't want to break anything in the process lol.

Thanks

I don't think you will break anything, especially if you install it using a package manager (apt-get, yum, emerge etc.).

Having APC on your server and not using it will not 'harm' you but if you have it, use it :)
 
Note: The cache_id_prefix is handy if you run more than one instance on the same server. Plus, I still recommend to set one, so it doesn't conflict with whatever else you might be running on the server :)

What exactly do you mean by that?
 
If you run one more than one XenForo forum, or another application that uses APC on the server.

Thanks

One more question:
Do I have to set a different prefix for each, "foro" and "foro2", for instance?
 
Just as an FYI, this is an epic fail on Windows 2008, IIS, PHP536. The only binaries are for xp and w7, using either of them result in, well, nothing happening. Apc.php simply displays a message saying that APC is not running
 
Not sure if this is the correct place to ask but is the first post still applicable? Once APC is installed do I just add what's in the first post into my config and that's it?

It would also be good to have a guide or examples of what the default values should be for XF. I realise getting optimal vaalues is more complicated but some for a good starting point would be useful.
 
Not sure if this is the correct place to ask but is the first post still applicable? Once APC is installed do I just add what's in the first post into my config and that's it?

It would also be good to have a guide or examples of what the default values should be for XF. I realise getting optimal vaalues is more complicated but some for a good starting point would be useful.
yes, it is still accurate.

the values in the first part are a good starting point.
 
I'd like to make myself clear on this - I personally do not recommend that you use APC for shared memory caching via your config file.

We use APC here for its opcode cache only, which it does automatically by virtue of being installed on your server. I do recommend that you have APC installed, for its opcode cache, which will massively speed up your page loads vs a system without APC.

If you want to use a shared-memory cache system, I'd recommend memcache, not APC.
 
Basic instructions:

Install APC for PHP. And enable it.
Don't touch config.php, unless you have memcached, set caching on, a prefix, and the back-end to Memcached.
 
I'd like to make myself clear on this - I personally do not recommend that you use APC for shared memory caching via your config file.

We use APC here for its opcode cache only, which it does automatically by virtue of being installed on your server. I do recommend that you have APC installed, for its opcode cache, which will massively speed up your page loads vs a system without APC.

If you want to use a shared-memory cache system, I'd recommend memcache, not APC.

Kier,

I would be interested in your reasonings why you do not recommend APC.
 
I stated them earlier in this thread - APC has cache slam issues, amongst other problems.

I've not had any issues with cache slam issues since 3.18, currently running 3.19. Have you actually tried any of the later versions? (I know 3.16 is prone to cache slams)
 
Basic instructions:

Install APC for PHP. And enable it.
Don't touch config.php, unless you have memcached, set caching on, a prefix, and the back-end to Memcached.

I thought setting the memory size higher than the default was pretty vital else the memory fragmentation reaches 100% very quickly?
 
Top Bottom