<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Karl Katzke &#187; php</title>
	<atom:link href="http://www.karlkatzke.com/categories/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.karlkatzke.com</link>
	<description>PHP, Puppies, and other Geekery</description>
	<lastBuildDate>Wed, 10 Mar 2010 22:07:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Detecting and Resolving LAMP Stack Problems &#8211; Scheduled Downtime</title>
		<link>http://www.karlkatzke.com/detecting-and-resolving-lamp-stack-problems-scheduled-downtime/</link>
		<comments>http://www.karlkatzke.com/detecting-and-resolving-lamp-stack-problems-scheduled-downtime/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 04:51:15 +0000</pubDate>
		<dc:creator>karlkatzke</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[apc]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[Drupal]]></category>
		<category><![CDATA[innodb]]></category>
		<category><![CDATA[myisam]]></category>
		<category><![CDATA[xcache]]></category>

		<guid isPermaLink="false">http://www.karlkatzke.com/?p=536</guid>
		<description><![CDATA[In the last issue of my current consulting saga, Detecting and Resolving LAMP Stack Performance Problems, we talked about a Drupal site that was being brought offline every few hours due to poor tuning of the LAMP stack. With the default settings, a site isn&#8217;t going to take much before it just falls flat on [...]]]></description>
			<content:encoded><![CDATA[<p>In the last issue of my current consulting saga, <a href="http://www.karlkatzke.com/detecting-and-resolving-lamp-stack-performance-problems/">Detecting and Resolving LAMP Stack Performance Problems</a>, we talked about a Drupal site that was being brought offline every few hours due to poor tuning of the LAMP stack. With the default settings, a site isn&#8217;t going to take much before it just falls flat on it&#8217;s face. </p>
<p>After triaging and addressing the main issues based on the logs, we were left with two more issues. The first was the inability of Drupal to perform well in an environment where it had to rebuild every page from source for every page view. This is well documented in the drupal community; there are many pages inn the documentation area of Drupal that deal with caching and performance optimization. The second issue was MySQL performance and the long table lock/scan times we were seeing on some queries that could not be further optimized. </p>
<p>We scheduled a 2 hour downtime with the customer to install some tools. Our checklist was installing <a href="http://www.danga.com/memcached/">memcached</a> and <a href="http://pecl.php.net/package/APC">PHP-APC</a>. I also wanted to take the time to back up the MySQL database and run a good check_table on each of the MyISAM tables. (Yes, I know. MyISAM. More on that later.) </p>
<p><small>Side note: I would typically prefer <a href="http://xcache.lighttpd.net/">xcache</a>, which in my mind is superior to APC because I have an easier time working with it and prefer it&#8217;s management interface and tuning parameters. However, APC was available as a binary package for the platform we were on, and xcache was not. To make things faster and easier, we chose APC. Despite the endless debate about which is superior, both are usable and work. I have not run into problems using APC on an 8-core system, despite oft-reported-but-never-proven flock() issues.</small> </p>
<p>APC was fast to install and required minimal tuning. It produced a noticeable performance improvement. However, the number of deadlocked apache threads (and total number of apache threads) went up, and the other Apache errors that dealt with clients timing out did not cease. </p>
<p>We installed <a href="http://drupal.org/project/memcache">the Drupal Memcache implementation</a> along with the appropriate PECL module. We configured two pools, both using up to 1 GB of RAM (which we had to spare on the web server.) The &#8216;hot&#8217; pool would mostly handle cached pages for non-logged-in users, and the other one would handle some higher volume caching for users that are logged in, as well as some internal/custom functionality to go along with specialized RSS feed parsing. (Side note: We found that the <a href="http://drupal.org/project/cache">Cache</a> and <a href="http://drupal.org/project/cacherouter">Cacherouter</a> plugins did not work as expected. Rather than waste downtime troubleshooting them, we used what worked.)</p>
<p>Again, we saw a huge performance boost. We needed to do some tuning (changing certain cache settings and analyzing performance, but that was essentially everything that we could find to do from a single-server web server side of things. </p>
<p>While we&#8217;re on the topic of drupal: Don&#8217;t forget that Drupal has a &#8216;cron&#8217; program that should be getting called remotely. It&#8217;s sort of a <a href="http://drupal.org/cron">poor man&#8217;s cron solution</a>, but it works. It was causing our load to spike every 20 minutes. We occasionally disabled it during testing to be sure we understood it&#8217;s effects. </p>
<p>The next beast to tackle was the database. As previously mentioned, it was on MyISAM tables. Obviously, this isn&#8217;t ideal. We found that node lookups, statistics lookups, and searches were taking up a disproportionate amount of server time because they were both  The weirdest part was that we were seeing some full table scans in the slow query log (i.e. 3 million rows scanned) but a later &#8216;explain&#8217; statement couldn&#8217;t replicate the performance recorded in the slow query log. </p>
<p>We batted around adding indexes. The issue was that Drupal&#8217;s search and nodes tables are frequently altered, which means the indexes become scrambled quickly. And really, what was taking time was the size of the table we were dealing with &#8212; the table wouldn&#8217;t fit in memory, so it was copying it to a disk temporary table and then doing a filesort. </p>
<p>Running check_table did the trick to re-sort the indexes and &#8216;defrag&#8217; the files, but the benefits only lasted so long. </p>
<p>What we ended up doing was taking the database down, dumping everything out to a SQL file, and re-importing everything to InnoDB. Make sure that innodb_files_per_table is enabled, or you might end up with some unexpectedly big files &#8212; this depends on your architecture and filesystem. Remember that InnoDB files can not currently shrink. (Also: You <b>can</b> do the table changes online, but it&#8217;s really not recommended. It takes a long time, especially when some of your tables are larger than 1gb.) Don&#8217;t forget to switch to <a href="http://www.mysqlperformanceblog.com/2007/11/03/choosing-innodb_buffer_pool_size/">set innodb_buffer_pool_size</a> appropriately.</p>
<p>The change to InnoDB, the implementation of both PHP engine-level opcode and actual built pages, and the careful tuning of Apache and MySQL parameters led to stability for this client. </p>
<p>There were some further problems, but they were with an unrelated product that causes a nightly load spike on the database machine. Tomorrow night I&#8217;ll covering the cleanup work: NFS iops vs. local disk, binary logging and the lack of backups in the original configuration, and building some redundancy into the system so that it can tolerate faults more smoothly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.karlkatzke.com/detecting-and-resolving-lamp-stack-problems-scheduled-downtime/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Detecting and Resolving LAMP Stack Performance Problems</title>
		<link>http://www.karlkatzke.com/detecting-and-resolving-lamp-stack-performance-problems/</link>
		<comments>http://www.karlkatzke.com/detecting-and-resolving-lamp-stack-performance-problems/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 03:45:34 +0000</pubDate>
		<dc:creator>karlkatzke</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[deadlock]]></category>
		<category><![CDATA[lamp]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[problems]]></category>
		<category><![CDATA[syslog]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://www.karlkatzke.com/?p=534</guid>
		<description><![CDATA[As a sysadmin, we sometimes run into performance problems with multiple angles and portions. It&#8217;s sometimes not particularly obvious where the actual performance problem is, and resolving one problem that you can see might bring another couple of problems to the surface. 
The below comes from a consulting gig that I&#8217;ve been working on recently. [...]]]></description>
			<content:encoded><![CDATA[<p>As a sysadmin, we sometimes run into performance problems with multiple angles and portions. It&#8217;s sometimes not particularly obvious where the actual performance problem is, and resolving one problem that you <i>can</i> see might bring another couple of problems to the surface. </p>
<p>The below comes from a consulting gig that I&#8217;ve been working on recently. The parties will remain nameless. I&#8217;m going to break this into several parts, since it took over three weeks to resolve all of the immediate <i>problems</i> with the site, and we&#8217;re still not all the way done with the task list. </p>
<p>Going in, I knew that we were dealing with a heavily loaded Drupal site that shared a mysql database with a wiki and a forum. The site would go down at random times &#8212; sometimes multiple times per hour. Upon logging into the server the first time, it seemed slow &#8212; so I immediately called &#8216;uptime&#8217; and the answer came back with all three time period load averages over 90 on an 8-core server. There were 125 Apache processes running, but most of them were in Deadlocked state. The very second command I ran on the server was <code>killall -9 httpd</code>, which is never the way you want to start out a consulting gig&#8230; </p>
<p>While that was busy killing off processes, I checked the Apache configuration. Sure enough, it was still at the stock settings. I immediately cranked up the requests per process to 20,000 and upped the server limit to 300. (Remember, we&#8217;re dealing with prefork here.) I restarted Apache and watched it churn. It handled the load far more gracefully with some room to move around, and I quickly saw the number of Apache processes spike, and then sink down to about 80 and stay there. </p>
<p>The next step was looking through the logs. A quick aside about logs: I like my logs to be clean. I don&#8217;t like debug messages, I don&#8217;t like status messages, and I don&#8217;t want to see either of them. If I have a lot of a certain type of status message that I *do* want to trap, I make sure that syslog puts it into it&#8217;s own file or I handle the problem that&#8217;s causing it. In this case, <code>/var/log/messages</code> had a bunch of SNMP messages logging each get, and some messages about martian packets. The martian packets issue could be (and was) resolved with a quick firewall tweak to reject packets from an illegal source. The snmp issue was resolved by editing snmpd&#8217;s startup configuration to log to local1 instead of the default (check your man file for snmpd to make sure you get the right flags, it&#8217;s changed&#8230;), and then editing syslog&#8217;s configuration to log everything on local1 to /var/log/snmpd &#8212; and don&#8217;t forget to add it to logrotate! </p>
<p>Now we were down to two classes of errors. The first was obvious and sort of easy to troubleshoot: &#8220;MySQL server has gone away.&#8221; Log into the MySQL server. See if there&#8217;s slow-running queries. Nope? Well, double check the timeout that&#8217;s set in <code>/etc/my.cnf</code> &#8212; on this server, slow-query-time was set to twenty seconds, but timeout was set to ten seconds. Well, that&#8217;s not very useful. Also, check your caches and table types. In this case, everything was MyISAM. More on that later &#8212; for now, just make sure we&#8217;re using the right kind of caching strategy for your table type and system specs, which in this case is MyISAM key cache (and lots of it!). Try to fit all of your most-used tables in memory. </p>
<p>On this gig, we got the site back on it&#8217;s feet with these things. Downtime went from multiple events an hour down to one or two events per six hour period. Unfortunately, we were also out of easy things to change. Next time I post, we&#8217;ll start to get into fixes that will <i>cause</i> downtime. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.karlkatzke.com/detecting-and-resolving-lamp-stack-performance-problems/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A few open-source/php articles&#8230;</title>
		<link>http://www.karlkatzke.com/a-few-open-sourcephp-articles/</link>
		<comments>http://www.karlkatzke.com/a-few-open-sourcephp-articles/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 17:45:17 +0000</pubDate>
		<dc:creator>karlkatzke</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[doctrine]]></category>
		<category><![CDATA[gpl]]></category>
		<category><![CDATA[pecl]]></category>

		<guid isPermaLink="false">http://www.karlkatzke.com/?p=475</guid>
		<description><![CDATA[PHP Performance Tips &#8211; A few comments: xcache has a usable GUI to clear the bytecode cache and analyze hits. I haven&#8217;t used APC recently so I can&#8217;t speak to it. 
20 Questions about the GPL
Doctrine now in PECL &#8212; to speed up a performance-sensitive part, they&#8217;re moving some of Doctrine&#8217;s hydration code into an [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li><a href="http://php100.wordpress.com/2009/07/13/php-performance/">PHP Performance Tips</a> &#8211; A few comments: xcache has a usable GUI to clear the bytecode cache and analyze hits. I haven&#8217;t used APC recently so I can&#8217;t speak to it. </li>
<li><a href="http://jacobian.org/writing/gpl-questions/">20 Questions about the GPL</a></li>
<li><a href="http://www.doctrine-project.org/documentation/user/1_1/en/doctrine-pecl-extension">Doctrine now in PECL &#8212; to speed up a performance-sensitive part, they&#8217;re moving some of Doctrine&#8217;s hydration code into an optional PECL extension. Recommended for anyone who&#8217;s using Doctrine in production on a high load site, but still in early alpha.</a>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.karlkatzke.com/a-few-open-sourcephp-articles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SVN for PHP Devs</title>
		<link>http://www.karlkatzke.com/svn-for-php-devs/</link>
		<comments>http://www.karlkatzke.com/svn-for-php-devs/#comments</comments>
		<pubDate>Wed, 20 May 2009 03:24:05 +0000</pubDate>
		<dc:creator>karlkatzke</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[source control]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://www.karlkatzke.com/?p=473</guid>
		<description><![CDATA[Matthew Weier-O&#8217;Phinney uploaded the slides from a presentation on using version control (Specifically, Subversion) aimed at new developers. If you don&#8217;t already use some form of version control (svn, git, bzr, or god forbid cvs), you should. 
]]></description>
			<content:encoded><![CDATA[<p><a href="http://weierophinney.net/matthew/">Matthew Weier-O&#8217;Phinney</a> uploaded the <a href="http://www.slideshare.net/weierophinney/practical-svn-for-php-developers">slides from a presentation on using version control (Specifically, Subversion) aimed at new developers</a>. If you don&#8217;t already use some form of version control (svn, git, bzr, or god forbid cvs), you should. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.karlkatzke.com/svn-for-php-devs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Redis</title>
		<link>http://www.karlkatzke.com/redis/</link>
		<comments>http://www.karlkatzke.com/redis/#comments</comments>
		<pubDate>Thu, 14 May 2009 03:33:33 +0000</pubDate>
		<dc:creator>karlkatzke</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[hadoop]]></category>
		<category><![CDATA[keyvalue]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[redis]]></category>
		<category><![CDATA[Tokyo Cabinet]]></category>
		<category><![CDATA[tuple]]></category>

		<guid isPermaLink="false">http://www.karlkatzke.com/?p=466</guid>
		<description><![CDATA[Redis is an interesting database project that reminds me a bit of a low-cost-of-entry hadoop/couchDB/simpleDB. &#8220;MySQL is to Oracle as Redis is to couchDB.&#8221;
It&#8217;s a simple key/value database that keeps everything in RAM but writes to disk occasionally, sort of the way MySQL works but without the whole overhead of SQL. So, kind of like [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://code.google.com/p/redis/">Redis is an interesting database project</a> that reminds me a bit of a low-cost-of-entry <a href="http://en.wikipedia.org/wiki/Hadoop">hadoop</a>/<a href="http://en.wikipedia.org/wiki/CouchDB">couchDB</a>/<a href="http://en.wikipedia.org/wiki/SimpleDB">simpleDB</a>. &#8220;MySQL is to Oracle as Redis is to couchDB.&#8221;</p>
<p>It&#8217;s a simple key/value database that keeps everything in RAM but writes to disk occasionally, sort of the way MySQL works but without the whole overhead of SQL. So, kind of like the bastard stepchild of <a href="http://tokyocabinet.sourceforge.net/">Tokyo Cabinet</a> and <a href="http://www.danga.com/memcached/">memcached</a>. </p>
<p>Frankly, I&#8217;m not sure I buy the justification for needing to keep everything in RAM. It makes it easy in the short term, but in the long term as your dataset grows, it becomes a pain in the ass to store even 32GB of data. With intelligent caching on a dataset, you should easily be able to saturate a gigabit connection even while doing computations. And there&#8217;s plenty of implementations (even commercial ones) of <a href="http://en.wikipedia.org/wiki/Tuple_space">Tuple Space</a> already.</p>
<p>Redis *does* seem to be the new cool kid on the block, though. Who knows, maybe it&#8217;ll be the next MySQL. You know, &#8220;Hey, kid, get a real database!&#8221; </p>
]]></content:encoded>
			<wfw:commentRss>http://www.karlkatzke.com/redis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Look Like an Epic Jackhole</title>
		<link>http://www.karlkatzke.com/how-to-look-like-an-epic-jackhole/</link>
		<comments>http://www.karlkatzke.com/how-to-look-like-an-epic-jackhole/#comments</comments>
		<pubDate>Mon, 04 May 2009 02:01:44 +0000</pubDate>
		<dc:creator>karlkatzke</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[jackass]]></category>

		<guid isPermaLink="false">http://www.karlkatzke.com/?p=443</guid>
		<description><![CDATA[http://bugs.php.net/bug.php?id=48139
I wish the guy had put his real name in the ticket. How much mocking spam do you think that email address is receiving right now? 
]]></description>
			<content:encoded><![CDATA[<p><a href="http://bugs.php.net/bug.php?id=48139">http://bugs.php.net/bug.php?id=48139</a></p>
<p>I wish the guy had put his real name in the ticket. How much mocking spam do you think that email address is receiving right now? </p>
]]></content:encoded>
			<wfw:commentRss>http://www.karlkatzke.com/how-to-look-like-an-epic-jackhole/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend Framework Debug Bar</title>
		<link>http://www.karlkatzke.com/zend-framework-debug-bar/</link>
		<comments>http://www.karlkatzke.com/zend-framework-debug-bar/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 19:08:16 +0000</pubDate>
		<dc:creator>karlkatzke</dc:creator>
				<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://www.karlkatzke.com/?p=422</guid>
		<description><![CDATA[A replacement for the one thing I missed about Symfony.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://jokke.dk/blog/2009/01/introducing_the_scienta_zf_debug_bar">A replacement for the <b>one</b> thing I missed about Symfony.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.karlkatzke.com/zend-framework-debug-bar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reading List: 6Feb09</title>
		<link>http://www.karlkatzke.com/reading-list-6feb09/</link>
		<comments>http://www.karlkatzke.com/reading-list-6feb09/#comments</comments>
		<pubDate>Sat, 07 Feb 2009 00:26:22 +0000</pubDate>
		<dc:creator>karlkatzke</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[reading list]]></category>

		<guid isPermaLink="false">http://www.karlkatzke.com/?p=372</guid>
		<description><![CDATA[It&#8217;s been a while, but that just means that I&#8217;ve had the free time to keep up with my reading and haven&#8217;t had to make a list to come back to later. 

About Slugging; that&#8217;s primarily of interest to DC people but is a very cool concept.
Related to the above is Casual Carpooling in SF; [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a while, but that just means that I&#8217;ve had the free time to keep up with my reading and haven&#8217;t had to make a list to come back to later. </p>
<ul>
<li><a href="http://www.slug-lines.com/Slugging/About_slugging.asp">About Slugging</a>; that&#8217;s primarily of interest to DC people but is a very cool concept.</li>
<li>Related to the above is Casual Carpooling in SF; there are some <a href="http://sippey.typepad.com/filtered/2008/07/casual-carpool-serendipity-and-radovan-karadzic.html">interesting stories</a>. Above two links via Kottke.</li>
<li>From the &#8220;Yes, Mom, I&#8217;m still a PHP Coder&#8221; department, Php:Impact has <a href="http://phpimpact.wordpress.com/2009/02/01/zend-framework-automatic-dependency-tracking/">Automatic Dependency Tracking</a> in Zend Framework. I use this along with firebug to see exactly what kind of spiderweb I load.</li>
<li>Two articles for the foodies: <a href="http://www.cheapvegetablegardener.com/2009/02/hydroponics-101-introduction-to.html">Hydroponics 101 at the Cheap Vegetable Gardener</a> &#8230; who&#8217;s also something of a cheap mad scientist. Also, Kottke&#8217;s <a href="http://www.kottke.org/09/02/make-your-own-cheese-at-home">resources on making your own cheese at home</a>.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.karlkatzke.com/reading-list-6feb09/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use strace to speed up PHP</title>
		<link>http://www.karlkatzke.com/use-strace-to-speed-up-php/</link>
		<comments>http://www.karlkatzke.com/use-strace-to-speed-up-php/#comments</comments>
		<pubDate>Wed, 04 Feb 2009 15:03:33 +0000</pubDate>
		<dc:creator>karlkatzke</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[speed]]></category>

		<guid isPermaLink="false">http://www.karlkatzke.com/?p=370</guid>
		<description><![CDATA[MySQL DBA has a great article on how to reduce load and response time in a PHP application&#8230; they do it by cutting down on a lot of the autoloading that happens when PHP wakes up and starts to process a page. 
Another way to accomplish a similar thing is to keep a bytecode compiler [...]]]></description>
			<content:encoded><![CDATA[<p>MySQL DBA has a great article on <a href="http://mysqldba.blogspot.com/2009/02/how-to-reduce-load-and-response-time-in.html">how to reduce load and response time in a PHP application</a>&#8230; they do it by cutting down on a lot of the autoloading that happens when PHP wakes up and starts to process a page. </p>
<p>Another way to accomplish a similar thing is to keep a bytecode compiler like xcache running on your server; theoretically it keeps those startup functions already compiled and ready to go. Cutting down on the number of Apache modules and PHP extensions that you don&#8217;t need will also help. (That&#8217;s one of the reasons that I prefer to run individual VMs when serving up a high-load PHP application&#8230; easier to customize the environment for just that app.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.karlkatzke.com/use-strace-to-speed-up-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yet</title>
		<link>http://www.karlkatzke.com/yet/</link>
		<comments>http://www.karlkatzke.com/yet/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 03:40:22 +0000</pubDate>
		<dc:creator>karlkatzke</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.karlkatzke.com/?p=327</guid>
		<description><![CDATA[I&#8217;d forgotten about the PHP Advent until Matthew tweeted earlier with a link to &#8220;Yet&#8221; by Marco Tabini. This is the magnum opus of PHP descriptions &#8212; so far, it&#8217;s detailed everything I love, hate, and love to hate about the language. 
A few choice quotes:
If there were a product statement for PHP, it’d probably [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;d forgotten about the <a href="http://phpadvent.org/2008">PHP Advent</a> until Matthew tweeted earlier with a link to <a href="http://phpadvent.org/2008/yet-by-marco-tabini">&#8220;Yet&#8221; by Marco Tabini</a>. This is the magnum opus of PHP descriptions &#8212; so far, it&#8217;s detailed everything I love, hate, and love to hate about the language. </p>
<p>A few choice quotes:</p>
<blockquote><p>If there were a product statement for PHP, it’d probably be something like “only a drunken Martian could come up with this.”</p></blockquote>
<blockquote><p>The elegance of PHP, therefore, is in its inelegance. The cost of admission to this most wonderful of development platforms is the fact that the language feeds you as much rope as you want and, therefore, the threshold for writing bad code is as low as what’s required to write any code.</p></blockquote>
<blockquote><p>The flip-side of frameworks is, of course, that they force the programmer into adopting a specific pattern for software development and, therefore, the learning curve is much steeper than “plain old PHP.” Invariably, PHP developers who try to settle into a framework have the (often irresistible) urge to simply drop it and write their own, because, you see, there is no framework that does things the way he or she wants—yet.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.karlkatzke.com/yet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
