<?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>costela.net &#187; performance</title>
	<atom:link href="http://costela.net/tag/performance/feed/" rel="self" type="application/rss+xml" />
	<link>http://costela.net</link>
	<description>rhetorically impaired, ironically despaired</description>
	<lastBuildDate>Wed, 25 Jan 2012 15:30:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>Re: Making pbuilder just that little bit faster</title>
		<link>http://costela.net/2009/12/re-making-pbuilder-just-that-little-bit-faster/</link>
		<comments>http://costela.net/2009/12/re-making-pbuilder-just-that-little-bit-faster/#comments</comments>
		<pubDate>Tue, 29 Dec 2009 22:45:33 +0000</pubDate>
		<dc:creator>Leo Antunes</dc:creator>
				<category><![CDATA[Home]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[debian planet]]></category>
		<category><![CDATA[pbuilder]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://costela.net/?p=528</guid>
		<description><![CDATA[Absolutely, but there are at least two workarounds: Adding BINDMOUNTS=&#34;/var/cache/apt/archives&#34; APTCACHE=&#34;&#34; to your .pbuilderrc, in case you don&#8217;t need any special separation of local and pbuilder caches (that&#8217;s my case). Using apt-proxy or the like, which has its overhead, but also its other advantages. None of them seem all that bad to me, considering the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.wgdd.de/?p=74">Absolutely</a>, but there are at least two workarounds:</p>
<ol>
<li>Adding

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">BINDMOUNTS</span>=<span style="color: #ff0000;">&quot;/var/cache/apt/archives&quot;</span>
<span style="color: #007800;">APTCACHE</span>=<span style="color: #ff0000;">&quot;&quot;</span></pre></div></div>

<p> to your .pbuilderrc, in case you don&#8217;t need any special separation of local and pbuilder caches (that&#8217;s my case).</li>
<li>Using apt-proxy or the like, which has its overhead, but also its other advantages.</li>
</ol>
<p>None of them seem all that bad to me, considering the sensible speed improvements to pbuilder, but the ultimate decision probably depends on the amount of disk-access the packages in question need.</p>
]]></content:encoded>
			<wfw:commentRss>http://costela.net/2009/12/re-making-pbuilder-just-that-little-bit-faster/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Forcing a bit of house-cleaning (old news for most, probably)</title>
		<link>http://costela.net/2009/08/forcing-a-bit-of-house-cleaning-old-news-for-most-probably/</link>
		<comments>http://costela.net/2009/08/forcing-a-bit-of-house-cleaning-old-news-for-most-probably/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 21:24:40 +0000</pubDate>
		<dc:creator>Leo Antunes</dc:creator>
				<category><![CDATA[Home]]></category>
		<category><![CDATA[debian planet]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[iceweasel]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[sqlite]]></category>

		<guid isPermaLink="false">http://costela.net/?p=420</guid>
		<description><![CDATA[[UPDATE: why does the internet insist in making my posts embarrassingly obsolete?] I had seen this Firefox* SQLite VACUUM trick on Lifehacker, but hadn&#8217;t done anything about it. Now for some reason I decided to give it a spin, but manually, since the proposed method didn&#8217;t work and I had zero patience to try and [...]]]></description>
			<content:encoded><![CDATA[<p>[<strong>UPDATE</strong>: why does the internet <a href="http://lifehacker.com/5347125/vacuum-places-improved-speeds-up-firefox-with-a-click-of-your-mouse">insist in making my posts embarrassingly obsolete</a>?]</p>
<p>I had seen <a href="http://lifehacker.com/5344418/make-firefox-faster-by-vacuuming-your-database">this Firefox* SQLite VACUUM trick on Lifehacker</a>, but hadn&#8217;t done anything about it. Now for some reason I decided to give it a spin, but manually, since the proposed method didn&#8217;t work and I had zero patience to try and debug Firefox&#8217;s inner black magic.<br />
Regardless, this certainly breathed some new life in the old guy:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #c20cb9; font-weight: bold;">find</span> ~<span style="color: #000000; font-weight: bold;">/</span>.mozilla<span style="color: #000000; font-weight: bold;">/</span>firefox<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-name</span> <span style="color: #000000; font-weight: bold;">*</span>.sqlite <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #c20cb9; font-weight: bold;">read</span> db; <span style="color: #000000; font-weight: bold;">do</span> 
	sqlite3 <span style="color: #007800;">$db</span> VACUUM; 
<span style="color: #000000; font-weight: bold;">done</span></pre></div></div>

<p>It&#8217;s no miracle, Firefox&#8217;s still a juggernaut, but it makes things sensibly snappier. No idea how long this will last, probably depends on the amount of INSERTS and DELETES that go on daily.</p>
<p>But I wonder why they don&#8217;t do that automatically. I thought they did and never bothered to check (still haven&#8217;t, to be completely honest). It might be to avoid a small hiccup while the VACUUM&#8217;s performed, but then again, so many people complain about Firefox being slower then molasses that I can hardly see the point.</p>
<p>Anyway, it&#8217;s easy to complain about other people&#8217;s work. Gotta keep reminding myself of the old &#8220;<em>show me the code!</em>&#8221; motto.</p>
<p>&nbsp;</p>
<p>* Iceweasel, whatever&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://costela.net/2009/08/forcing-a-bit-of-house-cleaning-old-news-for-most-probably/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Migrated to lighttpd</title>
		<link>http://costela.net/2009/07/migrated-to-lighttpd/</link>
		<comments>http://costela.net/2009/07/migrated-to-lighttpd/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 12:21:17 +0000</pubDate>
		<dc:creator>Leo Antunes</dc:creator>
				<category><![CDATA[Home]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[fastcgi]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[oom killer]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[trac]]></category>
		<category><![CDATA[vps]]></category>

		<guid isPermaLink="false">http://costela.net/?p=323</guid>
		<description><![CDATA[After toying with the idea for a while I finally managed to switch my humble VPS from apache to lighttpd. The server had been having some strange choking episodes and I wasn&#8217;t able to find exactly what caused it, besides knowing it had to do with fastcgi processes bloating up and triggering the OOM killer. [...]]]></description>
			<content:encoded><![CDATA[<p>After toying with the idea for a while I finally managed to switch my humble VPS from <a href="http://www.apache.org">apache</a> to <a href="http://www.lighttpd.net">lighttpd</a>. The server had been having some strange choking episodes and I wasn&#8217;t able to find exactly what caused it, besides knowing it had to do with fastcgi processes bloating up and triggering the OOM killer. It was relatively sporadic, but since the VPS is pretty flimsy, I figured it was worth it to migrate and try to improve the performance a bit.<br />
Plus I wanted to have this long overdue incursion into lighttpd-land more than I wanted to debug the problem&#8230;</p>
<p>I also took the opportunity to bust the only SVN code I had lying around (that nasty <a href="/projects/guck">guck</a>) and imported it to Git, so I could abandon mod_svn and didn&#8217;t have to setup a dedicated SVN server.</p>
<p>Migrating the normal sites running on the server was pretty straightforward, including WordPress (thanks to <a href="http://r00tshell.com/archives/2007/05/16/wordpress-lighttpd-permalinks-without-rewrite/">this clever idea</a> to ditch the htaccess-based redirects), but it wasn&#8217;t perfect:
<ul>
<li>I couldn&#8217;t make htdigest authentication work, but since it&#8217;s nothing serious I just left it unsolved for now.</li>
<li>migrating <a href="http://trac.edgewall.org">Trac</a> wasn&#8217;t a complete success. Got bitten by <a href="http://redmine.lighttpd.net/issues/729">this bug</a> which means I had to insert this hack to <del datetime="2009-07-08T22:00:27+00:00">keep it working like it used to:

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">url.<span style="color: black;">rewrite</span> = <span style="color: black;">&#40;</span> <span style="color: #483d8b;">&quot;^/trac&quot;</span> =<span style="color: #66cc66;">&gt;</span> <span style="color: #483d8b;">&quot;$0&quot;</span>, <span style="color: #483d8b;">&quot;^/(.*)&quot;</span> =<span style="color: #66cc66;">&gt;</span> <span style="color: #483d8b;">&quot;/trac/$1&quot;</span> <span style="color: black;">&#41;</span></pre></div></div>

<p></del><strong>UPDATE:</strong> actually no, that hadn&#8217;t fixed anything, but <a href="http://trac.edgewall.org/ticket/2418#comment:15">this</a> did.
</li>
</ul>
<p>Strangely enough lighttpd didn&#8217;t really have that big of an impact in the memory footprint. It might be that I just optimized Apache better and that with a bit more fine tuning it would really shine, but I guess I&#8217;m expecting a bit too much from the poor VPS.<br />
Anyway, now that everything is set up and a few other tweaks are in place, I hope it&#8217;ll breathe a bit of life in the little guy.</p>
<p><strong>UPDATE 2:</strong> apparently that clever 404 trick isn&#8217;t perfect. I just noticed <a href="http://redmine.lighttpd.net/wiki/lighttpd/FrequentlyAskedQuestions#What-kind-of-environment-does-servererror-handler-404-set-up">it doesn&#8217;t receive the querystring</a>, which caused my OpenId to stop working. I&#8217;ve put a workaround in place, but I must admit this migration wasn&#8217;t as smooth as it seemed at first.</p>
]]></content:encoded>
			<wfw:commentRss>http://costela.net/2009/07/migrated-to-lighttpd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

