From the monthly archives:

February 2007

PHP Acceleration - Pick Your Poison

by Vinny Carpenter on February 27, 2007

As I deployed more applications and web sites on my server, I started running into resource issues. Since most of the applications I write are in Java, I run Tomcat on my Linux server. But I also run Apache as a front-end host for Tomcat as well as several PHP applications like WordPress, Vanilla and a few other PHP applications that I've written. I am not an expert PHP developer by any stretch of the imagination but I tinker with enough PHP that I decided to take a look at PHP Acceleration software.

For the uninitiated, PHP is a scripting language that is interpreted and compiled on the server side. PHP Accelerators offer caching of the PHP scripts in their compiled state along with optimization. There are several PHP optimization products out there and I decided to give eAccelerator, XCache and APC a try on my Linux machine. For the record, the box is running CentOS 4.4 which is essentially a distribution that is repackaged Red Hat Enterprise Linux 4.x.

  • eAccelerator - eAccelerator is a free open-source PHP accelerator, optimizer, and dynamic content cache. It increases the performance of PHP scripts by caching them in their compiled state, so that the overhead of compiling is almost completely eliminated. It also optimizes scripts to speed up their execution. eAccelerator typically reduces server load and increases the speed of your PHP code by 1-10 times.
  • XCache - XCache is a fast, stable PHP opcode cacher that has been tested and is now running on production servers under high load.
  • APC - The Alternative PHP Cache (APC) is a free and open opcode cache for PHP. It was conceived of to provide a free, open, and robust framework for caching and optimizing PHP intermediate code.

I compiled and installed these PHP accelerators and found APC worked the best for me. XCache seemed to work well and actually provided a nice admin application that lets you peek inside the cache to see what's cached, the hit/miss ratio, etc. eAccelerator also seemed to work well and offered a great performance boost but caused segmentation fault and made the Apache web server unusable. It could have been bad PHP code that was causing the segmentation faults but I didn't really spend any times getting to the root cause. APC just worked, pretty much like XCache but seemed to offer a little better performance. Now I didn't really perform any empirical testing here – I simply relied on my website monitor GrabPERF as I ran each PHP extension for a few days. Your mileage may vary based on your server architecture, application, lunar phase, etc but PHP APC seemed to work the best for me.

Tags: , , , , , , , , , , ,

Related posts

Daily del.icio.us for Feb 27, 2007

by Vinny Carpenter on February 27, 2007

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Related posts

Daily del.icio.us for Feb 25, 2007 through Feb 26, 2007

by Vinny Carpenter on February 26, 2007

Tags: , , , , , , , , , , , , , , , , , ,

Related posts

Daily del.icio.us for Feb 24, 2007

by Vinny Carpenter on February 24, 2007

Tags: , , , , , , , , , , , , , , ,

Related posts

Daily del.icio.us for Feb 23, 2007

by Vinny Carpenter on February 23, 2007

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Related posts

Birthday Tribute to Baby Gavin

by Vinny Carpenter on February 22, 2007

Gavin Winslow is beating the odds and is about to celebrate his first birthday. Gavin is my wife's cousin’s son and he was born on February 23, 2006 with end-stage renal failure, or congenital kidney failure. Gavy was born with only 10-15% function in one of his kidneys, and 0% functions in the other. He was admitted to Children’s hospital of Wisconsin immediately after his birth and started on peritoneal dialysis.

Gavin is a fighter and a tough little guy who is beating the odds every day as he gets ready for his kidney transplant. Gavin's family and friends have come together and helped raise $95,778.67 (as of 2/15/07) to help offset the cost of Gavin's transplant and transplant-related expenses. Visit www.savebabygavin.com for more details on Gavin’s journey.

Gavin’s mom Jill and my wife Kristin put together this video to celebrate his first birthday. Check it out and visit www.savebabygavin.com and donate to help Gavin celebrate many more birthdays.

Tags: , , , , ,

Related posts

Daily del.icio.us for Feb 20, 2007 through Feb 21, 2007

by Vinny Carpenter on February 21, 2007

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Related posts

Daily del.icio.us for Feb 19, 2007

by Vinny Carpenter on February 19, 2007

These are my links for Feb 19, 2007:

  • Census Mashups Using StrikeIron Web Services and Yahoo Maps in Flex 2 - Census Dashboard Mashup is a mashup using StrikeIron's Zip Code Information Web Service, StrikeIron's Population Demographics By ZIP Code Web Service and Yahoo Maps to give detailed information for a specific US zip code. I find it to actually be a really
  • Sun Updates Java Mozilla HTML Parser 1.0.1 - O'Reilly ONJava Blog - Java Mozilla HTML Parser 1.0.1 is a package which allows parsing HTML pages into a Java Document object. Wonder how it stacks up against HtmlCleaner (http://htmlcleaner.sourceforge.net/)
  • dmiessler.com | study | lsof - lsof is the Linux/Unix über-tool. I use it most for getting network connection related information from a system, but that's just the beginning for this amazing and little-known application
  • chalain: So Beautiful, So Disturbing - She gets out of bed and stretches, perfect curves sliding under silky lingerie and momentarily making me forget about breakfast, meatloaf, and whoever it was I was married to before last night.
  • Massive Google hard drive survey turns up very interesting things - Engadget - When your server farm is in the hundreds of thousands and you're using cheap, off-the-shelf hard drives as your primary means of storage, you've probably got a a pretty damned good data set for looking at the health and failure patterns of hard drives
  • Raible Designs | Slick looking Confluence sites - Wicket and Cayenne have nice looking websites backed by Confluence. Wicket has a Writing documentation page that explains how it works.
  • Upselling your architecture - The Pragmatic Architect - As an architect, you'll probably need to present to different audiences at different levels. When you do, it's worth thinking about whether you need to upsell your architecture or not.
  • MyEclipse Delivers Tools to IntelliJ IDEA Users - Developers using IDEA are now able to utilize the MyEclipse Visual HTML Designer, XML Editor, Database Explorer and Image Editor SNAPs directly in their own environment.
  • IntelliJ IDEA: Inspections by Sections … - Static code analysis doesn't just improve your code quality, it can also teach you some cool ideas and best practices about programming
  • Java Power Tools: Home - "Java Power Tools" is about software tools and techniques that can contribute to improving the SDLC which includes build tools such as Maven and Ant, CI tools, code quality tools, testing tools, collaborative tools, source version control, and more!
  • Rod Johnson » Sun's GlassFish Embracing Spring - I think part of what's making Sun more relevant in the enterprise Java space is that they are now more plugged into what's happening in the wider world, and are willing to take the input on board and act on it
Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Related posts

Daily del.icio.us for Feb 17, 2007 through Feb 19, 2007

by Vinny Carpenter on February 19, 2007

These are my links for Feb 17, 2007 through Feb 19, 2007:

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Related posts

Daily del.icio.us for Feb 17, 2007

by Vinny Carpenter on February 17, 2007

No tag for this post.

Related posts

ladies running on a picturesque beach