linux poison RSS
linux poison Email

How to Accelerates the Performance of PHP Scripts - XCache

XCache is a open-source opcode cacher, which means that it accelerates the performance of PHP on servers. It optimizes performance by removing the compilation time of PHP scripts by caching the compiled state of PHP scripts into the shm (RAM) and uses the compiled version straight from the RAM. This will increase the rate of page generation time by up to 5 times as it also optimizes many other aspects of php scripts and reduce server-load.

The XCache project is lead by mOo who is also a developer of Lighttpd. Lighttpd is one of the fastest web-server programs and outperforms Apache and many other open source web-serving projects so the same is being done to XCache.

If you're interested in some benchmarks of XCache, eAccelerator, APC, etc. then checkout the Five Opcode Cache Comparison on PHP on Fire.

Installation
OpenSuSe user can install XCache using "1-click" installer - here

After sucessfull installation check the entries in your /etc/php5/conf.d/xcache.ini configuration file to suite your web-server requirement.

Restart apache using following command:
# /etc/init.d/apache restart
Make sure XCache is working, type following command:
php -v
PHP 5.3.0 (cli) (built: Oct 27 2009 17:41:09)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies
    with XCache v1.3.0, Copyright (c) 2005-2009, by mOo
If you wish to set up XCache administration page, configure an alias in httpd.conf of Apache to point to the admin subdirectory (/usr/share/php5/xcache/admin) within XCache.


1 comments:

NFL Schedule said...

Excellent pieces. Keep posting such kind of information on your blog. I really impressed by your blog.

Post a Comment

Related Posts with Thumbnails