• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XCache + memcached?

Moshe1010

Well-known member
#1
Just wondering if this combination makes sense. XCache gave me the best results with PHP 5.4 and Apache 2.4 (APC and ZO were tested). Any thoughts?
 

Moshe1010

Well-known member
#3
Why not just use XCache by itself? It has a variable cache. :rolleyes:
I got the idea that XCache works as opcache and it would be better to add data cache, although I'm not sure how much benefit small/medium boards have from data cache.

Would you recommend adding XCache to config.php or just leave it to run as is?

Thanks.
 

Jeremy P

Well-known member
#7
Any examples for correct configuration?
I guess whatever in XF FAQ isn't enough.
What's in the FAQ is enough for configuring XenForo to use XCache, but I'm talking about configuring XCache itself (through php.ini settings). Such configuration depends on your server specs, so I couldn't really say.

I wouldn't want to anyways because I'm no expert.. more of a guess and check kind of person and it's no huge deal to me when something goes wrong on one of my own boxes.
 

Moshe1010

Well-known member
#8
I don't care breaking things since its a managed VPS (full support).
Specs:
2 X Xeon E5 2650
4GB RAM

XCache in php.ini:

Code:
xcache.shm_scheme =        "mmap"
xcache.size  =              512M
xcache.count =                1
xcache.slots =                8K
xcache.ttl  =                0
xcache.gc_interval =          0

xcache.var_size  =            8M
xcache.var_count =            1
xcache.var_slots =            8K
xcache.var_ttl  =            0
xcache.var_maxttl  =          0
xcache.var_gc_interval =    300
xcache.var_namespace_mode =    0
xcache.var_namespace =        ""
xcache.readonly_protection = Off

xcache.cacher =              On
xcache.stat  =              On
xcache.optimizer =          Off
[xcache.coverager]

xcache.coverager =          Off
xcache.coverager_autostart =  On
xcache.coveragedump_directory = ""
I'm wondering if xcache.optimizer does anything since in version 2 that functions didn't work.

That's what I have in config.php

Code:
$config['cache']['enabled'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions']['cache_id_prefix'] = 'xf_';
$config['cache']['backend'] = 'XCache';
Not sure if I need to add cacheSessions to my config.php since I know there are some problems with users logging in with APC.
 
Last edited:

MattW

Well-known member
#9
This is my config.php using Xcache (storing sessions as well)

PHP:
$config['cache']['enabled'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions']['cache_id_prefix'] = 'xf_';
$config['cache']['cacheSessions'] = true;
$config['cache']['backend']='Xcache';
and my Xcache settings (VPS with 8GB RAM)
Code:
extension = "xcache.so"
xcache.admin.enable_auth = On
xcache.admin.user = "USERNAME"
xcache.admin.pass = "MD5PASSWORD"
xcache.shm_scheme = "mmap"
xcache.size  = 256M
xcache.count = 14
xcache.slots = 8K
xcache.ttl  =  0
xcache.gc_interval = 0
xcache.var_size  = 32M
xcache.var_count = 14
xcache.var_slots = 1K
xcache.var_ttl  = 0
xcache.var_maxttl  = 0
xcache.var_gc_interval = 300
xcache.var_namespace_mode = 0
xcache.var_namespace = ""
xcache.readonly_protection = Off
xcache.mmap_path = "/dev/zero"
xcache.coredump_directory =  ""
xcache.coredump_type = 0
xcache.disable_on_crash = Off
xcache.experimental = Off
xcache.cacher = On
xcache.stat  = On
xcache.optimizer = Off
xcache.coverager = Off
xcache.coverager_autostart =  On
xcache.coveragedump_directory = ""
 
Last edited:

Moshe1010

Well-known member
#10
This is my config.php using Xcache (storing settings as well)

PHP:
$config['cache']['enabled'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions']['cache_id_prefix'] = 'xf_';
$config['cache']['cacheSessions'] = true;
$config['cache']['backend']='Xcache';
and my Xcache settings (VPS with 8GB RAM)
Code:
extension = "xcache.so"
xcache.admin.enable_auth = On
xcache.admin.user = "USERNAME"
xcache.admin.pass = "MD5PASSWORD"
xcache.shm_scheme = "mmap"
xcache.size  = 256M
xcache.count = 14
xcache.slots = 8K
xcache.ttl  =  0
xcache.gc_interval = 0
xcache.var_size  = 32M
xcache.var_count = 14
xcache.var_slots = 1K
xcache.var_ttl  = 0
xcache.var_maxttl  = 0
xcache.var_gc_interval = 300
xcache.var_namespace_mode = 0
xcache.var_namespace = ""
xcache.readonly_protection = Off
xcache.mmap_path = "/dev/zero"
xcache.coredump_directory =  ""
xcache.coredump_type = 0
xcache.disable_on_crash = Off
xcache.experimental = Off
xcache.cacher = On
xcache.stat  = On
xcache.optimizer = Off
xcache.coverager = Off
xcache.coverager_autostart =  On
xcache.coveragedump_directory = ""
Thanks. We have everything the same except xcache.count, which is based on CPU cores as I know that. Is there a reason for 14? I was thinking raising it to 8, although I'm not sure.
And xcache.var_size that is 32M at yours, why so big?
 

MattW

Well-known member
#11
Thanks. We have everything the same except xcache.count, which is based on CPU cores as I know that. Is there a reason for 14? I was thinking raising it to 8, although I'm not sure.
And xcache.var_size that is 32M at yours, why so big?
Mine is set to 14 because I have access to 14 CPU cores
vps.PNG

I also have my xcache.var_size at 32M because I have a few other sites (phpBB3) using it as well. It's only using 6M, but doesn't hurt to have 32M
 

Moshe1010

Well-known member
#13
Mine is set to 14 because I have access to 14 CPU cores
View attachment 49079

I also have my xcache.var_size at 32M because I have a few other sites (phpBB3) using it as well. It's only using 6M, but doesn't hurt to have 32M
Hi,

Do you have any idea what that means?
XCache 3.0.3   Diagnosis.png

I added XCache in my config.php, even in my vB config.php and that's weird.
 
Last edited:

CTXMedia

Formerly CyclingTribe
#16
Yes, but I'm using a test area, so there are only 3-4 people who are using the system.
I think the session data should still remain, even after the people have stopped posting (providing they don't logout) - so perhaps the session data is not caching as expected?
 

Moshe1010

Well-known member
#17
I had a weird error that said I have no timezone in my php.ini
When I add a timezone , then I get the error above. If I delete the timezone, then I get PHP Compile time error (couple lines above in the diagnosis), but the VAR cacher error goes away.

This is my config.php, nothing special there:
Code:
$config['cache']['enabled'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions']['cache_id_prefix'] = 'xf_';
$config['cache']['cacheSessions'] = true;
$config['cache']['backend'] = 'xcache';