XCache and eAccelerator WP Plugins Updated

We've just finished uploading the latest versions of our XCache and eAccelerator plugins, now at version 0.6.

For those of you that missed the initial announcement, we've written two plugins that let WordPress communicate directly with memory-resident opcode PHP variable caches that are used in XCache and eAccelerator to boost performance and decrease I/O activity.

eAccelerator and XCache are the two most-popular open-source opcode caching engines for PHP, and we highly recommend that any and all hosts use them to improve PHP performance by several folds. In particular, we recommend XCache for best performance. The update to the WordPress opcode caching plugins brings a very important stability/reliability update to the table, especially for those of you running PHP as a multi-threaded (worker_mpm, PHP as ISAPI, PHP as NSAPI, etc.) extension to your application server (which isn't recommended with PHP!).

Aside from preventing future memory-access violation errors and heap corruption, version 0.6 fixes a minor bug that would incorrectly report that eAccelerator is installed and ready for opcode caching when it actually wasn't.

Download XCache for WordPress v0.6

Download eAccelerator for WordPress v0.6

[bug tracker] [support forums] [XCache] [eAccelerator]

NeoSmart Technologies uses and recommends XCache as the PHP opcode caching engine of choice for best performance, uptime, and stability.



Leave a Reply  •  About to Ask for Help?  •  Subscribe to Our Feed

55 Responses to “ XCache and eAccelerator WP Plugins Updated ”


  1. 1Margret ThatcherOct. 29th, 2007 at 4:24 pm

    Thanks for this - I'm on Apache w/ mod_apache (yes, I know, I'll be leaving it soon! and wtf is the point of mod_apache being so damn easy if it doesn't work (in mpm_worker mode)!!?!?!) and I was getting some heap corruption with XCache php extension when using this plugin.

    Now it's gone!! :)   

  2. 2Jason LitkaNov. 7th, 2007 at 4:44 pm

    An excellent bit of code!  I was actually getting ready to write my own script to utilize the var cache in XCache and this just saved me some time.

  3. 3chaoskaizerNov. 7th, 2007 at 11:17 pm

    sweet, two plugins release for caching, good jobs. tho would be better with APC

  4. 4Computer GuruNov. 7th, 2007 at 11:28 pm

    The APC one is already there. See the download page.

    But I don't know why you'd want to use APC - like everything else produced/maintained by PHP themselves, its performance isn't anything to write home about, especially compared to XCache and eAccelerator.

  5. 5Ma2TNov. 8th, 2007 at 4:13 am

    Great work!  I have been using XCache for a number of months now and it works wonders with wordpress, and of course other PHP sites.

     I can't wait to use your plugin to help even more.  One one, make sure people have their Variable Cache enabled :)  I have 2x 128mb of Opcode Cache, but 0mb of Variable (as I never needed it before).

     Cheers!

  6. 6JeremyNov. 8th, 2007 at 4:26 am

    Trying it out on WordPress MU, and apart from the fact that Apache2 segfaults after a few hours of running it, I can no longer access the Site Admin part of my WP Admin panel. It seems to have cached the privileges of a normal user, and not my own. Deleting object-cache.php magically makes the Site Admin button appear again.

  7. 7Computer GuruNov. 8th, 2007 at 5:08 am

    Does it work if you access that URI directly?

  8. 8JeremyNov. 8th, 2007 at 7:30 am

    Nope, I get a "You do not have permission to do that" message.

  9. 9Computer GuruNov. 8th, 2007 at 12:11 pm

    Well, I haven't tested it with WPMU, perhaps I'll get a chance sometime in the near future, but no guarantees. Pretty sad I guess, seeing as the highest concentration of heavy-load servers is most likely WPMU users in the first place :)

  10. 10JeremyNov. 8th, 2007 at 1:08 pm

    Well thanks for the interest, and if you ever want to get on my WPMU server to test anything out, I'll be happy to give you an account.

  11. 11AldereteNov. 9th, 2007 at 7:06 pm

    How about a version that works with the Zend optimizing and caching products? (That what my hosting company has installed.)

  12. 12JeremyNov. 10th, 2007 at 1:20 am

    Actually, I just confirmed that this is not a problem with your plugin. Even with your plugin disabled, but XCache enabled, Apache still segfaults after a few hours. I suspect a memory leak somewhere.

  13. 13Computer GuruNov. 10th, 2007 at 5:06 pm

    That's just PHP being a bitch.

    I assume you're using worker_mpm? PHP doesn't work properly in multi-threaded environments, despite what they say. Honestly, PHP was never made for anything other than CGI deployment, and FastCGI throws PHP a lifeline.

    PHP doesn't thread right, no matter what you do or what extensions you use, though PHP will tell you otherwise. In 3 years of self-hosting PHP, we found the only reliable high-uptime method to be either CGI or FastCGI - *sapi, mpm_worker/mpm_threaded are no go.

    Most likely you're running mpm_worker, you'll need to switch to mpm_prefork and sacrifice the huge performance difference in order to have stable PHP uptime.

    PHP may be a great language, but it's implentation sucks... on both Windows and Linux.

    We dealt with the last of the memory corruption (segfault) bugs in the XCache/eAccelerator plugins with this version, under heavy load-testing for extended periods of time (24 hours+ of non-stop load) without a problem.

  14. 14JeremyNov. 11th, 2007 at 7:18 am

    Nope, it's prefork.

    jeremy@ubuntu-www-2:~$ dpkg -s apache2-mpm-worker Package `apache2-mpm-worker' is not installed and no info is available.

    jeremy@ubuntu-www-2:~$ dpkg -s apache2-mpm-prefork Package: apache2-mpm-prefork Status: install ok installed

    Like I said, it happens even without your plugin (XCache running, but no WP integration). I think I'll have to pursue this with the XCache community (if there is one).

  15. 15adarNov. 11th, 2007 at 9:55 am

    hi, im using wordpress mu in blogmas.com. I have using eaccelerator for 3 day and i happy with it because i help me reduce server load by more than 100%.

    Today i install your eaccelerator plugin and everything is okay. So how i can confirm that your plugins doing the work?

    thanks for the great plugins.

  16. 16JeremyNov. 11th, 2007 at 11:22 am

    adar, what I did was I edited the plugin near the top, where it has the following:

    include_once(ABSPATH . WPINC . '/cache.php');

    Change it to:

    { error_log('Oh no! If you see this, the cache plugin isn\'t working!'); include_once(ABSPATH . WPINC . '/cache.php'); }

    After that, load a few pages, and look in your PHP error logs. If you see the message "Oh no! If you see this, the cache plugin isn't working!" anywhere, you'll know it's not working.

  17. 17Computer GuruNov. 11th, 2007 at 12:31 pm

    I think I'll add that to the next version, or perhaps have it echo it as an HTML comment, maybe.

    Jeremy, you can stop Apache from having a segfault if you run PHP in an "isolation" layer, like using the FastCGI or FastCGId modules.

    That way, if a PHP process dies out, it'll be silently replaced and Apache won't even know anything happened.

    The Apache FastCGI plugin is great, but more or less dead. Here's the fcgid module: http://fastcgi.coremail.cn/

    mod_fcgid -- an alternative FastCGI module for Apache2

    mod_fcgid has a new process management strategy, which concentrates on
    reducing the number of fastcgi server, and kick out the corrupt
    fastcgi server as soon as possible.

    mod_fcgid is binary-compatible with mod_fastcgi so your existing fastcgi
    programs do not need to be recompiled.  mod_fcgid supports suEXEC.

  18. 18RonNov. 12th, 2007 at 4:25 pm

    I've installed the xcache for wordpress v0.6 version in my WP 2.3.1's wp-content\plugins directory and it doesn't show up in the plugins screen in admin to enable this.  Any idea why?  (This is on Win2003 - Apache - XCache 1.2.1)

      XCache is working on a vbulletin forums that I have installed on the same machine.

    Thanks!

    Ron

     

  19. 19Computer GuruNov. 12th, 2007 at 5:24 pm

    It's not a real plugin in that it doesn't show in the plugins administration interface.

    This is because it's stored in /wp-content/ and not /wp-content/plugins/

  20. 20BlaKKJaKKJan. 4th, 2008 at 1:59 am

    Is anyone using eAccelerator with this plugin? XChache sounds good but my host supports installing eAccelerator for free and at this point, installing Xcache is probably a bit beyond my experience.

  21. 21Rob ScottMar. 4th, 2008 at 9:55 pm

    Hi,

    Firstly, thanks for the excellent work with this plugin. I've been trying to get my dedicated server to run faster with multiple WordPress installs. Given that I didn't know what apache meant until a few weeks ago, I'm doing OK - I got Xcache working after a couple of hours pissing about. I have one question about this plugin for wordpress though:

    How do I tell wordpress to use the plugin? - That is, does simply dropping the object-cache.php file (with my auth details therein) into wp-content do this on its own? If so, how? If not, as I suspect, I'll have to tell it using WP-Config where this cache info resides - how do I do that?

    Correct me if I'm wrong, its just that, after today's not uncommon trials and tribulations, it seems a little easy just to add this file et voila, it works - how does WordPress know to use it without me going in and defining this file??

    Thanks for your help.

    Rob

  22. 22Mahmoud Al-QudsiMar. 4th, 2008 at 11:01 pm

    Rob, WordPress 2.1+ will automatically search for object-cache.php, and if it's found WP will take care of the rest. It really is as simple as dragging-and-dropping the file and then you're set :)

  23. 23LazyMar. 17th, 2008 at 9:34 am

    In Wordpress 2.5 it seems that the object-cache changed a little bit.. or?

  24. 24Mahmoud Al-QudsiMar. 17th, 2008 at 9:42 am

    More than just a little :-)

    To the best of my knowledge, caching has been ATM removed completely from WP 2.5. But once you install these plugins, it'll be back like before.

  25. 25JeremyMar. 17th, 2008 at 9:43 am

    Indeed. The object cache is no longer file-based. (See ticket #5570.)

  26. 26LazyMar. 17th, 2008 at 11:23 am

    right.. memory based now and it seems (ive tested some hours ago..) that its the same speed as using xcache object-cache.. can someone agree? i`m not sure about my tests this morning (too less coffee..) and there are guys out there who have really skillz about that.. after all, 2.5 is really running great and the final should convince a lot people in my mind.. ;)

  27. 27Mahmoud Al-QudsiMar. 17th, 2008 at 7:09 pm

    Well, no. Not exactly. I'm planning a lengthy post on the matter today or tomorrow that should clear things up.

  28. 28LazyMar. 17th, 2008 at 8:14 pm

    thank you, Mahmoud Al-Qudsi. I´m looking forward to it, really.

    have a nice day!

    greetings,

    Chris

  29. 29Mahmoud Al-QudsiMar. 20th, 2008 at 7:17 pm

    I finally got around to making that post... it's a bit longer than I'd originally intended, but hopefully it gets the message across loud and clear:

    http://neosmart.net/blog/2008/wordpress-25-and-the-object-cache/

  30. 30jocuriJun. 5th, 2008 at 12:28 pm

    wow! excellent job and hope it will work for me..

    thanks

  1. 1 Donncha’s Wednesday Links at Holy Shmoly! Pingback on Oct. 31st, 2007 at 9:38 am
  2. 1 Donncha’s Friday Links at Holy Shmoly! Pingback on Nov. 2nd, 2007 at 10:29 am
  3. 1 How well did Super Cache handle the digg? at Holy Shmoly! Pingback on Nov. 7th, 2007 at 11:22 am
  4. 1 XCache Plugin for Wordpress at Utter Ramblings Pingback on Nov. 7th, 2007 at 4:41 pm
  5. 1 Run Wordpress, Run! | Simon Emery Pingback on Nov. 7th, 2007 at 7:05 pm
  6. 1 Keep Running Wordpress | Simon Emery Pingback on Nov. 7th, 2007 at 7:09 pm
  7. 1 Devlounge | WordPress Caching Overview Pingback on Nov. 7th, 2007 at 9:34 pm
  8. 1 Xcache and eAccelerator WordPress Plugins Pingback on Nov. 7th, 2007 at 11:18 pm
  9. 1 links for 2007-11-08 | Crooked Press Pingback on Nov. 8th, 2007 at 4:20 am
  10. 1 Brad's Ramblings Pingback on Nov. 8th, 2007 at 4:21 am
  11. 1 Getting WordPress Super Cache to Run on a Windows (IIS or Apache) Server at The NeoSmart Files Pingback on Nov. 8th, 2007 at 4:50 am
  12. 1 EricByers.com » Wordpress APC Object Cache Issues Pingback on Nov. 8th, 2007 at 8:05 am
  13. 1 Sarsura-Syrien.de: Update - Beitrag - Sarsura-Syrien Pingback on Nov. 8th, 2007 at 11:11 am
  14. 1 Speed up Wordpress with Xcache! at Delusions of Grandeur Pingback on Nov. 8th, 2007 at 4:43 pm
  15. 1 BlueHost-Wordpress Account Is Exceeding CPU Quota? | Insights, Inspiration, Tranquility, Peace and Harmony Pingback on Nov. 9th, 2007 at 12:50 am
  16. 1 KHIMICH Pingback on Nov. 9th, 2007 at 6:56 pm
  17. 1 Acelerando Wordpress | El Blog de Jose Manuel Suárez Pingback on Nov. 13th, 2007 at 6:09 pm
  18. 1 Plugins para WordPress: XCache y eAccelerator | La brujula verde Pingback on Nov. 24th, 2007 at 2:59 pm
  19. 1 Acelerando PHP - Carrero Bitácora de los Hermanos Carrero, David Carrero Fernández-Baillo y Jaime Carrero Fernández-Baillo. Pingback on Nov. 26th, 2007 at 7:50 am
  20. 1 Survive Large Traffic Spikes With The WP Super Cache WordPress Plugin Pingback on Dec. 17th, 2007 at 9:01 am
  21. 1 Wp Wordpress » Blog Archive » Survive Large Traffic Spikes With The WP Super Cache WordPress Plugin Pingback on Dec. 17th, 2007 at 10:13 am
  22. 1 Too Much Cookies Network Pingback on Mar. 20th, 2008 at 3:40 pm
  23. 1 Less Obvious New Stuff in WordPress 2.5 · Pressed Words Pingback on Mar. 29th, 2008 at 4:40 pm
  24. 1 Mencoba eAccelerator Wordpress Plugin | Sofyanspace Dot Com | A Newbie Blogger Pingback on Jun. 15th, 2008 at 10:10 pm
  25. 1 Insanity Redefined » Blog Archive » The Conclusive Guide To Wordpress Optimization Pingback on Jul. 27th, 2008 at 2:53 am

Leave a Reply