avatar Ilija Studen Staff Mar 25. 2010. 7:46 pm
Hello,

One of the easiest way to significantly improve activeCollab's performance on your server is to set up opcode cache. Opcode cache saves the time that PHP needs to parse all .php files that application is build of (and activeCollab has a lot of PHP files). This alone can cut down page execution time in half, sometimes even more.

We recommend APC, but we also have reports from customer who are successfully running activeCollab on servers that use eAccelerator. In one occasion, we had a customer who had significant problems with XCache, so we don't recommend using it just yet unless you really know what you are doing (try at your own risk, we haven't tested it properly just yet).

Great thing about APC is that you also get extremely easy to use memory cache. I've included experimental APC cache backend as an attachment to this message. To install it, download the ZIP archive attached to this page, unpack it and move APCCacheBackend.class.php file to /activecollab/angie/classes/cache/backend folder. When done, open config/config.php and add this (in block where all other configuration options are defined):

define('CACHE_BACKEND', 'APCCacheBackend');


While APC cache is experimental at the moment, it will be default caching mechanism for systems where APC is installed when activeCollab 3 gets launched. We have been using it for a while in our development environment and we had a couple of customers running it on their own servers with no problems so far.

Have fun with this and please let us know if you have any comments or suggestions regarding opcode and memory caching in activeCollab.
avatar chrisbloom7 Mar 25. 2010. 8:04 pm
Thanks for the write up on this. Exactly how "experimental" is this? Good enough for production if you know what you're doing?
avatar Ilija Studen Staff Mar 25. 2010. 8:11 pm
Yes, it's pretty stable. To be completely honest, there's nothing special about it because caching is pretty much get, set and clear (caching gets complicated when you start distributing it etc, but I doubt that's something that you'll be doing any time soon with your activeCollab).

If you notice any problems with the cache, simply comment CACHE_BACKEND definition in config/config.php and activeCollab will revert back to the old, file system based, caching.
avatar md Pro Mar 25. 2010. 8:36 pm
I get this error:
There is no 'APCCacheBackend.class' cache backend. Expected path: /nfs/c02/h09/mnt/22410/domains/projects.**********.com/html/activecollab/angie/classes/cache/backend/APCCacheBackend.class.class.php
avatar Ilija Studen Staff Mar 25. 2010. 8:42 pm
Sorry, it should be:

define('CACHE_BACKEND', 'APCCacheBackend');


Without .class part...
avatar Panagiotis K. Dev Mar 25. 2010. 11:38 pm
Nice!

Although I get the notice:

Notice: Constant CACHE_BACKEND already defined in /home/admin/domains/xxxxxxx/public_html/projects/activecollab/defaults.php on line 142

so I changed the definement there instead of config.php

Also if I'm not wrong APC isn't fully compatible with PHP 5.3 yet
Aviantâ„¢ | Zend PHP 5 Certified Engineer
PHP Development / Symfony 2 / Zend Framework / JavaScript / HTML5 / CSS3
Online CV: panosru.com
avatar chrisbloom7 Mar 26. 2010. 12:49 am
I tried setting this up on my local server (WAMP with PHP 5.2.6 + Apache 2.2.8), but kept getting a blank page. No error message in the PHP error log, and seemingly normal output in the AC log file, but no page content. I found the folder it generated in the %TEMP% folder too, but all it contained was a copy of APCCacheBackend.class.php. Disabling APC in my Apache conf file got everything back to normal. I will have to play around with it some more when I'm back at the office.
avatar Ilija Studen Staff Mar 26. 2010. 11:16 am
@panosru:

I suggest that you keep the config value in config/config.php and simply "shut up" define in defaults.php for the time being:

@define(...);


We'll have updated defaults.php in the next release, so it does no throw notice there. Until v2.3 of activeCollab, only supported caching mechanism was file system, so we haven't set that configuration option to be overridable from config/config.php just yet.

@Chris,

I haven't tested APC on Windows, but there may be some platform specific gotchas that you need to be aware of. Try with installation documentation for APC, they are mentioning something about temp folders and permissions.
avatar chrisbloom7 Mar 26. 2010. 2:37 pm
Thanks @Ilija - More than likely it's a dumb Win32 configuration issue. I'll have to check and make sure I've got the proper Visual Studio DLLs, etc. Much as I love WAMP Server, I really hate the W part sometimes.
avatar Panagiotis K. Dev Mar 27. 2010. 8:09 pm
Hello, I used APCCacheBackend as you suggested but it seems that it broke Source module, for some reason when I was using APC it couldn't find the executable svn file although the path was ok and it also worked before APC, I revert CACHE_BACKEND constant to FileCacheBackend and it works again normally
Aviantâ„¢ | Zend PHP 5 Certified Engineer
PHP Development / Symfony 2 / Zend Framework / JavaScript / HTML5 / CSS3
Online CV: panosru.com
or Go To Next Page