<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://commons.oreilly.com/wiki/skins/common/feed.css?97"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://commons.oreilly.com/wiki/index.php?title=Inter-Process_Communication_Affects_Application_Response_Time&amp;action=history&amp;feed=atom</id>
		<title>Inter-Process Communication Affects Application Response Time - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://commons.oreilly.com/wiki/index.php?title=Inter-Process_Communication_Affects_Application_Response_Time&amp;action=history&amp;feed=atom"/>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=Inter-Process_Communication_Affects_Application_Response_Time&amp;action=history"/>
		<updated>2013-05-22T12:00:47Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.11.0</generator>

	<entry>
		<id>http://commons.oreilly.com/wiki/index.php?title=Inter-Process_Communication_Affects_Application_Response_Time&amp;diff=23239&amp;oldid=prev</id>
		<title>Kevlin: The number of inter-process communications affects response time moved to Inter-Process Communication Affects Application Response Time</title>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=Inter-Process_Communication_Affects_Application_Response_Time&amp;diff=23239&amp;oldid=prev"/>
				<updated>2009-02-02T07:52:47Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;a href=&quot;/wiki/index.php/The_number_of_inter-process_communications_affects_response_time&quot; title=&quot;The number of inter-process communications affects response time&quot;&gt;The number of inter-process communications affects response time&lt;/a&gt; moved to &lt;a href=&quot;/wiki/index.php/Inter-Process_Communication_Affects_Application_Response_Time&quot; title=&quot;Inter-Process Communication Affects Application Response Time&quot;&gt;Inter-Process Communication Affects Application Response Time&lt;/a&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 07:52, 2 February 2009&lt;/td&gt;
			&lt;/tr&gt;
		&lt;/table&gt;</summary>
		<author><name>Kevlin</name></author>	</entry>

	<entry>
		<id>http://commons.oreilly.com/wiki/index.php?title=Inter-Process_Communication_Affects_Application_Response_Time&amp;diff=22505&amp;oldid=prev</id>
		<title>Kevlin at 09:28, 13 December 2008</title>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=Inter-Process_Communication_Affects_Application_Response_Time&amp;diff=22505&amp;oldid=prev"/>
				<updated>2008-12-13T09:28:20Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 09:28, 13 December 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Response time is critical to software usability. Few things are as frustrating as waiting for some software system to respond, especially when our interaction with the software involves repeated cycles of stimulus and response. We feel as if the software is wasting our time and affecting our productivity. However the causes of poor response time are less appreciated, especially in modern applications. &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Application Performance Management &lt;/del&gt;literature still &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;discusses &lt;/del&gt;data structures and &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;sorting &lt;/del&gt;algorithms, issues that &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;were important decades ago, &lt;/del&gt;but &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;not &lt;/del&gt;likely dominate performance in modern multi-tier enterprise applications.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Response time is critical to software usability. Few things are as frustrating as waiting for some software system to respond, especially when our interaction with the software involves repeated cycles of stimulus and response. We feel as if the software is wasting our time and affecting our productivity. However&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;, &lt;/ins&gt;the causes of poor response time are less &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;well &lt;/ins&gt;appreciated, especially in modern applications. &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Much performance management &lt;/ins&gt;literature still &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;focuses on &lt;/ins&gt;data structures and algorithms, issues that &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;can make a difference in some cases &lt;/ins&gt;but &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;are far less &lt;/ins&gt;likely &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;to &lt;/ins&gt;dominate performance in modern multi-tier enterprise applications.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;When performance is a problem, my experience has been that &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;improvements in &lt;/del&gt;data structures and algorithms &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;aren&lt;/del&gt;'t the right place to look. &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;In modern enterprise applications, response &lt;/del&gt;time depends most strongly on the number of remote inter-process communications (IPCs) conducted in response to a stimulus. While there can be other local bottlenecks, the number of remote inter-process communications usually dominates. Each remote inter-process communication contributes some non-negligible latency to the overall response time, and these individual contributions add up, especially when they are incurred &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;sequentially&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;When performance is a problem &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;in such applications&lt;/ins&gt;, my experience has been that &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;examining &lt;/ins&gt;data structures and algorithms &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;isn&lt;/ins&gt;'t the right place to look &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;for improvements&lt;/ins&gt;. &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Response &lt;/ins&gt;time depends most strongly on the number of remote inter-process communications (IPCs) conducted in response to a stimulus. While there can be other local bottlenecks, the number of remote inter-process communications usually dominates. Each remote inter-process communication contributes some non-negligible latency to the overall response time, and these individual contributions add up, especially when they are incurred &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;in sequence&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;A prime example is &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;quot;&lt;/del&gt;ripple loading&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;quot; &lt;/del&gt;in an application using object&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;-&lt;/del&gt;relational mapping. Ripple loading &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;refers to &lt;/del&gt;the sequential execution of many database calls to select the data needed for building a graph of objects (see [http://martinfowler.com/eaaCatalog/lazyLoad.html Lazy Load] in Martin Fowler's ''Patterns of Enterprise Application Architecture''). When the database client is a middle-tier application server rendering a web page, these database calls are usually executed sequentially in a single thread&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;, and their &lt;/del&gt;individual latencies &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;contribute &lt;/del&gt;to the overall response time. Even if each database call takes only 10ms, a page requiring 1000 calls (which is not uncommon) will exhibit at least a 10-second response time. Other examples include web service invocation, HTTP requests from a web browser, distributed object invocation, request&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;-&lt;/del&gt;reply messaging, and data grid interaction over custom network protocols. The more remote IPCs needed to respond to a stimulus, the greater the response time will be.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;A prime example is &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;ripple loading&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;in an application using object&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;ndash;&lt;/ins&gt;relational mapping. Ripple loading &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;describes &lt;/ins&gt;the sequential execution of many database calls to select the data needed for building a graph of objects (see [http://martinfowler.com/eaaCatalog/lazyLoad.html Lazy Load] in Martin Fowler's ''Patterns of Enterprise Application Architecture''). When the database client is a middle-tier application server rendering a web page, these database calls are usually executed sequentially in a single thread&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;. Their &lt;/ins&gt;individual latencies &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;accumulate, contributing &lt;/ins&gt;to the overall response time. Even if each database call takes only 10ms, a page requiring 1000 calls (which is not uncommon) will exhibit at least a 10-second response time. Other examples include web&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;-&lt;/ins&gt;service invocation, HTTP requests from a web browser, distributed object invocation, request&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;ndash;&lt;/ins&gt;reply messaging, and data&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;-&lt;/ins&gt;grid interaction over custom network protocols. The more remote IPCs needed to respond to a stimulus, the greater the response time will be.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;The &lt;/del&gt;strategies for reducing the number of remote inter-process communications per stimulus &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;are relatively few, and relatively obvious or well known&lt;/del&gt;. One is to apply the principle of parsimony, &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;by &lt;/del&gt;optimizing the interface between processes so that exactly the right data for the purpose at hand is exchanged with the minimum amount of interaction. Another is to parallelize the inter-process communications where possible, so that the overall response time becomes driven mainly by the longest-latency IPC. &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;And a &lt;/del&gt;third is to cache the results of previous IPCs, so that future IPCs may be avoided by hitting local cache instead.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;There are a few relatively obvious and well-known &lt;/ins&gt;strategies for reducing the number of remote inter-process communications per stimulus. One &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;strategy &lt;/ins&gt;is to apply the principle of parsimony, optimizing the interface between processes so that exactly the right data for the purpose at hand is exchanged with the minimum amount of interaction. Another &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;strategy &lt;/ins&gt;is to parallelize the inter-process communications where possible, so that the overall response time becomes driven mainly by the longest-latency IPC. &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;A &lt;/ins&gt;third &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;strategy &lt;/ins&gt;is to cache the results of previous IPCs, so that future IPCs may be avoided by hitting local cache instead.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;When you're designing an application, be mindful of the number of inter-process communications in response to each stimulus. When analyzing applications that suffer from poor performance, I have often found IPC-to-stimulus ratios of thousands-to-one. Reducing this ratio, whether by caching or parallelizing or some other technique, will pay off much more than &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;implementing the best &lt;/del&gt;data structure choice or &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;list &lt;/del&gt;sorting algorithm.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;When you're designing an application, be mindful of the number of inter-process communications in response to each stimulus. When analyzing applications that suffer from poor performance, I have often found IPC-to-stimulus ratios of thousands-to-one. Reducing this ratio, whether by caching or parallelizing or some other technique, will pay off much more than &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;changing &lt;/ins&gt;data structure choice or &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;tweaking a &lt;/ins&gt;sorting algorithm.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;By [[Randy Stafford]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;By [[Randy Stafford]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikicontent:diff:version:1.11a:oldid:22501:newid:22505 --&gt;
&lt;/table&gt;</summary>
		<author><name>Kevlin</name></author>	</entry>

	<entry>
		<id>http://commons.oreilly.com/wiki/index.php?title=Inter-Process_Communication_Affects_Application_Response_Time&amp;diff=22501&amp;oldid=prev</id>
		<title>Randy Stafford: Inter-process communication drives response time moved to The number of inter-process communications affects response time</title>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=Inter-Process_Communication_Affects_Application_Response_Time&amp;diff=22501&amp;oldid=prev"/>
				<updated>2008-12-13T02:17:05Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;a href=&quot;/wiki/index.php/Inter-process_communication_drives_response_time&quot; title=&quot;Inter-process communication drives response time&quot;&gt;Inter-process communication drives response time&lt;/a&gt; moved to &lt;a href=&quot;/wiki/index.php/The_number_of_inter-process_communications_affects_response_time&quot; title=&quot;The number of inter-process communications affects response time&quot;&gt;The number of inter-process communications affects response time&lt;/a&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 02:17, 13 December 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;/table&gt;</summary>
		<author><name>Randy Stafford</name></author>	</entry>

	<entry>
		<id>http://commons.oreilly.com/wiki/index.php?title=Inter-Process_Communication_Affects_Application_Response_Time&amp;diff=22500&amp;oldid=prev</id>
		<title>Randy Stafford at 02:16, 13 December 2008</title>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=Inter-Process_Communication_Affects_Application_Response_Time&amp;diff=22500&amp;oldid=prev"/>
				<updated>2008-12-13T02:16:14Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 02:16, 13 December 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Response time is critical to software usability. Few things are as frustrating as waiting for some software system to respond, especially when our interaction with the software involves repeated cycles of stimulus and response. We feel as if the software is wasting our time and affecting our productivity. However the causes of poor response time are less appreciated, especially in modern applications. Application Performance Management literature still discusses data structures and sorting algorithms, issues that were important decades ago, but &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;that are no longer dominant &lt;/del&gt;in &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;the era of &lt;/del&gt;multi-&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;core, multi-GHz processors&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Response time is critical to software usability. Few things are as frustrating as waiting for some software system to respond, especially when our interaction with the software involves repeated cycles of stimulus and response. We feel as if the software is wasting our time and affecting our productivity. However the causes of poor response time are less appreciated, especially in modern applications. Application Performance Management literature still discusses data structures and sorting algorithms, issues that were important decades ago, but &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;not likely dominate performance &lt;/ins&gt;in &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;modern &lt;/ins&gt;multi-&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;tier enterprise applications&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;When performance is a problem, my experience has been that improvements in data structures and algorithms aren't the right place to look. In modern applications, response time depends most strongly on the number of inter-process communications (IPCs) &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;needed &lt;/del&gt;to &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;process some &lt;/del&gt;stimulus. While there can be other local bottlenecks, the number of inter-process communications usually dominates. Each inter-process communication contributes some non-negligible latency to the overall response time, and these individual contributions add up, especially when they are incurred sequentially.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;When performance is a problem, my experience has been that improvements in data structures and algorithms aren't the right place to look. In modern &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;enterprise &lt;/ins&gt;applications, response time depends most strongly on the number of &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;remote &lt;/ins&gt;inter-process communications (IPCs) &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;conducted in response &lt;/ins&gt;to &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;a &lt;/ins&gt;stimulus. While there can be other local bottlenecks, the number of &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;remote &lt;/ins&gt;inter-process communications usually dominates. Each &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;remote &lt;/ins&gt;inter-process communication contributes some non-negligible latency to the overall response time, and these individual contributions add up, especially when they are incurred sequentially.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;A prime example is &amp;quot;ripple loading&amp;quot; in an application using object-relational mapping. Ripple loading refers to the sequential execution of many database calls to select the data needed for building a graph of objects (see [http://martinfowler.com/eaaCatalog/lazyLoad.html Lazy Load] in Martin Fowler's ''Patterns of Enterprise Application Architecture''). When the database client is a middle-tier application server rendering a web page, these database calls are usually executed sequentially in a single thread, and their individual latencies contribute to the overall response time. Even if each database call takes only 10ms, a page requiring 1000 calls (which is not uncommon) will exhibit at least a 10-second response time. Other examples include web service invocation, HTTP requests from a web browser, distributed object invocation, request-reply messaging, and data grid interaction over custom network protocols. The more IPCs &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;are &lt;/del&gt;needed to respond to a stimulus, the greater the response time will be.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;A prime example is &amp;quot;ripple loading&amp;quot; in an application using object-relational mapping. Ripple loading refers to the sequential execution of many database calls to select the data needed for building a graph of objects (see [http://martinfowler.com/eaaCatalog/lazyLoad.html Lazy Load] in Martin Fowler's ''Patterns of Enterprise Application Architecture''). When the database client is a middle-tier application server rendering a web page, these database calls are usually executed sequentially in a single thread, and their individual latencies contribute to the overall response time. Even if each database call takes only 10ms, a page requiring 1000 calls (which is not uncommon) will exhibit at least a 10-second response time. Other examples include web service invocation, HTTP requests from a web browser, distributed object invocation, request-reply messaging, and data grid interaction over custom network protocols. The more &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;remote &lt;/ins&gt;IPCs needed to respond to a stimulus, the greater the response time will be.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The strategies for reducing the &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;ratio &lt;/del&gt;of inter-process communications per stimulus are relatively few, and relatively obvious or well known. One is to apply the principle of parsimony, by optimizing the interface between processes so that exactly the right data for the purpose at hand is exchanged with the minimum amount of interaction. Another is to parallelize the inter-process communications where possible, so that the overall response time becomes driven mainly by the longest-latency IPC. And a third is to cache the results of previous IPCs, so that future IPCs may be avoided by hitting local cache instead.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The strategies for reducing the &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;number &lt;/ins&gt;of &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;remote &lt;/ins&gt;inter-process communications per stimulus are relatively few, and relatively obvious or well known. One is to apply the principle of parsimony, by optimizing the interface between processes so that exactly the right data for the purpose at hand is exchanged with the minimum amount of interaction. Another is to parallelize the inter-process communications where possible, so that the overall response time becomes driven mainly by the longest-latency IPC. And a third is to cache the results of previous IPCs, so that future IPCs may be avoided by hitting local cache instead.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;When you're designing an application, be mindful of the &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;ratio &lt;/del&gt;of inter-process communications &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;per &lt;/del&gt;stimulus. When analyzing applications that suffer from poor performance, I have often found IPC-to-stimulus ratios of thousands-to-one. Reducing this ratio, whether by caching or parallelizing or some other technique, will pay off much more than implementing the best &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;search &lt;/del&gt;algorithm.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;When you're designing an application, be mindful of the &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;number &lt;/ins&gt;of inter-process communications &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;in response to each &lt;/ins&gt;stimulus. When analyzing applications that suffer from poor performance, I have often found IPC-to-stimulus ratios of thousands-to-one. Reducing this ratio, whether by caching or parallelizing or some other technique, will pay off much more than implementing the best &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;data structure choice or list sorting &lt;/ins&gt;algorithm.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;By [[Randy Stafford]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;By [[Randy Stafford]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikicontent:diff:version:1.11a:oldid:12874:newid:22500 --&gt;
&lt;/table&gt;</summary>
		<author><name>Randy Stafford</name></author>	</entry>

	<entry>
		<id>http://commons.oreilly.com/wiki/index.php?title=Inter-Process_Communication_Affects_Application_Response_Time&amp;diff=12874&amp;oldid=prev</id>
		<title>Kevlin at 15:54, 31 October 2008</title>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=Inter-Process_Communication_Affects_Application_Response_Time&amp;diff=12874&amp;oldid=prev"/>
				<updated>2008-10-31T15:54:41Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 15:54, 31 October 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;By [[Randy Stafford]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;By [[Randy Stafford]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;This work is licensed under a Creative Commons Attribution 3&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;This work is licensed under a &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[http://creativecommons.org/licenses/by/3.0/us/ &lt;/ins&gt;Creative Commons Attribution 3&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;] &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Back to [[97 Things Every Programmer Should Know]] home page&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikicontent:diff:version:1.11a:oldid:12730:newid:12874 --&gt;
&lt;/table&gt;</summary>
		<author><name>Kevlin</name></author>	</entry>

	<entry>
		<id>http://commons.oreilly.com/wiki/index.php?title=Inter-Process_Communication_Affects_Application_Response_Time&amp;diff=12730&amp;oldid=prev</id>
		<title>Kevlin at 05:56, 20 October 2008</title>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=Inter-Process_Communication_Affects_Application_Response_Time&amp;diff=12730&amp;oldid=prev"/>
				<updated>2008-10-20T05:56:51Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 05:56, 20 October 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;When performance is a problem, my experience has been that improvements in data structures and algorithms aren't the right place to look. In modern applications, response time depends most strongly on the number of inter-process communications (IPCs) needed to process some stimulus. While there can be other local bottlenecks, the number of inter-process communications usually dominates. Each inter-process communication contributes some non-negligible latency to the overall response time, and these individual contributions add up, especially when they are incurred sequentially.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;When performance is a problem, my experience has been that improvements in data structures and algorithms aren't the right place to look. In modern applications, response time depends most strongly on the number of inter-process communications (IPCs) needed to process some stimulus. While there can be other local bottlenecks, the number of inter-process communications usually dominates. Each inter-process communication contributes some non-negligible latency to the overall response time, and these individual contributions add up, especially when they are incurred sequentially.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;A prime example is &amp;quot;ripple loading&amp;quot; in an application using object-relational mapping. Ripple loading refers to the sequential execution of many database calls to select the data needed for building a graph of objects (see Lazy Load in Martin Fowler's ''Patterns of Enterprise Application Architecture''). When the database client is a middle-tier application server rendering a web page, these database calls are usually executed sequentially in a single thread, and their individual latencies contribute to the overall response time. Even if each database call takes only 10ms, a page requiring 1000 calls (which is not uncommon) will exhibit at least a 10-second response time. Other examples include web service invocation, HTTP requests from a web browser, distributed object invocation, request-reply messaging, and data grid interaction over custom network protocols. The more IPCs are needed to respond to a stimulus, the greater the response time will be.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;A prime example is &amp;quot;ripple loading&amp;quot; in an application using object-relational mapping. Ripple loading refers to the sequential execution of many database calls to select the data needed for building a graph of objects (see &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[http://martinfowler.com/eaaCatalog/lazyLoad.html &lt;/ins&gt;Lazy Load&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;] &lt;/ins&gt;in Martin Fowler's ''Patterns of Enterprise Application Architecture''). When the database client is a middle-tier application server rendering a web page, these database calls are usually executed sequentially in a single thread, and their individual latencies contribute to the overall response time. Even if each database call takes only 10ms, a page requiring 1000 calls (which is not uncommon) will exhibit at least a 10-second response time. Other examples include web service invocation, HTTP requests from a web browser, distributed object invocation, request-reply messaging, and data grid interaction over custom network protocols. The more IPCs are needed to respond to a stimulus, the greater the response time will be.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The strategies for reducing the ratio of inter-process communications per stimulus are relatively few, and relatively obvious or well known. One is to apply the principle of parsimony, by optimizing the interface between processes so that exactly the right data for the purpose at hand is exchanged with the minimum amount of interaction. Another is to parallelize the inter-process communications where possible, so that the overall response time becomes driven mainly by the longest-latency IPC. And a third is to cache the results of previous IPCs, so that future IPCs may be avoided by hitting local cache instead.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The strategies for reducing the ratio of inter-process communications per stimulus are relatively few, and relatively obvious or well known. One is to apply the principle of parsimony, by optimizing the interface between processes so that exactly the right data for the purpose at hand is exchanged with the minimum amount of interaction. Another is to parallelize the inter-process communications where possible, so that the overall response time becomes driven mainly by the longest-latency IPC. And a third is to cache the results of previous IPCs, so that future IPCs may be avoided by hitting local cache instead.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikicontent:diff:version:1.11a:oldid:12729:newid:12730 --&gt;
&lt;/table&gt;</summary>
		<author><name>Kevlin</name></author>	</entry>

	<entry>
		<id>http://commons.oreilly.com/wiki/index.php?title=Inter-Process_Communication_Affects_Application_Response_Time&amp;diff=12729&amp;oldid=prev</id>
		<title>Kevlin at 05:47, 20 October 2008</title>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=Inter-Process_Communication_Affects_Application_Response_Time&amp;diff=12729&amp;oldid=prev"/>
				<updated>2008-10-20T05:47:20Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 05:47, 20 October 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;When performance is a problem, my experience has been that improvements in data structures and algorithms aren't the right place to look. In modern applications, response time depends most strongly on the number of inter-process communications (IPCs) needed to process some stimulus. While there can be other local bottlenecks, the number of inter-process communications usually dominates. Each inter-process communication contributes some non-negligible latency to the overall response time, and these individual contributions add up, especially when they are incurred sequentially.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;When performance is a problem, my experience has been that improvements in data structures and algorithms aren't the right place to look. In modern applications, response time depends most strongly on the number of inter-process communications (IPCs) needed to process some stimulus. While there can be other local bottlenecks, the number of inter-process communications usually dominates. Each inter-process communication contributes some non-negligible latency to the overall response time, and these individual contributions add up, especially when they are incurred sequentially.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;A prime example is &amp;quot;ripple loading&amp;quot; &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[Fowler PoEAA p.202] &lt;/del&gt;in an application using object-relational mapping. Ripple loading refers to the sequential execution of many database calls to select the data needed for building a graph of objects. When the database client is a middle-tier application server rendering a web page, these database calls are usually executed sequentially in a single thread, and their individual latencies contribute to the overall response time. Even if each database call takes only 10ms, a page requiring 1000 calls (which is not uncommon) will exhibit at least a 10-second response time. Other examples include web service invocation, HTTP requests from a web browser, distributed object invocation, request-reply messaging, and data grid interaction over custom network protocols. The more IPCs are needed to respond to a stimulus, the greater the response time will be.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;A prime example is &amp;quot;ripple loading&amp;quot; in an application using object-relational mapping. Ripple loading refers to the sequential execution of many database calls to select the data needed for building a graph of objects &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;(see Lazy Load in Martin Fowler's ''Patterns of Enterprise Application Architecture'')&lt;/ins&gt;. When the database client is a middle-tier application server rendering a web page, these database calls are usually executed sequentially in a single thread, and their individual latencies contribute to the overall response time. Even if each database call takes only 10ms, a page requiring 1000 calls (which is not uncommon) will exhibit at least a 10-second response time. Other examples include web service invocation, HTTP requests from a web browser, distributed object invocation, request-reply messaging, and data grid interaction over custom network protocols. The more IPCs are needed to respond to a stimulus, the greater the response time will be.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The strategies for reducing the ratio of inter-process communications per stimulus are relatively few, and relatively obvious or well known. One is to apply the principle of parsimony, by optimizing the interface between processes so that exactly the right data for the purpose at hand is exchanged with the minimum amount of interaction. Another is to parallelize the inter-process communications where possible, so that the overall response time becomes driven mainly by the longest-latency IPC. And a third is to cache the results of previous IPCs, so that future IPCs may be avoided by hitting local cache instead.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The strategies for reducing the ratio of inter-process communications per stimulus are relatively few, and relatively obvious or well known. One is to apply the principle of parsimony, by optimizing the interface between processes so that exactly the right data for the purpose at hand is exchanged with the minimum amount of interaction. Another is to parallelize the inter-process communications where possible, so that the overall response time becomes driven mainly by the longest-latency IPC. And a third is to cache the results of previous IPCs, so that future IPCs may be avoided by hitting local cache instead.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikicontent:diff:version:1.11a:oldid:12703:newid:12729 --&gt;
&lt;/table&gt;</summary>
		<author><name>Kevlin</name></author>	</entry>

	<entry>
		<id>http://commons.oreilly.com/wiki/index.php?title=Inter-Process_Communication_Affects_Application_Response_Time&amp;diff=12703&amp;oldid=prev</id>
		<title>Randy Stafford at 21:44, 16 October 2008</title>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=Inter-Process_Communication_Affects_Application_Response_Time&amp;diff=12703&amp;oldid=prev"/>
				<updated>2008-10-16T21:44:38Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 21:44, 16 October 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 9:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 9:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;When you're designing an application, be mindful of the ratio of inter-process communications per stimulus. When analyzing applications that suffer from poor performance, I have often found IPC-to-stimulus ratios of thousands-to-one. Reducing this ratio, whether by caching or parallelizing or some other technique, will pay off much more than implementing the best search algorithm.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;When you're designing an application, be mindful of the ratio of inter-process communications per stimulus. When analyzing applications that suffer from poor performance, I have often found IPC-to-stimulus ratios of thousands-to-one. Reducing this ratio, whether by caching or parallelizing or some other technique, will pay off much more than implementing the best search algorithm.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;By Randy Stafford&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;By &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[[&lt;/ins&gt;Randy Stafford&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;This work is licensed under a Creative Commons Attribution 3&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;This work is licensed under a Creative Commons Attribution 3&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikicontent:diff:version:1.11a:oldid:12257:newid:12703 --&gt;
&lt;/table&gt;</summary>
		<author><name>Randy Stafford</name></author>	</entry>

	<entry>
		<id>http://commons.oreilly.com/wiki/index.php?title=Inter-Process_Communication_Affects_Application_Response_Time&amp;diff=12257&amp;oldid=prev</id>
		<title>Rmonson: New page: Response time is critical to software usability. Few things are as frustrating as waiting for some software system to respond, especially when our interaction with the software involves re...</title>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=Inter-Process_Communication_Affects_Application_Response_Time&amp;diff=12257&amp;oldid=prev"/>
				<updated>2008-08-21T12:53:48Z</updated>
		
		<summary type="html">&lt;p&gt;New page: Response time is critical to software usability. Few things are as frustrating as waiting for some software system to respond, especially when our interaction with the software involves re...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Response time is critical to software usability. Few things are as frustrating as waiting for some software system to respond, especially when our interaction with the software involves repeated cycles of stimulus and response. We feel as if the software is wasting our time and affecting our productivity. However the causes of poor response time are less appreciated, especially in modern applications. Application Performance Management literature still discusses data structures and sorting algorithms, issues that were important decades ago, but that are no longer dominant in the era of multi-core, multi-GHz processors.&lt;br /&gt;
&lt;br /&gt;
When performance is a problem, my experience has been that improvements in data structures and algorithms aren't the right place to look. In modern applications, response time depends most strongly on the number of inter-process communications (IPCs) needed to process some stimulus. While there can be other local bottlenecks, the number of inter-process communications usually dominates. Each inter-process communication contributes some non-negligible latency to the overall response time, and these individual contributions add up, especially when they are incurred sequentially.&lt;br /&gt;
&lt;br /&gt;
A prime example is &amp;quot;ripple loading&amp;quot; [Fowler PoEAA p.202] in an application using object-relational mapping. Ripple loading refers to the sequential execution of many database calls to select the data needed for building a graph of objects. When the database client is a middle-tier application server rendering a web page, these database calls are usually executed sequentially in a single thread, and their individual latencies contribute to the overall response time. Even if each database call takes only 10ms, a page requiring 1000 calls (which is not uncommon) will exhibit at least a 10-second response time. Other examples include web service invocation, HTTP requests from a web browser, distributed object invocation, request-reply messaging, and data grid interaction over custom network protocols. The more IPCs are needed to respond to a stimulus, the greater the response time will be.&lt;br /&gt;
&lt;br /&gt;
The strategies for reducing the ratio of inter-process communications per stimulus are relatively few, and relatively obvious or well known. One is to apply the principle of parsimony, by optimizing the interface between processes so that exactly the right data for the purpose at hand is exchanged with the minimum amount of interaction. Another is to parallelize the inter-process communications where possible, so that the overall response time becomes driven mainly by the longest-latency IPC. And a third is to cache the results of previous IPCs, so that future IPCs may be avoided by hitting local cache instead.&lt;br /&gt;
&lt;br /&gt;
When you're designing an application, be mindful of the ratio of inter-process communications per stimulus. When analyzing applications that suffer from poor performance, I have often found IPC-to-stimulus ratios of thousands-to-one. Reducing this ratio, whether by caching or parallelizing or some other technique, will pay off much more than implementing the best search algorithm.&lt;br /&gt;
&lt;br /&gt;
By Randy Stafford&lt;br /&gt;
&lt;br /&gt;
This work is licensed under a Creative Commons Attribution 3&lt;/div&gt;</summary>
		<author><name>Rmonson</name></author>	</entry>

	</feed>