Implementing php5-xcache
Of the three "free" php opcode caching schemes APC, eAccelerator and Xcache, the latter had an installable package and appeared simplest to implement. I tried it on my local workstation first (always a good idea) and it came up with little difficulty.
apt-get install php5-xcache
Now generate the password.
echo -n "my_password" | md5sum -
Modify the username and password in /etc/php5/apache2/conf.d/xcache.ini
Hang the web code someplace easy to get at.
cp -a /usr/share/xcache/admin /var/www/xcache-web
Restart Apache.
/etc/init.d/apache2/restart
Point browser to http://localhost/xcache-web/
It works!
Now repeat on the "real" web server.
The OS version is a little moldy and the package php5-xcache installs but the configuration file is missing and the web pages don't work. Simple matter to upload those from the working version on my workstation.
It works! (Sort of.) Within seconds the default 16MB of opcode cache is exhausted. Edit the config file, bump the cache to 256MB and... It's a start.
XCache 1.2.0 Administration
Help » Statistics List PHP List Var Data
Caches:
| - | Slots | Size | Avail | % | Clear | Compiling | Hits | Misses | Clogs | OOMs | Protected | Cached | Deleted | GC |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| php#0 | 8.00 K | 256.00 M | 424.00 b |
|
no | 31,031 | 3,947 | 394 | 2,567 | no | 1,380 | 0 |
| php#0 size offset |
256.00 M |
|---|
php Cached
Good reason to use shared code and a Drupal "farm". I may try 512MB tomorrow but I am beginning to feel the pinch on memory. MySQL is now hogging the CPU and UTF-8 makes a mockery of reading /var/log/mysql/mysql.log. That passes.
Now it is time to implement some performance measuring tools.
- tarvid's blog
- Login or register to post comments
- Printer-friendly version
- Send to friend








