<?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>PHP vs .Net &#187; Linux</title>
	<atom:link href="http://www.phpvs.net/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phpvs.net</link>
	<description>ASP.Net and PHP go head to head</description>
	<lastBuildDate>Sat, 24 Dec 2011 18:20:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Mounting UFS/ext2/ext3 filesystems on Windows XP, and destroying old development hard drives.</title>
		<link>http://www.phpvs.net/2008/05/28/mounting-ufsext2ext3-filesystems-on-windows-xp-and-destroying-old-development-hard-drives/</link>
		<comments>http://www.phpvs.net/2008/05/28/mounting-ufsext2ext3-filesystems-on-windows-xp-and-destroying-old-development-hard-drives/#comments</comments>
		<pubDate>Wed, 28 May 2008 21:08:19 +0000</pubDate>
		<dc:creator>blake</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[eraserd]]></category>
		<category><![CDATA[ext2]]></category>
		<category><![CDATA[ext3]]></category>
		<category><![CDATA[secure erasing]]></category>
		<category><![CDATA[ufs]]></category>
		<category><![CDATA[windows xp]]></category>

		<guid isPermaLink="false">http://www.phpvs.net/2008/05/28/mounting-ufsext2ext3-filesystems-on-windows-xp-and-destroying-old-development-hard-drives/</guid>
		<description><![CDATA[After cleaning out the garage, I came across an old box that had been sitting in the corner for many years. The bottle recycling depots in my area now take old computer parts (Canada put in a small environmental tax on new electronics, so now the recycling places take old stuff for free!), so it&#039;s [...]]]></description>
			<content:encoded><![CDATA[<p>After cleaning out the garage, I came across an old box that had been sitting in the corner for many years.  The bottle recycling depots in my area now take old computer parts (Canada put in a small environmental tax on new electronics, so now the recycling places take old stuff for free!), so it&#039;s pretty convenient to get rid of this stuff now.</p>
<p>However, I knew the hard drive likely contained old checked-out code that had been moved to a new machine.  I&#039;m not a super-paranoid guy, but there&#039;s enough horror stories out there that I&#039;d rather wipe an old drive if I have the chance.  So I popped the drive out and hooked it up to my Windows XP box.</p>
<p>I wasn&#039;t really surprised when I booted XP and couldn&#039;t see any sign of the drive.  I cruised over to Device Manager, and it showed up there, but you can&#039;t format or mount drives from Device Manager.  I was a bit vexed, moreso because I wasn&#039;t sure what kind of file-system was on the drive.  Was it a linux ext2/ext3, or a FreeBSD UFS system?</p>
<p>I came across a <a href="http://linuxhelp.blogspot.com/2007/03/mount-ext2-or-ext3-partition-in-windows.html">nice post</a> that pointed me in the direction of a great tool called <a href="http://www.fs-driver.org">Ext2 Installable File System for Windows</a>.  It installs a Control Panel that lets you mount and access ext2/ext3 drives.  I gave it a shot, and it even picked up my drive and allowed me to assign it a letter during the install, so by the time I was done, Z: was waiting for me!</p>
<p>It turns out that the drive was UFS however, so when I tried to access it, I got a &#034;This drive has not been formatted&#034; message.  That was enough for me though, as I could now quick-format it with NTFS, then access it with my erasing utility, <a href="http://www.heidi.ie/node/6">eraserd</a>.</p>
<p>A couple of quick commands into a DOS prompt later:<br />
<code><br />
eraserd -allfiles Z: -passes 3<br />
eraserd -disk Z: -passes 1<br />
</code></p>
<p>and this hard drive was all set for it&#039;s trip to recycling, and I was assured that nothing wayward will happen to any old data that might be on it.  The first command removed any known files on the disk (which was none, since I had just formatted it), and the second command then used a secure erasing algorithm to overwrite all free space on the disk.</p>
<p>Because I wasn&#039;t using the XP machine for anything else at the moment, I re-formatted the disk and re-wiped the free space two more times.  Maybe I am super-paranoid.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpvs.net/2008/05/28/mounting-ufsext2ext3-filesystems-on-windows-xp-and-destroying-old-development-hard-drives/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Build a CentOS LAMP server</title>
		<link>http://www.phpvs.net/2008/03/09/build-a-centos-lamp-server/</link>
		<comments>http://www.phpvs.net/2008/03/09/build-a-centos-lamp-server/#comments</comments>
		<pubDate>Sun, 09 Mar 2008 21:45:14 +0000</pubDate>
		<dc:creator>blake</dc:creator>
				<category><![CDATA[LAMP]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Optimization]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.phpvs.net/2008/03/09/build-a-centos-lamp-server/</guid>
		<description><![CDATA[I finally finished re-building a development CentOS LAMP server. More importantly, and the primary purpose of the whole exercise, is that I finished my guide to building a CentOS LAMP server. I am happy to now post said guide on this blog (under Articles), for everyone to read and abuse as they please! So here [...]]]></description>
			<content:encoded><![CDATA[<p>I finally finished re-building a development CentOS LAMP server.  More importantly, and the primary purpose of the whole exercise, is that I finished my <i>guide</i> to building a CentOS LAMP server. I am happy to now post said guide on this blog (under Articles), for everyone to read and abuse as they please!</p>
<p>So here you go&#8230; may I present Blake&#039;s CentOS LAMP Server Guide, <a href="http://www.phpvs.net/articles/blakes-centos-lamp-server-guide-single-page/">single-page edition</a>, and the perhaps friendlier <a href="http://www.phpvs.net/articles/blakes-centos-lamp-server-guide/">multi-page edition</a>.</p>
<p>The guide covers the basics of building up a CentOS box to use as a remotely-administered LAMP server, including installation and configuration of PHP, Apache and MySQL.  Other goodies are in there too, like mail server setup with Postfix/Postgrey/Dovecot.  Keep in mind this guide was written from my point of view, and contains the ways that <em>I</em> like to do things.  I keep my basic LAMP stuff pretty slim for maximum performance, so you&#039;ll see some installations from source in there to help keep things tight.</p>
<p>Let me know if the guide is useful!  I&#039;m hoping to get Google to pick it up and get some comments going on the various ways people set up their own LAMP boxes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpvs.net/2008/03/09/build-a-centos-lamp-server/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Benchmarking Mono ASP.Net vs. PHP &#8211; a slight problem</title>
		<link>http://www.phpvs.net/2008/02/08/benchmarking-mono-aspnet-vs-php-a-slight-problem/</link>
		<comments>http://www.phpvs.net/2008/02/08/benchmarking-mono-aspnet-vs-php-a-slight-problem/#comments</comments>
		<pubDate>Fri, 08 Feb 2008 21:53:34 +0000</pubDate>
		<dc:creator>blake</dc:creator>
				<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mono]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[ab]]></category>
		<category><![CDATA[benchmarks]]></category>

		<guid isPermaLink="false">http://www.phpvs.net/2008/02/08/benchmarking-mono-aspnet-vs-php-a-slight-problem/</guid>
		<description><![CDATA[We promised some numbers, but I&#039;ve run into a snag that&#039;s slowed down my testing. Originally when we first started toying with the idea of pitting Mono + ASP.Net against PHP, I wrote a quick PHP script that would just make a cheap fopen call to whatever URL you wanted to test, however many times [...]]]></description>
			<content:encoded><![CDATA[<p>We promised some numbers, but I&#039;ve run into a snag that&#039;s slowed down my testing.  Originally when we first started toying with the idea of pitting Mono + ASP.Net against PHP, I wrote a quick PHP script that would just make a cheap <code>fopen </code> call to whatever URL you wanted to test, however many times you wanted to hit it.  This isn&#039;t really load-testing, it&#039;s more like a basic timer, and not a very accurate one at that.  However, it gave me some quick raw numbers to work with.</p>
<p>Now, the cleverer ones amongst you will know that Apache Benchmark, or <code>ab</code>, will do pretty much the exact same thing, plus much more.  This is where I was planning to get my first batch of results from.  But something has happened that is leaving me puzzled as to how I&#039;m going to make these tests fair.</p>
<p>I ran a few benchmarks against a basic PHP page, and it was pretty consistent, within the realms of what you&#039;d expect for a page just coughing up the same content over and over.  When I ran the same benchmark against a similar .aspx page however, things were <em>not</em> consistent!</p>
<h3>Mono benchmarks -- an anomaly</h3>
<p>Without going into a long post about what all results were, here&#039;s a brief summary.  I originally noticed the problem when I ran <code>ab -n 1000 -c 10 [url]</code> from a remote machine that is on the other side of the country.  <code>ab</code> was given a PHP URL and an ASP.Net URL for the test server here on my home network, and dutifully returned results for each.  The PHP page was giving me results similar to the following (results in seconds for total test time, rounded for brevity):</p>
<p><strong>75, 75, 74</strong></p>
<p>Looks good.  Kind of what you want to see in a benchmark.  Predictable load times under a given circumstance means your application code is working predictably as well.  I ran three tests and averaged the results.  So what did I get from Mono?  I restarted apache, hit a page to get rid of the initial .Net load time, then ran three tests.  Check this out:</p>
<p><strong>77, 77, 100</strong></p>
<p>I thought that was kind of weird.  Maybe the server was under some sort of load I didn&#039;t know about, so I thought I&#039;d chuck the third benchmark as anomalous and run some more:</p>
<p><strong>95, 107, 92, 106</strong></p>
<p>Now I had a case of the WTFs.  Thinking something was wrong, I rebooted apache (and hit a single .aspx page for the initial .Net load).  Then I ran some more tests:</p>
<p><strong>restart, 78, 79, 92</strong></p>
<p>There it goes again!  I switched to testing on the server machine itself under my desk to get rid of any network latency that might be occurring cross-continent.  I ran some PHP benchmarks to see what I would get.</p>
<p><strong>51, 51, 66, 52, 51, 51, 51</strong></p>
<p>Looks good, save the spike in the middle.  Back to Mono:</p>
<p><strong>restart 56, 58, 61, 62, 68, 62, 63, restart, 57, 61, 61, 63, 67</strong></p>
<h3>WTF</h3>
<p>It quickly became evident that the Mono environment is accruing some sort of overhead the more I pound on it.  And it&#039;s not getting away from this overhead either.  I left it alone for awhile to gather its thoughts (and maybe its garbage) while I took a break, but when I tried again it still showed much higher benchmark times than it would right after a server restart.  The conclusion I came to over another hour of testing is that <em>Mono would never serve pages as fast as the first benchmark on subsequent benchmarks</em>.</p>
<p>This has delayed my actual collection of benchmark data between PHP and Mono ASP.Net, as I don&#039;t feel that it&#039;s a fair comparison between the two if Mono is accruing performance penalties the more I use it.</p>
<p>I&#039;m going to have to research this a bit more.  Maybe it&#039;s my configuration, maybe it&#039;s Apache, maybe it&#039;s mod_mono, maybe it&#039;s something wrong with the .aspx test page, maybe it&#039;s a spooky goblin.  Maybe it&#039;s Mono itself.  I don&#039;t have enough information at this point to be sure.  I&#039;ll have to try to narrow this down, or continue testing knowing this limitation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpvs.net/2008/02/08/benchmarking-mono-aspnet-vs-php-a-slight-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

