Greg Szorc recently pointed me to this excellent PHP optimization tutorial presented at OSCON 2006 by Rasmus Lerdorf. In the tutorial, he shows how to build a website with some basic SQL calls that handles over 1100 requests/sec using optimization techniques. One of the optimizations he uses is an opcode cacher for PHP called APC. In gentoo, to get this optimization working required a simple emerge dev-php5/pecl-apc. Mr. Lerdorf then goes on to use http_load and callgrind to demonstrate the performance of the website and isolate problem sections.
The performance this PHP cacher provides is by far the best I have seen. I enabled it on this site and the pages are loading lightning fast. I did run into some problems. WP-Cache, an excellent page output caching module for WordPress, and APC don’t play well together. They caused a “White Page of Death” - that is, the first time I loaded a webpage, the page returns blank. Subsequent requests return the desired page, but this is hardly ideal.
Mark Jaquith documented this “white page of death” problem that occurs between the interaction of APC and WP-Cache. His solution, to filter out apc caching wp-cache’d pages, has not seemed to work for me yet. As of right now, I have disabled wp-cache because the performance benefits of APC outweighed those of WP-Cache.
Hopefully, one day, these two excellent solutions will live in harmony. I will continue to try to get them to co-exist as Mr. Jaquith has done. Currently, I have tried setting apc.filters=”-.*cache.*\.php” and apc.filters=”wp-cache-config”. I have tried every possible permutation of flushing the cache and restarting apache. No luck yet.
I played around a lot with the layout and style of the site. I did a lot of integration work with Gallery2 and wordpress. The result speaks for itself. The site will be slow today due to the upgrades.
Microsoft announced on Monday that they will work with XenSource to develop interoperability for Windows Server “Longhorn” Virtualization.
But why would Microsoft be interested in Xen and what does this mean for the virtualization market?
VMWare is currently the proven leader by leaps and bounds, but has designed a virtualized environment that uses technology known as “native virtualization“. While native virtualization allows for easy support of any operating system, it loses in a performance comparison to “paravirtualization“, which is the technology implemented by Xen.
It is a smart move on Microsoft’s part to collaborate with XenSource in their development of Microsoft Virtual Server because they can leverage Xen’s Linux performance advantages while being hosted on a Windows server. This will allow former Xen users to easily migrate their virtualized Linux servers to a Windows based solution. Unfortunately for the Linux camp, it looks like Microsoft will not be returning the favor by helping to improve Windows running under Xen (which is possible, if you have the right hardware).
This took me too long to findt/remember for such a simple task, so I’ll blog it. If you want to create a core dump file in Unix/Linux when your C/C++ program crashes, you need to set your environment to create it:
ulimit -c [max filesize in KB]
I usually set it to:
ulimit -c 10000
If you set the max too small, your file will be truncated and will be unreadable by gdb.
A new goal: One photo a day. Every day. I might need to rethink my gallery situation before I start this project. Currently, there are nearly 20,000 photos in my gallery. One of these days I swear I am going to label them all. I suppose I will stick with PHP Gallery, as it has gotten me this far, but I need to rethink the presentation strategy.