APC and caching

Nope

Given that our memory is currently at the limit and reports of elastic search needing a LOT of memory we thought it best not to (for now at least)
 
Have you tried turning down the indexing speed of Googlebot in Webmaster Tools? If not, give it a try - ISTR it working for me in the first few weeks after I'd migrated CycleChat. I slowly increased it in the following months as more of the site was reindexed.
 
Another issue we're having is that APC seems to reset every 2 hours. Is there anyway XenForo can cause this or should I get our server admins to look at the webserver settings?
 
I'm still a bit confused by the cache configuration. We've now moved to a setup with a separate webserver/mysql server and have memcache installed on the webserver with 500MB of RAM allocated to it.

Our cache configuration looks like this:

## Caching
# http://xenforo.com/community/threads/speed-up-your-board-caching.5699/
# http://xenforo.com/community/threads/tip-use-apc.6456/
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions'] = array(
'caching' => true,
'automatic_serialization' => true,
'lifetime' => 10800,
'cache_id_prefix' => 'xf'
);
$config['cache']['backend'] = 'Apc';

$config['cache']['backend'] = 'Memcached';
$config['cache']['backendOptions'] = array(
'compression' => false,
'servers' => array(
array(
// your memcached server IP /address
'host' => 'localhost',

// memcached port
'port' => 11211,
)
)
);

Is that correct? Can I have both APC and memcached like that?
 
I don't think that's a smart thing to do. Just stick to a) using APC or memcached on the server, so it does what it is designed for, b) turn on caching within config.php, and c) tell xenforo that it can use memcached or apc from point a, by putting the back-end code chunk in the config.php
 
Another issue we're having is that APC seems to reset every 2 hours. Is there anyway XenForo can cause this or should I get our server admins to look at the webserver settings?

In WHM go to:

Main >>Service Configuration>> Apache Configuration >> Piped Log Configuration

And select Enable Piped Apache Logs

And it won't reset every 2 hours any more.
 
Is that correct? Can I have both APC and memcached like that?

No, you don't need to specify APC in your XF config - it's an Opcode cache (different to Memcached) and if it's configured on your server it will work as intended:

Here's a snippet of my CycleChat site config file (adjust it to suit your own site):

Rich (BB code):
$config['cache']['enabled'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions'] = array('caching'   =>  true,
                                            'automatic_serialization' => true,
                                            'lifetime'    => 1800,
                                            'cache_id_prefix'  =>  'xf_'
);
$config['cache']['backend'] = 'Memcached';
$config['cache']['backendOptions'] = array(
            'servers' =>array(
                                array(
                                'host' => '127.0.0.1', // your memcached server ip /address
                                'port' => 11211        // memcached port
                            )
                        ),
             'compression' => false
);

$config['cache']['cacheSessions'] = true;

Not sure if you have the 'enabled' line in your config file (I presume you've snipped out the top part to keep it private?).

The session caching can save time on a really busy site and allow pages to load a smidge quicker. (y)

Hope it helps,
Shaun :D
 
Ok so after setting it to enabled, APC is now caching the variables as well as the files but it's leading to a lot of fragmentation. Is that something to worry about?

Previously when it was just caching files I saw no fragmentation...
 
The memory is already set to 256MB and only 50MB or so is being used.

For the file caching that helped the fragmentation when I originally set it up but this looks like it's being caused by the variable caching.
 
Top Bottom