I've just setup xcache on a vps server.
I have the admin section running and it is showing that xcache is running.
I am however a bit unsure about some of the settings - the documentation doesn't dwell very far into what each setting mean.
Notes that may be useful:
In the current setup I'm only interested in the basic opcode cacher, not the var data component.
The server is a VPS with 2GB memory (not sure about CPU config but could find out if critical to know) and it's running a CentOS 5.x OS with cPanel/WHM.
I have root access and the server will only host one website.
The version of php is:
PHP 5.4.21 (cli) (built: Nov 15 2013 10:15:53)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
with XCache v3.0.3, Copyright (c) 2005-2013, by mOo
with XCache Cacher v3.0.3, Copyright (c) 2005-2013, by mOo
Question 1
The default settings from the installation has:
xcache.shm_scheme = mmap
xcache.mmap_path = /dev/zero
Why is mmap_path set to /dev/zero? doesn't this negate the whole thing? should it be set to a fixed file path.
Question 2
The other "size" settings are:
cache.size = 16M
xcache.slots = 8K
xcache.count = 1
Is there a methodical approach that can be used to work out the best configuration for these?
The stats are currently as such:
Note: I have seen it maxed out 100% usage previously.
Question 3
What does xcache.optimizer
do?
The FAQ says
Currently only the "cacher" and "coverager" modules are implemented, tested and known to be working, the "optimizer" does nothing. it will be available only in XCache version 2, which is in an early development stage.
But i somehow appear to have XCache 3.0.3 installed o_O
The Xcache documentation is very poorly maintained, and I recently did my best to work through what is available, answering a similar question. I'll paraphrase a bit to hit your specific points.
If this is set to an empty or invalid path the cacher will turn off. I believe this should be a writeable directory. (On linux servers the default /dev/zero/
should work; on OSX this failed so I successfully used /tmp/xcache/
instead)
size/count
amount of memoryThe cacher also allows for a user controlled variable cache, with analogous settings and consequences.
This feature seems to be abandoned, or indefinitely under development — ignore it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With