XCache on OpenBSD

On my way for constant Web site rendering improvement, I decided to give XCache a try. I’ve been using eaccelerator for a long time and found it very efficient. But I never looked at the Google WebMaster Tools metrics before :)

On the Web server:

  • Install the XCache package:
    # pkg_add xcache
    # ln -fs /var/www/conf/php5.sample/xcache.ini /var/www/conf/php5/xcache.ini
  • Disable the eaccelerator module:
    # rm /var/www/conf/php5/eaccelerator.ini
  • Restart the Apache dæmon:
    # apachectl stop
    # apachectl startssl

Check the logs to ensure everything when right.

You may use the default configuration. I did a few modifications to mine:

xcache.size = 64M
xcache.count = 2

I tried enabling the xcache.optimizer but it didn’t seemed to do any goods to the rendering speed.

With eaccelerator, I got:

Requests per second:    0.42 [#/sec] (mean)
Time per request:       11899.769 [ms] (mean)
Time per request:       2379.954 [ms] (mean, across all concurrent requests)
Transfer rate:          12.38 [Kbytes/sec] received

With XCache, I got:

Requests per second:    0.44 [#/sec] (mean)
Time per request:       11270.220 [ms] (mean)
Time per request:       2254.044 [ms] (mean, across all concurrent requests)
Transfer rate:          13.16 [Kbytes/sec] received

I’ll check Google’s bot statistics later on to see if the optimization works nice. Or not :p

Author: Joel Carnat

@work Technical Architect and SysAdmin ; @home OpenBSD and FOSS, Karate, Kobudō, Jōdō, Bodyweight workout, Photography & Music

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.