<?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>Bearfruit &#187; backend</title>
	<atom:link href="http://www.bearfruit.org/category/backend/feed/?category_name=backend" rel="self" type="application/rss+xml" />
	<link>http://www.bearfruit.org</link>
	<description>Matthew Nuzum&#039;s Blog</description>
	<lastBuildDate>Wed, 28 Dec 2011 20:34:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2-bleeding</generator>
		<item>
		<title>Quick speed test between php and django</title>
		<link>http://www.bearfruit.org/2010/12/03/quick-speed-test-between-php-and-django/</link>
		<comments>http://www.bearfruit.org/2010/12/03/quick-speed-test-between-php-and-django/#comments</comments>
		<pubDate>Fri, 03 Dec 2010 19:57:07 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[backend]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Cool Stuff]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.bearfruit.org/?p=486</guid>
		<description><![CDATA[PHP is a programming language for web applications but Django is a full-fledged framework that provides database abstraction, caching, authentication and a host of other services. Comparing the performance of the two is not a fair, apples to apples comparison. However I want to do it in order to better decide what I should use [...]]]></description>
			<content:encoded><![CDATA[<p>PHP is a programming language for web applications but Django is a full-fledged framework that provides database abstraction, caching, authentication and a host of other services. Comparing the performance of the two is not a fair, apples to apples comparison. However I want to do it in order to better decide what I should use for an application.</p>
<p>I created a light-weight HTML page, a &#8220;hello world&#8221; php app (no db or sessions) and a light weight &#8220;hello world&#8221; django app using mostly default values (sessions are enabled). I then ran the apache benchmark (ab) on the three using a small VPS w/ 512 MB of RAM from localhost (so no latency is involved giving ideal conditions).<span id="more-486"></span></p>
<p>Apache is configured with a max clients of 40 so I tested with a concurrency of 40.</p>
<ul>
<li>Static HTML:<br />
Requests per second:    3249.36 [#/sec] (mean)<br />
(no measurable impact on server load)</li>
<li>PHP:<br />
Requests per second:    2786.73 [#/sec] (mean)<br />
(no measurable impact on server load)</li>
<li>Django:<br />
Requests per second:    157.97 [#/sec] (mean)<br />
(no measurable impact on server load)</li>
<li>Static HTML using SSL:<br />
Requests per second:    10.30 [#/sec] (mean)<br />
(during this, server load rose uncomfortably high)</li>
</ul>
<p>What do we understand from this? First, considering the added functionality of the Django framework, I&#8217;m quite comfortable with the performance here. If I need as lean of an app as possible, I may want to consider not using a framework. Carefully crafted PHP is probably going to be faster.</p>
<p>However, with a concurrency of 40 the Django app was able to support 157 connections per second. The server load and memory utilization indicates that this VPS can probably handle a higher value for max-clients.</p>
<p>I&#8217;m quite shocked at the poor SSL performance. I have no idea why the VPS would perform so poorly. I wonder if the VPS technology forces the server to offload SSL decryption to a virtual network adapter. The CPU of the VPS is an Intel Core 2 Quad @ 2.4GHz.</p>
<p>This is an OpenVZ VPS running Ubuntu 10.04 LTS, Apache 2.2.14, PHP 5.3.2, Django 1.2.3 on Python 2.6.5 using mod_wsgi 2.8.</p>
<p>You can get a <a href="https://service.burst.net/aff.php?aff=1511">good deal on a VPS at burst.net for $5.99/mo</a> (this link uses my &#8220;refer a friend&#8221; feature so I get credit). I&#8217;m extremely happy with the quality of their service and have had <em>0 downtime</em> in the few months I&#8217;ve been a customer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bearfruit.org/2010/12/03/quick-speed-test-between-php-and-django/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lucid Lynx release day excitement</title>
		<link>http://www.bearfruit.org/2010/04/30/lucid-lynx-release-day-excitement/</link>
		<comments>http://www.bearfruit.org/2010/04/30/lucid-lynx-release-day-excitement/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 19:27:27 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[backend]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Cool Stuff]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.bearfruit.org/?p=407</guid>
		<description><![CDATA[Every release day is exciting in one way or another. Lucid&#8217;s was no disappointment. April 29th, 2010 was my 8th Ubuntu release as the ubuntu.com webmaster. Counting testing releases, betas and RCs I&#8217;ve participated in about 50 releases. There are many aspects related to a release. I can only talk about my own perspective, as [...]]]></description>
			<content:encoded><![CDATA[<p>Every release day is exciting in one way or another. Lucid&#8217;s was no disappointment. April 29th, 2010 was my 8th Ubuntu release as the ubuntu.com webmaster. Counting testing releases, betas and RCs I&#8217;ve participated in about 50 releases.</p>
<p>There are many aspects related to a release. I can only talk about my own perspective, as it pertains to managing the website. Usually, a week or so before release we&#8217;ve got a pretty good idea of what the website will look like and people are viewing it on a testing server. Invariably there are last minute changes, and I do mean up to the last minute.<span id="more-407"></span></p>
<p>Wednesday evening the release manager starts the process of dispersing CD images to the corners of the globe so that when its time to go live they show up on the mirrors pretty quickly. I talk to him and plan a time for me to come online to prepare the website for release. This time we agreed I&#8217;d be online at 5:00 am (10:00 UTC), aiming for a 12:00 UTC release time.</p>
<p>There&#8217;s an element of risk in pre-seeding the CD images because the image testing happens in parallel. Normally its not a problem but this release a serious bug was found. I&#8217;m not sure of the details but it was bad enough that there was a &#8220;day-of&#8221; re-spin. When I came online at 5:00 the disks were being remastered.</p>
<p>This went OK apparently but a new problem popped up. We have a mirror prober application that checks our mirrors to see if they have the correct images. We do this by making HTTP HEAD requests to ensure the file name exists and the file size matches what we have. Unfortunately, the remastered disk images were exactly the same size as the defective ones. <em>Exact to the byte</em>.</p>
<p>We couldn&#8217;t tell which mirrors had the new version and which had the bad version. We use a protocol to communicate with our mirrors telling them which files to mirror. Therefore we updated the list to include a dummy file. That allowed us to identify which mirrors were up to date and which were not.</p>
<p>Finally, about 12:21 my time (17:21 UTC) we got the word that it was about time to &#8220;push the button.&#8221; I had prepared by opening up a bunch of tabs with the pages that were changing, updating the pages so that all I had to do was submit each form. The release team gave me some last minute changes and in the process of applying those I accidentally <em>closed my browser window</em>. If you were in central Iowa you may have heard me scream.</p>
<p>I&#8217;m an optimist, so I hoped that firefox would remember the tabs and values of the forms, but unfortunately our authentication system redirects you to an openid auth page when you first visit it. All was lost.</p>
<p>So I copy and pasted again while people constantly instant messaged me asking if it was ready yet. Finally, at about 12:46 (17:46 UTC) the website launched. I kid you not, multitudes of people open their browser to the homepage and refresh again and again waiting to see the site change. I hear someone in the Millbank office with a bottle of champagne waits until the website updates so that they can celebrate. Talk about pressure. <img src='http://www.bearfruit.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>We&#8217;re fortunate that our intense loads are so predictable. It gives us plenty of time to beef up our infrastructure and plan appropriately. When we get slashdotted we usually don&#8217;t even notice (unless they link to our wiki). <a href="http://www.bearfruit.org/wp-content/uploads/2010/04/spikes.png"><img class="size-full wp-image-408 alignright" title="spikes" src="http://www.bearfruit.org/wp-content/uploads/2010/04/spikes.png" alt="" width="61" height="66" /></a>A release day is at least 12 times more traffic than when we hit the homepage of digg and slashdot. For a reference, check out this image. The big bump is a release day, the small bump to the left of it is when we hit some big news site.</p>
<p>After the site launches I get a rush of bug reports. There&#8217;s nothing like having a million people proof reading your site all at once. The next couple hours are spent doing low-priority updates and fixing little issues that show up. About 3:00 my time (20:00 UTC) I stepped away from my computer and took a nap.</p>
<p>And that is a release day.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bearfruit.org/2010/04/30/lucid-lynx-release-day-excitement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

