<?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>philipp's weblog &#187; web development</title>
	<atom:link href="http://philipp.wagner.name/blog/category/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://philipp.wagner.name/blog</link>
	<description>whatever comes to a developer's mind</description>
	<lastBuildDate>Mon, 23 Jan 2012 21:44:46 +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>It&#8217;s all about benchmarks</title>
		<link>http://philipp.wagner.name/blog/2008/11/its-all-about-benchmarks/</link>
		<comments>http://philipp.wagner.name/blog/2008/11/its-all-about-benchmarks/#comments</comments>
		<pubDate>Mon, 03 Nov 2008 20:01:30 +0000</pubDate>
		<dc:creator>Philipp Wagner</dc:creator>
				<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://philipp.wagner.name/blog/?p=22</guid>
		<description><![CDATA[When I wrote Of course I did no benchmarks (*gg*) but things feel much snappier now, and that’s all that counts. I somehow knew that it would not take very long until the benchmarks would arrive. Actually, it took a whole day until it happened :-) So, here are some quick benchmarks: The gallery home [...]]]></description>
			<content:encoded><![CDATA[<p>When I <a href="http://philipp.wagner.name/blog/2008/11/speeding-up-gallery2/">wrote</a></p>
<blockquote><p>Of course I did no benchmarks (*gg*) but things feel much snappier now, and that’s all that counts.</p></blockquote>
<p>I somehow knew that it would not take very long until the benchmarks would arrive. Actually, it took a whole day until it happened :-)</p>
<p>So, here are some quick benchmarks:</p>
<p><strong>The gallery home page</strong></p>
<p>This page contains several albums, a random image block and the default layout. The first chart contains requests per second, the second sets the values without X-Sendfile values to 100 % and compares them with the X-Sendfile enabled numbers.</p>
<p style="text-align: center;"><a href="http://philipp.wagner.name/blog/wp-content/uploads/2008/11/overview_page.png" rel="lightbox[22]"><img class="alignnone size-medium wp-image-24" title="home page" src="http://philipp.wagner.name/blog/wp-content/uploads/2008/11/overview_page.png" alt="" width="300" height="88" /></a></p>
<p style="text-align: left;">As you can easily see, even on PHP-heavy pages with not that many pictures, the throughput increases by around 7 percent when using X-Sendfile. But even more important is the use of XCache, which gives you around 200 percent!</p>
<p style="text-align: left;">Now let&#8217;s have a look at a</p>
<p style="text-align: left;"><strong>Serving a single image (with security checks)</strong></p>
<p style="text-align: left;">The tested image was inside a protected area which requires the user to log-in, so Gallery is not able to utilize its fast-path mechanism for pictures which don&#8217;t require any security checks.</p>
<p style="text-align: center;"><a href="http://philipp.wagner.name/blog/wp-content/uploads/2008/11/single_image.png" rel="lightbox[22]"><img class="size-medium wp-image-25 aligncenter" title="serving a single image" src="http://philipp.wagner.name/blog/wp-content/uploads/2008/11/single_image.png" alt="" width="300" height="87" /></a></p>
<p style="text-align: left;">Now that&#8217;s impressing, isn&#8217;t it? XCache gives you over 4 times as many requests/s! And X-Sendfile increases that number by around 30 percent.</p>
<p style="text-align: left;">All tests were conducted on my pretty slow (VMware) server, so the interesting stuff here is the percentages, not the absolute numbers. The numbers are from Apache&#8217;s <a href="http://httpd.apache.org/docs/2.2/programs/ab.html">ab</a> with 20 concurrent requests and 100 requests total.</p>
<p style="text-align: left;">Conclusion: XCache (or some other bytecode cache) is a absolute must for Gallery (as well as for any heavily object-oriented PHP application, especially when using AJAX together with OO frameworks &#8211; but that&#8217;s another story).<br />
X-Sendfile speeds the whole thing up even more and increases the responsiveness of your Gallery to give the user a smooth browsing experience (there&#8217;s nothing more annoying than to wait for pictures on a slide slow).</p>
]]></content:encoded>
			<wfw:commentRss>http://philipp.wagner.name/blog/2008/11/its-all-about-benchmarks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

