<?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>MaisonBisson.com &#187; apc</title>
	<atom:link href="http://maisonbisson.com/blog/post/tag/apc/feed/" rel="self" type="application/rss+xml" />
	<link>http://maisonbisson.com</link>
	<description>A bunch of stuff I would have emailed you about.</description>
	<lastBuildDate>Sat, 14 Nov 2009 20:14:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Installing PHP APC On RHEL/CentOS</title>
		<link>http://maisonbisson.com/blog/post/12589/installing-php-apc-on-rhel-centos/</link>
		<comments>http://maisonbisson.com/blog/post/12589/installing-php-apc-on-rhel-centos/#comments</comments>
		<pubDate>Mon, 15 Sep 2008 00:08:34 +0000</pubDate>
		<dc:creator>Casey</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[apc]]></category>
		<category><![CDATA[Centos]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rhel]]></category>
		<category><![CDATA[system administration]]></category>

		<guid isPermaLink="false">http://maisonbisson.com/?p=12589</guid>
		<description><![CDATA[

Yum up some packages:

yum install php-pear php-devel httpd-devel


Install APC using pear (the pear installer is smarter than the pecl installer):
When the installer asks about APXS, say &#8216;no&#8217;. 

pear install pecl/apc


Tell PHP to load APC:

echo extension=apc.so &#62; /etc/php.d/apc.ini


Restart Apache:

/sbin/service httpd graceful



]]></description>
			<content:encoded><![CDATA[<abbr class="unapi-id" title="maisonbisson-12589"><!-- &nbsp; --></abbr>
<ol>
<li>Yum up some packages:

<div class="wp_syntax"><div class="code"><pre class="csh" style="font-family:monospace;">yum install php-pear php-devel httpd-devel</pre></div></div>

</li>
<li>Install APC using pear (the pear installer is smarter than the pecl installer):<br />
When the installer asks about APXS, say &#8216;no&#8217;. </p>

<div class="wp_syntax"><div class="code"><pre class="csh" style="font-family:monospace;">pear install pecl/apc</pre></div></div>

</li>
<li>Tell PHP to load APC:

<div class="wp_syntax"><div class="code"><pre class="csh" style="font-family:monospace;">echo extension=apc.so &gt; /etc/php.d/apc.ini</pre></div></div>

</li>
<li>Restart Apache:

<div class="wp_syntax"><div class="code"><pre class="csh" style="font-family:monospace;">/sbin/service httpd graceful</pre></div></div>

</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://maisonbisson.com/blog/post/12589/installing-php-apc-on-rhel-centos/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Speedy PHP: Intermediate Code Caching</title>
		<link>http://maisonbisson.com/blog/post/10970/speedy-php-intermediate-code-caching/</link>
		<comments>http://maisonbisson.com/blog/post/10970/speedy-php-intermediate-code-caching/#comments</comments>
		<pubDate>Thu, 31 May 2007 15:10:08 +0000</pubDate>
		<dc:creator>Casey Bisson</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[acceleration]]></category>
		<category><![CDATA[apc]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[intermediate code cache]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[scaling]]></category>
		<category><![CDATA[web applications]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://maisonbisson.com/blog/post/10970/#speedy-php-intermediate-code-caching</guid>
		<description><![CDATA[
I&#8217;ve been working on MySQL optimization for a while, and though there&#8217;s still more to done on that front, I&#8217;ve gotten to the point where the the cumulative query times make up less than half of the page generation time.
So I&#8217;m optimizing code when the solution is obvious (and I hope to rope Zach into [...]]]></description>
			<content:encoded><![CDATA[<abbr class="unapi-id" title="maisonbisson-10970"><!-- &nbsp; --></abbr>
<p>I&#8217;ve been working on MySQL optimization for a while, and though there&#8217;s still more to done on that front, I&#8217;ve gotten to the point where the the cumulative query times make up less than half of the page generation time.</p>
<p>So I&#8217;m optimizing code when the solution is obvious (and I hope to rope <a href="http://nosheep.net/">Zach</a> into giving the code a performance audit soon), but I&#8217;m also looking at optimizing how PHP works.</p>
<p>Once upon a time, most of us ran PHP as a CGI, and every time a request came in, the PHP interpreter would have to launch, read/compile/execute the script, then spit out the result and shutdown. Now (hopefully) everybody&#8217;s running PHP as an Apache module, so all the time spent launching the interpreter, allocating memory and other resources for it, and then shutting it down and cleaning up after it, is done just once for each thread of Apache.</p>
<p>It might not sound like much, but I had a chance to compare CGI vs. module performance recently and found that a fairly simple, but frequently accessed script running as a CGI completely swamped a server as a CGI (creating a load average over 20), but was hardly noticed when running as a module. </p>
<p>But even as a module, the PHP scripts still need to be interpreted and compiled before they can be executed. And because of the way PHP works, this is done every time the page/script is requested.</p>
<p>Java programmers, among others, criticize PHP for this, but that <a href="http://www.37signals.com/svn/archives2/fear_shark_attacks_and_will_it_scale.php">small inefficiency</a> is part of what makes PHP so easy to use (and popular). And that ease of use means people are building some really interesting <a href="http://gettingreal.37signals.com/ch04_Scale_Later.php">apps worth scaling</a>.</p>
<p>Anyway, there&#8217;s a solution to eliminate that inefficiency in PHP: intermediate code caching.</p>
<p>By caching the executable code generated by the interpreter, then the using the cached copy instead of the source script for the next request, you can enjoy the benefits of PHP&#8217;s easy development and compiled code&#8217;s fast execution time. A number of projects all promise anywhere from double to 10X jump in performance.</p>
<ul>
<li><a href="http://www.php-accelerator.co.uk/" title="The ionCube PHP Accelerator: Home">ionCube PHP Accelerator</a><br />This has the most recognizable “brand,” and some hosting providers even offer it, but it&#8217;s offered <a href="http://phprpms.sourceforge.net/phpa">only in binary form</a> and <a href="http://www.php-accelerator.co.uk/faq.php#license">the license</a> seems intentionally ambiguous (um, <a href="http://www.fsf.org/licensing/essays/free-sw.html">not free</a>?).</li>
<li><a href="http://sourceforge.net/projects/turck-mmcache/" title="SourceForge.net: Turck MMCache for PHP">Turck MMCache for PHP</a><br />Has a good <a href="http://turck-mmcache.sourceforge.net/index_old.html">performance chart</a>, and is GPL&#8217;d, but development appears to have ended in 2003.</li>
<li><a href="http://web.archive.org/web/20040401135239/bwcache.bware.it/cache.htm">afterBURNERr*Cache</a><br />Yeah, I had to point to a page in the Wayback Machine, this project is dead.</li>
<li><a href="http://www.zend.com/products/zend_platform/">Zend Platform Performance Suite</a><br />A commercial suite that includes <a href="http://www.zend.com/products/zend_platform/features_comparison">piles of goodies</a>, if you pay.</li>
<li><a href="http://pecl.php.net/package/apc" title="PECL :: Package :: APC">APC: Alternative PHP Cache</a><br />It&#8217;s under active development and includes Rasmus Lerdorf, the guy who created PHP, among the project leads. License: <a href="http://www.php.net/license/2_02.txt">BSD-style</a> (<a href="http://www.gnu.org/philosophy/license-list.html">non-copyleft</a>)</li>
</ul>
<p>I haven&#8217;t actually tried any of these yet, but I&#8217;m looking for information and suggestions, and I&#8217;m likely to try APC, maybe even Zend soon. Just as soon as I make an app compelling enough (and large enough) to need it.</p>
<p><tags>php, caching, acceleration, zend, apc, intermediate code cache, optimization, scaling, web applications</tags></p>
]]></content:encoded>
			<wfw:commentRss>http://maisonbisson.com/blog/post/10970/speedy-php-intermediate-code-caching/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>