<?xml version="1.0" encoding="iso-8859-1"?><!-- generator="b2evolution/4.0.0-alpha" -->
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>fplanque: dev blog</title>
		<link>http://fplanque.com/dev/</link>
		<atom:link rel="self" type="application/rss+xml" href="http://fplanque.com/dev/?tempskin=_rss2" />
		<description>Weblog on web/database development and more... by Fran&#231;ois PLANQUE.</description>
		<language>en-US</language>
		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
		<admin:generatorAgent rdf:resource="http://b2evolution.net/?v=4.0.0-alpha"/>
		<ttl>60</ttl>
				<item>
			<title>Mac Mini 2010 Hard Drive Speed</title>
			<link>http://fplanque.com/dev/mac/mac-mini-2010-hard-drive</link>
			<pubDate>Fri, 20 Aug 2010 14:53:00 +0000</pubDate>			<dc:creator>Francois Planque</dc:creator>
			<category domain="main">Mac stuff</category>			<guid isPermaLink="false">962@http://fplanque.com/</guid>
						<description>&lt;div&gt;&lt;div&gt;&lt;a href=&quot;http://fplanque.com/media/dev/2010/system_profiler.png?mtime=1282316007&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;http://fplanque.com/media/dev/2010/.evocache/system_profiler.png/fit-320x320.png?mtime=1282316007&quot; width=&quot;320&quot; height=&quot;228&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;I was looking into upgrading my 2006 Mac Mini (serving as a media server) with a 2010 model, just to get a bigger hard drive&amp;#8230; and also a faster one!&lt;/p&gt;
&lt;p&gt;Now, &lt;a href=&quot;http://rickystechblog.wordpress.com/2010/06/17/the-apple-mac-mini-and-why-you-shouldn%E2%80%99t-buy-it/&quot;&gt;according to this guy&lt;/a&gt;, the Mac Mini 2010 still comes with a stinky slow old SATA-1 drive, just as back in the days. And that Ricky guy actually sounds like he knows damn well what he&amp;#8217;s talking about!&lt;/p&gt;
&lt;p&gt;Anyone got a Mac Mini 2010? Care to check the Negotiated Link Speed in your System Profiler? (About my mac &amp;gt; More info&amp;#8230;)&lt;/p&gt;
&lt;p&gt;On the screenshot above, you can see a Negatiated Link Speed of 3 Gb/s, which is good&amp;#8230; except I made the capture on my Mac Pro. Apparently, 2010 Mac Minis will show you a Link Speed of 3 Gb/s (that&amp;#8217;s what the Mac is capable of) but a &lt;strong&gt;Negotiated&lt;/strong&gt; Link Speed of only 1.5 Gb/s (that&amp;#8217;s what the HD is capable of)&amp;#8230;&lt;/p&gt;
&lt;p&gt;What Ricky doesn&amp;#8217;t say though, is if he has the 320 GB drive or the 500 GB drive. There may be a difference between these two.&lt;/p&gt;
&lt;p&gt;Now, the alternative would be to upgrade the drive myself, but it&amp;#8217;s just a big bag of hurt! I&amp;#8217;m too old to get any pleasure out of disasenbling hardware any more&amp;#8230;&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;videoblock&quot;&gt;&lt;object data=&quot;http://www.youtube.com/v/wZy0wPniqqo&quot; type=&quot;application/x-shockwave-flash&quot; wmode=&quot;transparent&quot; width=&quot;425&quot; height=&quot;350&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/wZy0wPniqqo&quot;&gt;&lt;/param&gt;&lt;param name=&quot;wmode&quot; value=&quot;transparent&quot;&gt;&lt;/param&gt;&lt;/object&gt;&lt;/div&gt;&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://fplanque.com/dev/mac/mac-mini-2010-hard-drive&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<div><div><a href="http://fplanque.com/media/dev/2010/system_profiler.png?mtime=1282316007"><img alt="" src="http://fplanque.com/media/dev/2010/.evocache/system_profiler.png/fit-320x320.png?mtime=1282316007" width="320" height="228" /></a></div></div><p>I was looking into upgrading my 2006 Mac Mini (serving as a media server) with a 2010 model, just to get a bigger hard drive&#8230; and also a faster one!</p>
<p>Now, <a href="http://rickystechblog.wordpress.com/2010/06/17/the-apple-mac-mini-and-why-you-shouldn%E2%80%99t-buy-it/">according to this guy</a>, the Mac Mini 2010 still comes with a stinky slow old SATA-1 drive, just as back in the days. And that Ricky guy actually sounds like he knows damn well what he&#8217;s talking about!</p>
<p>Anyone got a Mac Mini 2010? Care to check the Negotiated Link Speed in your System Profiler? (About my mac &gt; More info&#8230;)</p>
<p>On the screenshot above, you can see a Negatiated Link Speed of 3 Gb/s, which is good&#8230; except I made the capture on my Mac Pro. Apparently, 2010 Mac Minis will show you a Link Speed of 3 Gb/s (that&#8217;s what the Mac is capable of) but a <strong>Negotiated</strong> Link Speed of only 1.5 Gb/s (that&#8217;s what the HD is capable of)&#8230;</p>
<p>What Ricky doesn&#8217;t say though, is if he has the 320 GB drive or the 500 GB drive. There may be a difference between these two.</p>
<p>Now, the alternative would be to upgrade the drive myself, but it&#8217;s just a big bag of hurt! I&#8217;m too old to get any pleasure out of disasenbling hardware any more&#8230;</p>
<p><div class="videoblock"><object data="http://www.youtube.com/v/wZy0wPniqqo" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"><param name="movie" value="http://www.youtube.com/v/wZy0wPniqqo"></param><param name="wmode" value="transparent"></param></object></div></p><div class="item_footer"><p><small><a href="http://fplanque.com/dev/mac/mac-mini-2010-hard-drive">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://fplanque.com/dev/mac/mac-mini-2010-hard-drive#comments</comments>
			<wfw:commentRss>http://fplanque.com/dev/?tempskin=_rss2&#38;disp=comments&#38;p=962</wfw:commentRss>
		</item>
				<item>
			<title>How to autoplay movies in QuickTime X</title>
			<link>http://fplanque.com/dev/mac/how-to-autoplay-movies-in-quicktime-x</link>
			<pubDate>Wed, 20 Jan 2010 00:58:00 +0000</pubDate>			<dc:creator>Francois Planque</dc:creator>
			<category domain="main">Mac stuff</category>			<guid isPermaLink="false">958@http://fplanque.com/</guid>
						<description>&lt;p&gt;Apple has removed that features in Snow Leopard and QuickTime X has no preferences panel to enable this. So you need to go through the command line to get it back&amp;#8230;&lt;/p&gt;
&lt;p&gt;In Terminal, copy/paste:&lt;/p&gt;
&lt;p&gt;defaults write com.apple.QuickTimePlayerX MGPlayMovieOnOpen 1&lt;/p&gt;
&lt;p&gt;Now movies will autploay when you double click them.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://fplanque.com/dev/mac/how-to-autoplay-movies-in-quicktime-x&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>Apple has removed that features in Snow Leopard and QuickTime X has no preferences panel to enable this. So you need to go through the command line to get it back&#8230;</p>
<p>In Terminal, copy/paste:</p>
<p>defaults write com.apple.QuickTimePlayerX MGPlayMovieOnOpen 1</p>
<p>Now movies will autploay when you double click them.</p><div class="item_footer"><p><small><a href="http://fplanque.com/dev/mac/how-to-autoplay-movies-in-quicktime-x">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://fplanque.com/dev/mac/how-to-autoplay-movies-in-quicktime-x#comments</comments>
			<wfw:commentRss>http://fplanque.com/dev/?tempskin=_rss2&#38;disp=comments&#38;p=958</wfw:commentRss>
		</item>
				<item>
			<title>How to enable X-Ray folder previews in Mac OS Quick Look</title>
			<link>http://fplanque.com/dev/mac/how-to-enable-x-ray-folder-previews-in-mac-os-quick-look</link>
			<pubDate>Wed, 20 Jan 2010 00:56:00 +0000</pubDate>			<dc:creator>Francois Planque</dc:creator>
			<category domain="main">Mac stuff</category>			<guid isPermaLink="false">957@http://fplanque.com/</guid>
						<description>&lt;p&gt;In Terminal copy/paste this:&lt;/p&gt;
&lt;p&gt;defaults write com.apple.finder QLEnableXRayFolders 1&lt;/p&gt;
&lt;p&gt;Then relaunch the Finder. Press space on a selected folder and admire :)&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://fplanque.com/dev/mac/how-to-enable-x-ray-folder-previews-in-mac-os-quick-look&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>In Terminal copy/paste this:</p>
<p>defaults write com.apple.finder QLEnableXRayFolders 1</p>
<p>Then relaunch the Finder. Press space on a selected folder and admire :)</p><div class="item_footer"><p><small><a href="http://fplanque.com/dev/mac/how-to-enable-x-ray-folder-previews-in-mac-os-quick-look">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://fplanque.com/dev/mac/how-to-enable-x-ray-folder-previews-in-mac-os-quick-look#comments</comments>
			<wfw:commentRss>http://fplanque.com/dev/?tempskin=_rss2&#38;disp=comments&#38;p=957</wfw:commentRss>
		</item>
				<item>
			<title>Why echo is slow in PHP and how to make it really fast</title>
			<link>http://fplanque.com/dev/linux/why-echo-is-slow-in-php-how-to-make-it-really-fast</link>
			<pubDate>Thu, 03 Dec 2009 05:40:00 +0000</pubDate>			<dc:creator>Francois Planque</dc:creator>
			<category domain="alt">PHP</category>
<category domain="alt">Web Dev</category>
<category domain="main">Linux stuff</category>			<guid isPermaLink="false">956@http://fplanque.com/</guid>
						<description>&lt;p&gt;You may have noticed that PHP scripts that echo a lot of content appear to be running with poor performance&amp;#8230;&lt;/p&gt;
&lt;p&gt;Well, the operative word here is &amp;#8220;appear&quot;. It is a common misconception that &amp;#8220;echo is the slowest PHP command&quot;! :p&lt;/p&gt;
&lt;p&gt;The problem is actually just a bandwidth issue! When you try to pump a lot of content though the Internet, at some point you experience &amp;#8220;load time&quot;&amp;#8230; and at some point PHP actually experiences &amp;#8220;send time&quot;!&lt;/p&gt;
&lt;p&gt;You may measure the execution time between the begining and the end of your script, and, on a slow connection, it may show you that it took 500 ms to execute. You may even narrow it down to a single echo statement that takes 480 ms to execute. But that time actually includes wait time where PHP cannot send any more data back to apache!&lt;/p&gt;
&lt;p&gt;There is a common trick that consists of starting output befering before echoing, like this:&lt;/p&gt;
&lt;p class=&quot;amcode&quot;&gt;PHP:&lt;/p&gt;&lt;div class=&quot;codeblock amc_php amc_short&quot;&gt;&lt;table&gt;&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc1&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_html&quot;&gt;&lt;span class=&quot;amc_default&quot;&gt;&lt;a href=&quot;http://www.php.net/function.ob_start&quot; title=&quot; Read the PHP.net documentation for : ob_start() &quot; target=&quot;_blank&quot; class=&quot;codeblock_external_link&quot;&gt;ob_start&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;amc_keyword&quot;&gt;();&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc2&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_html&quot;&gt;&lt;span class=&quot;amc_keyword&quot;&gt;echo&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;amc_default&quot;&gt;$a_lot_of_content&lt;/span&gt;&lt;span class=&quot;amc_keyword&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;This will allow PHP to move on and appear to terminate fast. But the truth is, all the content is now in PHP&amp;#8217;s output buffer, and although your script is done, PHP is still working in the background to send all that data to your web server (apache for instance).&lt;/p&gt;
&lt;a href=&quot;http://fplanque.com/dev/linux/why-echo-is-slow-in-php-how-to-make-it-really-fast#more956&quot;&gt;Full story &amp;raquo;&lt;/a&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://fplanque.com/dev/linux/why-echo-is-slow-in-php-how-to-make-it-really-fast&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>You may have noticed that PHP scripts that echo a lot of content appear to be running with poor performance&#8230;</p>
<p>Well, the operative word here is &#8220;appear". It is a common misconception that &#8220;echo is the slowest PHP command"! :p</p>
<p>The problem is actually just a bandwidth issue! When you try to pump a lot of content though the Internet, at some point you experience &#8220;load time"&#8230; and at some point PHP actually experiences &#8220;send time"!</p>
<p>You may measure the execution time between the begining and the end of your script, and, on a slow connection, it may show you that it took 500 ms to execute. You may even narrow it down to a single echo statement that takes 480 ms to execute. But that time actually includes wait time where PHP cannot send any more data back to apache!</p>
<p>There is a common trick that consists of starting output befering before echoing, like this:</p>
<p class="amcode">PHP:</p><div class="codeblock amc_php amc_short"><table><tr class="amc_code_odd"><td class="amc_line"><div class="amc1"></div></td><td><code><span class="amc_html"><span class="amc_default"><a href="http://www.php.net/function.ob_start" title=" Read the PHP.net documentation for : ob_start() " target="_blank" class="codeblock_external_link">ob_start</a></span><span class="amc_keyword">();&nbsp;</span></span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc2"></div></td><td><code><span class="amc_html"><span class="amc_keyword">echo&nbsp;</span><span class="amc_default">$a_lot_of_content</span><span class="amc_keyword">;</span></span></code></td></tr>
</table></div>
<p>This will allow PHP to move on and appear to terminate fast. But the truth is, all the content is now in PHP&#8217;s output buffer, and although your script is done, PHP is still working in the background to send all that data to your web server (apache for instance).</p>
<a href="http://fplanque.com/dev/linux/why-echo-is-slow-in-php-how-to-make-it-really-fast#more956">Full story &raquo;</a><div class="item_footer"><p><small><a href="http://fplanque.com/dev/linux/why-echo-is-slow-in-php-how-to-make-it-really-fast">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://fplanque.com/dev/linux/why-echo-is-slow-in-php-how-to-make-it-really-fast#comments</comments>
			<wfw:commentRss>http://fplanque.com/dev/?tempskin=_rss2&#38;disp=comments&#38;p=956</wfw:commentRss>
		</item>
				<item>
			<title>How to log request processing times in Apache</title>
			<link>http://fplanque.com/dev/linux/how-to-log-request-processing-times-in-apache</link>
			<pubDate>Thu, 03 Dec 2009 02:33:00 +0000</pubDate>			<dc:creator>Francois Planque</dc:creator>
			<category domain="alt">Web Dev</category>
<category domain="main">Linux stuff</category>			<guid isPermaLink="false">955@http://fplanque.com/</guid>
						<description>&lt;p&gt;If you have an apache (2) web server, you probably have an access.log file showing you all kinds of data using the &amp;#8220;combined&amp;#8221; log format. &lt;strong&gt;Let&amp;#8217;s see how to include processing time into that log file.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;By default a line in the combined log looks like this:&lt;/p&gt;
&lt;p class=&quot;amcode&quot;&gt;Code:&lt;/p&gt;&lt;div class=&quot;codeblock amc_code amc_short&quot;&gt;&lt;table&gt;&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc1&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;10.0.209.80 - - [03/Dec/2009:03:20:47 +0100] &quot;GET /info-tech/ HTTP/1.1&quot; 200 46482 &quot;http://fplanque.com/info-tech/&quot; &quot;Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5&quot;&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;Notice the 2 dashes - - just after the IP. The first one stands for &amp;#8220;I could not identify the user using ident&amp;#8221; and the second one for &amp;#8220;no user authentication was performed&quot;.&lt;/p&gt;
&lt;p&gt;Now, let&amp;#8217;s face it: you will never identify anyone using ident. Your apache conf probably even doesn&amp;#8217;t try. That field is a left over from ancient times. So let&amp;#8217;s replace that first dash with something useful, i-e: the processing time of the request! Note that by doing this we keep the global structure of the file identical and any log processing tool you might be using should not be affected.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://fplanque.com/dev/linux/how-to-log-request-processing-times-in-apache#more955&quot;&gt;Full story &amp;raquo;&lt;/a&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://fplanque.com/dev/linux/how-to-log-request-processing-times-in-apache&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>If you have an apache (2) web server, you probably have an access.log file showing you all kinds of data using the &#8220;combined&#8221; log format. <strong>Let&#8217;s see how to include processing time into that log file.</strong></p>
<p>By default a line in the combined log looks like this:</p>
<p class="amcode">Code:</p><div class="codeblock amc_code amc_short"><table><tr class="amc_code_odd"><td class="amc_line"><div class="amc1"></div></td><td><code><span class="amc_default">10.0.209.80 - - [03/Dec/2009:03:20:47 +0100] "GET /info-tech/ HTTP/1.1" 200 46482 "http://fplanque.com/info-tech/" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5"</span></code></td></tr>
</table></div>
<p>Notice the 2 dashes - - just after the IP. The first one stands for &#8220;I could not identify the user using ident&#8221; and the second one for &#8220;no user authentication was performed".</p>
<p>Now, let&#8217;s face it: you will never identify anyone using ident. Your apache conf probably even doesn&#8217;t try. That field is a left over from ancient times. So let&#8217;s replace that first dash with something useful, i-e: the processing time of the request! Note that by doing this we keep the global structure of the file identical and any log processing tool you might be using should not be affected.</p>
<p><a href="http://fplanque.com/dev/linux/how-to-log-request-processing-times-in-apache#more955">Full story &raquo;</a><div class="item_footer"><p><small><a href="http://fplanque.com/dev/linux/how-to-log-request-processing-times-in-apache">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://fplanque.com/dev/linux/how-to-log-request-processing-times-in-apache#comments</comments>
			<wfw:commentRss>http://fplanque.com/dev/?tempskin=_rss2&#38;disp=comments&#38;p=955</wfw:commentRss>
		</item>
				<item>
			<title>How to install the APC PHP Cache on Debian (Lenny)</title>
			<link>http://fplanque.com/dev/linux/install-apc-php-cache-debian-lenny</link>
			<pubDate>Sun, 29 Nov 2009 00:50:50 +0000</pubDate>			<dc:creator>Francois Planque</dc:creator>
			<category domain="alt">PHP</category>
<category domain="main">Linux stuff</category>			<guid isPermaLink="false">954@http://fplanque.com/</guid>
						<description>&lt;div&gt;&lt;div&gt;&lt;a href=&quot;http://fplanque.com/media/dev/2009/apc.png?mtime=1259455706&quot;&gt;&lt;img title=&quot;APC Control Panel&quot; alt=&quot;APC PHP Cache Control Panel&quot; src=&quot;http://fplanque.com/media/dev/2009/.evocache/apc.png/fit-320x320.png?mtime=1259455706&quot; width=&quot;316&quot; height=&quot;320&quot; /&gt;&lt;/a&gt;&lt;div&gt;&lt;i&gt;The APC PHP Cache Control Panel&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;The &lt;a href=&quot;http://php.net/manual/en/book.apc.php&quot;&gt;APC cache&lt;/a&gt; can significantly improve your PHP script performance, just by installing it, which basically takes 5 minutes! (Plus, it&amp;#8217;s actually supported by the core PHP developers and will probably be integrated into PHP6&amp;#8230;)&lt;/p&gt;
&lt;p&gt;Here&amp;#8217;s what I did on my Debian Lenny box&amp;#8230;&lt;/p&gt;
&lt;p&gt;First you may want to have a reference benchmark to see if it actually improves:&lt;/p&gt;
&lt;p class=&quot;amcode&quot;&gt;Code:&lt;/p&gt;&lt;div class=&quot;codeblock amc_code amc_short&quot;&gt;&lt;table&gt;&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc1&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;ab -c5 -n100 http://www.yoursite.com/yourscript.php&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;Now install the APC package:&lt;/p&gt;
&lt;p class=&quot;amcode&quot;&gt;Code:&lt;/p&gt;&lt;div class=&quot;codeblock amc_code amc_short&quot;&gt;&lt;table&gt;&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc2&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;aptitude install php-apc&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;Now, restart apache:&lt;/p&gt;
&lt;p class=&quot;amcode&quot;&gt;Code:&lt;/p&gt;&lt;div class=&quot;codeblock amc_code amc_short&quot;&gt;&lt;table&gt;&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc3&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;/etc/init.d/apache2 restart&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;Now, you can run your benchmark again and see the difference! Tada! :)&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://fplanque.com/dev/linux/install-apc-php-cache-debian-lenny#more954&quot;&gt;Full story &amp;raquo;&lt;/a&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://fplanque.com/dev/linux/install-apc-php-cache-debian-lenny&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<div><div><a href="http://fplanque.com/media/dev/2009/apc.png?mtime=1259455706"><img title="APC Control Panel" alt="APC PHP Cache Control Panel" src="http://fplanque.com/media/dev/2009/.evocache/apc.png/fit-320x320.png?mtime=1259455706" width="316" height="320" /></a><div><i>The APC PHP Cache Control Panel</i></div></div></div><p>The <a href="http://php.net/manual/en/book.apc.php">APC cache</a> can significantly improve your PHP script performance, just by installing it, which basically takes 5 minutes! (Plus, it&#8217;s actually supported by the core PHP developers and will probably be integrated into PHP6&#8230;)</p>
<p>Here&#8217;s what I did on my Debian Lenny box&#8230;</p>
<p>First you may want to have a reference benchmark to see if it actually improves:</p>
<p class="amcode">Code:</p><div class="codeblock amc_code amc_short"><table><tr class="amc_code_odd"><td class="amc_line"><div class="amc1"></div></td><td><code><span class="amc_default">ab -c5 -n100 http://www.yoursite.com/yourscript.php</span></code></td></tr>
</table></div>
<p></p><p>Now install the APC package:</p>
<p class="amcode">Code:</p><div class="codeblock amc_code amc_short"><table><tr class="amc_code_odd"><td class="amc_line"><div class="amc2"></div></td><td><code><span class="amc_default">aptitude install php-apc</span></code></td></tr>
</table></div>
<p></p><p>Now, restart apache:</p>
<p class="amcode">Code:</p><div class="codeblock amc_code amc_short"><table><tr class="amc_code_odd"><td class="amc_line"><div class="amc3"></div></td><td><code><span class="amc_default">/etc/init.d/apache2 restart</span></code></td></tr>
</table></div>
<p></p><p>Now, you can run your benchmark again and see the difference! Tada! :)</p>
<p><a href="http://fplanque.com/dev/linux/install-apc-php-cache-debian-lenny#more954">Full story &raquo;</a><div class="item_footer"><p><small><a href="http://fplanque.com/dev/linux/install-apc-php-cache-debian-lenny">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://fplanque.com/dev/linux/install-apc-php-cache-debian-lenny#comments</comments>
			<wfw:commentRss>http://fplanque.com/dev/?tempskin=_rss2&#38;disp=comments&#38;p=954</wfw:commentRss>
		</item>
				<item>
			<title>Control fan speed &#38; noise on the mac pro</title>
			<link>http://fplanque.com/dev/mac/control-fan-speed-aamp-noise-on-the-mac-pro</link>
			<pubDate>Sun, 09 Aug 2009 21:33:00 +0000</pubDate>			<dc:creator>Francois Planque</dc:creator>
			<category domain="main">Mac stuff</category>			<guid isPermaLink="false">952@http://fplanque.com/</guid>
						<description>&lt;div&gt;&lt;div&gt;&lt;a href=&quot;http://fplanque.com/media/dev/2009/fancontrol.gif?mtime=1249853785&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;http://fplanque.com/media/dev/2009/.evocache/fancontrol.gif/fit-320x320.gif?mtime=1249853785&quot; width=&quot;320&quot; height=&quot;176&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Did you know there were actually 5 different fans inside a Mac Pro (early 2009 version)? They are named Intake, Exhaust, BoostA, PCI and Power Supply! By default, all of them turn pretty slowly; in the 600 to 850 rpm range! Which makes the whole thing pretty silent&amp;#8230; yet&amp;#8230; anoying because of the complexity of the sound (yes, it&amp;#8217;s 5 different spining motor sounds combined, not to mention the hard drive spinning!)&lt;/p&gt;
&lt;p&gt;You can monitor that with &lt;a href=&quot;http://islayer.com/apps/istatmenus/&quot;&gt;iStat menus&lt;/a&gt; &amp;#8211; which is very cool for monitoring a lot of things, except voltages &amp;amp; power consumption which do not seem to work, at least on the Mac pro 2009.&lt;/p&gt;
&lt;p&gt;Now my problem is I&amp;#8217;d like all these fans to run faster! Yes, faster! Not because I want some extra fan noise, but because I believe Uncle Steve pushed it too far when he asked his engineers to reduce the fan noise! I wouldn&amp;#8217;t mind the noise to be a little bit higher pitched than it currently is.&lt;/p&gt;
&lt;p&gt;I first tried &lt;a href=&quot;http://www.lobotomo.com/products/FanControl/index.html&quot;&gt;FanControl&lt;/a&gt; from Lobotomo Software. &lt;strong&gt;BEWARE: it&amp;#8217;s a pain to uninstall&lt;/strong&gt; (unsinstall instrutions on their &lt;a href=&quot;http://www.lobotomo.com/products/FanControl/index.html&quot;&gt;page&lt;/a&gt;). Because it&amp;#8217;s designed for the macbook pro (yes, the laptop), it only controls 2 of the 5 fans and the minimum speed it allows is 1000 rpms. Up from 600 rpm, that is too much! I wish I could run every fan at 850 rpm!&lt;/p&gt;
&lt;p&gt;Then I found &lt;a href=&quot;http://www.eidac.de/?p=134&quot;&gt;smcFanControl&lt;/a&gt; from eidac. That one has the advantage of allowing settings for all 5 fans on the mac pro. However, again two of them cannot be set lower than 1000 rpm. Worse: it doesn&amp;#8217;t actually do anything on the mac pro. It probably works on other apple computers but on the mac pro 2009 it has absolutely no effect on fan speed. :&amp;#8217;(&lt;/p&gt;
&lt;p&gt;From what I undrestand the fans are controlled by a chip called &amp;#8220;SMC&amp;#8221; as in &amp;#8220;System Management Controller&amp;#8221; and apple doesn&amp;#8217;t give you much control over it, apart from a clunky procedure to &lt;a href=&quot;http://support.apple.com/kb/HT1806&quot;&gt;reset it&lt;/a&gt;! Note: resetting the SMC allowed me to get back to original rpms for all fans after FanControl had messed them up. Resetting teh SMC also seems to have reduced the tempearture of the air mesured at the exhaust &amp;#8211; at equivalent fan speeds and system load (that is: idle!). Strange&amp;#8230;&lt;/p&gt;
&lt;p&gt;If any of you knows a way to effectively control fan speed on the mac pro, please let me know.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;d be up for some watercooling too :)&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://fplanque.com/dev/mac/control-fan-speed-aamp-noise-on-the-mac-pro&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<div><div><a href="http://fplanque.com/media/dev/2009/fancontrol.gif?mtime=1249853785"><img alt="" src="http://fplanque.com/media/dev/2009/.evocache/fancontrol.gif/fit-320x320.gif?mtime=1249853785" width="320" height="176" /></a></div></div><p>Did you know there were actually 5 different fans inside a Mac Pro (early 2009 version)? They are named Intake, Exhaust, BoostA, PCI and Power Supply! By default, all of them turn pretty slowly; in the 600 to 850 rpm range! Which makes the whole thing pretty silent&#8230; yet&#8230; anoying because of the complexity of the sound (yes, it&#8217;s 5 different spining motor sounds combined, not to mention the hard drive spinning!)</p>
<p>You can monitor that with <a href="http://islayer.com/apps/istatmenus/">iStat menus</a> &#8211; which is very cool for monitoring a lot of things, except voltages &amp; power consumption which do not seem to work, at least on the Mac pro 2009.</p>
<p>Now my problem is I&#8217;d like all these fans to run faster! Yes, faster! Not because I want some extra fan noise, but because I believe Uncle Steve pushed it too far when he asked his engineers to reduce the fan noise! I wouldn&#8217;t mind the noise to be a little bit higher pitched than it currently is.</p>
<p>I first tried <a href="http://www.lobotomo.com/products/FanControl/index.html">FanControl</a> from Lobotomo Software. <strong>BEWARE: it&#8217;s a pain to uninstall</strong> (unsinstall instrutions on their <a href="http://www.lobotomo.com/products/FanControl/index.html">page</a>). Because it&#8217;s designed for the macbook pro (yes, the laptop), it only controls 2 of the 5 fans and the minimum speed it allows is 1000 rpms. Up from 600 rpm, that is too much! I wish I could run every fan at 850 rpm!</p>
<p>Then I found <a href="http://www.eidac.de/?p=134">smcFanControl</a> from eidac. That one has the advantage of allowing settings for all 5 fans on the mac pro. However, again two of them cannot be set lower than 1000 rpm. Worse: it doesn&#8217;t actually do anything on the mac pro. It probably works on other apple computers but on the mac pro 2009 it has absolutely no effect on fan speed. :&#8217;(</p>
<p>From what I undrestand the fans are controlled by a chip called &#8220;SMC&#8221; as in &#8220;System Management Controller&#8221; and apple doesn&#8217;t give you much control over it, apart from a clunky procedure to <a href="http://support.apple.com/kb/HT1806">reset it</a>! Note: resetting the SMC allowed me to get back to original rpms for all fans after FanControl had messed them up. Resetting teh SMC also seems to have reduced the tempearture of the air mesured at the exhaust &#8211; at equivalent fan speeds and system load (that is: idle!). Strange&#8230;</p>
<p>If any of you knows a way to effectively control fan speed on the mac pro, please let me know.</p>
<p>I&#8217;d be up for some watercooling too :)</p><div class="item_footer"><p><small><a href="http://fplanque.com/dev/mac/control-fan-speed-aamp-noise-on-the-mac-pro">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://fplanque.com/dev/mac/control-fan-speed-aamp-noise-on-the-mac-pro#comments</comments>
			<wfw:commentRss>http://fplanque.com/dev/?tempskin=_rss2&#38;disp=comments&#38;p=952</wfw:commentRss>
		</item>
				<item>
			<title>How do I sync my macs?</title>
			<link>http://fplanque.com/dev/mac/mac-laptop-desktop-sync</link>
			<pubDate>Wed, 05 Aug 2009 18:23:03 +0000</pubDate>			<dc:creator>Francois Planque</dc:creator>
			<category domain="main">Mac stuff</category>			<guid isPermaLink="false">951@http://fplanque.com/</guid>
						<description>&lt;p&gt;If you have multiple macs (and an iPhone), mobile.me is a must have, of course, but it only syncs so much&amp;#8230; basically:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Address book&lt;/li&gt;
&lt;li&gt;Calendar&lt;/li&gt;
&lt;li&gt;Mail (but I&amp;#8217;m using IMAP anyways)&lt;/li&gt;
&lt;li&gt;Safari bookmarks&lt;/li&gt;
&lt;li&gt;System preferences&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;mobile.me does not auto-sync:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;All kinds of documents&lt;/li&gt;
&lt;li&gt;Application settings &amp;amp; preferences&lt;/li&gt;
&lt;li&gt;iPhoto library&lt;/li&gt;
&lt;li&gt;iTunes library&lt;/li&gt;
&lt;li&gt;VMware virtual machines&lt;/li&gt;
&lt;li&gt;Firefox bookmarks&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For merging all kinds of bookmarks I use Foxmarks. However for the rest, I&amp;#8217;m pretty much down to manual sync every time I leave for a trip where I have to move all mods over to the laptop and then back to the desktop when I get back. When synchronizing the entire home folder there are actually a lot of files that need to be left out or you&amp;#8217;ll just break apps on the other computer (erase serial numbers, etc.). So it requires a lot of manual supervision.&lt;/p&gt;
&lt;p&gt;It feels like an entire wasted day every time. (At least I&amp;#8217;m doing some packing/unpacking during large file copies, but still&amp;#8230;)&lt;/p&gt;
&lt;p&gt;Most sync tools are too stupid to handle exceptions nicely. The only way synching home folders could actually work over time in my opinion would be for the sync toll to start by asking you for each subfolder what should be done: Ignore, Sync, Sync with curent contents, Sync with future contents. Then at each subsequent sync, any new found folder should trigger the question again, unless it was already included in a &amp;#8220;Sync with future subfolders&amp;#8221; parent.&lt;/p&gt;
&lt;p&gt;Some folder would also require a &amp;#8220;Sync as a whole&amp;#8221; function, where contents from both sides should never end up mixed as a result of a merge (I am thinking about iPhoto here).&lt;/p&gt;
&lt;p&gt;Still looking for something smart enough&amp;#8230;&lt;/p&gt;
&lt;p&gt;Beyond the software issue I think I need to buy a Firewire 800 cable in order to transfer files faster direcly from one mac to another. Believe it or not but file transfers over Gigabit Ethernet remain pathetically slow&amp;#8230; like 14 MB/s which is roughly only 0.14 Gigabits/second.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://fplanque.com/dev/mac/mac-laptop-desktop-sync&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>If you have multiple macs (and an iPhone), mobile.me is a must have, of course, but it only syncs so much&#8230; basically:</p>
<ul>
<li>Address book</li>
<li>Calendar</li>
<li>Mail (but I&#8217;m using IMAP anyways)</li>
<li>Safari bookmarks</li>
<li>System preferences</li>
</ul>
<p>mobile.me does not auto-sync:</p>
<ul>
<li>All kinds of documents</li>
<li>Application settings &amp; preferences</li>
<li>iPhoto library</li>
<li>iTunes library</li>
<li>VMware virtual machines</li>
<li>Firefox bookmarks</li>
</ul>
<p>For merging all kinds of bookmarks I use Foxmarks. However for the rest, I&#8217;m pretty much down to manual sync every time I leave for a trip where I have to move all mods over to the laptop and then back to the desktop when I get back. When synchronizing the entire home folder there are actually a lot of files that need to be left out or you&#8217;ll just break apps on the other computer (erase serial numbers, etc.). So it requires a lot of manual supervision.</p>
<p>It feels like an entire wasted day every time. (At least I&#8217;m doing some packing/unpacking during large file copies, but still&#8230;)</p>
<p>Most sync tools are too stupid to handle exceptions nicely. The only way synching home folders could actually work over time in my opinion would be for the sync toll to start by asking you for each subfolder what should be done: Ignore, Sync, Sync with curent contents, Sync with future contents. Then at each subsequent sync, any new found folder should trigger the question again, unless it was already included in a &#8220;Sync with future subfolders&#8221; parent.</p>
<p>Some folder would also require a &#8220;Sync as a whole&#8221; function, where contents from both sides should never end up mixed as a result of a merge (I am thinking about iPhoto here).</p>
<p>Still looking for something smart enough&#8230;</p>
<p>Beyond the software issue I think I need to buy a Firewire 800 cable in order to transfer files faster direcly from one mac to another. Believe it or not but file transfers over Gigabit Ethernet remain pathetically slow&#8230; like 14 MB/s which is roughly only 0.14 Gigabits/second.</p><div class="item_footer"><p><small><a href="http://fplanque.com/dev/mac/mac-laptop-desktop-sync">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://fplanque.com/dev/mac/mac-laptop-desktop-sync#comments</comments>
			<wfw:commentRss>http://fplanque.com/dev/?tempskin=_rss2&#38;disp=comments&#38;p=951</wfw:commentRss>
		</item>
			</channel>
</rss>
