<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>thefjord.org</title>
	
	<link>http://thefjord.org</link>
	<description>The official online Fjord</description>
	<lastBuildDate>Mon, 12 Jul 2010 03:57:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/curtishawthorne" /><feedburner:info uri="curtishawthorne" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>curtishawthorne</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Ruby Garbage Collector Tuning: A Walkthrough</title>
		<link>http://feedproxy.google.com/~r/curtishawthorne/~3/n9z7o3UEWko/</link>
		<comments>http://thefjord.org/2010/07/05/ruby-garbage-collector-tuning-a-walkthrough/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 20:22:17 +0000</pubDate>
		<dc:creator>fjord</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://thefjord.org/?p=197</guid>
		<description><![CDATA[So you&#8217;ve heard that tuning the Ruby garbage collector is essential for Rails performance, but all those tuning parameters in the REE documentation look scary and indecipherable? Well, I took an afternoon and played around with Birdstack&#8217;s GC config, and it turns out that not only is it actually really important to tune those parameters, [...]]]></description>
			<content:encoded><![CDATA[<p>So you&#8217;ve heard that tuning the Ruby garbage collector is essential for Rails performance, but all those tuning parameters in the REE documentation look scary and indecipherable? Well, I took an afternoon and played around with <a href="http://birdstack.com/">Birdstack</a>&#8217;s GC config, and it turns out that not only is it actually really important to tune those parameters, they&#8217;re not really that scary.</p>
<p>First, some terminology:</p>
<p>Ruby Heap: A collection of ~20-40 byte &#8220;slots&#8221; that keep track of every object allocated in a Ruby program</p>
<p>C Heap: Memory allocated by Ruby for storing data for your objects if the slot is too small. If you&#8217;re storing an integer, it&#8217;ll probably fit in the slot. If you&#8217;re storing a string containing the entirety of your latest novel, Ruby will need a slot to keep track of the object and some space on the C heap to store your bestseller.</p>
<p>Garbage Collection: Unlike C/C++, Ruby takes care of deallocating objects for you. It doesn&#8217;t do this as soon as you stop using an object, it waits and does period sweeps through the Ruby heap (the collection of slots), figures out what objects aren&#8217;t being used and then deletes them.</p>
<p><a href="http://rubyenterpriseedition.com/">Ruby Enterprise Edition</a>: A distribution of MRI 1.8.x with all sorts of nice patches. To tune Ruby&#8217;s garbage collector, you&#8217;ll need to be running REE.</p>
<p>If you want to know more about the Ruby garbage collector, go read the <a href="http://www.engineyard.com/blog/2010/mri-memory-allocation-a-primer-for-developers/">Engine Yard article on MRI Memory Allocation</a>. Also, you should really take a look at the <a href="http://www.rubyenterpriseedition.com/documentation.html#_garbage_collector_performance_tuning">REE documentation</a> to see more about these parameters. And if you really want to know what&#8217;s going on, just go read the <a href="http://github.com/FooBarWidget/rubyenterpriseedition187/blob/master/gc.c">gc.c source</a>. It&#8217;s really not too complicated.</p>
<p>OK, so REE gives us a bunch of knobs to turn for GC and memory allocation, and a lot of diagnostic output. The first step is to turn on that output so we can decide what knobs to fiddle with.  Here&#8217;s how I set up my Rails app to give me an approximate idea of what GC activity happens with every request.</p>
<p><script src="http://gist.github.com/464624.js"></script></p>
<p>GitHub Gist: <a href="http://gist.github.com/464624">http://gist.github.com/464624</a></p>
<p>Once you&#8217;ve got that set up, get your app running in a staging environment that closely mimics your production environment, and start up an instance of your app with GC logging turned on. I found that I needed to use just &#8217;script/server&#8217; with WEBrick instead of Passenger or I wouldn&#8217;t get anything in my logs. Probably something with how Passenger handles file descriptors when forking; I didn&#8217;t feel like debugging it. You might also be interested in a my post on <a href="http://thefjord.org/2010/05/24/default-gc-parameters-for-ruby-enterprise-edition/">setting machine-wide Ruby GC defaults</a>.</p>
<p>I started with these environment variables:<br />
<code><br />
RUBY_GC_STATS=1<br />
RUBY_GC_DATA_FILE=/tmp/ruby_gc.txt<br />
</code></p>
<p>And here&#8217;s what I got for my first request:<br />
<code><br />
***<br />
Request completed: http://localhost:8080/people<br />
GC collections: 7<br />
GC time (us): 563772<br />
Bytes allocated since last GC run: 1856079<br />
Bytes allocated since last request: 43486971<br />
Number of allocations since last request: 887968<br />
Live objects: 558106<br />
Total allocated objects since interpreter start: 2557208<br />
HEAP[ 0]: size=  10000<br />
HEAP[ 1]: size=  20001<br />
HEAP[ 2]: size=  38001<br />
HEAP[ 3]: size=  70402<br />
HEAP[ 4]: size= 128722<br />
HEAP[ 5]: size= 233698<br />
HEAP[ 6]: size= 422655<br />
***<br />
</code></p>
<p>Woah, after only 1 request, we&#8217;ve done 7 GC runs, allocated 7 Ruby heaps, and spent over half a second doing nothing but garbage collecting. To be fair, this includes loading WEBrick, and I&#8217;m on a resource-starved virtual machine on my laptop, so things will be a bit different once we&#8217;re in full production. But this is still pretty horrible!</p>
<p>Let&#8217;s start with the easy optimization: heap allocations. After 1 request, we&#8217;ve got 558,106 objects, so it&#8217;s pretty silly to stick with the default heap size of 10,000 and make Ruby allocate more heaps when it runs out of room, so let&#8217;s up that to 600,000 and try again.<br />
<code><br />
RUBY_GC_STATS=1<br />
RUBY_GC_DATA_FILE=/tmp/ruby_gc.txt<br />
RUBY_HEAP_MIN_SLOTS=600000<br />
</code><br />
And here&#8217;s the request:<br />
<code><br />
***<br />
Request completed: http://localhost:8080/people<br />
GC collections: 6<br />
GC time (us): 502798<br />
Bytes allocated since last GC run: 4013508<br />
Bytes allocated since last request: 43482680<br />
Number of allocations since last request: 887880<br />
Live objects: 616405<br />
Total allocated objects since interpreter start: 2557151<br />
HEAP[ 0]: size= 600000<br />
HEAP[ 1]: size= 610000<br />
***<br />
</code></p>
<p>Well, that&#8217;s a bit better. We cut out 1 GC run, 5 Ruby heap allocations, and about 60ms of GC time. We ran over our 600,000 item heap limit (616,405 live objects), so let&#8217;s increase that to 650,000 for the next run. But that doesn&#8217;t explain why there were so many GC runs.</p>
<p>The next important tuning variable is RUBY_GC_MALLOC_LIMIT. By default, it&#8217;s set to 8000000, which means that every time we allocate more than 8 million bytes on the C heap (not the Ruby heap), we run GC. Well, on the first request, we allocated 43,482,680 bytes! Divide that by 8 million, and you get almost 5.5, so yup, 6 GC runs makes sense. But if we know that we&#8217;ll be allocating nearly 50 MB every request, let&#8217;s just increase that number.<br />
<code><br />
RUBY_GC_STATS=1<br />
RUBY_GC_DATA_FILE=/tmp/ruby_gc.txt<br />
RUBY_HEAP_MIN_SLOTS=650000<br />
RUBY_GC_MALLOC_LIMIT=50000000<br />
</code><br />
Here&#8217;s the request:<br />
<code><br />
***<br />
Request completed: http://localhost:8080/people<br />
GC collections: 3<br />
GC time (us): 339061<br />
Bytes allocated since last GC run: 2796396<br />
Bytes allocated since last request: 43482627<br />
Number of allocations since last request: 887879<br />
Live objects: 582949<br />
Total allocated objects since interpreter start: 2557151<br />
HEAP[ 0]: size= 650000<br />
***<br />
</code></p>
<p>Much better! We cut out 3 GC runs, and over 150ms of GC time. But why is it still doing 3 GC runs? Well, it turns out that was just because either WEBrick or Rails initialized a ton of objects on startup. If we go back in the logs and look at the GC runs, we can see that two of the runs happened before the request started, and each time the freelist had 0. That means the Ruby heap space really was out of room to store more objects.<br />
<code><br />
Garbage collection started<br />
objects processed: 0650000<br />
live objects    : 0403654<br />
freelist objects : 0000000<br />
freed objects   : 0246346<br />
</code><br />
&#8230;<br />
<code><br />
Garbage collection started<br />
objects processed: 0650000<br />
live objects    : 0428574<br />
freelist objects : 0000000<br />
freed objects   : 0221426<br />
</code><br />
&#8230;<br />
<code><br />
***<br />
Request starting: http://localhost:8080/people<br />
***</p>
<p>Garbage collection started<br />
objects processed: 0650000<br />
live objects    : 0489192<br />
freelist objects : 0000000<br />
freed objects   : 0160808<br />
</code></p>
<p>GC runs themselves aren&#8217;t a bad thing: if you use a language with garbage collection, you&#8217;ll have to collect dead objects sooner or later. The larger your heap, the fewer times you&#8217;ll have to do garbage collection, but a large heap also means that doing GC will take a long time. I figure a reasonable goal is an average of one GC run per request cycle.</p>
<p>So let&#8217;s run a few more requests on this same instance:<br />
<code><br />
***<br />
Request completed: http://localhost:8080/people/cghawthorne<br />
GC collections: 1<br />
GC time (us): 97365<br />
Bytes allocated since last GC run: 3556<br />
Bytes allocated since last request: 5147220<br />
Number of allocations since last request: 158437<br />
Live objects: 505713<br />
Total allocated objects since interpreter start: 2736920<br />
HEAP[ 0]: size= 650000<br />
***<br />
</code><br />
&#8230;<br />
<code><br />
***<br />
Request completed: http://localhost:8080/people/cghawthorne/lists/3.html<br />
GC collections: 0<br />
GC time (us): 0<br />
Bytes allocated since last GC run: 2175864<br />
Bytes allocated since last request: 1620109<br />
Number of allocations since last request: 43456<br />
Live objects: 562918<br />
Total allocated objects since interpreter start: 2794125<br />
HEAP[ 0]: size= 650000<br />
***<br />
</code></p>
<p>Hey, it worked out! About 1 GC run per request (we&#8217;re almost at the point of having to do another one, less than 100,000 objects to go) and no extra heap allocations.</p>
<p>There are several other settings you can tweak that have to do with determining the size of additionally allocated heaps. If your application&#8217;s memory size can occasionally grow, you might look into fine tuning them as well.</p>
<p><strong>Update</strong>: If you&#8217;re curious, I collected some performance data from running Birdstack with and without these modifications.</p>
<p>Without GC tuning, the average VIRT size, as reported by &#8216;top&#8217;, of each Rails process was about 80mb shortly after starting. Over the course of a day, the average time to serve a page was 599ms.</p>
<p>After tuning, the average start size of the Rails processes was 120mb, and over a day, the average serve time was 581ms. After letting it run for another couple days, the average serve time dropped to 475ms.</p>
<p>So what does that mean? Well, the tunings didn&#8217;t actually improve response times on the site drastically. A lot of the variance can probably be attributed to different types of traffic. But, the changes certainly didn&#8217;t hurt things, and I&#8217;m willing to pay a few extra megabytes of RAM for a little more performance. I&#8217;m guessing the real problem here is that my server is very much IO-bound rather than CPU-bound. It lives on a virtual host with a limited amount of RAM and pretty slow disk access. So, every page to swap (thankfully not that many) and every disk hit the db has to do (quite a bit more) hurts. I&#8217;d be interested to see GC performance numbers for hosts that have better disk and memory resources. I know Twitter got a <a href="http://blog.evanweaver.com/articles/2009/04/09/ruby-gc-tuning/">big performance boost</a> with GC tuning.</p>
]]></content:encoded>
			<wfw:commentRss>http://thefjord.org/2010/07/05/ruby-garbage-collector-tuning-a-walkthrough/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://thefjord.org/2010/07/05/ruby-garbage-collector-tuning-a-walkthrough/</feedburner:origLink></item>
		<item>
		<title>Muzundrum Review</title>
		<link>http://feedproxy.google.com/~r/curtishawthorne/~3/sFTzyLVeNrY/</link>
		<comments>http://thefjord.org/2010/06/09/muzundrum-review/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 17:55:06 +0000</pubDate>
		<dc:creator>fjord</dc:creator>
				<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://thefjord.org/?p=190</guid>
		<description><![CDATA[Just like everyone else, I like to think that I&#8217;m immune to advertising&#8217;s influence. But that&#8217;s not really the case. The other day, Gmail figured out that I&#8217;m interested in music and decided to show me an ad for Musician&#8217;s Dice. Those sounded pretty novel, so I decided to take a look. Next thing I [...]]]></description>
			<content:encoded><![CDATA[<p>Just like everyone else, I like to think that I&#8217;m immune to advertising&#8217;s influence. But that&#8217;s not really the case. The other day, Gmail figured out that I&#8217;m interested in music and decided to show me an ad for <a href="http://www.musiciansdice.com/">Musician&#8217;s Dice</a>. Those sounded pretty novel, so I decided to take a look. Next thing I knew, I was ordering a copy of <a href="http://www.muzundrum.com/">Muzundrum</a>, a sort of musical Scrabble/crossword puzzle board game that is played with the Musician&#8217;s Dice.</p>
<p><a href="http://thefjord.org/gallery/muzundrum/2010-06-01+23_09_31.jpg.html"><img src="http://thefjord.org/gallery/d/2981-2/2010-06-01+23_09_31.jpg" class="alignleft"></a></p>
<p>I had a chance to play a few games while visiting my family in Kansas, and I think it&#8217;s a pretty great game. Players take turns rolling one of the 12-sided (one side for each note in the chromatic scale) dice and then try to place that die on the board in a way that adds to a scale or a triad. To keep things from getting too complicated, only major scales are allowed and triads must be either major, minor, or diminished. If that&#8217;s too simple, they also have a <a href="http://www.muzundrum.com/master.html">master&#8217;s version of the game</a>.</p>
<p>I&#8217;ve played only three rounds (and won one!) so far, and I&#8217;m still using the cheat sheet quite a bit. But, as I hoped, it has helped improve my understanding of music theory.</p>
<p>Nathan (who is a full-time music minister and really knows his music theory) and Abu (who isn&#8217;t half bad at music theory either) were able to be in town one evening, and we all played a game with Grey (who claims not to know music theory, but has successfully applied his mathematical superpowers to the game). We probably spent more time talking about music theory and fiddling around on the piano than we did actually playing the game. It was great! Nathan won. :-)</p>
<p>If you happen to get a copy of the game (or come visit me!), here are the important bits of music theory you&#8217;ll need to know. <a href="http://en.wikipedia.org/wiki/Major_scale">Major scales</a> are made up of whole steps and half steps in this pattern: WWHWWWH. Or, you can think of it as two identical tetrachords separated by a whole step: WWH-W-WWH (thank you, Wikipedia). <a href="http://en.wikipedia.org/wiki/Major_triad">Major triads</a> are made up of a <a href="http://en.wikipedia.org/wiki/Major_third">major third</a> (the second note is two whole steps above the first) and a <a href="http://en.wikipedia.org/wiki/Minor_third">minor third</a> (the second note is one whole step and one half step above the first). <a href="http://en.wikipedia.org/wiki/Minor_triad">Minor triads</a> are the opposite: a minor third followed by a major third. <a href="http://en.wikipedia.org/wiki/Diminished_triad">Diminished triads</a> are made of two minor triads.</p>
<p>I&#8217;d learned all that stuff at some point, but playing the game and talking through it all really helped solidify it in my mind.</p>
<p>One potential gripe I have with the game is that there seems to be very little strategy involved. You never know what note you&#8217;ll get on your next roll, so there&#8217;s usually not much point in planning ahead; just find the best place to put the note you just rolled. For now, just trying to find that best place is sufficiently challenging to keep me interested, but I can see how it might get less interesting once I get better.</p>
<p>I haven&#8217;t tried it yet, but it might be fun to try pre-rolling some number of dice for each player and keeping them secret. This could make Scrabble-like strategizing possible. Or, maybe once I get bored with the standard gameplay, I could just move up to the master level.</p>
<p>Anyway, it&#8217;s a cool game.  You should come visit me so we can play a round!</p>
]]></content:encoded>
			<wfw:commentRss>http://thefjord.org/2010/06/09/muzundrum-review/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://thefjord.org/2010/06/09/muzundrum-review/</feedburner:origLink></item>
		<item>
		<title>Fjord’s Last Stand</title>
		<link>http://feedproxy.google.com/~r/curtishawthorne/~3/2R_NgNqcQdA/</link>
		<comments>http://thefjord.org/2010/06/06/fjords-last-stand/#comments</comments>
		<pubDate>Sun, 06 Jun 2010 17:35:31 +0000</pubDate>
		<dc:creator>fjord</dc:creator>
				<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://thefjord.org/?p=171</guid>
		<description><![CDATA[Fjord&#8217;s Last Stand photos
Last weekend was my final weekend in Maryland before moving to California to start my shiny new job (which starts on tomorrow!). So, my totally awesome friends put together a non-stop four-day-long party which Jared titled &#8220;Fjord&#8217;s Last Stand.&#8221; Luckily, things worked out better for me than for Custer.
Friday
The weekend began with [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://thefjord.org/gallery/fjords-last-stand/">Fjord&#8217;s Last Stand photos</a></p>
<p>Last weekend was my final weekend in Maryland before moving to California to start my shiny new job (which starts on tomorrow!). So, my totally awesome friends put together a non-stop four-day-long party which Jared titled &#8220;Fjord&#8217;s Last Stand.&#8221; Luckily, things worked out better for me than for Custer.</p>
<p><strong>Friday</strong></p>
<p>The weekend began with an all-you-can-eat crab extravaganza at a little seafood place that Jared found. Zerg had never had crabs before, and I&#8217;d only had them once, so we definitely had to experience a true Maryland crab dinner before I left.  It was pretty great.  The all-you-can-eat aspect certainly made it less stressful&#8211;we didn&#8217;t have to be worried about extracting all possible meat from every crab.</p>
<p>Then we went back to the Osborn&#8217;s (who graciously let me sleep on their couch because I had already vacated my apartment) and watched the last two episodes of <a href="http://en.wikipedia.org/wiki/Chuck_(TV_series)">Chuck</a>.  Zerg and I had watched all the rest of the season while we were still roommates, so it seemed fitting to finish it off at the party.  The season had a great finale, but I really wish they would have just ended the show instead of adding another crazy twist at the last moment.</p>
<p><strong>Saturday</strong></p>
<p><a href="http://thefjord.org/gallery/fjords-last-stand/06+-+The+Mighty+Wanamaker+Organ+_yes_+it+goes+all+the+way+up_.JPG.html"><img src="http://thefjord.org/gallery/d/3009-2/06+-+The+Mighty+Wanamaker+Organ+_yes_+it+goes+all+the+way+up_.JPG" class="alignleft"></a></p>
<p>The next morning, we got up early and headed to Philadelphia to see (and hear) THE LARGEST PIPE ORGAN IN THE WORLD!  Woo!  Oddly enough, it&#8217;s not in a church or a concert hall, but a Macy&#8217;s department store.  The <a href="http://en.wikipedia.org/wiki/Wanamaker_Organ">Wanamaker Organ</a> did not disappoint.  The sound wasn&#8217;t overwhelming loud, but amazingly rich, warm, complex, diverse, and yes, powerful.  I highly recommend a visit.  In addition to a fantastic concert by <a href="http://pipedreams.publicradio.org/listings/2003/0344/">Peter Conte</a> himself, we also got to go on a <a href="http://wanamakerorgan.com/thumbs.php#Tours">tour</a> of the organ.</p>
<p><a href="http://thefjord.org/gallery/fjords-last-stand/28+-+I_m+pretty+excited+to+sit+at+the+console_.JPG.html"><img src="http://thefjord.org/gallery/d/3075-2/28+-+I_m+pretty+excited+to+sit+at+the+console_.JPG" class="alignright"></a></p>
<p>But, best of all, I got to sit at the console! More photos of the tour and the console are in <a href="http://thefjord.org/gallery/fjords-last-stand/">the gallery</a>.</p>
<p>We also got to see the Liberty Bell, visited a couple yarn shops, and ate at Pat&#8217;s, home of the original Philly Cheese Steak.  Those were all great, but obviously my favorite was the organ. :-)</p>
<p><strong>Sunday</strong></p>
<p>On Sunday, we had a special outdoor church service under a big tent for the Bishop&#8217;s visit. It was actually pretty neat, and we had great weather for it. <a href="http://www.sttimscatonsville.org/">St. Tim&#8217;s</a> gave me a really amazing going away present: an accompanist&#8217;s edition of the 1982 Hymnal and Service Music, signed by everyone on the worship team. I hope I can find a good church that will let me use it on their pipe organ!</p>
<p><a href="http://thefjord.org/gallery/fjords-last-stand/IMG00414.jpg.html"><img src="http://thefjord.org/gallery/d/2990-2/IMG00414.jpg" class="alignleft"></a></p>
<p>After the service, we had a big picnic lunch. And after that, Fr. Terry had the crazy idea that we should have a Young Adults vs. The Vestry rope pull over a mud pit. He had told us we&#8217;d be doing this earlier, but we really couldn&#8217;t tell if he was joking or not until it actually happened. Unfortunately, most of the young adults had left by that time, but the teens joined in with us in our battle against the vestry.  We still lost.  And got rather muddy.  What a way to finish up my time at St. Tim&#8217;s! :-)</p>
<p>Then, we went back to the Osborn&#8217;s for an excellent Rock Band session (we played a lot of Rock Band that weekend) and watched Hero and Kill Bill Vol. 2 (the greatest movie ever made, ever).</p>
<p><strong>Monday</strong></p>
<p><a href="http://thefjord.org/gallery/fjords-last-stand/48+-+Looks+nice_+doesn_t+it_.JPG.html"><img src="http://thefjord.org/gallery/d/3135-1/48+-+Looks+nice_+doesn_t+it_.JPG" class="alignright"></a></p>
<p>Thanks to Memorial Day, most people were off work on Monday, so the party continued! In the morning, we went to Jared&#8217;s parents&#8217; place to celebrate his dad&#8217;s birthday. Then it was back to the Osborn&#8217;s for Make-Your-Own-Sushi Night! We had salmon and shark for the meat and cucumber, carrot, avacado, and scrambled eggs for the, uh, non-meat.  We mostly did regular rolls but also a few handrolls and even some sashimi.  It was pretty tasty.</p>
<p>Then, in continuing our movie theme, we watched Once (one of Rebecca&#8217;s favorite movies). It had some pretty great music and made me want to go start a band or something.  Brandon and CC even came over, and I got to play with their cat Diotima.</p>
<p><strong>Conclusion</strong></p>
<p>If you were to make a list of Things Fjord Likes, there wouldn&#8217;t be very many things on it that didn&#8217;t occur that weekend.  Thanks to everyone who made it happen! I shall miss you, my east coast buddies. Thanks for being the awesomest friends anyone could ask for!</p>
<p>You can also read <a href="http://osbornfiber.com/2010/05/31/last-stand/">Rebecca&#8217;s account of the party</a>. The last bit almost brings tears to my eyes. ::sniff::</p>
<p><a href="http://thefjord.org/gallery/fjords-last-stand/">Fjord&#8217;s Last Stand photos</a></p>
]]></content:encoded>
			<wfw:commentRss>http://thefjord.org/2010/06/06/fjords-last-stand/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://thefjord.org/2010/06/06/fjords-last-stand/</feedburner:origLink></item>
		<item>
		<title>Default GC Parameters for Ruby Enterprise Edition</title>
		<link>http://feedproxy.google.com/~r/curtishawthorne/~3/r8590VoE6to/</link>
		<comments>http://thefjord.org/2010/05/24/default-gc-parameters-for-ruby-enterprise-edition/#comments</comments>
		<pubDate>Tue, 25 May 2010 03:53:54 +0000</pubDate>
		<dc:creator>fjord</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://thefjord.org/?p=160</guid>
		<description><![CDATA[Update: I&#8217;ve posted some more info on how to go about tuning the garbage collector in Ruby Garbage Collector Tuning: A Walkthrough
After attending Ruby Nation (which was awesome) and hearing a couple talks on how Ruby&#8217;s garbage collection works, I&#8217;ve been playing around some with the GC settings that REE lets you tweak.  I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update</strong>: I&#8217;ve posted some more info on how to go about tuning the garbage collector in <a href="http://thefjord.org/2010/07/05/ruby-garbage-collector-tuning-a-walkthrough/">Ruby Garbage Collector Tuning: A Walkthrough</a></p>
<p>After attending <a href="http://rubynation.org">Ruby Nation</a> (which was awesome) and hearing a couple talks on how Ruby&#8217;s garbage collection works, I&#8217;ve been playing around some with the GC settings that <a href="http://www.rubyenterpriseedition.com/">REE</a> lets you tweak.  I&#8217;m still experimenting with the best setup, but I do know that by setting RUBY_HEAP_MIN_SLOTS to 600,000 (the default is 10,000), the <a href="http://birdstack.com">Birdstack</a> code base loads with 1 heap slot allocation instead of 7.</p>
<p>So, that&#8217;s an obvious win, and I wanted to make sure that all my app servers used that setting.  Unfortunately, there&#8217;s no easy way to do that.  My first thought was to look for a <a href="http://www.modrails.com/">Passenger</a> option to set the environment for the REE instances it launches, but that setting doesn&#8217;t exist, and that wouldn&#8217;t cover my <a href="http://github.com/collectiveidea/delayed_job">delayed_job</a> process or the cron jobs that run.</p>
<p>My solution was to write a wrapper around the ruby program itself.  You can&#8217;t use a script as an interpreter for a shebang line (#!) with <a href="http://lkml.org/lkml/2008/9/6/66">kernels earlier than 2.6.27.9</a>, so for my deployment, it needed to be in C.  It&#8217;s a pretty trivial program, but it gets the job done and ensures that all my Ruby programs use the correct GC settings.</p>
<p><script src="http://gist.github.com/412737.js?file=ruby.c"></script><br />
GitHub Gist: <a href="http://gist.github.com/412737">http://gist.github.com/412737</a></p>
<p>Add whatever other GC settings you&#8217;d like and modify the exec line to point to your real Ruby executable. To compile, just do &#8216;make ruby&#8217;.</p>
<p>Read up on the other REE settings in the <a href="http://www.rubyenterpriseedition.com/documentation.html#_garbage_collector_performance_tuning">REE documentation</a>. Give it a few reads; the way the allocator works isn&#8217;t totally obvious.  I also recommend the <a href="http://www.engineyard.com/blog/2010/mri-memory-allocation-a-primer-for-developers/">Engine Yard blog post on the MRI allocator</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://thefjord.org/2010/05/24/default-gc-parameters-for-ruby-enterprise-edition/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://thefjord.org/2010/05/24/default-gc-parameters-for-ruby-enterprise-edition/</feedburner:origLink></item>
		<item>
		<title>Research Party!</title>
		<link>http://feedproxy.google.com/~r/curtishawthorne/~3/FtHcIK_6pTY/</link>
		<comments>http://thefjord.org/2010/05/01/research-party/#comments</comments>
		<pubDate>Sun, 02 May 2010 01:09:16 +0000</pubDate>
		<dc:creator>fjord</dc:creator>
				<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://thefjord.org/?p=155</guid>
		<description><![CDATA[Spence flew in Thursday night for our long-awaited Epic Research Party of Awesometude.  Remember that Stockade Case thing we obsessively researched for an entire semester back in college and were going to write a book about?  Well, it&#8217;s going to happen.  It turns out that the National Archives in DC has all [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://thefjord.org/gallery/nara-dc-2010/2010-04-30+10_46_30.jpg.html"><img src="http://thefjord.org/gallery/d/2972-2/2010-04-30+10_46_30.jpg" class="alignleft"></a>Spence flew in Thursday night for our long-awaited Epic Research Party of Awesometude.  Remember that Stockade Case thing we obsessively researched for an entire semester back in college and were going to write a book about?  Well, it&#8217;s going to happen.  It turns out that the National Archives in DC has all of the original copies of everything used in the trial, so we&#8217;re going to spend the next week researching and writing like crazy.</p>
<p><a href="http://thefjord.org/gallery/nara-dc-2010/2010-05-01+13_32_01.jpg.html"><img src="http://thefjord.org/gallery/d/2976-2/2010-05-01+13_32_01.jpg" class="alignright"></a>It&#8217;s pretty exciting to handle original documents from the 1860s.  We&#8217;ve spent countless hours reading about the people involved in this crazy trial, and now we&#8217;re able to handle papers that they actually wrote on!  Better yet, the things they wrote are pretty nuts.  My advice: don&#8217;t mess with a Reconstruction-era disenfranchised Texan.</p>
<p>Bonus: we get to use locker #41 every day to store our stuff. :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://thefjord.org/2010/05/01/research-party/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://thefjord.org/2010/05/01/research-party/</feedburner:origLink></item>
		<item>
		<title>Organist!</title>
		<link>http://feedproxy.google.com/~r/curtishawthorne/~3/tpARCm9dsXk/</link>
		<comments>http://thefjord.org/2010/02/21/organist/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 19:01:59 +0000</pubDate>
		<dc:creator>fjord</dc:creator>
				<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://thefjord.org/?p=153</guid>
		<description><![CDATA[As of today, I&#8217;m actually a real organist!  Nearly two years ago (April &#8216;08), I started piano lessons with the goal of eventually playing the organ in church.  Today, I played Old Hundredth (&#8220;Praise God from whom all Blessings Flow&#8221;) in church.  I used all three manuals of the pipe organ at [...]]]></description>
			<content:encoded><![CDATA[<p>As of today, I&#8217;m actually a real organist!  Nearly two years ago (April &#8216;08), I started piano lessons with the goal of eventually playing the organ in church.  Today, I played Old Hundredth (&#8220;Praise God from whom all Blessings Flow&#8221;) in church.  I used all three manuals of the pipe organ at <a href="http://www.sttimscatonsville.org/">St. Tim&#8217;s</a>, both feet on the pedals, and a pretty full registration.  The congregation sang and everything!  I made a few minor mistakes, but I kept on playing, and I doubt very many people even noticed.</p>
<p>Now, I just need to join the <a href="http://www.agohq.org">guild</a>. :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://thefjord.org/2010/02/21/organist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://thefjord.org/2010/02/21/organist/</feedburner:origLink></item>
		<item>
		<title>Christmas Organ</title>
		<link>http://feedproxy.google.com/~r/curtishawthorne/~3/02mlL12Qzx0/</link>
		<comments>http://thefjord.org/2009/12/31/christmas-organ/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 00:26:41 +0000</pubDate>
		<dc:creator>fjord</dc:creator>
				<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://thefjord.org/?p=140</guid>
		<description><![CDATA[For Christmas break, I&#8217;m back in Kansas with my parents.  This last Sunday, I decided to check out the local Episcopal church.  I started attending an Episcopal church after college, so I was curious what the one in my hometown was like.  Grace Episcopal turned out to be a great little church, and better [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://thefjord.org/gallery/christmas-organ-2009/100_0861.JPG.html"><img src="http://thefjord.org/gallery/d/2945-2/100_0861.JPG" class="alignleft"></a>For Christmas break, I&#8217;m back in Kansas with my parents.  This last Sunday, I decided to check out the local Episcopal church.  I started attending an Episcopal church after college, so I was curious what the one in my hometown was like.  <a href="http://www.gracechurchhutch.org/">Grace Episcopal</a> turned out to be a great little church, and better yet, they&#8217;ve got an awesome pipe organ!  It&#8217;s a little <a href="http://www.gabrielkney.com/">Gabriel Kney</a> tracker organ (entirely mechanical) built in 1989 in Canada.  I talked with the rector after the service, and he said I could come by during the week and practice on it if I wanted, so guess where I&#8217;ve been the last three afternoons. :-)</p>
<p><a href="http://thefjord.org/gallery/christmas-organ-2009/100_0873.JPG.html"><img src="http://thefjord.org/gallery/d/2967-2/100_0873.JPG" class="alignright"></a>It has only 13 stops, but it&#8217;s tons of fun to play.  It&#8217;s small, so I was right next to the pipes and immersed in their sound when playing.  And, it&#8217;s a tracker organ, so I could literally feel the levers opening the pipes for every note I played.</p>
<p>I&#8217;m still trying to figure out a reasonable way to record pipe organ music, so I don&#8217;t have any music to post yet, but I&#8217;ll get that figured out soon.  Next week, it&#8217;s back to the much larger pipe organ at <a href="http://sttimscatonsville.org">St. Tim&#8217;s</a>!</p>
<p><a href="http://thefjord.org/gallery/christmas-organ-2009/">More pipe organ pictures</a></p>
]]></content:encoded>
			<wfw:commentRss>http://thefjord.org/2009/12/31/christmas-organ/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://thefjord.org/2009/12/31/christmas-organ/</feedburner:origLink></item>
		<item>
		<title>Recital #3</title>
		<link>http://feedproxy.google.com/~r/curtishawthorne/~3/hbsMO646-e8/</link>
		<comments>http://thefjord.org/2009/11/07/recital-3/#comments</comments>
		<pubDate>Sat, 07 Nov 2009 18:25:23 +0000</pubDate>
		<dc:creator>fjord</dc:creator>
				<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://thefjord.org/?p=132</guid>
		<description><![CDATA[It&#8217;s been about a year and a half ago now that I started taking piano lessons, and on Thursday I had my third recital.  It was by far the best recital I&#8217;ve done, mostly just because I&#8217;m less nervous about playing in front of people now.  The two pieces I did were ones [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been about a year and a half ago now that I started taking piano lessons, and on Thursday I had my third recital.  It was by far the best recital I&#8217;ve done, mostly just because I&#8217;m less nervous about playing in front of people now.  The two pieces I did were ones that I knew pretty well, so I just had a good time instead of being worried about it.  As usual, here are some recordings I made at home of the pieces I played:</p>
<p><a href="http://thefjord.org/static/fst/Recital%203/(01)%20Chopin%20-%20Prelude%20No.%204%20in%20E%20minor.mp3">Chopin &#8211; Prelude No. 4 in E minor</a></p>
<p><a href="http://thefjord.org/static/fst/Recital%203/(02)%20Massenet%20-%20Elegie.mp3">Massenet &#8211; Élégie</a></p>
<p>I also started taking organ lessons about a month ago, so hopefully I&#8217;ll have some organ music recordings on here soon!</p>
]]></content:encoded>
			<wfw:commentRss>http://thefjord.org/2009/11/07/recital-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://thefjord.org/2009/11/07/recital-3/</feedburner:origLink></item>
		<item>
		<title>The Hazards of Love</title>
		<link>http://feedproxy.google.com/~r/curtishawthorne/~3/l0MmW-K2HG8/</link>
		<comments>http://thefjord.org/2009/06/06/the-hazards-of-love/#comments</comments>
		<pubDate>Sat, 06 Jun 2009 17:52:20 +0000</pubDate>
		<dc:creator>fjord</dc:creator>
				<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://curtis.hawthorne.name/blog/2009/06/06/the-hazards-of-love/</guid>
		<description><![CDATA[First off, have you heard The Decemberists&#8217; latest album, &#8220;The Hazards of Love?&#8221;  If not, drop what you&#8217;re doing, go buy it, listen to it at least 3 times on a good sound system, and read the lyrics while you&#8217;re listening.  No really, do it now.  I&#8217;ll wait.
&#8230;
Wasn&#8217;t it awesome?!  It&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>First off, have you heard The Decemberists&#8217; latest album, &#8220;The Hazards of Love?&#8221;  If not, drop what you&#8217;re doing, go buy it, listen to it at least 3 times on a good sound system, and read the lyrics while you&#8217;re listening.  No really, do it now.  I&#8217;ll wait.</p>
<p>&#8230;</p>
<p><a href="http://curtis.hawthorne.name/gallery/hazards-of-love/100_0071.JPG.html"><img class="alignright" src="http://curtis.hawthorne.name/gallery/d/2713-2/100_0071.JPG" /></a>Wasn&#8217;t it awesome?!  It&#8217;s this crazy epic rock opera about a shape-shifting forest-dweller who falls in love with a lovely young maiden, their trials with the queen of the forest, a murdering rake, and a wild river.  The brand brought in two amazing vocalists from other bands to fill the parts of Margaret (the heroine of the story) and the forest queen.</p>
<p>Naturally, when I found out they were coming to the area, I had to go to the concert.  So, last night Lucky, Zerg, Brittany, and I made our way down to Richmond, VA for the show.</p>
<p><a href="http://curtis.hawthorne.name/gallery/hazards-of-love/100_0074.JPG.html"><img class="alignleft" src="http://curtis.hawthorne.name/gallery/d/2722-2/100_0074.JPG" /></a>I need to finish packing for India (leaving in just a few hours!), so I&#8217;ll just list some of the highlights: The Queen absolutely rocked, Margaret did an excellent job of staying in character the entire performance, the band has several ridiculously talented multi-instrumentalists (Hammond organ, Nord synth, and glockenspiel all at the same time? Very yes!), and finally, the Decemberists Players taught me that Evel Knievel&#8217;s ability to jump 7 cars with his motorcycle was the real reason that the South didn&#8217;t successfully succeed from the North during the Civil War.  Brilliant.</p>
<p><a href="http://curtis.hawthorne.name/gallery/hazards-of-love">More pictures from the concert</a></p>
]]></content:encoded>
			<wfw:commentRss>http://thefjord.org/2009/06/06/the-hazards-of-love/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://thefjord.org/2009/06/06/the-hazards-of-love/</feedburner:origLink></item>
		<item>
		<title>Not good at buying pants</title>
		<link>http://feedproxy.google.com/~r/curtishawthorne/~3/q8RbwAm8-UY/</link>
		<comments>http://thefjord.org/2009/06/03/not-good-at-buying-pants/#comments</comments>
		<pubDate>Wed, 03 Jun 2009 22:16:18 +0000</pubDate>
		<dc:creator>fjord</dc:creator>
				<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://curtis.hawthorne.name/blog/2009/06/03/not-good-at-buying-pants/</guid>
		<description><![CDATA[ 
On Saturday, I set out to buy some pants.  I ended up buying a 6&#8242;x4&#8242; abstract art painting on canvas.  I really need to work on my pants-purchasing skills.  Zerg was less than pleased, but I think it makes our living room look awesome!  Bonus points if anyone can figure [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://curtis.hawthorne.name/gallery/living-room-art/100_0061.JPG.html"><img class="alignleft" src="http://curtis.hawthorne.name/gallery/d/2682-2/100_0061.JPG" alt="" /></a> <a href="http://curtis.hawthorne.name/gallery/living-room-art/100_0062.JPG.html"><img class="alignleft" src="http://curtis.hawthorne.name/gallery/d/2686-2/100_0062.JPG" alt="" align="center" /></a></p>
<p>On Saturday, I set out to buy some pants.  I ended up buying a 6&#8242;x4&#8242; abstract art painting on canvas.  I really need to work on my pants-purchasing skills.  Zerg was less than pleased, but I think it makes our living room look awesome!  Bonus points if anyone can figure out the name of the artist; I can&#8217;t make out the signature.</p>
<p>Also, as an update, I&#8217;m leaving for India for 3 weeks on Saturday.  Whee!  The first half of the trip will be centered around Minu&#8217;s wedding, which I&#8217;m sure will be all kinds of awesome.  Then, we (Spork, Dex, Eric, and me) fly up north and spend several days at the <a href="http://www.makaibari.com">Makaibari Tea Estate</a> in Darjeeling.  And after that, it&#8217;s off to Agra to see the Taj Mahal and see what there is to see in Delhi.  I&#8217;ll post lots of pictures and whatnot when I get back.</p>
<p>Oh, and back in April, I finally got to see Neko Case live!!  It was an amazing concert, with Will Sheff from Okkervil River opening.  If you missed it (and I&#8217;m pretty sure everyone but me did), you can still listen to it because NPR taped the whole thing and has it available on their website: <a href="http://www.npr.org/templates/story/story.php?storyId=102641637">Neko Case Concert</a>.  I highly recommend it. :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://thefjord.org/2009/06/03/not-good-at-buying-pants/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://thefjord.org/2009/06/03/not-good-at-buying-pants/</feedburner:origLink></item>
	</channel>
</rss>
