<?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>chrisstreeter.com &#187; benchmarking</title>
	<atom:link href="http://www.chrisstreeter.com/archive/category/benchmarking/feed" rel="self" type="application/rss+xml" />
	<link>http://www.chrisstreeter.com</link>
	<description>Chris Streeter&#039;s location on the Internet.</description>
	<lastBuildDate>Tue, 20 Sep 2011 15:53:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Aperture Performance Problems</title>
		<link>http://www.chrisstreeter.com/archive/2010/08/503/aperture-performance-problems</link>
		<comments>http://www.chrisstreeter.com/archive/2010/08/503/aperture-performance-problems#comments</comments>
		<pubDate>Wed, 25 Aug 2010 19:32:25 +0000</pubDate>
		<dc:creator>streeter</dc:creator>
				<category><![CDATA[aperture]]></category>
		<category><![CDATA[benchmarking]]></category>
		<category><![CDATA[photos]]></category>
		<category><![CDATA[photography]]></category>

		<guid isPermaLink="false">http://www.chrisstreeter.com/?p=503</guid>
		<description><![CDATA[I&#8217;m a heavy user of Apple&#8217;s Aperture. I enjoy taking photos and then use Aperture to organize and do basic touch-ups for those photos. Earlier this year, Apple released version 3.0, which had numerous enhancements (my favorite is localized adjustments) &#8230; <a href="http://www.chrisstreeter.com/archive/2010/08/503/aperture-performance-problems">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a heavy user of <a href="http://www.apple.com/aperture/">Apple&#8217;s Aperture</a>. I enjoy taking photos and then use Aperture to organize and do basic touch-ups for those photos. Earlier this year, <a href="http://www.dpreview.com/news/1002/10020905aperture3.asp">Apple released version 3.0</a>, which had numerous enhancements (my favorite is localized adjustments) and compelled me to upgrade.  Since that date, I&#8217;ve almost been extremely close to regretting my decision every time I opened the application. Version 3.0 added a bunch of new features, but something has been killing the performance on my brand new 15&#8243; MacBook Pro. When I have the latest hardware with 4 gigs of RAM, I shouldn&#8217;t have to wait 10+ seconds to enter full screen mode or to view the next photo. There was absolutely no reason for this other than the updates to Aperture.  The subsequent version updates (up to the recent 3.0.3 update) did nothing to alleviate my wait-times, they only squashed bugs I ran into.</p>
<p>Lately, I&#8217;ve been using Aperture more than ever because <a href="http://www.chrisstreeter.com/photos/album/peru/">several</a> <a href="http://www.chrisstreeter.com/photos/album/bolivia/">recent</a> <a href="http://www.chrisstreeter.com/photos/album/chile/">trips</a> I&#8217;ve gone on have left me with a <a href="http://www.chrisstreeter.com/photos/album/sierras-roadtrip/">ton of pictures</a> to go organize. If it wasn&#8217;t for the fact that I&#8217;ve got 8+ years of photos and associated metadata, I would have jumped ship months ago.  I&#8217;ve tried all of Aperture&#8217;s First Aid options (accessed by holding Option-Command when opening the app): rebuilding permissions (this shouldn&#8217;t cause performance issues, but hey, I was desperate), repairing the database and finally resorting the the rebuild database option. I felt like the speed increased slightly after repairing the database and was optimistic that my problems were solved. Yet, I still had issues. I&#8217;ve been convinced that this has been a disk related as my memory and CPU are never loaded very heavily when I sit and wait for Aperture to do &#8220;stuff.&#8221; I began to think I needed a 7200 RPM disk drive instead of my 5400 RPM drive just to use Aperture.</p>
<p><span id="more-503"></span></p>
<p>Finally, I found <a href="http://techpatio.com/2010/apple/aperture-3-performance-fix-slow-aperture-run-faster">an article</a> that talked about removing the old com.apple.Aperture.plist file in ~/Library/Preferences to gain back some performance.  Today I decided to try that. But before I wiped the old .plist file, I went ahead and made a backup of it.  All I can say is, whoa. That actually worked. Aperture is actually <em>snappy</em> again. It&#8217;s ridiculous. I don&#8217;t even remember when I last experienced a responsive Aperture interface. Since I had a before and after .plist file, I did some diffing to figure out what was going wrong. While viewing the diff, I removed some of the options that seemed like they had no way of contributing to the slowness (things like default window locations, background colors, etc). That left me with the following diff:</p>
<p><code> 1a2,3<br />
&gt; 	"" = "";<br />
&gt; 	"61-2" = "2008-08-03T19:05:02Z";<br />
2a5,6<br />
&gt; 	"addCurrentSelectedVersions" = YES;<br />
&gt; 	"allProjectsSortMenuTag" = 1;<br />
18a23,27<br />
&gt; 	"DotMacConfigurationDictionary" = {<br />
&gt; 	};<br />
&gt; 	"DotMacConfigurationLastUpdate" = "2010-08-17T15:44:23Z";<br />
&gt; 	"DotMacConfigurationLastURL" = "https://configuration.apple.com/configurations/internetservices/iapps/publishConfiguration08.plist";<br />
&gt; 	"ExportAttachmentsWithMastersKey" = YES;<br />
19a29,32<br />
&gt; 	FacesEnabled = NO;<br />
&gt; 	fastBrowse = NO;<br />
&gt; 	FileHandling = 1;<br />
&gt; 	filesystemBatchSize = 10;<br />
23c36<br />
&lt; 		projectSortingMode = 0;<br />
---<br />
&gt; 		projectSortingMode = 1;<br />
25a39<br />
&gt; 	fullscreenAvoid = NO;<br />
27c41,42<br />
&lt; 	"fullscreenWhichWindow" = NO;<br />
---<br />
&gt; 	"fullscreenWhichWindow" = YES;<br />
&gt; 	fullSizeJPEGQuality = 0.5;<br />
35a51<br />
&gt; 	icaBatchSize = 5;<br />
43a60<br />
&gt; 	"limitPreviewSubsample" = 1920;<br />
46a64,67<br />
&gt; 	mainSecondaryMode = 3;<br />
&gt; 	"MetadataPresetSelectedPreset" = 0;<br />
&gt; 	"moveCurrentSelectedVersions" = NO;<br />
&gt; 	MUPhotoSize = 100;<br />
48a70<br />
&gt; 	primaryOnly = NO;<br />
55a78,79<br />
&gt; 	"showProjectVersionCount" = YES;<br />
&gt; 	"showUnplacedImagesOnly" = NO;<br />
56a81,83<br />
&gt; 	subsequentLaunch = YES;<br />
&gt; 	UseEmbeddedJPEG = NO;<br />
&gt; 	ViewerPropertySet = 2;<br />
64a92<br />
&gt; 	"WebKitEnableFullDocumentTeardown" = YES;<br />
</code></p>
<p>Immediately, there were two things that stood out to me: <strong>fastBrowse = NO</strong> and <strong>filesystemBatchSize = 10</strong> . Seeing as I felt there was a disk issues, I decided to test out the issue. I opened the current .plist file and added in filesystemBatchSize = 10 and opened Aperture. It didn&#8217;t seem quite as slow as before, but it was noticeably slower for me. Now, I have no idea what the default filesystemBatchSize should be, but I do know that for me, removing it from the .plist file sped up Aperture considerably.  I didn&#8217;t do any objective measurements (ie. stopwatch tests), but so far, I&#8217;m not sitting waiting around hating Aperture for stealing my time.  What is the take away here? If you are having issues with Aperture&#8217;s performance, make a backup of your Aperture preferences .plist and delete the one in ~/Library/Preferences to try and get some improvement.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisstreeter.com/archive/2010/08/503/aperture-performance-problems/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Benchmarking Redis and PRedis</title>
		<link>http://www.chrisstreeter.com/archive/2010/01/434/benchmarking-redis-and-predis</link>
		<comments>http://www.chrisstreeter.com/archive/2010/01/434/benchmarking-redis-and-predis#comments</comments>
		<pubDate>Sat, 16 Jan 2010 06:51:37 +0000</pubDate>
		<dc:creator>streeter</dc:creator>
				<category><![CDATA[benchmarking]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[redis]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[predis]]></category>

		<guid isPermaLink="false">http://www.chrisstreeter.com/?p=434</guid>
		<description><![CDATA[At work, I recently was tasked with looking into some NoSQL solutions for upcoming projects. For various reasons, I focused on the open source Redis project. Redis looks to be adding new features quickly and seemed to be a great &#8230; <a href="http://www.chrisstreeter.com/archive/2010/01/434/benchmarking-redis-and-predis">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>At work, I recently was tasked with looking into some <a href="http://en.wikipedia.org/wiki/NoSQL" target="_blank">NoSQL</a> solutions for upcoming projects. For various reasons, I focused on the <a title="Redis" href="http://code.google.com/p/redis/" target="_blank">open source Redis</a> project. Redis looks to be adding new features quickly and seemed to be a great potential solution.</p>
<p>I then started looking into PHP clients as our current environment is mostly PHP. We require that the client support <a href="http://en.wikipedia.org/wiki/Consistent_hashing" target="_blank">consistent hashing</a>, and, from a quick search, a couple turned up. <a title="PRedis" href="http://github.com/nrk/predis/" target="_blank">PRedis</a> seemed to offer the most potential, and after some quick tests, also seemed to offer the greatest performance. So I set up a more elaborate benchmark of the the client and server package.</p>
<p>My test setup involved using 5 servers with between 2 and 5 enabled at a time on the clients (ie. I disabled up to 3 of the servers in the client configurations). For performance, I configured the servers to never write to disk, though periodically syncing to disk should not cause too much of a performance loss. In fact performance was most greatly affected by forcing an fsync after every write. I then had 9 other client boxes running the same code base, with all 9 enabled for each test.</p>
<p>Each client would start a master PHP process that forked 20, 30 or 40 child processes to simulate greater and greater load. Each forked PHP process then did 10,000 SETs on random keys with 4 byte payloads (early tests showed that payload size didn&#8217;t drastically affect the results). I was using the <a href="http://github.com/nrk/predis/tree/php5.2_backport" target="_blank">PHP 4.2.6 branch of the PRedis client</a>, and had optimized it a bit so that it did fewer counts of the consistent hash array. I made the optimizations based on some results after profiling the code. I then had the master PHP process on each box repeat the test 5 times to help to average the test results.</p>
<p>I used dsh to start the test simultaneously on all the clients, timing how long it took the dsh process to start and finish executing. This was the amount of time it took to execute (5 repeats) * (9 client boxes) * (20, 30 or 40 client processes / box) * (10,000 requests) = X total requests. I then graphed the results below.</p>
<div id="attachment_441" class="wp-caption aligncenter" style="width: 483px"><a href="http://www.chrisstreeter.com/wp-content/uploads/2010/01/redis.png"><img class="size-full wp-image-441 " title="Graphing Requests / Second With Redis and PRedis" src="http://www.chrisstreeter.com/wp-content/uploads/2010/01/redis.png" alt="Graphing Requests / Second With Redis and PRedis" width="473" height="267" /></a><p class="wp-caption-text">Graphing Requests / Second With Redis and PRedis</p></div>
<p>This ended up showing that with 9 clients, going up to 4 servers was the point of diminishing returns. Adding the fifth server (with that client box count) did not increase throughput, but rather, the throughput went down. The reason for this is most likely a combination of network interface contention on each client and higher overhead from consistent hashing. So with 9 clients, I found that the sweet spot, with my setup, was 4 servers. By adding more clients, along with more servers, the throughput would increase, instead of the decrease I was starting to see.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisstreeter.com/archive/2010/01/434/benchmarking-redis-and-predis/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

