<?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>williamhathaway.com &#187; Uncategorized</title>
	<atom:link href="http://www.williamhathaway.com/wordpress/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.williamhathaway.com/wordpress</link>
	<description></description>
	<lastBuildDate>Wed, 21 Jul 2010 03:10:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Effect of multi-byte locales on GNU grep speed in OpenSolaris</title>
		<link>http://www.williamhathaway.com/wordpress/2009/09/25/effect-of-multi-byte-locales-on-gnu-grep-speed/</link>
		<comments>http://www.williamhathaway.com/wordpress/2009/09/25/effect-of-multi-byte-locales-on-gnu-grep-speed/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 13:02:18 +0000</pubDate>
		<dc:creator>William Hathaway</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[solaris]]></category>

		<guid isPermaLink="false">http://www.williamhathaway.com/wordpress/?p=469</guid>
		<description><![CDATA[I have a lab machine running OpenSolaris 2009.06 (updated to snv_117) and had created an LDIF file with about 100k small entries in it (file size was ~ 63 megs).  I wanted to get a count of the exact number of entries so I ran: grep -c ^dn: I expected it to take a second [...]]]></description>
			<content:encoded><![CDATA[<p><em> </em></p>
<p>I have a lab machine running OpenSolaris 2009.06 (updated to snv_117) and had created an LDIF file with about 100k small entries in it (file size was ~ 63 megs).  I wanted to get a count of the exact number of entries so I ran:</p>
<p><strong>grep -c ^dn:</strong></p>
<p>I expected it to take a second or two.  I was wrong.  It was painfully slow.</p>
<p>I used the <strong>time</strong> command to re-run the grep and saw it clocked in at just over a minute.</p>
<p>This was weird, so I though it was time to investigate further.  I used the<a href="http://opensolaris.org/os/community/dtrace/dtracetoolkit/"> DTrace Toolkit&#8217;s</a> hotuser command to see what the hot functions were:</p>
<pre><strong>pfexec /opt/DTT/hotuser -c "grep -c ^dn: /var/tmp/search.out"</strong>
Sampling... Hit Ctrl-C to end.

FUNCTION                                                     COUNT   PCNT
...&lt;snipped out smaller functions&gt;...
ggrep`check_multibyte_string                                    5480   8.9%
methods_unicode.so.3`__mbrtowc_dense_utf8                      12328  20.1%
libc.so.1`mbrlen                                               13566  22.1%
libc.so.1`memset                                               23014  37.5%</pre>
<p>Hmm, interesting to see the calls to mbrlen and methods_unicode among the hot functions.  Lets check my $LANG setting:</p>
<pre><strong>echo $LANG</strong></pre>
<pre>en_US.UTF-8</pre>
<p>Bingo!  Lets try it again with a non multi-byte LANG setting.</p>
<pre><strong>LANG=C</strong> <strong>time grep -c ^dn: /var/tmp/search.out
</strong></pre>
<pre>99987

real        0.1
user        0.0
sys         0.0</pre>
<p>That looks normal.  Now lets try one more time with a multi-byte LANG to be sure:</p>
<pre><strong>LANG=en_US.UTF-8 time grep -c ^dn: /var/tmp/search.out</strong>
99987

real     1:01.4
user     1:01.3
sys         0.0</pre>
<p>Yep, the problem is confirmed.</p>
<h2>Notes</h2>
<p>For those unfamiliar with OpenSolaris,  the default path has /usr/gnu/bin first.  The grep I was using was:</p>
<pre><strong>grep -V</strong>
grep (GNU grep) 2.5

Copyright 1988, 1992-1999, 2000, 2001 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</pre>
<p>If you use the non-GNU grep available at <strong>/usr/xpg4/bin/grep </strong>it doesn&#8217;t have the big slowdown regardless of the LANG.</p>
<p>I also tried the same test on the GNU <strong>wc</strong> command and saw about a 25x difference when using a multi-byte LANG.</p>
<p>For both grep and wc, I re-ran the tests multiple times to make sure that file system caching played no role in the results.</p>
<p>I think these performance differences are way higher than they should be, I&#8217;m going to dig further when I have a chance.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.williamhathaway.com/wordpress/2009/09/25/effect-of-multi-byte-locales-on-gnu-grep-speed/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Garmin Connect finally coming along</title>
		<link>http://www.williamhathaway.com/wordpress/2009/06/10/garmin-connect-finally-coming-along/</link>
		<comments>http://www.williamhathaway.com/wordpress/2009/06/10/garmin-connect-finally-coming-along/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 12:45:32 +0000</pubDate>
		<dc:creator>William Hathaway</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[fitness]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://www.williamhathaway.com/wordpress/?p=430</guid>
		<description><![CDATA[It has been nice watching connect.garmin.com finally start taking shape. Their team has been struggling for the last year and a half with missed deadline after missed deadline, lame functionality and weak excuses on their blog but it looks like they have recently been getting their act together. I noticed you can now upload from [...]]]></description>
			<content:encoded><![CDATA[<p>It has been nice watching <a href="http://connect.garmin.com/">connect.garmin.com</a> finally start taking shape.  Their team has been struggling for the last year and a half with missed deadline after missed deadline, lame functionality and <a href="http://blog.motionbased.com/2008/12/update-on-garmin-connect-migration.html">weak excuses</a> on their blog but it looks like they have recently been getting their act together.  I noticed you can now upload from all the Garmin fitness products and they have working RSS feeds.  There are still a few rough edges, but I am glad to see them making significant progress.</p>
<p>My Garmin <a href="http://connect.garmin.com/feed/rss/activities?feedname=Garmin%20Connect%20-%20wdhathaway&amp;owner=wdhathaway">RSS feed</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.williamhathaway.com/wordpress/2009/06/10/garmin-connect-finally-coming-along/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Armed Forces 5k Race Report</title>
		<link>http://www.williamhathaway.com/wordpress/2008/05/17/armed-forces-5k-race-report/</link>
		<comments>http://www.williamhathaway.com/wordpress/2008/05/17/armed-forces-5k-race-report/#comments</comments>
		<pubDate>Sat, 17 May 2008 22:11:33 +0000</pubDate>
		<dc:creator>William Hathaway</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://williamhathaway.com/?p=168</guid>
		<description><![CDATA[My training had been going relatively well for the last 3 weeks since the Lehigh Valley Half-Marathon. I&#8217;ve been concentrating on steady mileage and have been seeing some improvements in pace versus heart rate, but have not been attempting any speed workouts or tempo runs in order to minimize risk of muscle/joint related injuries. I [...]]]></description>
			<content:encoded><![CDATA[<p>My training had been going relatively well for the last 3 weeks since the Lehigh Valley Half-Marathon.  I&#8217;ve been concentrating on steady mileage and have been seeing some improvements in pace versus heart rate, but have not been attempting any speed workouts or tempo runs in order to minimize risk of muscle/joint related injuries.  I also decided this would be my first 5k race that I&#8217;d run in trainers instead of racing flats.  (While the racing flats are lighter and would probably save a few seconds the lower heel also increases the strain on the calf muscles.)</p>
<p>I was pretty excited about racing in this 5k since it has been about 4 months since my <a href="http://williamhathaway.com/?p=112">last 5k</a>.</p>
<p>I arrived at City Island about 40 minutes before the 8 AM start.    The island was buzzing with activity as lots of armed forces personnel were working on getting the vehicles (tanks, helicopters, armored personnel carriers, etc) and other displays ready.  Picking up the bib was painless because the race was pretty small (about 215 people).  I jogged around for about 15 minutes, saw a few people from the <a href="http://www.harrc.org">Harrisburg Road Runners</a> and then went over to the starting area.</p>
<p>I had lined up about 5 rows back from the front figuring I&#8217;d would probably be in the top 20 or 30 finishers. As people were getting ready to start, a helicopter came down and was landing about 100 feet away.  This was extremely loud and I was wondering if people would actually be able to hear the race director over the noise.  We waited for a minute or two and the noise started getting decreasing as the engine spun down.  The race directory spoke loudly, spent 10 seconds of thanking the armed forces, we had a quick round of applause and then were off.</p>
<p>The race starts on a curvy section of the City Island road (next to the mini train station) and heads counter-clockwise around the island. It was a fairly congested for the first 100 yards as people negotiated the curves and a few very large puddles.  After about three minutes of the &#8220;is this too fast? too slow? too fast?&#8221; internal monologue I started settling into a good rhythm.</p>
<p>We hit the Walnut Street Bridge at about the three quarters of a mile.  I noticed everyone was running on the small concrete walkway (as opposed to some people running on the iron lattice which happens in most Harrisburg races).  I looked ahead and saw a vehicle parked on the other end of the bridge that was blocking most of the non-walkway part so figured I would stay on the concrete too.  There were a few people walking from Harrisburg to City Island across the bridge who I felt bad for.  Due to a timing misfortune, they were being passed by hundreds of people flying past them in the opposite direction all crowded into 5 feet of space.  I crossed the 1 mile mark right as we exited the bridge in 6:26.</p>
<p>The course took an immediate right turn and we ran down to the walkway on the lower-level.  I don&#8217;t really like this turn in races since you have a nice downhill and then need to make an immediate150 degree turn to head up-river which means you burn some time slowing for the turn.</p>
<p>We ran about 3/4 of a mile up-river.  I was feeling good here and keeping a relatively even pace hovering around 6:20/mile.  We next had to run up a 40 foot or so hill to get back to the upper-level.  As I was starting up the hill the leaders came zooming down past me.  I tried to keep an even effort going up and just after the hill, but I could tell the pace was dropping off.  We ran a quick loop around the garden and then it was my turn to head back down the hill to the lower-level again.  I hit the two mile mark just before heading down the hill with a 6:29 split.</p>
<p>The course then headed back down the river to the Walnut Street Bridge.  I was definitely starting to fatigue and was concentrating on maintaining good form and cadence.  I passed a handful of people here and had a mini-battle with one runner where I passed her and then she passed me back a hundred yards later.  I finally passed her again a short distance from where we had to climb back up to street level.   I was trying to push as hard as I could while running back across the bridge, but the pace and the last hill had taken most of the fight out of me.   I was able to pick it up a little bit and ended up finishing in 19:51, good for 18th place out of roughly 215 people.</p>
<p>My Garmin measured the course at 3.08 miles, so it lost about 150 feet, which isn&#8217;t surprising given the sharp turns.  What really surprised me was that my auto-recorded splits for miles two and three were both 6:29.36.  Now I know that if the Garmin had been able to measure the corners correctly I would have not had splits identical to within a hundredth of a second, but it was kind of funny to see those times.  Apparently I&#8217;ve got even pacing down to a science, now just need to work on getting faster.</p>
<p>Overall I was pretty happy with the race effort.</p>
<p><a href="http://trail.motionbased.com/trail/activity/5685495">Motionbased</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.williamhathaway.com/wordpress/2008/05/17/armed-forces-5k-race-report/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First good run in last two weeks</title>
		<link>http://www.williamhathaway.com/wordpress/2008/03/31/first-good-run-in-last-two-weeks/</link>
		<comments>http://www.williamhathaway.com/wordpress/2008/03/31/first-good-run-in-last-two-weeks/#comments</comments>
		<pubDate>Mon, 31 Mar 2008 02:30:55 +0000</pubDate>
		<dc:creator>William Hathaway</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[running]]></category>

		<guid isPermaLink="false">http://williamhathaway.com/?p=146</guid>
		<description><![CDATA[Quick summary of the previous week: Sat: ran with Jon Laman, had to cut it off at 4.5 miles due to hamstring tightness (pain level 5 out of 10) Sun: 20 mins easy on elliptical at home + stretching.  No pain. Mon: off Tues: off + PT appointment. Performed a bunch of leg exercises. Felt [...]]]></description>
			<content:encoded><![CDATA[<p>Quick summary of the previous week:</p>
<p>Sat: ran with Jon Laman, had to cut it off at 4.5 miles due to hamstring tightness (pain level 5 out of 10)</p>
<p>Sun: 20 mins easy on elliptical at home + stretching.  No pain.<br />
Mon: off</p>
<p>Tues: off + PT appointment.  Performed a bunch of leg exercises.  Felt uncomfortable that the only PT had to split time between me and another patient.</p>
<p>Wed: bike 30 mins at LA Fitness + stretching.</p>
<p>Thu: bike 45 mins at LA Fitness + stretching.  Ran slowly for 5 mins w/o pain.</p>
<p>Fri: racquetball for an hour was the plan but stopped at 15 mins due to mild hamstring tightness (pain level 2 out of 10).  I was annoyed at myself for neglecting a warm-up.  After stretching the hamstring tightness pretty much went away. Later that night I  came across a Runner&#8217;s World article on <a href="http://runningdoctor.runnersworld.com/2008/03/i-pulled-my-ham.html">recovering from hamstring problems</a>.</p>
<p>On Saturday morning I was supposed to run with Jon and a running group (called &#8220;<a href="http://sports.groups.yahoo.com/group/crispybalance/">Crispy Balance</a>&#8220;) he recently discovered. I was fairly nervous about running since it felt tight the night before, but ended up deciding to give it a shot.</p>
<p>I met up with Jon and the &#8220;Crispies&#8221; at City Island at 9.  The group was welcoming, laid-back, and well-organized.   Meg, the woman hosting the run, had written route instructions for runs of a variety of distances, ranging from 5.7 to 11 miles and had stashed water and Gatorade along the course in several locations.   Introductions were made, then we all posed for a group picture and headed off.  I wasn&#8217;t sure how far I was going to go since I was worried about my hamstring tightening up again. I made sure to do a bunch of movement to help warm-up before starting and concentrated on keeping my pace really slow.</p>
<p>I enjoyed both the running route (there were a couple of awesome views of Harrisburg from the hills),  and  the nice group of people.  Several were really into ultra-marathon and trail racing.  One woman mentioned she celebrated turning 50 by running in the <a href="http://www.jfk50mile.org/">JFK 50 mile trail race</a>.  Very inspiring.  A lot of group members were training for the <a href="http://www.flyingpigmarathon.com/">Flying Pig Marathon</a> in Cincinnati, which I thought was really cool since it meant a bunch of people on a similar training schedule.</p>
<p>I felt much better than I had feared earlier, and ended up running 10 miles. My leg felt complete fine until the last 1/2 mile or so, when I could feel a little bit of fatigue/tightness.  After the run I stretched for about 10 minutes and  felt great after that.</p>
<p>Sunday: 1 hour 10 mins on bike + stretching.</p>
<p>Plan for the week:  Bike 3  days and try to get in two 5-6 mile easy runs and a good long run on Sat or Sun.  I&#8217;m also going to slowly ease into some hamstring specific exercises to build back strength and flexibility.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.williamhathaway.com/wordpress/2008/03/31/first-good-run-in-last-two-weeks/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
