Home

drupal.ls.net

Navigation

  • About
  • Blogs
  • Contact
  • Forums
  • Image galleries
  • Log in
  • Feed aggregator
Home Blogs tarvid's blog
    • Drupal
    • LSNet

Core security advisories

  • SA-CORE-2010-002 - Drupal core - Multiple vulnerabilities
more

Contrib security advisories

  • SA-CONTRIB-2010-089 - Simplenews Content Selection - Cross Site Scripting
  • SA-CONTRIB-2010-088 - Content Construction Kit (CCK) - Access Bypass
  • SA-CONTRIB-2010-087 - GovDelivery - Cross site scripting
  • SA-CONTRIB-2010-086 - Prepopulate - Access Bypass
  • SA-CONTRIB-2010-085 - Pathauto - Cross Site Scripting
more

Drupal security announcements

  • PSA-2010-002 - Views - Administer views permission
  • PSA-2010-001: Policy on release versions and permissions
more

Drupal.org jobs feed

  • Marketing Website Developer | Western Governors University
  • Coder | Fidoli Bilişim Teknolojileri
  • Drupal developer | ubergig
  • Javascript developer | ubergig
  • Web Developer | MIT
more

Visit our client's websites

  • http://bridle-creek.com
  • http://demo.mydllurth.com
  • http://downtowngalax.com
  • http://drupal.ls.net
  • http://crossleft.org/
  • http://cuttingedgelaw.com/
  • http://new-river.dixongarner.com/
  • http://import.mydllurth.com
  • http://lyceum.mydllurth.com
  • http://mtvaleumc.org
  • http://news.mydllurth.com
  • http://oldcranks.com
  • http://psychguides.com
  • http://starbuck.net
  • http://stewartfurniture.com
  • http://tarvid.org
  • http://ubercart.ls.net
  • http://wolfeservices.net

Events

« September 2010
SunMonTueWedThuFriSat
1234
567891011
12131415161718
19202122232425
2627282930

Implementing php5-xcache

Submitted by tarvid on Fri, 03/13/2009 - 23:33

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  
Free Blocks:
php#0 size
offset
424.00 b
256.00 M
 

php Cached


Cache entry Hits Refcount Size SrcSize Modify device inode Access Create
php#0 0 /home/lsnet/public_html/downtowngalax.com/sites/all/modules/ed_classified/ed_classified_settings.inc 9 0 50.08 K 7.51 K 6 M 2049 6176769 1 m 32 m
php#0 1 /home/lsnet/public_html/drupal.ls.net/includes/actions.inc 73 0 79.31 K 13.01 K 3 w 2049 22102019 23 s 31 m
php#0 2 /home/lsnet/public_html/downtowngalax.com/includes/common.inc 9 0 779.38 K 122.45 K 2 w 2049 8372227 1 m 32 m
php#0 3 /home/adumbral/public_html/mydllurth.com/index.php 10 0 6.34 K 872.00 b 2 Y 2049 20512773 3 m 30 m
php#0 4 /home/lsnet/public_html/drupal.ls.net/includes/bootstrap.inc 73 0 247.06 K 36.87 K 2 w 2049 22102021 23 s 31 m

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
  • PDF version
  • Delicious
  • Digg
  • StumbleUpon
  • Facebook
  • Google
  • Technorati

User login

What is OpenID?
  • Log in using OpenID
  • Cancel OpenID login
  • Create new account
  • Request new password
Powered by Drupal, an open source content management system
RoopleTheme