Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: How to speed up website performance using caching solution XCache?  (Read 1250 times)

0 Members and 1 Guest are viewing this topic.

joseletk

  • Guest
If you are looking for caching solution to speed up the website performance, XCache is one of the best solutions.

What is XCache and use of it:

1. XCache accelerates the performance of PHP on servers. It speed up the page loading.
2. XCache optimizes performance by eliminating the compilation time of php scripts by caching the compiled state of php scripts in to the RAM and uses the compiled version straight from the RAM.
3. This will increase the rate of page generation time upto 5 times as it also optimizes many other aspects of php scripts and reduce server load.

How to enable XCACHE via SSH:

1. Download the XCACHE

2. For linux VPS, you can login to your server via SSH and execute following commands for XCACHE installation:

Code: [Select]
# wget xcache.lighttpd.net/pub/Releases/3.1.0/xcache-3.1.0.tar.gz [this line will download the XCACHE]
# tar -zxvf xcache-3.1.0.tar.gz [this line will extract the file]
# cd xcache-3.1.0
# phpize
# ./configure –enable-xcache
# make
# make install

3. Now, add the following extension in php.ini file:

Code: [Select]
extension=xcache.so
4. Restart Apache

How to enable XCACHE from WHM/cPanel:

1. Login to your WHM
2. Go to EasyApache from left hand pane options
3. Keep Previously Saved Config option selected and click on Start customizing based on profile
4. Do not need to change anything in Apache and PHP. Simply click on Next button to goto next steps
5. From Short Option List, you will have an option xcache for php. Select this option and click on Save and Build
6. It will take few minutes to complete the Build process. Once done restart Apache from WHM
7. You can modify the values set for Xcache from php.ini file

Following are the recommended settings for Xcache, however, you can modify them as per your requirements:

XCache Administration Settings:

Code: [Select]
xcache.admin.user="mOo"
xcache.admin.pass=""
xcache.admin.enable_auth="on"
xcache.test="Off"
xcache.coredump_directory=""
xcache.disable_on_crash="off"

Cache Cacher Settings:

xcache.cacher="On"
xcache.stat=”On”
xcache.shm_scheme="mmap"
xcache.readonly_protection=Off
xcache.size="50M"
xcache.count="1"
xcache.slots="8K"
xcache.ttl="3600"
xcache.gc_interval="300"
xcache.var_size="16M"
xcache.var_count="2"
xcache.var_slots="8K"
xcache.var_ttl="3600"
xcache.var_maxttl="7200"
xcache.var_gc_interval="300"
xcache.mmap_path="/dev/zero"
xcache.readonly_protection="Off"

XCache Optimizer Settings:

Code: [Select]
xcache.optimizer="On"
XCache Coverager Settings:

Code: [Select]
xcache.coverager="Off"
xcache.coverager_autostart=”Off”
xcache.coveragedump_directory="/tmp/pcov/"

You can verify installed Xcache and its settings by uploading simple phpinfo() page.
=========================================================================