<?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/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>William Louth's Weblog</title>
	<atom:link href="http://williamlouth.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://williamlouth.wordpress.com</link>
	<description>The Art of API Design and Performance Engineering</description>
	<lastBuildDate>Fri, 30 Oct 2009 09:58:00 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='williamlouth.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/1a577147ee2bef55bb80b184a76bf23a?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>William Louth's Weblog</title>
		<link>http://williamlouth.wordpress.com</link>
	</image>
			<item>
		<title>Hybrid Probe Profiling: Execution + Sampling</title>
		<link>http://williamlouth.wordpress.com/2009/10/29/hybrid-probe-profiling-execution-sampling/</link>
		<comments>http://williamlouth.wordpress.com/2009/10/29/hybrid-probe-profiling-execution-sampling/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 16:04:00 +0000</pubDate>
		<dc:creator>williamlouth</dc:creator>
				<category><![CDATA[JXInsight]]></category>
		<category><![CDATA[Performance Engineering]]></category>
		<category><![CDATA[Profiling]]></category>

		<guid isPermaLink="false">http://williamlouth.wordpress.com/?p=2116</guid>
		<description><![CDATA[Whilst I have long argued that execution based profilers (metering agents &#38; activity monitors) can out-perform sample based profilers on many levels (when implemented right) I have always recognized that statistical sampling techniques do occasionally have their place in ones arsenal in tackling the complexity of a real-world application/system performance model collected from a production [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=williamlouth.wordpress.com&blog=4209026&post=2116&subd=williamlouth&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Whilst I have long argued that execution based profilers (<em>metering agents &amp; activity monitors</em>) can out-perform sample based profilers on many levels (<em>when implemented right</em>) I have always recognized that statistical sampling techniques do occasionally have their place in ones arsenal in tackling the complexity of a real-world application/system performance model collected from a production environment under particular runtime constraints. That is why when we introduced our pioneering strategy based resource metering approach I made sure to include a number of out-of-the-box strategies that have sampling characteristics. This list initially included <code>frequency</code>, <code>interval</code>, <code>sample</code>, and <code>burst</code>. All of which have the following metering behavior &#8211; a non-metered <code>gap</code> and a metered <code>run</code>.</p>
<p><img class="alignnone size-full wp-image-2120" title="hybridsampling.1" src="http://williamlouth.files.wordpress.com/2009/10/hybridsampling-1.gif?w=384&#038;h=66" alt="hybridsampling.1" width="384" height="66" /><br />
The two main differences in the metering strategies relate to the unit of measurement for both <code>gap</code> and <code>run</code> (<em>time or frequency</em>), and the <code>scope</code> of the strategy (<em>global or probe name based</em>).</p>
<blockquote>
<p style="text-align:center;"><em>Note: <a href="http://www.jinspired.com" target="_blank">JXInsight&#8217;s</a> Probes technology supports complex chaining of metering strategies allowing you to derive your very own metering strategy from base (built-in) strategies.</em></p>
</blockquote>
<p>Each of the above mentioned metering strategies have their strengths and weaknesses depending on the application (<em>or problem</em>) context but none are truly comparable to how a standard call stack sampling profiler works so in a recent <a href="http://blog.jinspired.com/?p=813" target="_blank">update</a> to our <a href="http://www.jinspired.com/products/jxinsight/" target="_blank">product</a> I approached this problem from a different angle within our runtime model by way of a new meter named <code>sample.count</code> which is basically a low-resolution clock (<em>counter</em>) with a user configurable time interval (<em>sample</em>) for increments (<em>ticks</em>). In doing so I addressed one of the key performance indicators (<em>KPI</em>) of a typical execution based profiler &#8211; the number of relatively costly (<em>mostly native</em>) counter access calls (<em>which would otherwise occur in close time proximity in a heavily load system</em>).</p>
<p>So how does this match much closer with the behavior of a call stack sampler? Well first of all the number of samples (<em>meter increments</em>) and the cost of the underlying native system calls is approximately the same (<em>it is also a known quantity</em>). Second of all only fired probes (<em>metered activities</em>) which have a metered execution period spanning at least one sample window increment (<em>tick</em>) will have their metering totals updated which means that the accuracy for high frequency and low cost methods is similar. Were it differs from sampling is in the increased accuracy of the performance model by including frequency (<em>invocation</em>) counts as well as collecting the min, avg and max for <code>sample.count</code> meter readings. In addition we can still utilize our default <code>hotspot</code> metering strategy by simply changing the strategy&#8217;s meter and the threshold value used.</p>
<blockquote>
<p style="text-align:center;"><em>Note: Thread call stack samplings in ability to track the complete duration (or ticks) of a method&#8217;s invocation restricts its application solely to development environments.</em></p>
</blockquote>
<p>Naturally I was curious to see how a <code>sample.count</code> metering model compared with one based on the <code>clock.time</code> meter. So I metered the startup execution of a JBoss 4.x application server instance with a sample JBoss Seam application deployed. For this initial run I disabled our default <code>hotspot</code> metering strategy. The startup took less than 31 seconds with 776,468 method invocations metered within the <code>org.jboss.*</code> package which. This translates to 1.5 million clock time access calls &#8211; 50k / sec.</p>
<blockquote>
<p style="text-align:center;"><em>Note: &#8220;Count&#8221; is the number of method invocations metered and &#8220;Total&#8221; is the sum of the ticks during the execution period of the metered method invocation.</em></p>
</blockquote>
<p><img class="alignnone size-full wp-image-2167" title="hybridsampling.2" src="http://williamlouth.files.wordpress.com/2009/10/hybridsampling-2.gif?w=448&#038;h=433" alt="hybridsampling.2" width="448" height="433" /></p>
<p>Here is the <code>sample.count</code> metering model for a similar startup sequence. The breakdown of the metering &#8220;Total %&#8221; column looks very similar to that of the <code>clock.time</code> model. The startup time took less than 30 seconds which translates (<em>approximately</em>) to 30,000 clock ticks with a default tick interval of 1ms &#8211; 1k / sec.</p>
<p><img class="alignnone size-full wp-image-2166" title="hybridsampling.3" src="http://williamlouth.files.wordpress.com/2009/10/hybridsampling-3.gif?w=448&#038;h=450" alt="hybridsampling.3" width="448" height="450" /></p>
<p>Of course one would expect the previous models to be very similar. A real comparison test would be with the <code>hotspot</code> metering strategy enabled which attempts to eliminate the metering of low cost instrumented method invocations (<em>reducing the cumulative count</em>). Here is the <code>clock.time</code> metering model for the startup. The number of metered probes fired has now halved though this reduction would be much higher in a long running system as we by default meter the first 1,000 firings per named probe.</p>
<p><img class="alignnone size-full wp-image-2165" title="hybridsampling.4" src="http://williamlouth.files.wordpress.com/2009/10/hybridsampling-4.gif?w=448&#038;h=467" alt="hybridsampling.4" width="448" height="467" /></p>
<p>With the <code>hotspot</code> metering strategy configured to use the <code>sample.count</code> meter the breakdown of both the &#8220;Count&#8221; and &#8220;Total&#8221; columns looks again similar to the <code>clock.time</code> metering model.</p>
<p><img class="alignnone size-full wp-image-2164" title="hybridsampling.5" src="http://williamlouth.files.wordpress.com/2009/10/hybridsampling-5.gif?w=448&#038;h=435" alt="hybridsampling.5" width="448" height="435" /></p>
<p>Though I still prefer to use our sample based metering strategies (<em>more so because of familiarity</em>) which guarantee accurate metering of those probes sampled the <code>sample.count</code> meter approach allows me to create a filtering like mechanism to the model at the granularity that suits the context of the investigation. With the meter I get the frequency for every probe fired which the strategy approach does not afford me but I only aggregate the metering total for those probes fired and metered that exceed a meter threshold I have defined.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/williamlouth.wordpress.com/2116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/williamlouth.wordpress.com/2116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/williamlouth.wordpress.com/2116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/williamlouth.wordpress.com/2116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/williamlouth.wordpress.com/2116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/williamlouth.wordpress.com/2116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/williamlouth.wordpress.com/2116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/williamlouth.wordpress.com/2116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/williamlouth.wordpress.com/2116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/williamlouth.wordpress.com/2116/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=williamlouth.wordpress.com&blog=4209026&post=2116&subd=williamlouth&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://williamlouth.wordpress.com/2009/10/29/hybrid-probe-profiling-execution-sampling/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc0e0e0b6cd94c7c31748cd5d96e8a13?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">williamlouth</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/10/hybridsampling-1.gif" medium="image">
			<media:title type="html">hybridsampling.1</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/10/hybridsampling-2.gif" medium="image">
			<media:title type="html">hybridsampling.2</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/10/hybridsampling-3.gif" medium="image">
			<media:title type="html">hybridsampling.3</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/10/hybridsampling-4.gif" medium="image">
			<media:title type="html">hybridsampling.4</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/10/hybridsampling-5.gif" medium="image">
			<media:title type="html">hybridsampling.5</media:title>
		</media:content>
	</item>
		<item>
		<title>Java Call Stack Sampling in the Wild</title>
		<link>http://williamlouth.wordpress.com/2009/10/21/java-call-sampling-overhead-in-the-wild/</link>
		<comments>http://williamlouth.wordpress.com/2009/10/21/java-call-sampling-overhead-in-the-wild/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 21:49:16 +0000</pubDate>
		<dc:creator>williamlouth</dc:creator>
				<category><![CDATA[JMX]]></category>
		<category><![CDATA[Performance Engineering]]></category>
		<category><![CDATA[Profiling]]></category>

		<guid isPermaLink="false">http://williamlouth.wordpress.com/?p=2097</guid>
		<description><![CDATA[To be in anyway successful at managing &#38; monitoring real-world Java enterprise applications in production (that excludes Spring &#8220;PetClinic&#8221;) one needs to assess the runtime impact of the various performance data collection techniques and their actual (tool) implementations. Unfortunately most programmers fail to understand this and instead develop/promote/deploy tools that are clearly completely inadequate for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=williamlouth.wordpress.com&blog=4209026&post=2097&subd=williamlouth&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>To be in anyway successful at managing &amp; monitoring real-world Java enterprise applications in production (<em>that excludes Spring &#8220;PetClinic&#8221;</em>) one needs to assess the runtime impact of the various performance data collection techniques and their actual (<em>tool</em>) implementations. Unfortunately most programmers fail to understand this and instead develop/promote/deploy tools that are clearly completely inadequate for the task at hand &#8211; in a production context. They incorrectly assume<em> ease of use</em> equates to <em>lightweight</em> when in fact the only thing <em>lightweight</em> is the effort and due diligence performed in understanding the problem domain and managing the associated risks. It is for this reason why most operations teams immediately discount (<em>with any evaluation</em>) the use of monitoring tools a developer might have used in any way during localized tuning.</p>
<p>Recently this was made so evident when its was falsely claimed <em>(without any qualification other than wishful thinking</em>) that a Java sample based profiling tool <em>could</em> out-perform <a href="http://www.jinspired.com/product/jxinsight/" target="_blank">JXInsight</a> &#8211; a dynamic strategy based resource metering solution. I will save the publication of a benchmark comparison for a (<em>near</em>) future blog but instead show you a chart (<em>taken from within the &#8220;visual&#8221; tool itself</em>) depicting the performance impact of such a technique on an application with a realistic number of threads (100) running with call stacks of realistic sizes (100-200).</p>
<blockquote>
<p style="text-align:center;"><em>Note: The similarities of both the 100 ms and 1,000 ms run sections indicates the tool was not able to perform at the lower of the sampling rates.</em></p>
</blockquote>
<p><img class="alignnone size-full wp-image-2108" title="sampling.chart" src="http://williamlouth.files.wordpress.com/2009/10/sampling-chart3.gif?w=431&#038;h=222" alt="sampling.chart" width="431" height="222" /></p>
<p>Even at a 10 second sample interval rate the runtime impact is excessive ignoring the fact that at this resolution the data would be completely meaningless unless the application was a dog in terms of performance which begs the question &#8220;<em>How did such a beast get into production in the first place?&#8221;</em>.</p>
<p>Yes the overhead of sampling is zero when not being performed but what type of enterprise application is not monitored continuously in production? Instrumentation needs to be a primary source of resource metering &amp; software execution metric performance data. Sampling should be considered (<em>and only after discounting many other sources and techniques</em>) when the current instrumentation coverage is not adequate at the time a problem appears though I am doubtful of its effectiveness with the noise that would be created when enabled based on the charting above.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/williamlouth.wordpress.com/2097/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/williamlouth.wordpress.com/2097/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/williamlouth.wordpress.com/2097/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/williamlouth.wordpress.com/2097/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/williamlouth.wordpress.com/2097/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/williamlouth.wordpress.com/2097/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/williamlouth.wordpress.com/2097/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/williamlouth.wordpress.com/2097/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/williamlouth.wordpress.com/2097/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/williamlouth.wordpress.com/2097/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=williamlouth.wordpress.com&blog=4209026&post=2097&subd=williamlouth&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://williamlouth.wordpress.com/2009/10/21/java-call-sampling-overhead-in-the-wild/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc0e0e0b6cd94c7c31748cd5d96e8a13?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">williamlouth</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/10/sampling-chart3.gif" medium="image">
			<media:title type="html">sampling.chart</media:title>
		</media:content>
	</item>
		<item>
		<title>(Java) Call Stack Problem Analysis Simplified</title>
		<link>http://williamlouth.wordpress.com/2009/10/06/java-call-stack-problem-analysis-simplified/</link>
		<comments>http://williamlouth.wordpress.com/2009/10/06/java-call-stack-problem-analysis-simplified/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 22:25:32 +0000</pubDate>
		<dc:creator>williamlouth</dc:creator>
				<category><![CDATA[Diagnostics]]></category>
		<category><![CDATA[JXInsight]]></category>

		<guid isPermaLink="false">http://williamlouth.wordpress.com/?p=2022</guid>
		<description><![CDATA[It is notoriously hard to detect and distinguish busy and hung threads in todays complex enterprise middleware even more so when the middleware is distributed across multiple processing nodes with temporal execution dependency (locking, co-ordination). A large part of the reason for this is the lack of current execution information associated with frames within thread stack [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=williamlouth.wordpress.com&blog=4209026&post=2022&subd=williamlouth&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>It is notoriously hard to detect and distinguish <em>busy</em> and <em>hung</em> threads in todays complex enterprise middleware even more so when the middleware is distributed across multiple processing nodes with temporal execution dependency (<em>locking, co-ordination</em>). A large part of the reason for this is the lack of current execution information associated with frames within thread stack dumps. For one we cannot easily determine from two thread dumps listing the same call stack for a thread whether the thread in question is hung waiting on a response from a resource  or whether the thread is performing the same operation again following receipt of another request into a processing queue. We might not even be able to detect the case were the thread is merely busy making calls from the stack listed in the dump to other fast executing methods not listed.</p>
<p>To help with the problem analysis we have recently <a href="http://blog.jinspired.com/?p=786" target="_blank">enhanced</a> our optional stack probes provider to collect additional information such as the number of times a uniquely identifiable stack appears across two <em>mark</em> requests from within our management console and the number of calls (<em>or frames</em>) made during the execution interval of a caller frame.</p>
<p>Here is a Java class I quickly wrote to demonstrate the problem and the solution. I have created two <code>Runnable</code> classes that mimic the behavior of <em>hung</em> and <em>busy</em> threads.</p>
<p><img class="alignnone size-full wp-image-2088" title="stacks.code.1" src="http://williamlouth.files.wordpress.com/2009/10/stacks-code-12.gif?w=401&#038;h=611" alt="stacks.code.1" width="401" height="611" /></p>
<p>Here is a sample of a partial stack dump during the execution of the above class. As you can see it is pretty hard to actually determine the type of problem that may be present ignoring the obvious clue in the class naming.</p>
<p><img class="alignnone size-full wp-image-2048" title="stacks.dump.1" src="http://williamlouth.files.wordpress.com/2009/10/stacks-dump-12.gif?w=401&#038;h=138" alt="stacks.dump.1" width="401" height="138" /></p>
<p>Below is a resource metering snapshot taken during a similar execution run with our dynamic probes instrumentation enabled. What we can quickly see from this view is that the <code>run()</code> call executed by <code>Thread-0</code> has only made one additional direct (<em>or indirect</em>) call during its ongoing execution interval. Whereas the <code> run()</code> call executed by <code>Thread-1</code> has been <em>busy</em> performing more than 1 million calls (<em>stack push operations</em>).</p>
<p><img class="alignnone size-full wp-image-2049" title="stacks.probes.1" src="http://williamlouth.files.wordpress.com/2009/10/stacks-probes-14.gif?w=470&#038;h=135" alt="stacks.probes.1" width="470" height="135" /></p>
<p>Now we cannot be sure that <code>Thread-0</code> is effectively <em>hung</em> because it might have only just began executing prior to the snapshot capture. Likewise we cannot be sure of our initial prognosis for <code>Thread-1</code> as it might just be finishing up or it has been active for a prolonged period in the runtime waking up occasionally to service queued requests.</p>
<p>So lets make a <em>mark</em> (<em>reset</em>) from within our management console that instructs the remote managed runtime to mark all current resource metering related data including associated stacks. Then we wait a little while (<em>a few second</em>s) and then capture another snapshot shown below. From the M<code>arks</code> table column we can see that some parts of the stacks present in this new snapshot capture were present prior to our recent mark remote operation &#8211; <code>marks &gt; 0</code>. The only new stack frame is the <code>Busy.doit()</code> call which has a thread execution sequence id of 3031907.</p>
<p>In addition we can see from the <code>Count</code> <code>Delta</code> column that only the <code>run()</code> call executed by <code>Thread-1</code> has performed additional (<em>instrumented</em>) calls during its still unfinished execution.</p>
<p><img class="alignnone size-full wp-image-2050" title="stacks.probes.2" src="http://williamlouth.files.wordpress.com/2009/10/stacks-probes-23.gif?w=470&#038;h=136" alt="stacks.probes.2" width="470" height="136" /></p>
<p>To be sure that the stacks visible from within the management console have indeed an execution period of longer than a few seconds we can make another <em>mark</em>. Now any element of a stack listed in a snapshot following the last <em>mark</em> operation with a <code>Marks</code> value greater than 1 has at least an execution duration of the time difference between both <em>mark</em> operations.</p>
<p>For those elements with a <code>Marks</code> value of 1 we can only say with confidence that the stack (<em>or partial stack</em>) has existed since the period of the last <em>mark</em> to the point at which a snapshot is captured which can be done repeatedly without marking.</p>
<p><img class="alignnone size-full wp-image-2051" title="stacks.probes.3" src="http://williamlouth.files.wordpress.com/2009/10/stacks-probes-33.gif?w=470&#038;h=133" alt="stacks.probes.3" width="470" height="133" /><br />
Now if that is not exciting enough we can easily perform the same steps across a complete cluster of nodes from a single view within our management console and this works for all probe related extensions whether the probes represent actual Java methods or contextually mapped <a href="http://williamlouth.wordpress.com/2009/08/05/the-fastest-ruby-profiler-is-a-java-profiler/" target="_blank">Ruby</a> and <a href="http://williamlouth.wordpress.com/2009/09/29/the-fastest-python-profiler-is-a-java-profiler/" target="_blank">Python</a> calls.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/williamlouth.wordpress.com/2022/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/williamlouth.wordpress.com/2022/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/williamlouth.wordpress.com/2022/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/williamlouth.wordpress.com/2022/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/williamlouth.wordpress.com/2022/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/williamlouth.wordpress.com/2022/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/williamlouth.wordpress.com/2022/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/williamlouth.wordpress.com/2022/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/williamlouth.wordpress.com/2022/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/williamlouth.wordpress.com/2022/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=williamlouth.wordpress.com&blog=4209026&post=2022&subd=williamlouth&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://williamlouth.wordpress.com/2009/10/06/java-call-stack-problem-analysis-simplified/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc0e0e0b6cd94c7c31748cd5d96e8a13?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">williamlouth</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/10/stacks-code-12.gif" medium="image">
			<media:title type="html">stacks.code.1</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/10/stacks-dump-12.gif" medium="image">
			<media:title type="html">stacks.dump.1</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/10/stacks-probes-14.gif" medium="image">
			<media:title type="html">stacks.probes.1</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/10/stacks-probes-23.gif" medium="image">
			<media:title type="html">stacks.probes.2</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/10/stacks-probes-33.gif" medium="image">
			<media:title type="html">stacks.probes.3</media:title>
		</media:content>
	</item>
		<item>
		<title>The Fastest Python Profiler is a Java Profiler</title>
		<link>http://williamlouth.wordpress.com/2009/09/29/the-fastest-python-profiler-is-a-java-profiler/</link>
		<comments>http://williamlouth.wordpress.com/2009/09/29/the-fastest-python-profiler-is-a-java-profiler/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 20:57:09 +0000</pubDate>
		<dc:creator>williamlouth</dc:creator>
				<category><![CDATA[Jython]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://williamlouth.wordpress.com/?p=1985</guid>
		<description><![CDATA[Following on from our &#8220;The Fastest Ruby Profiler is a Java Profiler&#8221; I am pleased to announce that our upcoming probes based resource metering extension for Jython is the fastest function call profiling solution for Python applications executed within a Java runtime. With our dynamic hotspot resource metering strategy the overhead of our probes instrumentation [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=williamlouth.wordpress.com&blog=4209026&post=1985&subd=williamlouth&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Following on from our <a href="http://williamlouth.wordpress.com/2009/08/05/the-fastest-ruby-profiler-is-a-java-profiler/" target="_blank">&#8220;The Fastest Ruby Profiler is a Java Profiler&#8221;</a> I am pleased to announce that our upcoming probes based resource metering extension for <a href="http://www.jython.org" target="_blank">Jython</a> is the fastest <em>function call </em>profiling solution for <a href="http://www.python.org" target="_blank">Python</a> applications executed within a Java runtime. With our dynamic hotspot resource metering strategy the overhead of our probes instrumentation can drop down to approximately 8 nanoseconds for non-hotspot function calls.</p>
<p>Here is the Python micro-benchmark I have used in determining this.<br />
<img class="alignnone size-full wp-image-1990" title="code" src="http://williamlouth.files.wordpress.com/2009/09/code.gif?w=242&#038;h=231" alt="code" width="242" height="231" /></p>
<p>Here is a chart showing the average time (<em>secs</em>) reported by multiple executions of the <code>run</code> method without (<em>baseline</em>) and with our probes based instrumentation. <a href="http://www.jinspired.com/products/jxinsight/" target="_blank">JXInsight&#8217;s</a> instrumentation overhead is just over 2% but that is 2% on a method, <code>call</code>, that effectively does nothing.</p>
<blockquote>
<p style="text-align:center;"><em>The overhead incurred in the instrumentation and measurement of fine grain method executions, which dominate the execution (frequency) profile of most web applications, is a key performance indicator (KPI) for any enterprise application performance management and monitoring solution.</em></p>
</blockquote>
<p><img class="alignnone size-full wp-image-1992" title="jython.chart" src="http://williamlouth.files.wordpress.com/2009/09/jython-chart.gif?w=198&#038;h=200" alt="jython.chart" width="198" height="200" /></p>
<p>Below is a screenshot of the resulting resource metering in our application management console. Note the strike-through on the <code>call:12</code> function indicating the associated instrumentation has been disabled following the execution of 1000 probe firings and the determination by the <em>hotspot</em> metering strategy that the named probe, <code>benchmark.call.12</code>, is not a hotspot.</p>
<blockquote>
<p style="text-align:center;"><em>Note: Line numbers can be excluded from the probe name assigned to a function marking all same named functions within a module as hot or cold spots depending on the combined resource metering behavior for all implementations.</em></p>
</blockquote>
<p><img style="border:0 initial initial;" title="jython.table" src="http://williamlouth.files.wordpress.com/2009/09/jython-table.gif?w=377&#038;h=299" alt="jython.table" width="377" height="299" /></p>
<p>The following chart shows the performance of the same benchmark executed by the native c-based Python engine along with the standard <a href="http://docs.python.org/library/profile.html#cProfile.run" target="_blank"><code>cProfile</code></a>. The overhead is significant.</p>
<p><img class="alignnone size-full wp-image-2001" title="python.chart" src="http://williamlouth.files.wordpress.com/2009/09/python-chart.gif?w=201&#038;h=200" alt="python.chart" width="201" height="200" /></p>
<p>Here is a chart comparing the overhead (%) of <a href="http://www.jinspired.com/products/jxinsight/" target="_blank">JXInsight</a> with that of the Python <a href="http://docs.python.org/library/profile.html#cProfile.run" target="_blank"><code>cProfile</code></a>.</p>
<p><img class="alignnone size-full wp-image-2003" title="compare.chart" src="http://williamlouth.files.wordpress.com/2009/09/compare-chart.gif?w=207&#038;h=202" alt="compare.chart" width="207" height="202" /></p>
<blockquote>
<p style="text-align:center;"><em>I attempted to run the benchmark with the Python based <code>profile</code> solution but a single <code>run()</code> call took over 200 seconds compared to 2-4 seconds for all other reported test runs. Surprisingly the Jython version of the Python <code>profile</code> solution executed in just under 120 seconds.</em></p>
</blockquote>
<p>If you are interested in seeing more of what will be possible with the upcoming extension then check out the following images showing contextual labeling as well as multi-language metering (profiling).</p>
<p><a href="http://www.jinspired.com/images/jxinsight.5.7.32.jython.to.python.p.1.gif" target="_blank"> www.jinspired.com/images/jxinsight.5.7.32.jython.to.python.p.1.gif</a><br />
<a href="http://www.jinspired.com/images/jxinsight.5.7.32.jython.to.python.p.2.gif" target="_blank"> www.jinspired.com/images/jxinsight.5.7.32.jython.to.python.p.2.gif</a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/williamlouth.wordpress.com/1985/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/williamlouth.wordpress.com/1985/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/williamlouth.wordpress.com/1985/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/williamlouth.wordpress.com/1985/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/williamlouth.wordpress.com/1985/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/williamlouth.wordpress.com/1985/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/williamlouth.wordpress.com/1985/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/williamlouth.wordpress.com/1985/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/williamlouth.wordpress.com/1985/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/williamlouth.wordpress.com/1985/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=williamlouth.wordpress.com&blog=4209026&post=1985&subd=williamlouth&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://williamlouth.wordpress.com/2009/09/29/the-fastest-python-profiler-is-a-java-profiler/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc0e0e0b6cd94c7c31748cd5d96e8a13?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">williamlouth</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/09/code.gif" medium="image">
			<media:title type="html">code</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/09/jython-chart.gif" medium="image">
			<media:title type="html">jython.chart</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/09/jython-table.gif" medium="image">
			<media:title type="html">jython.table</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/09/python-chart.gif" medium="image">
			<media:title type="html">python.chart</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/09/compare-chart.gif" medium="image">
			<media:title type="html">compare.chart</media:title>
		</media:content>
	</item>
		<item>
		<title>Metering (Profiling) Tagged Execution Periods</title>
		<link>http://williamlouth.wordpress.com/2009/09/21/monitoring-profiling-execution-periods/</link>
		<comments>http://williamlouth.wordpress.com/2009/09/21/monitoring-profiling-execution-periods/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 11:11:39 +0000</pubDate>
		<dc:creator>williamlouth</dc:creator>
				<category><![CDATA[JXInsight]]></category>
		<category><![CDATA[Performance Engineering]]></category>
		<category><![CDATA[Performance Testing]]></category>
		<category><![CDATA[Profiling]]></category>

		<guid isPermaLink="false">http://williamlouth.wordpress.com/?p=1928</guid>
		<description><![CDATA[One of the many cool and innovative features we have recently pushed out the door with our regular software updates is an enhancement to tagging that really makes this unique feature extremely useful and versatile in the analysis of software under construction during development &#38; test or under management in production. Now when you set [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=williamlouth.wordpress.com&blog=4209026&post=1928&subd=williamlouth&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>One of the many cool and innovative features we have recently pushed out the door with our regular software updates is an <a href="http://blog.jinspired.com/?p=755" target="_blank">enhancement</a> to <a href="http://www.jinspired.com/products/jxinsight/new-in-5.7.html" target="_blank">tagging</a> that really makes this unique feature extremely useful and versatile in the analysis of software under construction during development &amp; test or under management in production. Now when you set a tag at either the global or thread context level not only do we aggregate resource metering for the tagged metering group but we do this for every other metering group updated during the tagged execution period. We do this by creating an extended @tag metering group that concatenates the name of the metered group updated with the value of tag.</p>
<p><img class="alignnone size-full wp-image-1944" title="tagging.startup" src="http://williamlouth.files.wordpress.com/2009/09/tagging-startup.gif?w=409&#038;h=476" alt="tagging.startup" width="409" height="476" /></p>
<p>Being able to inject tags remotely from within our management console or command line interface or locally from within the actual managed runtime via our Open API gives us the ability answer two very broad questions:</p>
<p>1. What is the resource usage for a <code>package</code>/<code>class</code>/<code>method</code> during a particular tagged execution period?</p>
<p>2. How does the resource usage for a particular probe compare across tagged and non-tagged execution periods in terms of <code>count</code>, <code>total</code>, <code>min</code>, <code>max</code> and <code>average</code>?</p>
<p>Previously the way to answer such questions at a global level across various profiling and application performance management (APM) tools would be to reset all data collected prior to the execution period, specify a period filter on an event journal table or log, or in our case <a href="http://www.jinspired.com/products/jxinsight/new-in-5.6.html">mark</a> the current totals and then perform delta analysis following the completion of the execution metered. But this leads to the creation of multiple disconnected performance models that cannot be easily compared and reconciled. In addition it is not possible to narrow the analysis to one or more threads or have concurrent tagged execution periods with each thread having its own tag value which is required when the tag values reflect the some aspect of the execution context such as the web application user name, request parameter or session attribute.</p>
<p><img class="alignnone size-full wp-image-1967" title="tagging.steps" src="http://williamlouth.files.wordpress.com/2009/09/tagging-steps2.gif?w=426&#038;h=424" alt="tagging.steps" width="426" height="424" /></p>
<p>Here are some concrete kind use cases where this capability might be much more appropriate during analysis across multiple application life cycle management phases.</p>
<p>1. During the testing of a web application interaction consisting of a series of steps and pages a tag based on the step or page name is set globally allowing the developer to break down the resource metering costs for a particular <code>package</code>/<code>class</code>/<code>method</code> by the tagged step (or page).</p>
<p>2. During unit testing a tag is set at the thread context level based on the name of each @Test method executed providing code coverage like analysis for direct and indirect executed code by test method. This data can also be used in generating dependency analysis reports for such tests.</p>
<p>3. During a system failure (<em>i.e. database bounce</em>) a global tag is injected identifying the failure period allowing service level management to later break-out such costs on a per activity/interaction basis.</p>
<p>4. In diagnosing a user specific problem a thread context level tag is set identifying the user or the particular interaction at the entry point of request processing enabling resource metering to be reported both from an operational perspective (<em>code</em>) and contextual (<em>user marker</em>) perspective side by side.</p>
<p>5. In delivering elastic computing capabilities to an application a tag is injected into a cluster of runtimes at each dynamic change (<em>a capacity profile</em>) in the computing capacity made available to the application in the cloud which can then later be analyzed offline to determine reasons for the increase in capacity not being fully utilized due to possible inherent scalability problems with the applications own code base. Likewise one can easily determine which particular activities are impacted more than others by decreases in computing capacity due to elasticity policies.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/williamlouth.wordpress.com/1928/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/williamlouth.wordpress.com/1928/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/williamlouth.wordpress.com/1928/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/williamlouth.wordpress.com/1928/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/williamlouth.wordpress.com/1928/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/williamlouth.wordpress.com/1928/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/williamlouth.wordpress.com/1928/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/williamlouth.wordpress.com/1928/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/williamlouth.wordpress.com/1928/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/williamlouth.wordpress.com/1928/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=williamlouth.wordpress.com&blog=4209026&post=1928&subd=williamlouth&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://williamlouth.wordpress.com/2009/09/21/monitoring-profiling-execution-periods/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc0e0e0b6cd94c7c31748cd5d96e8a13?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">williamlouth</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/09/tagging-startup.gif" medium="image">
			<media:title type="html">tagging.startup</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/09/tagging-steps2.gif" medium="image">
			<media:title type="html">tagging.steps</media:title>
		</media:content>
	</item>
		<item>
		<title>The Fastest Ruby Profiler is a Java Profiler</title>
		<link>http://williamlouth.wordpress.com/2009/08/05/the-fastest-ruby-profiler-is-a-java-profiler/</link>
		<comments>http://williamlouth.wordpress.com/2009/08/05/the-fastest-ruby-profiler-is-a-java-profiler/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 06:03:34 +0000</pubDate>
		<dc:creator>williamlouth</dc:creator>
				<category><![CDATA[JRuby]]></category>
		<category><![CDATA[Profiling]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://williamlouth.wordpress.com/?p=1852</guid>
		<description><![CDATA[Recently we announced that JXInsight can execute 1 billion instrumented Java method calls per second once the multi-resource (hotspot) strategy based metering runtime determines a particular method is a non-hotspot. So I was curious to see how our JRuby-to-Ruby cross language profiling extension faired with such optimizations as our probes technology is not in anyway [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=williamlouth.wordpress.com&blog=4209026&post=1852&subd=williamlouth&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Recently we <a href="http://blog.jinspired.com/?p=655" target="_blank">announced</a> that <a href="http://www.jinspired.com/products/jxinsight/" target="_blank">JXInsight</a> can execute 1 billion instrumented Java method calls per second once the multi-resource (<em>hotspot</em>) strategy based metering runtime determines a particular method is a non-hotspot. So I was curious to see how our <a href="http://williamlouth.wordpress.com/2008/10/14/cross-language-profiling-with-jxinsight-jruby-to-ruby/" target="_blank">JRuby-to-Ruby</a> cross language profiling extension faired with such optimizations as our probes technology is not in anyway tied to metering just named Java code execution constructs. The good news is that our technology can drop the overhead so low that it even out-performs <em>no-op </em>instrumentation calls in Ruby itself which means we are faster than any Ruby language based profiling or benchmarking solution <em>(naturally when executed on the Java platform &#8211; JRuby VM</em>).</p>
<p>Here is the Ruby micro-benchmark I used to determine the above.</p>
<p><img class="alignnone size-full wp-image-1856" title="code.1" src="http://williamlouth.files.wordpress.com/2009/08/code-11.gif?w=216&#038;h=256" alt="code.1" width="216" height="256" /></p>
<p>Here is a chart showing the average time reported by multiple executions of the <code>run</code> method without and with our probes based instrumentation. Our instrumentation overhead is just over 15% but that is 15% on a method, <code>call</code>, that does nothing. Effectively our overhead is just under 15 nanoseconds for non-hotspots.</p>
<blockquote>
<p style="text-align:center;"><em>The overhead incurred in the instrumentation and measurement of fine grain method executions, which dominate the execution profile of most web applications, is a key performance indicator (<a href="http://en.wikipedia.org/wiki/Key_performance_indicator" target="_blank">KPI</a></em><em>) for any enterprise performance management and monitoring solution.</em></p>
</blockquote>
<p><img class="alignnone size-full wp-image-1857" title="chart.1" src="http://williamlouth.files.wordpress.com/2009/08/chart-1.gif?w=208&#038;h=200" alt="chart.1" width="208" height="200" /></p>
<p>Here is a partial screenshot of the resulting resource metering in our application management console. Note the strike-through on the <code>call</code> method indicating the associated instrumentation has been disabled following the execution of 1000 probe firings and the determination by the <em>hotspot</em> metering strategy that the named probe, <code>Object.call</code>, is a non-hotspot.</p>
<p><img class="alignnone size-full wp-image-1918" title="table-2" src="http://williamlouth.files.wordpress.com/2009/08/table-2.gif?w=297&#038;h=288" alt="table-2" width="297" height="288" /></p>
<p>To determine the best (<em>if not impossible</em>) time a Ruby based profiling solution could do I added both a <code>before</code> and <code>after</code> method call to the <code>call</code> method which is typical of how most dynamic instrumentation agents work across various languages and runtimes. <em>Both methods do nothing.</em></p>
<p><img class="alignnone size-full wp-image-1858" title="code.2" src="http://williamlouth.files.wordpress.com/2009/08/code-2.gif?w=213&#038;h=364" alt="code.2" width="213" height="364" /></p>
<p>Here is a revised chart with the average execution time for the above manual instrumentation added. <em>JXInsight is 3 times faster than a Ruby solution that does nothing.</em><br />
<img class="alignnone size-full wp-image-1859" title="chart.2" src="http://williamlouth.files.wordpress.com/2009/08/chart-2.gif?w=266&#038;h=204" alt="chart.2" width="266" height="204" /></p>
<blockquote>
<p style="text-align:center;"><em>Note: Disabling our hotspot metering strategy and comparing the performance with a version having a callout to <code>Benchmark.measure()</code> <a href="http://www.jinspired.com/products/jxinsight/" target="_blank">JXInsight</a></em><em> is more than 15 times more efficient. Moving to <a href="http://www.jruby.org/" target="_blank">JRuby</a></em><em> has many advantages for production applications both in terms of the raw speed of the runtime itself and the supporting management and monitoring tools.</em></p>
</blockquote>
<p><code><strong>Hardware</strong><br />
Model Name: MacBook Pro<br />
Model Identifier: MacBookPro5,1<br />
Processor Name Intel Core 2 Duo<br />
Processor Speed: 2.53 GHz<br />
Number Of Processors: 1<br />
Total Number Of Cores: 2<br />
L2 Cache: 6 MB<br />
Memory: 4 GB<br />
Bus Speed: 1.07 GHz</code></p>
<p><code> </code></p>
<p><code><strong>JRuby</strong><br />
jruby 1.3.1 (ruby 1.8.6p287) (2009-06-15 2fd6c3d)</code></p>
<p><code> </code></p>
<p><code><strong>Runtime</strong><br />
java version "1.6.0_15"<br />
Java(TM) SE Runtime Environment (build 1.6.0_15-b03-223)<br />
Java HotSpot(TM) 64-Bit Server VM (build 14.1-b02-92, mixed mode)<br />
</code></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/williamlouth.wordpress.com/1852/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/williamlouth.wordpress.com/1852/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/williamlouth.wordpress.com/1852/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/williamlouth.wordpress.com/1852/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/williamlouth.wordpress.com/1852/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/williamlouth.wordpress.com/1852/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/williamlouth.wordpress.com/1852/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/williamlouth.wordpress.com/1852/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/williamlouth.wordpress.com/1852/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/williamlouth.wordpress.com/1852/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=williamlouth.wordpress.com&blog=4209026&post=1852&subd=williamlouth&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://williamlouth.wordpress.com/2009/08/05/the-fastest-ruby-profiler-is-a-java-profiler/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc0e0e0b6cd94c7c31748cd5d96e8a13?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">williamlouth</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/08/code-11.gif" medium="image">
			<media:title type="html">code.1</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/08/chart-1.gif" medium="image">
			<media:title type="html">chart.1</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/08/table-2.gif" medium="image">
			<media:title type="html">table-2</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/08/code-2.gif" medium="image">
			<media:title type="html">code.2</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/08/chart-2.gif" medium="image">
			<media:title type="html">chart.2</media:title>
		</media:content>
	</item>
		<item>
		<title>Dumping OSGi &#8211; SpringSource dm server</title>
		<link>http://williamlouth.wordpress.com/2009/07/30/dumping-osgi-springsource-dm-server/</link>
		<comments>http://williamlouth.wordpress.com/2009/07/30/dumping-osgi-springsource-dm-server/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 19:30:09 +0000</pubDate>
		<dc:creator>williamlouth</dc:creator>
				<category><![CDATA[Diagnostics]]></category>
		<category><![CDATA[OSGi]]></category>

		<guid isPermaLink="false">http://williamlouth.wordpress.com/?p=1815</guid>
		<description><![CDATA[There are two basic approaches to developing diagnostics for any enterprise Java application server (be it OSGi based or not). The first approach is to create lots of custom code that treats every subsystem, service and component uniquely different in terms of presentation, collection and modeling forcing the creation of extraneous interfaces and/or additions to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=williamlouth.wordpress.com&blog=4209026&post=1815&subd=williamlouth&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>There are two basic approaches to developing diagnostics for any enterprise Java application server (<em>be it OSGi based or not</em>). The first approach is to create lots of custom code that treats every subsystem, service and component uniquely different in terms of presentation, collection and modeling forcing the creation of extraneous interfaces and/or additions to existing classes to support state extraction. The second approach involves defining a common model and representation of state data (<em>including meta data</em>) that can be used across multiple diagnostics (<em>state</em>) datasources, implemented by a single provider using runtime object state inspection (<em>without any code changes</em>) and supporting exploration within a single management console in a consistent manner and accessible whilst being disconnected.</p>
<blockquote>
<p style="text-align:center;"><em>Unfortunately nearly all application server vendors select the first approach including those newcomers that claim to be anti-bloat ware.</em></p>
</blockquote>
<p>Naturally we opted for the second option building a kind of dynamic state based <em>configuration management database</em> (<a href="http://en.wikipedia.org/wiki/CMDB" target="_blank">CMDB</a>) snapshot facility with supporting disconnected offline analysis tooling.</p>
<blockquote>
<p style="text-align:center;"><em>Amazingly some vendors require you to start an actual server instance to view the contents of a dump in a readable format.</em></p>
</blockquote>
<p>With <a href="http://www.jinspired.com/products/jxinsight/" target="_blank">JXInsight</a> all that is required to capture diagnostics state is to simply drop a technology specific observation extension into the class path of an application server. Here I have used our <code>jxinsight-ext-aj-osgi-bundle-observe.jar</code> to collect actual state diagnostics for live <a href="http://www.osgi.org" target="_blank">OSGi</a> bundles.</p>
<blockquote>
<p style="text-align:center;"><em>Note: A snapshot can contain both dynamic &amp; static, public &amp; private, state. With static state typically representing configuration loaded from a persistent store such as a file system.</em></p>
</blockquote>
<p><img class="alignnone size-full wp-image-1816" title="1" src="http://williamlouth.files.wordpress.com/2009/07/1.gif?w=372&#038;h=695" alt="1" width="372" height="695" /></p>
<p>The depth to which object (graph) state is collected within a diagnostic snapshot is configurable but typically 6-8 is sufficient for most offline analysis purposes.</p>
<p><img class="alignnone size-full wp-image-1817" title="2" src="http://williamlouth.files.wordpress.com/2009/07/2.gif?w=392&#038;h=692" alt="2" width="392" height="692" /></p>
<p>By combining both <em>state</em> and <em>metadata</em> into a single diagnostic snapshot we can <em>render,</em> <em>highlight </em>and<em> annotate</em> various items within the model &#8211; all in a consistent manner with as much detail as one would required in whatever role we assume during the problem analysis.</p>
<blockquote>
<p style="text-align:center;"><em>Note: We record the time(stamp) the object was constructed  or first appeared to the diagnostics runtime as well as the system identity hash code.</em></p>
</blockquote>
<p><img class="alignnone size-full wp-image-1818" title="3" src="http://williamlouth.files.wordpress.com/2009/07/3.gif?w=502&#038;h=500" alt="3" width="502" height="500" /></p>
<p>If we want to enhance the collection capabilities of the diagnostics system we simply drop in another extension library. Here I have added <code>jxinsight-ext-aj-osgi-service-observe.jar</code></p>
<p><img class="alignnone size-full wp-image-1819" title="4" src="http://williamlouth.files.wordpress.com/2009/07/4.gif?w=430&#038;h=722" alt="4" width="430" height="722" /></p>
<p>We can even record much more dynamic state including that which is being referenced directly or indirectly during request processing. Here I have added <code>jxinsight-ext-aj-osgi-service-diagnostics.jar</code> to the classpath to collect at any moment in time within the management console the object graph state related to arguments and target objects currently executing methods defined in the one or more of the OSGi service related interfaces. The method being called is <code>getServiceReferences</code> by thread <code>server-dm-1</code> with a single string argument on a target object of type <code>BundContext</code>.</p>
<p><img class="alignnone size-full wp-image-1820" title="5" src="http://williamlouth.files.wordpress.com/2009/07/5.gif?w=495&#038;h=711" alt="5" width="495" height="711" /></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/williamlouth.wordpress.com/1815/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/williamlouth.wordpress.com/1815/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/williamlouth.wordpress.com/1815/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/williamlouth.wordpress.com/1815/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/williamlouth.wordpress.com/1815/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/williamlouth.wordpress.com/1815/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/williamlouth.wordpress.com/1815/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/williamlouth.wordpress.com/1815/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/williamlouth.wordpress.com/1815/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/williamlouth.wordpress.com/1815/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=williamlouth.wordpress.com&blog=4209026&post=1815&subd=williamlouth&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://williamlouth.wordpress.com/2009/07/30/dumping-osgi-springsource-dm-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc0e0e0b6cd94c7c31748cd5d96e8a13?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">williamlouth</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/07/1.gif" medium="image">
			<media:title type="html">1</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/07/2.gif" medium="image">
			<media:title type="html">2</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/07/3.gif" medium="image">
			<media:title type="html">3</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/07/4.gif" medium="image">
			<media:title type="html">4</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/07/5.gif" medium="image">
			<media:title type="html">5</media:title>
		</media:content>
	</item>
		<item>
		<title>One Billion Operations Per Second</title>
		<link>http://williamlouth.wordpress.com/2009/07/27/one-billion-operations-per-second/</link>
		<comments>http://williamlouth.wordpress.com/2009/07/27/one-billion-operations-per-second/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 20:24:44 +0000</pubDate>
		<dc:creator>williamlouth</dc:creator>
				<category><![CDATA[JXInsight]]></category>
		<category><![CDATA[Performance Engineering]]></category>
		<category><![CDATA[Profiling]]></category>

		<guid isPermaLink="false">http://williamlouth.wordpress.com/?p=1790</guid>
		<description><![CDATA[The problem with (published) performance benchmarks is that they are there to be beaten (luckily only ever by ourselves) and today well we have shattered all our previous benchmark results, including one last week, which means I am now faced with the daunting task of going over all my previous related postings and redoing the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=williamlouth.wordpress.com&blog=4209026&post=1790&subd=williamlouth&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The problem with (<em>published</em>) performance benchmarks is that they are there to be beaten (<em>luckily only ever by ourselves</em>) and today well we have shattered all our previous benchmark results, including <a href="http://blog.jinspired.com/?p=633" target="_blank">one</a> last week, which means I am now faced with the daunting task of going over all my previous related postings and redoing the testing or just simply <a href="http://blog.jinspired.com/?p=655" target="_blank">linking</a> to the latest and greatest numbers. I think I will go with second option for now.<br />
<a href="http://blog.jinspired.com/?p=655" target="_blank"><img class="alignnone" src="http://www.jinspired.com/images/1bops.comparison.chart.gif" alt="" width="400" height="280" /></a></p>
<blockquote>
<p style="text-align:center;"><em><a href="http://www.jinspired.com/products/jxinsight/" target="_blank">JXInsight</a>&#8217;s multi-resource metering &amp; monitoring (&amp; profiling) technology is truly the fastest and most scalable Java solution on the market that is designed specifically for production usage in the most demanding of environments. Getting to this level of software quality is never easy. Its been a long and hard slog but Rod and I (co-founders) have managed to consistently out class the competition in terms of open &amp; extensible API design, efficient runtime &amp; tooling, and in the delivery of innovative information visualizations for the vast amount of data that the product can collect today.</em></p>
</blockquote>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/williamlouth.wordpress.com/1790/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/williamlouth.wordpress.com/1790/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/williamlouth.wordpress.com/1790/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/williamlouth.wordpress.com/1790/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/williamlouth.wordpress.com/1790/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/williamlouth.wordpress.com/1790/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/williamlouth.wordpress.com/1790/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/williamlouth.wordpress.com/1790/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/williamlouth.wordpress.com/1790/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/williamlouth.wordpress.com/1790/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=williamlouth.wordpress.com&blog=4209026&post=1790&subd=williamlouth&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://williamlouth.wordpress.com/2009/07/27/one-billion-operations-per-second/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc0e0e0b6cd94c7c31748cd5d96e8a13?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">williamlouth</media:title>
		</media:content>

		<media:content url="http://www.jinspired.com/images/1bops.comparison.chart.gif" medium="image" />
	</item>
		<item>
		<title>Visualizing Sequential &amp; Hierarchical Execution Aspects of Metered Software</title>
		<link>http://williamlouth.wordpress.com/2009/07/21/visualizing-sequential-hierarchical-execution-aspects-of-metered-software/</link>
		<comments>http://williamlouth.wordpress.com/2009/07/21/visualizing-sequential-hierarchical-execution-aspects-of-metered-software/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 19:56:54 +0000</pubDate>
		<dc:creator>williamlouth</dc:creator>
				<category><![CDATA[JXInsight]]></category>
		<category><![CDATA[Profiling]]></category>

		<guid isPermaLink="false">http://williamlouth.wordpress.com/?p=1767</guid>
		<description><![CDATA[Last week I managed to get back working on cool and innovative (hopefully you will agree) visualization work that I had designed (lots of sketches scattered around my office) a long time back but never managed to get the push to actually realize them within the product until today when we released a first in a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=williamlouth.wordpress.com&blog=4209026&post=1767&subd=williamlouth&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Last week I managed to get back working on cool and innovative (<em>hopefully you will agree</em>) visualization work that I had designed (<em>lots of sketches scattered around my office</em>) a long time back but never managed to get the push to actually realize them within the product until today when we <a href="http://blog.jinspired.com/?p=633" target="_blank">released</a> a first in a series of visualization updates I am actively working on that will raise the bar (<em>sky high</em>) once again (<em>well that is the motivational chant used currently</em>).</p>
<p>In this first update I have tried to tackle a common problem with most application performance profiling/tracing/logging/journaling tools that use <em>ordered</em> child nodes within trees to display sequential execution behavior. The problem being that they do not scale in the enterprise context (<em>too many nested branches and large sequences of nodes</em>), are wasteful of precious screen real-estate, and cause repetitive strain injury (RSI) with excessive clicking to expand &amp; contract nodes (<em>seriously</em>).</p>
<p><strong>The solution is to not use a tree</strong>. Instead we use an <em>ordered</em> table that overlays the hierarchical execution nature (<em>caller-to-callee</em>) on top of a flattened sequential execution flow and makes it contextual (<em>based on the current selection</em>). And best of all we can display the execution of multiple concurrent threads side-by-side (<em>to be exact its row by row</em>) which is impossible with trees as the basis for any such visualization. Here is an animated gif showing this in action.</p>
<blockquote>
<p style="text-align:center;"><em>By the way the graphical tree overlay also highlights re-entrant calls on the billed probe stack. Can you see the visual pattern indicator?</em></p>
</blockquote>
<p><img title="treeoverlay" src="http://williamlouth.files.wordpress.com/2009/07/treeoverlay.gif" alt="treeoverlay" /></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/williamlouth.wordpress.com/1767/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/williamlouth.wordpress.com/1767/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/williamlouth.wordpress.com/1767/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/williamlouth.wordpress.com/1767/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/williamlouth.wordpress.com/1767/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/williamlouth.wordpress.com/1767/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/williamlouth.wordpress.com/1767/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/williamlouth.wordpress.com/1767/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/williamlouth.wordpress.com/1767/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/williamlouth.wordpress.com/1767/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=williamlouth.wordpress.com&blog=4209026&post=1767&subd=williamlouth&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://williamlouth.wordpress.com/2009/07/21/visualizing-sequential-hierarchical-execution-aspects-of-metered-software/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc0e0e0b6cd94c7c31748cd5d96e8a13?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">williamlouth</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/07/treeoverlay.gif" medium="image">
			<media:title type="html">treeoverlay</media:title>
		</media:content>
	</item>
		<item>
		<title>Jazoon ‘09: The Conference</title>
		<link>http://williamlouth.wordpress.com/2009/07/03/jazoon-%e2%80%9809-the-conference/</link>
		<comments>http://williamlouth.wordpress.com/2009/07/03/jazoon-%e2%80%9809-the-conference/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 14:55:02 +0000</pubDate>
		<dc:creator>williamlouth</dc:creator>
				<category><![CDATA[Conferences]]></category>

		<guid isPermaLink="false">http://williamlouth.wordpress.com/?p=1683</guid>
		<description><![CDATA[This was my first time to attend (and speak) at the Jazoon conference and though I was only able to attend for 2 days I really did have a great time attending the conference and talking in person (and drinking) with a number of well known individuals in the Java industry including Bela &#8220;a blast&#8221; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=williamlouth.wordpress.com&blog=4209026&post=1683&subd=williamlouth&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This was my first time to attend (<em>and speak</em>) at the <a href="http://jazoon.com/">Jazoon</a> conference and though I was only able to attend for 2 days I really did have a great time attending the conference and talking in person (<em>and drinking</em>) with a number of well known individuals in the Java industry including Bela <em>&#8220;a blast&#8221;</em> Ban (JBoss), Mike <em>&#8220;I&#8217;m nice&#8221;</em> Keith (Oracle), and Kirk Pepperdine (Kodewerk) who dared discuss and debate application performance management &amp; monitoring approaches with me over lunches and walks to and from our hotel.</p>
<blockquote>
<p style="text-align:center;"><em><img src="http://farm4.static.flickr.com/3411/3662261060_96fc63475b_m.jpg" alt="" /></em></p>
<p style="text-align:center;"><em>Kirk just about to experience my Irish resolve.</em></p>
</blockquote>
<p>I did attend the keynote session given by Adrian Colyer (<a href="http://www.springsource.com">SpringSource</a>) and I must say I was impressed with his presentation skills even though it was a tad bit too long in terms of the green theme and light on in-depth technical analysis but I suppose there is only so much you can do in such a short time especially when predicting the future which could all change with an acquisition.</p>
<blockquote>
<p style="text-align:center;"><em>Adrian was as ever economical with the facts in his assessment of which VM language will win the war when he claimed that his choice of Groovy was made prior to the acquisition of the company behind Groovy &amp; Grails &#8211; hence it was a pure technical decision. He failed to state that the VC that provided financial support to SpringSource at the very outset had also invested in the acquired company and had been promoting the technology to Rod and Co. for some time. Whether it had any bearing on the final decision is a different matter but it should have been disclosed in his argument to the audience questioning his objectivity.</em></p>
</blockquote>
<p>The same cannot be said for the other main session I attended in which Peter <em>&#8220;let me put this chastity belt on your classloaders before everything drops out under&#8221;</em> Kriens (OSGi) who did a very poor job of presenting a supposedly technical session which in fact turned out to be more like &#8220;<em>let me preach &amp; market my 10 year old modular framework (that keeps re-inventing new component models)&#8221;</em>. Peter really used every cheap marketing trick in the book when it came to the information (<em>can we even call it [data] that, more like the gospel according to Peter</em>) he presented in his slides. Below is an actual slide from the presentation.</p>
<blockquote>
<p style="text-align:center;"><img class="size-full wp-image-1712 aligncenter" title="osgi-heaven" src="http://williamlouth.files.wordpress.com/2009/07/osgi-heaven.gif?w=150&#038;h=210" alt="osgi-heaven" width="150" height="210" /><br />
<em> Heaven awaits those who embrace OSGi?</em></p></blockquote>
<p>The session might have been somewhat informative if he stopped talking about his 10 years of servitude, left out the gimmicky slides, and limited his bashing of Java and Sun at every opportunity during the talk. It felt like 10 years had passed when the session was over which should not have been the case for this particular technology which will have served an important purpose when Java does indeed deliver a built-in and much improved replacement. His insistence that modularity should be managed entirely outside of the language and oblivious to the Java runtime sounded like someone completely divorced from reality (<em>vital lies?</em>).</p>
<blockquote>
<p style="text-align:center;"><em>When Juergen Hoeller (</em><a href="http://www.springsource.com"><em>SpringSource</em></a><em>) was pulled over to our table I did question him on whether Rod (</em><a href="http://www.springsource.com"><em>SpringSource</em></a><em>) should continue blogging or go back to coding factory classes. What is worse? His reply was &#8220;No comment&#8221; but his body language betrayed him.</em></p>
</blockquote>
<blockquote>
<p style="text-align:center;"><em>During Peters talk he mentioned that we was instructed by the OSGi committee to not talk about the original target environment for the technology &#8211; the embedded market.</em></p>
</blockquote>
<blockquote>
<p style="text-align:center;"><em>Not all OSGi members share Peter&#8217;s view that the default behavior for OSGi should be to break existing enterprise Java applications which he refers to as &#8220;no pain, no gain&#8221;. There appears to be two camps. The hard-liners (and groupies/followers whose only response to issues raised is to name call those who dare mention them) and those (mainly app server vendors) who just want to get things to work sometimes only using the technology to segregate container libraries from application deployments.</em></p>
</blockquote>
<blockquote><p><em> Peter has responded (partially) and apparently &#8220;new&#8221; is (only) good when it is in relation to &#8220;OSGi (component) programming models&#8221; but not when it is in relation to an approach to modularity that involves enhancements to the language and runtime which are outside of Peter&#8217;s control (hence his rejection). I cannot believe that Peter &amp; Co. would have designed OSGi as it is today if they had the opportunity to extend the language, runtime and tooling to accommodate their design. I refuse to believe that they did not compromise their design (and resulting implementations) especially in light of this and the original target environment &#8211; the embedded space. At the very least they would have looked at ways of reducing they own class loader hacks. I also doubt that Sun would have allowed any proposed design break compatibility in a number of ways that OSGi has done so (and some for no good reason). Even if Sun fails to delivery a deployment centric modularity approach we still might gain from their efforts as a smaller (modular) VM could gives us the ultimate class isolation container &#8211; an operating system process (and many of them hosting specific services connected to a grid/cloud). Lets not be fooled in to believing that to achieve modularity we just put a class chastity belt around our private parts. In the enterprise space state is just as important as behavior and it is not so easy to tackle in or outside of a container which is why most systems go occasionally offline (at least internally) to sync changes across different data processing domains (messaging, databases, &#8230;). Even if you can isolate classes from each other you cannot do the same for the external side effects (of multiple &amp; different versions). This last item seems foreign to many OSGi disciples who apparently do not understand one of the main reasons why operations stop and restart processes in applying a managed change  &#8211; to be sure the process can indeed be restarted when something goes terribly amiss in production outside of the container (hardware). It is much easier rolling back at the time the change is applied.</em></p></blockquote>
<blockquote><p><em>The &#8220;chastity belt&#8221; reference reflects my view that modularity, which should be managed at many levels in the design and development process and not just in bundling, has more to do with education and  support during the early application life-cycle than a cruel troublesome enforcement at the late stage of post-deployment (into the bad real world). We need modularity to be supported in different ways (not just a single realization) and at different stages with each building on top and augmenting that which precedes its. I think currently there is way to much emphasis placed on bundle separation (thinking being that the more modules the greater the modularity). We should look at packaging (bundling) of application artifacts to indicate deployment collocation for reasons other than a &#8220;modularity nirvana&#8221;. We should also encourage diversity in approaches to how modularity is enforced at runtime (if it need be or not) and not just standardize on a particular implementation. The language and tooling needs to help capture and convey intent not target implementation. Modularity is not achieved by just creating many little bundles and hiding classes which seems to be Peter&#8217;s fixation (crucifix). I have seen very modular software designs that never needed runtime policing of visibility (outside of what is provided by the language) maybe they were not so dynamic (at least within a single runtime and in terms of service implementation) but how many organizations really need such capabilities and have the ability and tooling to effectively manage and control such environments in an enterprise context. Very few and even if they had the capability within the organization most try to avoid such scenarios (multiple live bundle/library versions in a single container) because the risks (diagnostics is problematic) far outweigh the benefits (&#8220;its cool&#8221;).</em></p></blockquote>
<blockquote><p><em>Peter did not actually address my main criticism points of his presentation. The cheap tricks in how he presented the information to back up his OSGi marketing campaign like the dependency graph of the Java class library with no comparable graph of a similar runtime and SDK built over the same period (Java 1.x-1.6) and offering the same breath and depth of services using OSGi. How much different would it indeed look like? Would any noticeable differences reflect the choice of the component approach or just the talent and longevity of the people involved. Great products are created by great teams. Yes there is a need for a framework (of reference and values) along with a support system but does it need to be policed in the way proposed which in my opinion reflects the constraints on the original design space (or the authors cynical view of the rest of us)? Does it need to be marketed as &#8220;the&#8221; silver bullet for the software industry that ultimately fixes us to a future designed 10 years ago? I hope not. We need to learn from previous work along with the mistakes made and 10 years gives you plenty of time to do this no matter how hard you try not to as time and the pace of innovation is not on your side.</em></p></blockquote>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/williamlouth.wordpress.com/1683/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/williamlouth.wordpress.com/1683/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/williamlouth.wordpress.com/1683/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/williamlouth.wordpress.com/1683/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/williamlouth.wordpress.com/1683/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/williamlouth.wordpress.com/1683/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/williamlouth.wordpress.com/1683/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/williamlouth.wordpress.com/1683/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/williamlouth.wordpress.com/1683/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/williamlouth.wordpress.com/1683/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=williamlouth.wordpress.com&blog=4209026&post=1683&subd=williamlouth&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://williamlouth.wordpress.com/2009/07/03/jazoon-%e2%80%9809-the-conference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc0e0e0b6cd94c7c31748cd5d96e8a13?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">williamlouth</media:title>
		</media:content>

		<media:content url="http://farm4.static.flickr.com/3411/3662261060_96fc63475b_m.jpg" medium="image" />

		<media:content url="http://williamlouth.files.wordpress.com/2009/07/osgi-heaven.gif" medium="image">
			<media:title type="html">osgi-heaven</media:title>
		</media:content>
	</item>
		<item>
		<title>Jazoon ‘09: Activity Based Costing and the Cloud</title>
		<link>http://williamlouth.wordpress.com/2009/06/25/jazoon-%e2%80%9809-activity-based-costing-and-the-cloud/</link>
		<comments>http://williamlouth.wordpress.com/2009/06/25/jazoon-%e2%80%9809-activity-based-costing-and-the-cloud/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 19:02:19 +0000</pubDate>
		<dc:creator>williamlouth</dc:creator>
				<category><![CDATA[Activity Based Costing (ABC)]]></category>
		<category><![CDATA[Cloud Computing]]></category>

		<guid isPermaLink="false">http://williamlouth.wordpress.com/?p=1667</guid>
		<description><![CDATA[Mike over at Canoo has a write-up of the talk I gave today at the Jazoon 09 conference on applying activity based costing in the cloud. I understand some of his concerns but I hope he will see that the model itself has application in many areas not all cost related (at least not directly) including [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=williamlouth.wordpress.com&blog=4209026&post=1667&subd=williamlouth&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Mike over at <a href="http://www.canoo.com">Canoo</a> has a <a href="http://canoo.com/blog/2009/06/25/jazoon-09-activity-based-costing-and-the-cloud/">write-up</a> of the talk I gave today at the <a href="http://www.jazoon.com">Jazoon 09</a> conference on applying activity based costing in the cloud. I understand some of his concerns but I hope he will see that the model itself has application in many areas not all cost related (at least not directly) including performance and capacity management.</p>
<p>I am delighted he is excited (<em>&#8220;it’s certainly an incredibly powerful idea&#8221;</em>) about the possibility of our <a href="http://opencore.jinspired.com">OpenCore</a> Probes API becoming a standard which we can all expect to be available in the runtime and which can be extended by cloud or runtime vendors via the registration of their own custom meters.</p>
<p>I would like to add that metering does not necessarily imply that every activity has to be costed. Metering is a powerful and scalable way of analyzing the resource usage of a software without suffering from the obvious scalability and performance problems of call or path trace tools. Activity analysis can be the sole purpose of the data collected and the model generated. During the demo I showed how you can even create a meter based on the frequency or resource usage of another metered activity. This is what so cool about our design and implementation &#8211; you can model the execution of a block code as an activity or meter or both.</p>
<p>Activity based metering (ABM) is an incredibly important source of information on behavioral patterns of users which can in fact increase development budgets in areas that have higher profit margins or are used much more frequently (and hopefully appreciated) by clients. More and more of our daily activities are mirrored in the execution of software in todays web and business applications. Threads are our delegates (agents) acting on our behalf.</p>
<blockquote>
<p style="text-align:center;"><em>It is also extremely important when you are a Web 2.0 startup with a growing user base and no clue of what business model can be applied that will eventually offset operational costs that will likely to continue to grow in the future.</em></p>
</blockquote>
<blockquote>
<p style="text-align:center;"><em>Next time I intend ending the session with a clip from the Matrix showing our life streams (threads/calls) flowing down the panel with a little William (or Smith) assuming control of one or more threads temporarily.</em></p>
</blockquote>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/williamlouth.wordpress.com/1667/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/williamlouth.wordpress.com/1667/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/williamlouth.wordpress.com/1667/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/williamlouth.wordpress.com/1667/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/williamlouth.wordpress.com/1667/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/williamlouth.wordpress.com/1667/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/williamlouth.wordpress.com/1667/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/williamlouth.wordpress.com/1667/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/williamlouth.wordpress.com/1667/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/williamlouth.wordpress.com/1667/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=williamlouth.wordpress.com&blog=4209026&post=1667&subd=williamlouth&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://williamlouth.wordpress.com/2009/06/25/jazoon-%e2%80%9809-activity-based-costing-and-the-cloud/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc0e0e0b6cd94c7c31748cd5d96e8a13?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">williamlouth</media:title>
		</media:content>
	</item>
		<item>
		<title>Execution Profiling: Counting KPI&#8217;s</title>
		<link>http://williamlouth.wordpress.com/2009/05/04/execution-profiling-counting-kpis/</link>
		<comments>http://williamlouth.wordpress.com/2009/05/04/execution-profiling-counting-kpis/#comments</comments>
		<pubDate>Mon, 04 May 2009 18:28:46 +0000</pubDate>
		<dc:creator>williamlouth</dc:creator>
				<category><![CDATA[JXInsight]]></category>
		<category><![CDATA[Performance Engineering]]></category>
		<category><![CDATA[Profiling]]></category>

		<guid isPermaLink="false">http://williamlouth.wordpress.com/?p=1536</guid>
		<description><![CDATA[In a previous blog entry, Instrument-&#62;Measure-&#62;Refine-&#62;Repeat , I discussed how to approach the performance analysis of software with request processing execution times in the low microseconds via an iterative hotspot detection process that seeks to refine the instrumentation and measurement with each cycle, reducing overhead and minimizing perturbation in the data collected. In this follow-up I would like to present an [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=williamlouth.wordpress.com&blog=4209026&post=1536&subd=williamlouth&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>In a previous blog entry, <a href="http://williamlouth.wordpress.com/2009/04/06/instrument-measure-refine-repeat/">Instrument-&gt;Measure-&gt;Refine-&gt;Repeat</a> , I discussed how to approach the performance analysis of <a href="http://www.oracle.com/technology/products/coherence/index.html" target="_blank">software</a> with request processing execution times in the low microseconds via an iterative hotspot detection process that seeks to refine the instrumentation and measurement with each cycle, reducing overhead and minimizing perturbation in the data collected. In this follow-up I would like to present an alternative and complimentary approach that allows us to largely discount any instrumentation and measurement overhead by focusing on the rate of change in key performance indicators (<a href="http://en.wikipedia.org/wiki/Key_performance_indicator" target="_blank">KPI</a>) that are not time based.</p>
<p>But first allow me to ask the question &#8220;<em>Why do we profile the execution of software?</em>&#8220;. For many developers the answer is simple &#8211; &#8220;<em>to tune&#8221;</em>. But this is not entirely the only valid reason and in fact this answer is more of a by-product of other activities and tasks within software performance engineering (<a href="www.jinspired.com/solutions/xpe/index.html" target="_blank">SPE</a>).</p>
<p>For large complex systems we observe and measure the execution of software in order to understand, model, quantify, and manage its behavior (<em>resources usage &amp; utilization, performance, scalability, runtime system dependencies</em>) across multiple software releases and under different operating &amp; executing contexts. Naturally we need a way to effectively manage all this information. This is achieved by metering (<em>tracking</em>) a relatively small number of indicators that measure operational activities that have a significant impact on performance, correlating the rate of change in such indicators with higher-level activities and various operating parameters.</p>
<blockquote>
<p style="text-align:center;"><em>Note: In fact the ability to detect and assess underlying changes in both the system &amp; software execution models across deployments is of paramount importance in delivering service level management and reducing the time window for problem resolution in production environments.</em></p>
</blockquote>
<p>The choice of a good key performance indicator depends largely on the type of software being monitored and managed. For standard business applications this can be the number and timing for requests serviced by various resource managers (<em>file system, database, messaging middleware, data grid, compute grid</em>). For low latency request processing systems there are a number of useful candidates for key performance indicators that are not entirely time dependent or impacted by instrumentation including: method execution counts, field read/write counts, object allocation counts &amp; sizes (<em>and to some lesser extent cpu time</em>).</p>
<p>Lets apply this approach to the performance analysis of <a href="http://www.oracle.com/technology/products/coherence/index.html" target="_blank">Oracle Coherence</a> used in my previous <a href="http://williamlouth.wordpress.com/2009/04/06/instrument-measure-refine-repeat/" target="_blank">blog</a> entry which you should have already read at this stage. Before looking at any execution profile data you first need to know what was the activity being tested and how was it parameterized. Here it is:</p>
<p><code>&gt;cache cache</code><br />
<code>&gt;#10 bulkput</code><br />
<code>&gt;#10 bulkput</code></p>
<p>Executing the above command sequence in the <a href="http://www.oracle.com/technology/products/coherence/index.html" target="_blank">Oracle Coherence</a> interactive shell results in a total of 20,000 <code>SafeNamedCache.put()</code> calls. We can see this below in the metering table with the <code>Count</code> column representing the number of times this particular method was called.</p>
<blockquote>
<p style="text-align:center;"><em>Lets keep this number, 20,000, in mind when looking at all numbers presented below.</em></p>
</blockquote>
<p><img class="alignnone size-full wp-image-1544" title="execprofiling1" src="http://williamlouth.files.wordpress.com/2009/05/execprofiling1.gif?w=467&#038;h=395" alt="execprofiling1" width="467" height="395" /></p>
<p>The <code>Total</code> column represents the number of methods executed within the <code>com.tangosol.*</code> package during the execution of the <code>SafeNamedCache.put()</code> 20,000 calls by the same calling thread. The <code>Total(I)</code> tells us the number of methods called that were directly (<em>inherently</em>) attributed to the execution of the  <code>SafeNamedCache.put()</code></p>
<p>So 20,000 <code>SafeNamedCache.put()</code> calls resulted in 13.7 million method calls, 40,000 of which were made directly from within the method itself. But what about the other 38 million (51 less 13) call? Why only 13.7 million? The reason is that these other 38 million calls were made outside of the execution of the cache operation and more importantly by other threads. Expansion of the metering model tree reveals one of the main contributing classes, <code>PacketPublisher</code>, whose method executions resulted in a total of more than 22 million (1.3 million x 17) method calls, 4 million of which were made directly from within the class.</p>
<blockquote>
<p style="text-align:center;"><em>Note: For extremely low latency systems the overhead of excessive method calls can be relatively high even if in-lined to some degree because there still needs to be some housekeeping performed by the runtime (call stack mgmt). When looking for possible candidates to tune start with those probes with high averages.</em></p>
</blockquote>
<p><img class="alignnone size-full wp-image-1548" title="execprofiling21" src="http://williamlouth.files.wordpress.com/2009/05/execprofiling21.gif?w=450&#038;h=462" alt="execprofiling21" width="450" height="462" /></p>
<p>In analyzing the performance of our own software <a href="http://www.jinspired.com/products/jxinsight/" target="_blank">product</a> we use two low level meters &#8211; f<code>ield.read.count</code> and <code>field.write.count</code>. Below is such an analysis with 37.6 million reads performed on fields residing in the <code>com.tangosol.*</code> package during the execution of 52.1 million method calls also within the <code>com.tangosol.*</code> package.</p>
<blockquote>
<p style="text-align:center;"><em>Note: We ourselves monitor call paths within our probes runtime at the nanosecond level by averaging billions of test executions and by managing the number of field reads and writes.</em></p>
</blockquote>
<p><img class="alignnone size-full wp-image-1542" title="execprofiling3" src="http://williamlouth.files.wordpress.com/2009/05/execprofiling3.gif?w=463&#038;h=360" alt="execprofiling3" width="463" height="360" /></p>
<p>Comparing the <code>Count</code> column with the <code>Total(I)</code> columns shows that a vast number of calls within the <code>PacketPublisher</code> class are simple field getters &#8211; an average of 1 field read per method call. It also reveals that during the execution of methods within this class 18.5 millions fields are read with 1 million within the class&#8217;s own methods and the rest in methods executed elsewhere in the <code>com.tangosol.*</code> package.</p>
<p><img class="alignnone size-full wp-image-1541" title="execprofiling4" src="http://williamlouth.files.wordpress.com/2009/05/execprofiling4.gif?w=473&#038;h=360" alt="execprofiling4" width="473" height="360" /></p>
<p>Another useful meter in analyzing software with a large amount of thread co-ordination is <code>waiting.count</code> which tracks the number of <code>Object.wait()</code> calls made by a thread.</p>
<blockquote>
<p style="text-align:center;"><em>Note: The <code>waiting.count</code> meter can be used in <a href="http://williamlouth.wordpress.com/2009/04/24/profiling-the-nothing-part-1/" target="_blank">&#8220;profiling nothing&#8221;</a> as a high number of waits calls is generally indicative of worker threads starved of work items to process.</em></p>
</blockquote>
<p><img class="alignnone size-full wp-image-1545" title="execprofiling51" src="http://williamlouth.files.wordpress.com/2009/05/execprofiling51.gif?w=465&#038;h=241" alt="execprofiling51" width="465" height="241" /></p>
<p>For low latency systems you really need to look at the rate of object allocation and the resulting byte sizes. This is not only important for performance management but for capacity management as well as most <code>OutOfMemoryErrors</code> are the result of high concurrent request processing placing too much demand on the available memory pool and not some permanent memory leakage (<em>more like a temporal &amp; transient waste</em>).</p>
<blockquote>
<p style="text-align:center;"><em>Note: Execution count profiling allows one to identify and quantify the impact of particular request execution parameters have on key performance indicators &#8211; correlating rate of change across multiple variables.</em></p>
</blockquote>
<p><img class="alignnone size-full wp-image-1539" title="execprofiling6" src="http://williamlouth.files.wordpress.com/2009/05/execprofiling6.gif?w=461&#038;h=360" alt="execprofiling6" width="461" height="360" /></p>
<p>Focusing on the average object allocation count per method execution can sometimes reveal opportunities for tuning which by the way does not necessarily imply that objects should be cached &#8211; <em>always try to eliminate work completely before improving the efficiency of the work via reuse. </em></p>
<p><em></em>From the metering table below we can see how many objects are allocated directly from within a method and how many are typically allocated during its execution including from within methods called directly and indirectly.</p>
<blockquote>
<p style="text-align:center;"><em>Note: Object allocation metering can also reveal the cost of initialization &#8211; methods only ever executed once.</em></p>
</blockquote>
<p><img class="alignnone size-full wp-image-1538" title="execprofiling7" src="http://williamlouth.files.wordpress.com/2009/05/execprofiling7.gif?w=475&#038;h=376" alt="execprofiling7" width="475" height="376" /></p>
<p>Key performance indicators can be used to drive change (<em>tune</em>) but they can also be used to effectively manage and track change not necessarily tied to the achievement of an aligned target. They can also be used to identify unplanned changes that would otherwise result in customers notifying you of visible side effects at a much higher granularity and largely disconnected from the problem domain.</p>
<p>In a follow-up to this entry I will show how easy it is to create your own custom key performance indicators with our aspect library extensions.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/williamlouth.wordpress.com/1536/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/williamlouth.wordpress.com/1536/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/williamlouth.wordpress.com/1536/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/williamlouth.wordpress.com/1536/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/williamlouth.wordpress.com/1536/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/williamlouth.wordpress.com/1536/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/williamlouth.wordpress.com/1536/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/williamlouth.wordpress.com/1536/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/williamlouth.wordpress.com/1536/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/williamlouth.wordpress.com/1536/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=williamlouth.wordpress.com&blog=4209026&post=1536&subd=williamlouth&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://williamlouth.wordpress.com/2009/05/04/execution-profiling-counting-kpis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc0e0e0b6cd94c7c31748cd5d96e8a13?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">williamlouth</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/05/execprofiling1.gif" medium="image">
			<media:title type="html">execprofiling1</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/05/execprofiling21.gif" medium="image">
			<media:title type="html">execprofiling21</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/05/execprofiling3.gif" medium="image">
			<media:title type="html">execprofiling3</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/05/execprofiling4.gif" medium="image">
			<media:title type="html">execprofiling4</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/05/execprofiling51.gif" medium="image">
			<media:title type="html">execprofiling51</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/05/execprofiling6.gif" medium="image">
			<media:title type="html">execprofiling6</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/05/execprofiling7.gif" medium="image">
			<media:title type="html">execprofiling7</media:title>
		</media:content>
	</item>
		<item>
		<title>Profiling The Nothing &#8211; Part 1</title>
		<link>http://williamlouth.wordpress.com/2009/04/24/profiling-the-nothing-part-1/</link>
		<comments>http://williamlouth.wordpress.com/2009/04/24/profiling-the-nothing-part-1/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 19:56:21 +0000</pubDate>
		<dc:creator>williamlouth</dc:creator>
				<category><![CDATA[JXInsight]]></category>
		<category><![CDATA[Performance Engineering]]></category>
		<category><![CDATA[Performance Testing]]></category>
		<category><![CDATA[Profiling]]></category>

		<guid isPermaLink="false">http://williamlouth.wordpress.com/?p=1493</guid>
		<description><![CDATA[Kirk Pepperdine recently queried whether JXInsight could indeed profile nothing. Naturally JXInsight can profile the &#8220;nothing&#8221; in all its many forms (resource contention, coupling &#38; co-ordination) but to keep the first part of this follow-up short &#38; sweet let me show you how to detect latency in browser based operations from a software execution model perspective. In [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=williamlouth.wordpress.com&blog=4209026&post=1493&subd=williamlouth&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Kirk Pepperdine recently queried whether <a href="http://www.jinspired.com/products/jxinsight/" target="_blank">JXInsight</a> could indeed <a href="http://kirk.blog-city.com/latency_is_a_performance_bug.htm" target="_blank">profile nothing</a>. Naturally <a href="http://www.jinspired.com/products/jxinsight/" target="_blank">JXInsight </a>can profile the <em>&#8220;nothing&#8221;</em> in all its many forms (resource contention, coupling &amp; co-ordination) but to keep the first part of this follow-up short &amp; sweet let me show you how to detect latency in browser based operations from a software execution model perspective. In this scenario a single button click on a web page to cancel a hotel booking that results in the user returning to a page displaying the list of current bookings remaining.</p>
<p>And here it is &#8211; our timeline analysis of the two resulting HTTP requests processed by the same worker thread (this need not always be the case) within an application server.</p>
<p><img class="alignnone size-full wp-image-1498" title="profilingnothing11" src="http://williamlouth.files.wordpress.com/2009/04/profilingnothing11.gif?w=442&#038;h=175" alt="profilingnothing11" width="442" height="175" /></p>
<p>The light blue rectangles represent the time the thread was processing within the servlet layer. The yellow and brown the time the thread was processing within the JNDI and EJB layers respectively. The bracket above the brown rectangle in the first HTTP request represents the actual active resource (JDBC) transaction window.</p>
<p>Finally the whitespace (the <em>&#8220;nothing&#8221;</em>) in the middle of the timeline graphic is the time spent outside of the container sending/receiving/processing the request at the client &#8211; 15-20% of the total user experience time.</p>
<p>Next up profiling the &#8220;<em>nothing&#8221;</em> from a system execution model perspective.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/williamlouth.wordpress.com/1493/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/williamlouth.wordpress.com/1493/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/williamlouth.wordpress.com/1493/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/williamlouth.wordpress.com/1493/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/williamlouth.wordpress.com/1493/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/williamlouth.wordpress.com/1493/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/williamlouth.wordpress.com/1493/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/williamlouth.wordpress.com/1493/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/williamlouth.wordpress.com/1493/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/williamlouth.wordpress.com/1493/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=williamlouth.wordpress.com&blog=4209026&post=1493&subd=williamlouth&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://williamlouth.wordpress.com/2009/04/24/profiling-the-nothing-part-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc0e0e0b6cd94c7c31748cd5d96e8a13?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">williamlouth</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/04/profilingnothing11.gif" medium="image">
			<media:title type="html">profilingnothing11</media:title>
		</media:content>
	</item>
		<item>
		<title>Cloud Modeling with Activity Based Costing</title>
		<link>http://williamlouth.wordpress.com/2009/04/18/cloud-modeling-with-activity-based-costing/</link>
		<comments>http://williamlouth.wordpress.com/2009/04/18/cloud-modeling-with-activity-based-costing/#comments</comments>
		<pubDate>Sat, 18 Apr 2009 21:31:54 +0000</pubDate>
		<dc:creator>williamlouth</dc:creator>
				<category><![CDATA[Activity Based Costing (ABC)]]></category>
		<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[JXInsight]]></category>

		<guid isPermaLink="false">http://williamlouth.wordpress.com/?p=1389</guid>
		<description><![CDATA[I recently came across a customer that was using our probes Open API in a novel way to simulate a real-world business process and composed activities for the purpose of cost analysis. This is quite unusual as the technology is mainly used in metering and costing services and activities that are purely software based. But [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=williamlouth.wordpress.com&blog=4209026&post=1389&subd=williamlouth&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I recently came across a customer that was using our probes <a href="http://www.jinspired.com/products/jxinsight/api/">Open API</a> in a novel way to simulate a real-world business process and composed activities for the purpose of cost analysis. This is quite unusual as the technology is mainly used in metering and costing services and activities that are purely software based. But here the customer has created a software execution engine that models the real-world and uses our software instrumentation &amp; measurement technologies to meter the simulated model in terms of the real-world cost drivers.</p>
<blockquote>
<p style="text-align:center;"><em>Note: Our <a href="http://www.jinspired.com/products/jxinsight/" target="_blank">probes</a></em><em> technology is unlike any other performance management solution in that it is not tied in anyway to method execution constructs. Composite named probes can represent any identifiable execution activity and resources can be abstract representing such things as chargeable cloud service interactions. This allows us to meter across languages within a single execution context.</em></p>
</blockquote>
<p>This usage of our technology made me revisit a recent discussion I had with a cloud computing vendor regarding how to apply an activity based costing approach to hosted computing appliances in the cloud. The vendor in question wanted to initially offer very high level metering information to customers before rolling out a complete activity based costing solution that would allow customers to expose activities within their software to our extensible resource metering engine delivering an unprecedented cost and performance management offering. What if I created a software model of the cloud platform itself &#8211; a model that would act as a proxy or facade on to the underlying cloud and that would receive events or control actions directly.</p>
<p><img class="alignnone size-full wp-image-1471" title="mvmmodel" src="http://williamlouth.files.wordpress.com/2009/04/mvmmodel.gif?w=480&#038;h=491" alt="mvmmodel" width="480" height="491" /></p>
<p>The following table shows the mapping from the cloud model to our <a href="http://www.jinspired.com/products/jxinsight/api/">Open API</a> interfaces and then to the corresponding activity based costing concepts.</p>
<blockquote>
<p style="text-align:center;"><em>Note: This mapping is largely only applicable to the context described here as a resource in activity based costing can be mapped to a <code>Meter</code>, <code>Counter</code>, or <code>Measure</code> within our <a href="http://www.jinspired.com/products/jxinsight/api/">Open API</a>.</em></p>
</blockquote>
<p><img class="alignnone size-full wp-image-1488" title="mvmtable" src="http://williamlouth.files.wordpress.com/2009/04/mvmtable.gif?w=313&#038;h=200" alt="mvmtable" width="313" height="200" /></p>
<p>Lets create a mock implementation to demonstrate this approach to using activity based costing to meter at the VM level by starting with a rather simplified <code>VM</code> interface representing a virtual machine within a cloud.</p>
<p><img class="alignnone size-full wp-image-1391" title="mvmcode1" src="http://williamlouth.files.wordpress.com/2009/04/mvmcode1.gif?w=165&#038;h=211" alt="mvmcode1" width="165" height="211" /></p>
<p>Here is a <code>Mock</code> implementation class of the <code>VM</code> interface. I have added a <em>units</em> field representing the number of processors assigned to the virtual machine. Naturally most of these calls would be delegated to an agent running on the virtual machine itself or possibly some central information system.</p>
<p><img class="alignnone size-full wp-image-1392" title="mvmcode2" src="http://williamlouth.files.wordpress.com/2009/04/mvmcode2.gif?w=441&#038;h=509" alt="mvmcode2" width="441" height="509" /></p>
<p>Below is the <code>Worker</code> thread class that will run within the runtime for the lifetime of the <code>VM</code> being modeled. In the run() method the worker registers two <code>Resources</code>, <code>vm.cpu.time</code> and <code>vm.up.time</code> with the current thread resource metering context before starting the metered activity.</p>
<blockquote>
<p style="text-align:center;"><em>Note: <a href="http://www.jinspired.com/products/jxinsight" target="_blank">JXInsight</a></em><em> comes with 30+ built in resource meters and offers the ability to register custom resources via the (pushed based) <code>Counter</code> interface or (pulled based) <code>Measure</code> interface.</em></p>
</blockquote>
<p><img class="alignnone size-full wp-image-1393" title="mvmcode3" src="http://williamlouth.files.wordpress.com/2009/04/mvmcode3.gif?w=385&#038;h=724" alt="mvmcode3" width="385" height="724" /></p>
<p>Finally here is the <code>Cloud</code> class I used to interact with the model from the command line. The class supports 3 commands: <code>start</code> (vm), <code>stop</code> (vm) and <code>tag</code>. The <code>tag</code> command allows the customer to set an alternative metering cost structure for probes (activities) being metered.</p>
<p><img class="alignnone size-full wp-image-1402" title="mvmcode41" src="http://williamlouth.files.wordpress.com/2009/04/mvmcode41.gif?w=383&#038;h=724" alt="mvmcode41" width="383" height="724" /></p>
<p>Before running up the mock simulation I created a <code>jxinsight.override.config</code> file to setup the meter-to-resource mapping as well as some unit costing. Here is the contents of the file.</p>
<p><code>jxinsight.server.probes.tag.enabled=true</code><br />
<code>jxinsight.server.probes.meter.clock.time.include=false</code><br />
<code>jxinsight.server.probes.meter.resources=vm.cpu.time,vm.up.time</code><br />
<code>jxinsight.server.probes.meter.unit.cost.include=true</code><br />
<code>jxinsight.server.probes.meter.resource.vm.cpu.time.unit.cost=2</code></p>
<p>And here is a small transcript of an interaction with the cloud.</p>
<p><code>start com.acme.sales.crm.vm1 4</code><br />
<em><code># tv advert airing</code></em><br />
<code>tag tvadvert</code><br />
<em><code># vm1 is loaded need more capacity</code></em><br />
<code>start com.acme.sales.crm.vm2 4</code><br />
<em><code># resuming normal service</code></em><br />
<code>stop com.acme.sales.crm.vm2</code><br />
<code>tag</code><br />
<code>stop com.acme.sales.crm.vm1</code></p>
<p>Connecting our management console to the Java runtime which is acting as a proxy to the cloud infrastructure I captured the following resource metering &amp; costing model.</p>
<blockquote>
<p style="text-align:center;"><em>Note: The metering (cost) group structure shown below is derived from the composite name used in creating a probe (activity) which itself a parsed representation of the virtual machine identifier.</em></p>
</blockquote>
<p><img class="alignnone size-full wp-image-1403" title="mvmmetering1" src="http://williamlouth.files.wordpress.com/2009/04/mvmmetering1.gif?w=429&#038;h=570" alt="mvmmetering1" width="429" height="570" /></p>
<p>In a follow-up to this blog entry I will show how easy it is to combine this cloud model based approach with an actual standard software activity based costing approach provided to customers and used by cloud service solutions (storage, queues).</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/williamlouth.wordpress.com/1389/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/williamlouth.wordpress.com/1389/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/williamlouth.wordpress.com/1389/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/williamlouth.wordpress.com/1389/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/williamlouth.wordpress.com/1389/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/williamlouth.wordpress.com/1389/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/williamlouth.wordpress.com/1389/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/williamlouth.wordpress.com/1389/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/williamlouth.wordpress.com/1389/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/williamlouth.wordpress.com/1389/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=williamlouth.wordpress.com&blog=4209026&post=1389&subd=williamlouth&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://williamlouth.wordpress.com/2009/04/18/cloud-modeling-with-activity-based-costing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc0e0e0b6cd94c7c31748cd5d96e8a13?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">williamlouth</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/04/mvmmodel.gif" medium="image">
			<media:title type="html">mvmmodel</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/04/mvmtable.gif" medium="image">
			<media:title type="html">mvmtable</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/04/mvmcode1.gif" medium="image">
			<media:title type="html">mvmcode1</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/04/mvmcode2.gif" medium="image">
			<media:title type="html">mvmcode2</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/04/mvmcode3.gif" medium="image">
			<media:title type="html">mvmcode3</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/04/mvmcode41.gif" medium="image">
			<media:title type="html">mvmcode41</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/04/mvmmetering1.gif" medium="image">
			<media:title type="html">mvmmetering1</media:title>
		</media:content>
	</item>
		<item>
		<title>Instrument-&gt;Measure-&gt;Refine-&gt;Repeat</title>
		<link>http://williamlouth.wordpress.com/2009/04/06/instrument-measure-refine-repeat/</link>
		<comments>http://williamlouth.wordpress.com/2009/04/06/instrument-measure-refine-repeat/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 14:40:54 +0000</pubDate>
		<dc:creator>williamlouth</dc:creator>
				<category><![CDATA[JXInsight]]></category>
		<category><![CDATA[Performance Engineering]]></category>
		<category><![CDATA[Profiling]]></category>

		<guid isPermaLink="false">http://williamlouth.wordpress.com/?p=1229</guid>
		<description><![CDATA[One of the hardest challenges for any application performance management tool is in reducing the runtime overhead to levels acceptable for production environments whilst collecting as much measurement data as possible for the purposes of service level management and problem management. For the typical code profiling solution this is an impossible task without significant filtering [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=williamlouth.wordpress.com&blog=4209026&post=1229&subd=williamlouth&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>One of the hardest challenges for any application performance management tool is in reducing the runtime overhead to levels acceptable for production environments whilst collecting as much measurement data as possible for the purposes of <a href="http://en.wikipedia.org/wiki/Service_level_management" target="_blank">service level management</a> and <a href="http://en.wikipedia.org/wiki/Information_Technology_Infrastructure_Library#Problem_Management" target="_blank">problem management</a>. For the typical code profiling solution this is an impossible task without significant filtering which incidentally most of the time results in the actual bottleneck being hidden as filtering is usually based on namespaces rather the actual performance profile of the methods themselves.</p>
<p>Even with significant filtering most profiling tools cannot perform at levels required for applications that have incredibly low request processing times whilst executing a significant number of method calls. If a request executes in 250 microseconds (<em>which pretty much rules out call stack sampling</em>) and during its execution it makes 2,500 method calls it is pretty easy to see that achieving an acceptable level of overhead, 2% (5 microseconds), is an insurmountable task especially when a system call to the clock counter costs between 0.2 &#8211; 0.3 microseconds and you need to do this twice for each of the 2,500 method calls.</p>
<p>With a dynamic measurement (<em>metering</em>) solution such as the <a href="http://www.jinspired.com/products/jxinsight/" target="_blank">product</a> I work on you can reduce the overhead of an instrumented method call, that is not deemed a hotspot (<em>dynamically at runtime</em>), to just under 0.03 microseconds but multiplying that by 2,500 we still come out above the acceptable levels for this extreme type of request processing.</p>
<p>Can such applications then be profiled? Yes. There are two approaches one which I will discuss in this blog entry and the other in a future entry.</p>
<p><strong>Instrument-&gt;Measure-&gt;Refine-&gt;Repeat</strong><br />
Clearly a solution to the problem described above must involve reducing the cost of both the instrumentation and measurement. But how can this be done in such a way that we do not eliminate expensive calls from the performance model whilst ensuring we do not inadvertently include calls perturbed (<em>directly and indirectly</em>) by the remaining instrumentation. The solution is to <em>iteratively</em> refine the instrumentation based on measurements that identify execution <em>hotspots</em>. With each iteration the hotspot list is reassessed in light of the reduced level of instrumentation.</p>
<p><img class="alignnone size-full wp-image-1359" title="imrr" src="http://williamlouth.files.wordpress.com/2009/04/imrr.gif?w=407&#038;h=376" alt="imrr" width="407" height="376" /></p>
<p>For this process to be much more effective than the guesswork performed by way of manual namespace filtering the underlying runtime and tooling must at minimum</p>
<ol>
<li>Perform the measurement with as low overhead as possible (<em>which is why our <a href="http://www.jinspired.com/products/jxinsight/" target="_blank">product</a> out-performs the competition by a huge margin</em>)</li>
<li>Allow the hotspot determination to be based on the dynamic analysis of resource usage across one or more meters (<em>via composite cost meters</em>)</li>
<li>Automate the accurate generation of the refined instrumentation set (<em>it is a one-click operation in our </em><a href="http://www.jinspired.com/products/jxinsight/" target="_blank">product</a>).</li>
</ol>
<p>To demonstrate this approach I am going to use a real-world software example &#8211; <a href="http://www.oracle.com/technology/products/coherence/index.html" target="_blank">Oracle Coherence</a>. Shipped with the Coherence product is a command line interface that allows one to interactively execute <code>Map.put()</code> and <code>Map.get()</code> operations on a distributed cache. The command line facility also allows you to perform such operations in bulk and to repeat them. Here is the command sequence I will execute across each test presented below.</p>
<p><code>&gt; cache cache<br />
&gt; #100 bulkput</code></p>
<p>The above commands will create a distributed cache named &#8220;<code>cache</code>&#8221; and repeat 100 times a <code>bulkput</code> command which by default executes 1,000 <code>Map.put(Integer,byte[])</code> commands. In total 100,000 <code>Map.put</code> calls are executed.</p>
<p>Below is a metering model collected following the above command sequence which does include a small number of call counts related to the start-up and excludes constructor calls. Over 2,300 method calls are made per <code>Map.put</code> call. Running the test without any instrumentation the average execution time is 0.265 microseconds per <code>Map.put</code> call. This is our baseline.</p>
<blockquote><p>Note: This particular use case is a best (<em>if unrealistic</em>) case for Coherence as the command uses a <code>byte[]</code> (<em>easy IO mapping work</em>) as the <code>put</code> value, whereas most applications would have objects that need to be serialized which is very expensive <em>relatively speaking that is</em>.</p></blockquote>
<p><img class="alignnone size-full wp-image-1228" title="table1" src="http://williamlouth.files.wordpress.com/2009/04/table1.gif?w=330&#038;h=373" alt="table1" width="330" height="373" /></p>
<p>The above metering was collected without any of our production-oriented features enabled such as our dynamic <code>hotspot</code> metering strategy. By re-enabling such features whilst keeping the same level of instrumentation we get the metering model shown below with a significant reduction (1000x) in the number of firing probes that were actually metered (<em>calls measured</em>). Unfortunately we still take a performance hit in dynamically assessing whether a called method (<em>firing probe</em>) is a hotspot or not (<em>metered or not</em>). The average execution time for each <code>Map.put</code> is now 0.640 microseconds.</p>
<blockquote><p>Note: The definition of a hotspot is highly configurable within our runtime. For the tests reported in this entry I defined it to be any method with an average inherent <strong>wall clock time </strong>of 50 or more microseconds after 1000 executions globally.</p></blockquote>
<p><img class="alignnone size-full wp-image-1230" title="table2" src="http://williamlouth.files.wordpress.com/2009/04/table2.gif?w=330&#038;h=272" alt="table2" width="330" height="272" /></p>
<p>Fortunately from within the management console we can automatically generate a new probe extension (jar) based on those probes labeled hotspots within the metering model exported from the managed runtime. <em>One click operation!!!</em> Instead of instrumenting over 4,500 methods we now have a small list of methods to be instrumented spread across a total of 5 classes.</p>
<p><img class="alignnone size-full wp-image-1234" title="xml1" src="http://williamlouth.files.wordpress.com/2009/04/xml1.gif?w=486&#038;h=454" alt="xml1" width="486" height="454" /></p>
<p>Below is the metering model following the deployment of the new probe extension containing the refined instrumentation. We have now halved the metering count but more importantly the instrumentation overhead associated with methods not deemed hotspots has been removed. The average execution time has dropped back down to 0.285 microseconds.</p>
<p><img class="alignnone size-full wp-image-1231" title="table3" src="http://williamlouth.files.wordpress.com/2009/04/table3.gif?w=330&#038;h=234" alt="table3" width="330" height="234" /></p>
<p>Generating a new revised probe extension based on the hotspots in this new metering model reveals a further reduction in the methods and classes deemed hotspots.</p>
<p><img class="alignnone size-full wp-image-1235" title="xml2" src="http://williamlouth.files.wordpress.com/2009/04/xml2.gif?w=486&#038;h=291" alt="xml2" width="486" height="291" /></p>
<p>Here is the final metering model captured based on the refined hotspots &#8211; a ever so small reduction. The average execution time has now dropped to 0.275 microseconds which equates to 0.010 microseconds of overhead which is largely a result of the underlying system clock calls.</p>
<p><img class="alignnone size-full wp-image-1232" title="table4" src="http://williamlouth.files.wordpress.com/2009/04/table4.gif?w=330&#038;h=235" alt="table4" width="330" height="235" /></p>
<p>The following bar chart compares the changes across each iteration with the baseline reported above and that of another Java profiler.</p>
<p><img class="alignnone size-full wp-image-1241" title="chart" src="http://williamlouth.files.wordpress.com/2009/04/chart.gif?w=232&#038;h=257" alt="chart" width="232" height="257" /></p>
<blockquote><p>Note: Hopefully this explains why today we ship with over 600 technology specific extension libraries that specifically target the main client call entry points (<em>mainly interfaces</em>) into each technology.</p></blockquote>
<p>In a follow-up to this entry I will revisit the tests again but this time using another technique ideal for CPU analysis in situations were the resolution of the system counter is insufficient &#8211; <em>execution count profiling</em>.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/williamlouth.wordpress.com/1229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/williamlouth.wordpress.com/1229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/williamlouth.wordpress.com/1229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/williamlouth.wordpress.com/1229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/williamlouth.wordpress.com/1229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/williamlouth.wordpress.com/1229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/williamlouth.wordpress.com/1229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/williamlouth.wordpress.com/1229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/williamlouth.wordpress.com/1229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/williamlouth.wordpress.com/1229/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=williamlouth.wordpress.com&blog=4209026&post=1229&subd=williamlouth&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://williamlouth.wordpress.com/2009/04/06/instrument-measure-refine-repeat/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc0e0e0b6cd94c7c31748cd5d96e8a13?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">williamlouth</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/04/imrr.gif" medium="image">
			<media:title type="html">imrr</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/04/table1.gif" medium="image">
			<media:title type="html">table1</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/04/table2.gif" medium="image">
			<media:title type="html">table2</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/04/xml1.gif" medium="image">
			<media:title type="html">xml1</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/04/table3.gif" medium="image">
			<media:title type="html">table3</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/04/xml2.gif" medium="image">
			<media:title type="html">xml2</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/04/table4.gif" medium="image">
			<media:title type="html">table4</media:title>
		</media:content>

		<media:content url="http://williamlouth.files.wordpress.com/2009/04/chart.gif" medium="image">
			<media:title type="html">chart</media:title>
		</media:content>
	</item>
	</channel>
</rss>