<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MarkJ.net &#38; Focused Apps&#187; Performance</title>
	<atom:link href="http://www.markj.net/category/performance/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.markj.net</link>
	<description>iOS Apps and Games</description>
	<lastBuildDate>Fri, 03 Feb 2012 22:44:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Xcode on a 2010 Macbook Pro High Res with SSD</title>
		<link>http://www.markj.net/macbook-owc-mercury-ssd-xcode/</link>
		<comments>http://www.markj.net/macbook-owc-mercury-ssd-xcode/#comments</comments>
		<pubDate>Sun, 20 Jun 2010 19:08:33 +0000</pubDate>
		<dc:creator>markj</dc:creator>
				<category><![CDATA[iOS Programming]]></category>
		<category><![CDATA[iPhone Other]]></category>
		<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://www.markj.net/?p=686</guid>
		<description><![CDATA[<p>I just bought a new <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;location=http%3A%2F%2Fwww.amazon.com%2Fs%3Fie%3DUTF8%26redirect%3Dtrue%26ref_%3Dsr%5Fkk%5F3%26keywords%3Dmacbook%2520pro%252015%26qid%3D1277069196%26rh%3Di%253Aelectronics%252Ck%253Amacbook%2520pro%252015&amp;tag=markjnet-20&amp;linkCode=ur2&amp;camp=1789&amp;creative=390957">2010 15&#8243; Macbook Pro</a><img style="border: none !important; margin: 0px !important;" src="https://www.assoc-amazon.com/e/ir?t=markjnet-20&amp;l=ur2&amp;o=1" border="0" alt="" width="1" height="1" /> and put in a solid state drive - <a href="http://eshop.macsales.com/shop/internal_storage/Mercury_Extreme_SSD_Sandforce">OWC Mercury Extreme Pro SSD</a> 240GB. It&#8217;s to replace my 2007 macbook used all the time for iPhone development with Xcode. I picked the hi-res antiglare screen (1680 x 1050). The OWC SSD is a new Sandforce based model<img style="border: none !important; margin: 0px !important;" src="https://www.assoc-amazon.com/e/ir?t=markjnet-20&amp;l=ur2&amp;o=1" border="0" alt="" width="1" height="1" /> that is <a href="http://macperformanceguide.com/SSD-RealWorld-SevereDuty.html">reported to not suffer from the precipitous drop in write performance</a> common to many SSDs on the market. (I also considered using a <a href="http://www.amazon.com/gp/product/B003NSBF32?ie=UTF8&amp;tag=markjnet-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B003NSBF32">Seagate Momentus hybrid drive</a><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.com/e/ir?t=markjnet-20&amp;l=as2&amp;o=1&amp;a=B003NSBF32" border="0" alt="" width="1" height="1" />.) Benefits of the new machine include:</p>
<ul>
<li>Faster CPUs and hyperthreading, so CPU bound Xcode builds gets to run 4 parallel compiles at the same time for a big speed boost.</li>
<li>The SSD has blazing random access times thus speeding up all general use of the machine, including the compile-deploy-test cycle with Xcode and the iPhone simulator.</li>
<li>More screen space makes it easier to work with Xcode and the iPhone &amp; iPad simulator on the road.</li>
<li>The machine can better keep up with demanding Instruments profiling.</li>
</ul>
<h2>Simple Benchmarks</h2>
<p>Here are some simple stopwatch based benchmarks comparing new and old machines. Its much snappier all round, and definitely speedier for development work.</p>
<table border="0" cellspacing="2" width="90%">
<tbody>
<tr>
<td width="50%"></td>
<td width="25%" align="center"><strong>2007 Macbook Pro 2.16GHz</strong></td>
<td colspan="2" align="center"><strong>2010 Macbook Pro 2.4GHz i5</strong></td>
</tr>
<tr>
<td></td>
<td align="center"><strong>7200rpm HD</strong></td>
<td width="14%" align="center"><strong>5400rpm HD</strong></td>
<td width="11%" align="center"><strong>SSD</strong></td>
</tr>
<tr>
<td>Boot, from power on to desktop first appearing</td>
<td align="center" valign="middle">30s</td>
<td align="center" valign="middle">40s</td>
<td align="center" valign="middle">24s</td>
</tr>
<tr>
<td>Launch Xcode</td>
<td align="center" valign="middle">7s</td>
<td align="center" valign="middle">6s</td>
<td align="center" valign="middle">4.5s</td>
</tr>
<tr>
<td>Build complex iPhone project from clean</td>
<td align="center" valign="middle">86s</td>
<td align="center" valign="middle">48s</td>
<td align="center" valign="middle">45s</td>
</tr>
<tr>
<td>iPhone sim &amp; Xcode install &amp; debug app</td>
<td align="center" valign="middle">10s</td>
<td align="center" valign="middle">9s</td>
<td align="center" valign="middle">3s</td>
</tr>
<tr>
<td>Instruments open 30MB trace</td>
<td align="center" valign="middle">11s</td>
<td align="center" valign="middle"></td>
<td align="center" valign="middle">6s</td>
</tr>
<tr>
<td>Start Photoshop CS3 (1st time, 2nd time)</td>
<td align="center" valign="middle">15s / 5s</td>
<td align="center" valign="middle"></td>
<td align="center" valign="middle">5s / 4s</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<h2>High-res Display</h2>
<p>The high-res display gives more pixels within the same space, so GUI elements take up less space and fonts draw smaller. This means Xcode and the simulator fit on the high res display. For me they didn&#8217;t quite fit right on the normal display, so I always found myself re-arranging windows when working out of my office (where I have a 27&#8243; desktop display). You can see this in the two screen shots below, the first from the old macbook and below that the new high-res macbook. I boosted the font for code from Monaco-12 on old macbook (also great on my desktop display) to Monaco-14 to get the same sized text on the high res macbook display. I might settle on a 12 or 13 though because the new screen is much clearer than the old one. Fortunately Xcode makes it easy to change font sizes for code so switching between 12pt for desktop and 14pt when on the road shouldn&#8217;t be an annoyance.</p>
<p><img class="aligncenter size-full wp-image-691" title="Xcode on high res macbook pro" src="http://www.markj.net/wp/wp-content/uploads/2010/06/Xcode-res.jpg" alt="Xcode on high res macbook pro" width="504" height="600" /></p>
<h2>Open-GL on Simulator</h2>
<p>I was hoping that the faster CPUs would boost performance of the iPad simulator running OpenGL. OpenGL on the simulator has terrible performance, I guess this is because the simulator is doing all its graphics with CPU based emulation of the graphics hardware on the phones, or maybe it just doesn&#8217;t use real graphics hardware on the macbook. On the one hand thats fine for performance work because performance work of course has to be done on real devices. However for general game and graphics logic development it means that running the game on the simulator (especially in iPad mode) means that frame rates are really low, lower than a generation 1 iPhone. The new macbook didn&#8217;t really help much here, OpenGL on the simulator still pegs one CPU on the macbook, and frame rates really didn&#8217;t improve much.</p>
<h2>Xbench Tests</h2>
<table class="tableizer-table">
<tbody>
<tr class="tableizer-firstrow">
<th colspan="2" align="left"><strong>Result:</strong></th>
<th><strong>266.92</strong></th>
</tr>
<tr>
<td colspan="2">System Info</td>
<td></td>
</tr>
<tr>
<td></td>
<td>Xbench Version</td>
<td></td>
<td>1.3</td>
</tr>
<tr>
<td></td>
<td>System Version</td>
<td></td>
<td>10.6.4 (10F569)</td>
</tr>
<tr>
<td></td>
<td>Physical RAM</td>
<td></td>
<td>4096 MB</td>
</tr>
<tr>
<td></td>
<td>Model</td>
<td></td>
<td>MacBookPro6,2</td>
</tr>
<tr>
<td></td>
<td>Drive Type</td>
<td></td>
<td>OWC Mercury Extreme Pro SSD</td>
</tr>
<tr>
<td colspan="2">CPU Test</td>
<td>189.95</td>
</tr>
<tr>
<td></td>
<td>GCD Loop</td>
<td>296.65</td>
<td>15.64 Mops/sec</td>
</tr>
<tr>
<td></td>
<td>Floating Point Basic</td>
<td>166.76</td>
<td>3.96 Gflop/sec</td>
</tr>
<tr>
<td></td>
<td>vecLib FFT</td>
<td>109.83</td>
<td>3.62 Gflop/sec</td>
</tr>
<tr>
<td></td>
<td>Floating Point Library</td>
<td>386.71</td>
<td>67.34 Mops/sec</td>
</tr>
<tr>
<td colspan="2">Thread Test</td>
<td>465.08</td>
</tr>
<tr>
<td></td>
<td>Computation</td>
<td>483.74</td>
<td>9.80 Mops/sec, 4 threads</td>
</tr>
<tr>
<td></td>
<td>Lock Contention</td>
<td>447.80</td>
<td>19.26 Mlocks/sec, 4 threads</td>
</tr>
<tr>
<td colspan="2">Memory Test</td>
<td>300.03</td>
</tr>
<tr>
<td></td>
<td>System</td>
<td>320.11</td>
<td></td>
</tr>
<tr>
<td></td>
<td>Allocate</td>
<td>469.76</td>
<td>1.73 Malloc/sec</td>
</tr>
<tr>
<td></td>
<td>Fill</td>
<td>214.25</td>
<td>10417.48 MB/sec</td>
</tr>
<tr>
<td></td>
<td>Copy</td>
<td>388.24</td>
<td>8018.86 MB/sec</td>
</tr>
<tr>
<td></td>
<td>Stream</td>
<td>282.32</td>
<td></td>
</tr>
<tr>
<td></td>
<td>Copy</td>
<td>281.48</td>
<td>5813.81 MB/sec</td>
</tr>
<tr>
<td></td>
<td>Scale</td>
<td>278.43</td>
<td>5752.27 MB/sec</td>
</tr>
<tr>
<td></td>
<td>Add</td>
<td>287.15</td>
<td>6116.93 MB/sec</td>
</tr>
<tr>
<td></td>
<td>Triad</td>
<td>282.38</td>
<td>6040.76 MB/sec</td>
</tr>
<tr>
<td colspan="2">Quartz Graphics Test</td>
<td>243.53</td>
</tr>
<tr>
<td></td>
<td>Line</td>
<td>191.89</td>
<td>12.78 Klines/sec [50% alpha]</td>
</tr>
<tr>
<td></td>
<td>Rectangle</td>
<td>244.42</td>
<td>72.97 Krects/sec [50% alpha]</td>
</tr>
<tr>
<td></td>
<td>Circle</td>
<td>216.59</td>
<td>17.65 Kcircles/sec [50% alpha]</td>
</tr>
<tr>
<td></td>
<td>Bezier</td>
<td>207.61</td>
<td>5.24 Kbeziers/sec [50% alpha]</td>
</tr>
<tr>
<td></td>
<td>Text</td>
<td>557.04</td>
<td>34.85 Kchars/sec</td>
</tr>
<tr>
<td colspan="2">OpenGL Graphics Test</td>
<td>192.35</td>
</tr>
<tr>
<td></td>
<td>Spinning Squares</td>
<td>192.35</td>
<td>244.01 frames/sec</td>
</tr>
<tr>
<td colspan="2">User Interface Test</td>
<td>326.40</td>
</tr>
<tr>
<td></td>
<td>Elements</td>
<td>326.40</td>
<td>1.50 Krefresh/sec</td>
</tr>
<tr>
<td colspan="2">Disk Test</td>
<td>321.71</td>
</tr>
<tr>
<td></td>
<td>Sequential</td>
<td>192.97</td>
<td></td>
</tr>
<tr>
<td></td>
<td>Uncached Write</td>
<td>282.94</td>
<td>173.72 MB/sec [4K blocks]</td>
</tr>
<tr>
<td></td>
<td>Uncached Write</td>
<td>278.32</td>
<td>157.47 MB/sec [256K blocks]</td>
</tr>
<tr>
<td></td>
<td>Uncached Read</td>
<td>92.01</td>
<td>26.93 MB/sec [4K blocks]</td>
</tr>
<tr>
<td></td>
<td>Uncached Read</td>
<td>365.84</td>
<td>183.87 MB/sec [256K blocks]</td>
</tr>
<tr>
<td></td>
<td>Random</td>
<td>966.64</td>
<td></td>
</tr>
<tr>
<td></td>
<td>Uncached Write</td>
<td>1186.91</td>
<td>125.65 MB/sec [4K blocks]</td>
</tr>
<tr>
<td></td>
<td>Uncached Write</td>
<td>517.95</td>
<td>165.82 MB/sec [256K blocks]</td>
</tr>
<tr>
<td></td>
<td>Uncached Read</td>
<td>2940.24</td>
<td>20.84 MB/sec [4K blocks]</td>
</tr>
<tr>
<td></td>
<td>Uncached Read</td>
<td>975.84</td>
<td>181.07 MB/sec [256K blocks]</td>
</tr>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<div style="display:block"><small><em>by Markj <a href="http://www.markj.net/macbook-owc-mercury-ssd-xcode/#comments">Leave A Comment</a><br />&copy;2012 <a href="http://www.markj.net">MarkJ.net &amp; Focused Apps</a>. All Rights Reserved.</em></small></div>]]></description>
			<content:encoded><![CDATA[<p>I just bought a new <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;location=http%3A%2F%2Fwww.amazon.com%2Fs%3Fie%3DUTF8%26redirect%3Dtrue%26ref_%3Dsr%5Fkk%5F3%26keywords%3Dmacbook%2520pro%252015%26qid%3D1277069196%26rh%3Di%253Aelectronics%252Ck%253Amacbook%2520pro%252015&amp;tag=markjnet-20&amp;linkCode=ur2&amp;camp=1789&amp;creative=390957">2010 15&#8243; Macbook Pro</a><img style="border: none !important; margin: 0px !important;" src="https://www.assoc-amazon.com/e/ir?t=markjnet-20&amp;l=ur2&amp;o=1" border="0" alt="" width="1" height="1" /> and put in a solid state drive - <a href="http://eshop.macsales.com/shop/internal_storage/Mercury_Extreme_SSD_Sandforce">OWC Mercury Extreme Pro SSD</a> 240GB. It&#8217;s to replace my 2007 macbook used all the time for iPhone development with Xcode. I picked the hi-res antiglare screen (1680 x 1050). The OWC SSD is a new Sandforce based model<img style="border: none !important; margin: 0px !important;" src="https://www.assoc-amazon.com/e/ir?t=markjnet-20&amp;l=ur2&amp;o=1" border="0" alt="" width="1" height="1" /> that is <a href="http://macperformanceguide.com/SSD-RealWorld-SevereDuty.html">reported to not suffer from the precipitous drop in write performance</a> common to many SSDs on the market. (I also considered using a <a href="http://www.amazon.com/gp/product/B003NSBF32?ie=UTF8&amp;tag=markjnet-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B003NSBF32">Seagate Momentus hybrid drive</a><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.com/e/ir?t=markjnet-20&amp;l=as2&amp;o=1&amp;a=B003NSBF32" border="0" alt="" width="1" height="1" />.) Benefits of the new machine include:</p>
<ul>
<li>Faster CPUs and hyperthreading, so CPU bound Xcode builds gets to run 4 parallel compiles at the same time for a big speed boost.</li>
<li>The SSD has blazing random access times thus speeding up all general use of the machine, including the compile-deploy-test cycle with Xcode and the iPhone simulator.</li>
<li>More screen space makes it easier to work with Xcode and the iPhone &amp; iPad simulator on the road.</li>
<li>The machine can better keep up with demanding Instruments profiling.</li>
</ul>
<h2>Simple Benchmarks</h2>
<p>Here are some simple stopwatch based benchmarks comparing new and old machines. Its much snappier all round, and definitely speedier for development work.</p>
<table border="0" cellspacing="2" width="90%">
<tbody>
<tr>
<td width="50%"></td>
<td width="25%" align="center"><strong>2007 Macbook Pro 2.16GHz</strong></td>
<td colspan="2" align="center"><strong>2010 Macbook Pro 2.4GHz i5</strong></td>
</tr>
<tr>
<td></td>
<td align="center"><strong>7200rpm HD</strong></td>
<td width="14%" align="center"><strong>5400rpm HD</strong></td>
<td width="11%" align="center"><strong>SSD</strong></td>
</tr>
<tr>
<td>Boot, from power on to desktop first appearing</td>
<td align="center" valign="middle">30s</td>
<td align="center" valign="middle">40s</td>
<td align="center" valign="middle">24s</td>
</tr>
<tr>
<td>Launch Xcode</td>
<td align="center" valign="middle">7s</td>
<td align="center" valign="middle">6s</td>
<td align="center" valign="middle">4.5s</td>
</tr>
<tr>
<td>Build complex iPhone project from clean</td>
<td align="center" valign="middle">86s</td>
<td align="center" valign="middle">48s</td>
<td align="center" valign="middle">45s</td>
</tr>
<tr>
<td>iPhone sim &amp; Xcode install &amp; debug app</td>
<td align="center" valign="middle">10s</td>
<td align="center" valign="middle">9s</td>
<td align="center" valign="middle">3s</td>
</tr>
<tr>
<td>Instruments open 30MB trace</td>
<td align="center" valign="middle">11s</td>
<td align="center" valign="middle"></td>
<td align="center" valign="middle">6s</td>
</tr>
<tr>
<td>Start Photoshop CS3 (1st time, 2nd time)</td>
<td align="center" valign="middle">15s / 5s</td>
<td align="center" valign="middle"></td>
<td align="center" valign="middle">5s / 4s</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<h2>High-res Display</h2>
<p>The high-res display gives more pixels within the same space, so GUI elements take up less space and fonts draw smaller. This means Xcode and the simulator fit on the high res display. For me they didn&#8217;t quite fit right on the normal display, so I always found myself re-arranging windows when working out of my office (where I have a 27&#8243; desktop display). You can see this in the two screen shots below, the first from the old macbook and below that the new high-res macbook. I boosted the font for code from Monaco-12 on old macbook (also great on my desktop display) to Monaco-14 to get the same sized text on the high res macbook display. I might settle on a 12 or 13 though because the new screen is much clearer than the old one. Fortunately Xcode makes it easy to change font sizes for code so switching between 12pt for desktop and 14pt when on the road shouldn&#8217;t be an annoyance.</p>
<p><img class="aligncenter size-full wp-image-691" title="Xcode on high res macbook pro" src="http://www.markj.net/wp/wp-content/uploads/2010/06/Xcode-res.jpg" alt="Xcode on high res macbook pro" width="504" height="600" /></p>
<h2>Open-GL on Simulator</h2>
<p>I was hoping that the faster CPUs would boost performance of the iPad simulator running OpenGL. OpenGL on the simulator has terrible performance, I guess this is because the simulator is doing all its graphics with CPU based emulation of the graphics hardware on the phones, or maybe it just doesn&#8217;t use real graphics hardware on the macbook. On the one hand thats fine for performance work because performance work of course has to be done on real devices. However for general game and graphics logic development it means that running the game on the simulator (especially in iPad mode) means that frame rates are really low, lower than a generation 1 iPhone. The new macbook didn&#8217;t really help much here, OpenGL on the simulator still pegs one CPU on the macbook, and frame rates really didn&#8217;t improve much.</p>
<h2>Xbench Tests</h2>
<table class="tableizer-table">
<tbody>
<tr class="tableizer-firstrow">
<th colspan="2" align="left"><strong>Result:</strong></th>
<th><strong>266.92</strong></th>
</tr>
<tr>
<td colspan="2">System Info</td>
<td></td>
</tr>
<tr>
<td></td>
<td>Xbench Version</td>
<td></td>
<td>1.3</td>
</tr>
<tr>
<td></td>
<td>System Version</td>
<td></td>
<td>10.6.4 (10F569)</td>
</tr>
<tr>
<td></td>
<td>Physical RAM</td>
<td></td>
<td>4096 MB</td>
</tr>
<tr>
<td></td>
<td>Model</td>
<td></td>
<td>MacBookPro6,2</td>
</tr>
<tr>
<td></td>
<td>Drive Type</td>
<td></td>
<td>OWC Mercury Extreme Pro SSD</td>
</tr>
<tr>
<td colspan="2">CPU Test</td>
<td>189.95</td>
</tr>
<tr>
<td></td>
<td>GCD Loop</td>
<td>296.65</td>
<td>15.64 Mops/sec</td>
</tr>
<tr>
<td></td>
<td>Floating Point Basic</td>
<td>166.76</td>
<td>3.96 Gflop/sec</td>
</tr>
<tr>
<td></td>
<td>vecLib FFT</td>
<td>109.83</td>
<td>3.62 Gflop/sec</td>
</tr>
<tr>
<td></td>
<td>Floating Point Library</td>
<td>386.71</td>
<td>67.34 Mops/sec</td>
</tr>
<tr>
<td colspan="2">Thread Test</td>
<td>465.08</td>
</tr>
<tr>
<td></td>
<td>Computation</td>
<td>483.74</td>
<td>9.80 Mops/sec, 4 threads</td>
</tr>
<tr>
<td></td>
<td>Lock Contention</td>
<td>447.80</td>
<td>19.26 Mlocks/sec, 4 threads</td>
</tr>
<tr>
<td colspan="2">Memory Test</td>
<td>300.03</td>
</tr>
<tr>
<td></td>
<td>System</td>
<td>320.11</td>
<td></td>
</tr>
<tr>
<td></td>
<td>Allocate</td>
<td>469.76</td>
<td>1.73 Malloc/sec</td>
</tr>
<tr>
<td></td>
<td>Fill</td>
<td>214.25</td>
<td>10417.48 MB/sec</td>
</tr>
<tr>
<td></td>
<td>Copy</td>
<td>388.24</td>
<td>8018.86 MB/sec</td>
</tr>
<tr>
<td></td>
<td>Stream</td>
<td>282.32</td>
<td></td>
</tr>
<tr>
<td></td>
<td>Copy</td>
<td>281.48</td>
<td>5813.81 MB/sec</td>
</tr>
<tr>
<td></td>
<td>Scale</td>
<td>278.43</td>
<td>5752.27 MB/sec</td>
</tr>
<tr>
<td></td>
<td>Add</td>
<td>287.15</td>
<td>6116.93 MB/sec</td>
</tr>
<tr>
<td></td>
<td>Triad</td>
<td>282.38</td>
<td>6040.76 MB/sec</td>
</tr>
<tr>
<td colspan="2">Quartz Graphics Test</td>
<td>243.53</td>
</tr>
<tr>
<td></td>
<td>Line</td>
<td>191.89</td>
<td>12.78 Klines/sec [50% alpha]</td>
</tr>
<tr>
<td></td>
<td>Rectangle</td>
<td>244.42</td>
<td>72.97 Krects/sec [50% alpha]</td>
</tr>
<tr>
<td></td>
<td>Circle</td>
<td>216.59</td>
<td>17.65 Kcircles/sec [50% alpha]</td>
</tr>
<tr>
<td></td>
<td>Bezier</td>
<td>207.61</td>
<td>5.24 Kbeziers/sec [50% alpha]</td>
</tr>
<tr>
<td></td>
<td>Text</td>
<td>557.04</td>
<td>34.85 Kchars/sec</td>
</tr>
<tr>
<td colspan="2">OpenGL Graphics Test</td>
<td>192.35</td>
</tr>
<tr>
<td></td>
<td>Spinning Squares</td>
<td>192.35</td>
<td>244.01 frames/sec</td>
</tr>
<tr>
<td colspan="2">User Interface Test</td>
<td>326.40</td>
</tr>
<tr>
<td></td>
<td>Elements</td>
<td>326.40</td>
<td>1.50 Krefresh/sec</td>
</tr>
<tr>
<td colspan="2">Disk Test</td>
<td>321.71</td>
</tr>
<tr>
<td></td>
<td>Sequential</td>
<td>192.97</td>
<td></td>
</tr>
<tr>
<td></td>
<td>Uncached Write</td>
<td>282.94</td>
<td>173.72 MB/sec [4K blocks]</td>
</tr>
<tr>
<td></td>
<td>Uncached Write</td>
<td>278.32</td>
<td>157.47 MB/sec [256K blocks]</td>
</tr>
<tr>
<td></td>
<td>Uncached Read</td>
<td>92.01</td>
<td>26.93 MB/sec [4K blocks]</td>
</tr>
<tr>
<td></td>
<td>Uncached Read</td>
<td>365.84</td>
<td>183.87 MB/sec [256K blocks]</td>
</tr>
<tr>
<td></td>
<td>Random</td>
<td>966.64</td>
<td></td>
</tr>
<tr>
<td></td>
<td>Uncached Write</td>
<td>1186.91</td>
<td>125.65 MB/sec [4K blocks]</td>
</tr>
<tr>
<td></td>
<td>Uncached Write</td>
<td>517.95</td>
<td>165.82 MB/sec [256K blocks]</td>
</tr>
<tr>
<td></td>
<td>Uncached Read</td>
<td>2940.24</td>
<td>20.84 MB/sec [4K blocks]</td>
</tr>
<tr>
<td></td>
<td>Uncached Read</td>
<td>975.84</td>
<td>181.07 MB/sec [256K blocks]</td>
</tr>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.markj.net/macbook-owc-mercury-ssd-xcode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bottlenecks &#8211; disk, cpu, synchronization, etc</title>
		<link>http://www.markj.net/bottlenecks-disk-cpu-synchronization-etc/</link>
		<comments>http://www.markj.net/bottlenecks-disk-cpu-synchronization-etc/#comments</comments>
		<pubDate>Sun, 27 Apr 2008 04:48:51 +0000</pubDate>
		<dc:creator>markj</dc:creator>
				<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://www.markj.net/whats-the-bottleneck-disk-cpu-synchronization-etc/</guid>
		<description><![CDATA[<p>Bottlenecks are the parts of the system that limit performance. The system is made up of multiple parts that can run in parallel, for example the disk can be doing disk IO at the same time as the CPU is running some code, but when the system is at its maximum throughput then one of those parts is running at 100% of it&#8217;s maximum capacity, and that part is the bottleneck, everything else is running at less then 100% because its spending some time waiting for the bottleneck. Here&#8217;s a list of possible bottlenecks, ordered roughly in order of how likely they are to be the bottleneck in a typical business application:</p>
<ol>
<li>disk IO</li>
<li>CPU</li>
<li>synchronization of a shared software resource</li>
<li>an external system your software interacts with</li>
<li>network IO</li>
<li>virtual memory</li>
<li>main memory / RAM</li>
<li>some of the users of the system</li>
</ol>
<p>
Usually the bottleneck dominates the use of time in the system, and hence usually performance can only be significantly improved by addressing the bottleneck (this is the down to earth meaning of <a href="http://en.wikipedia.org/wiki/Amdahl's_law">Amdahl&#8217;s Law</a>). So it&#8217;s key to find the bottleneck if you want to improve performance. This is the reason for <a href="http://www.markj.net/markjs-rules-of-good-software-performance/">performance rule 1</a>: measure first optimize second. By measuring where the time is being spent you can find the bottleneck and optimize that, rather than waste time optimizing something that isn&#8217;t the bottleneck.</p>
<p>To improve performance you can either make the bottlenecked part itself go faster, or you can use the bottlenecked part more efficiently by getting the system to do more useful work for the same load on the bottleneck. For example if disk IO is the bottleneck, you can either get faster disks or you can change your code to use disk IO more efficiently. If hardware is the bottleneck then rarely will changing the hardware lead to very big performance increases, and often times changing the hardware simply isn&#8217;t possible. But the good news is that the very large performance increases usually come from changing code to use the hardware more efficiently, because the performance problems in most systems are due to violations of the <a href="http://www.markj.net/markjs-rules-of-good-software-performance/">performance rules</a>, not hardware that is too slow.</p>
<div style="display:block"><small><em>by Markj <a href="http://www.markj.net/bottlenecks-disk-cpu-synchronization-etc/#comments">Leave A Comment</a><br />&copy;2012 <a href="http://www.markj.net">MarkJ.net &amp; Focused Apps</a>. All Rights Reserved.</em></small></div>]]></description>
			<content:encoded><![CDATA[<p>Bottlenecks are the parts of the system that limit performance. The system is made up of multiple parts that can run in parallel, for example the disk can be doing disk IO at the same time as the CPU is running some code, but when the system is at its maximum throughput then one of those parts is running at 100% of it&#8217;s maximum capacity, and that part is the bottleneck, everything else is running at less then 100% because its spending some time waiting for the bottleneck. Here&#8217;s a list of possible bottlenecks, ordered roughly in order of how likely they are to be the bottleneck in a typical business application:</p>
<ol>
<li>disk IO</li>
<li>CPU</li>
<li>synchronization of a shared software resource</li>
<li>an external system your software interacts with</li>
<li>network IO</li>
<li>virtual memory</li>
<li>main memory / RAM</li>
<li>some of the users of the system</li>
</ol>
<p>
Usually the bottleneck dominates the use of time in the system, and hence usually performance can only be significantly improved by addressing the bottleneck (this is the down to earth meaning of <a href="http://en.wikipedia.org/wiki/Amdahl's_law">Amdahl&#8217;s Law</a>). So it&#8217;s key to find the bottleneck if you want to improve performance. This is the reason for <a href="http://www.markj.net/markjs-rules-of-good-software-performance/">performance rule 1</a>: measure first optimize second. By measuring where the time is being spent you can find the bottleneck and optimize that, rather than waste time optimizing something that isn&#8217;t the bottleneck.</p>
<p>To improve performance you can either make the bottlenecked part itself go faster, or you can use the bottlenecked part more efficiently by getting the system to do more useful work for the same load on the bottleneck. For example if disk IO is the bottleneck, you can either get faster disks or you can change your code to use disk IO more efficiently. If hardware is the bottleneck then rarely will changing the hardware lead to very big performance increases, and often times changing the hardware simply isn&#8217;t possible. But the good news is that the very large performance increases usually come from changing code to use the hardware more efficiently, because the performance problems in most systems are due to violations of the <a href="http://www.markj.net/markjs-rules-of-good-software-performance/">performance rules</a>, not hardware that is too slow.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markj.net/bottlenecks-disk-cpu-synchronization-etc/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MarkJ&#8217;s Rules for Good Software Performance</title>
		<link>http://www.markj.net/markjs-rules-of-good-software-performance/</link>
		<comments>http://www.markj.net/markjs-rules-of-good-software-performance/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 06:21:16 +0000</pubDate>
		<dc:creator>markj</dc:creator>
				<category><![CDATA[Performance]]></category>
		<category><![CDATA[rule of thumb]]></category>
		<category><![CDATA[rules]]></category>

		<guid isPermaLink="false">http://www.markj.net/wp/markjs-rules-of-good-software-performance/</guid>
		<description><![CDATA[<p>To get good performance from your software applications your team needs to follow MarkJ&#8217;s Rules of Good Software Performance:</p>
<p><strong>1) Measure first and optimize second &#8211; find bottlenecks</strong> , ie don&#8217;t guess where a performance problem might be before you have one, find the slow part of the system through testing. In performance engineering it&#8217;s time you have to follow &#8211; find out <span style="font-style: italic;">where the time goes</span> and make that part faster. The slowest part of the system is it&#8217;s bottleneck, the part that maxes out first and limits performance of the entire system. Making another part of the system faster but leaving the bottleneck alone isn&#8217;t going to make much difference. Steve Sounders gives an excellent example of this in &#8216;High Performance Web Sites: Essential Knowledge for Front-End Engineers&#8217;, explaining how Yahoo optimized page response time. They found that 10% of the page load time came from Yahoo&#8217;s back end servers, and 90% came from page download and rendering time on the browser. To improve page load time there was little point trying to optimize the back end server code any more because it only accounted for 10% of the time, instead they spent their time finding ways to optimize page download and rendering time because that&#8217;s where 90% of the time was going.</p>
<p><strong>2) Use I/O efficiently &#8211; it&#8217;s much slower than code. <span style="font-weight: normal;">Inefficient use of I/O</span></strong> is the underlying cause for 50-75% of all performance problems in typical business software, web apps, and most software I&#8217;ve come across. The data the application uses is in some place that has to be accessed via disk I/O or network I/O. I/O to disk is really really slow. I/O to the network is quite slow, and even accessing data in RAM is slower than using data in the CPU and cache. Obviously you can&#8217;t just skip the I/O altogether, you have to access the data in an efficient way. This comes down to designing the software so that it gets a large amount of data with a small number of I/O calls, rather a large number of I/O calls each getting a small amount of data. The classic example, which is seen in software over and over again, is SQL select calls to the database inside a loop. Ie code inside a loop keeps doing another I/O to get another row from a table. This slow. The correct way to code this is to select all the data needed in one go, then step through a single large result set inside the loop.</p>
<p><strong>3) Use shared resources sparingly &#8211; or don&#8217;t share them. <span style="font-weight: normal;">Shared resources usually have to be protected against concurrent use by multiple threads by synchronization locks, but the synchronization makes threads wait to use the resource. Synchronization is the underlying cause for the</span></strong> other 25-50% of performance problems, and concurrency contention is at the heart of <a href="http://www.markj.net/scalability-and-other-meanings-of-performance/">scalability</a>. If software has high concurrency contention, aka poor concurrency, then many users requests, many threads, many CPUs, etc will all be waiting to get a lock on a shared resource before they can execute. All that waiting adds up to poor performance. Software that has low concurrency contention, aka good concurrency, allows lots of different things to be going on at once in parallel without all the tasks waiting for each other. Synchronization brings thread safety to shared data, but it also increases concurrency contention.</p>
<p><strong>4)</strong> <strong>Learn how you are <span style="font-style: italic;">supposed</span> to use APIs and third party components</strong>. It seems obvious, but this is the cause of many performance problems. When you use something in a way in that its original designers did not intend, then you often end up tripping on rules 2, 3, or both. (Where this something might be a third party API, a piece of code written by your colleague, or your database.) Programmers are very creative people. A programmers natural tendency when using an API is first to get a basic understanding what it does, and then to dream up no end of &#8216;clever&#8217; new ways to use it. Unfortunately if you don&#8217;t understand exactly how the insides of this component work then once you stray away from the intended uses you end up causing the component to use inefficient patterns of access to data and/or have poor concurrency. A classic example in business software that uses Oracle is using dynamic SQL instead of prepared statements. Oracle is designed so that frequently used queries can execute with good concurrency if they are issued using prepared statements. The part of Oracle that makes it have great performance with prepared statements means that if you instead perform every query as a brand new piece of SQL, then Oracle has high concurrency contention in the statement cache (rule 3) and performance is terrible.</p>
<p><strong>5) Use a realistic amount of test data and a realistic workload &#8211; don&#8217;t test against and empty database. <span style="font-weight: normal;">It&#8217;s a classic problem that occurs again and again. The code works fine on the developer&#8217;s PC where his database contains just a few hundred rows of test data, but when the system goes into production with millions of rows in the database performance is a disaster. P</span></strong>erformance engineering is just too hard to get right without good testing. There will always be something you overlooked or underestimated, or some place where you broke rules 2, 3, or 4 in your code that you need to uncover. But if you test with a practically empty database then you&#8217;ll fail to uncover these surprises because guess what &#8211; your application will go really fast when the database is empty. Further, what you really have to do is some basic capacity planning (rule 6) to forecast what the workload will be, how much data there will be in the database, and how many concurrent users you&#8217;ll have, and design a test that simulates all of that.</p>
<p><strong>6) Do performance engineering work throughout your project</strong>. Doing this means you can have visibility to potential performance problems as you go, while you have a chance to redesign the problem away. If you leave performance testing to the end of the project you&#8217;ll discover multiple cases of breaking rules 2, 3, and 4 that will require redesign, recoding, and retesting &#8211; which will take you over budget and you&#8217;ll miss your delivery date. If you are introducing a new technology, design, or algorithm its a good idea to do a technical prototype early on and performance test it. Also you need to start with some simple capacity planning: How many users? How much data? What performance characteristics do you need? What kind of hardware can you run it on? Without having a rough answer to these questions you won&#8217;t know if your performance is good enough or not. If you miss you&#8217;ll either have a system that is too slow or you&#8217;ll have wasted money building something that is faster than needed.</p>
<p><strong>7) Don&#8217;t optimize coding while coding.</strong> It&#8217;s a direct violation of rule 1, but I&#8217;m restating it as the last rule because programmers often forget this and waste their time trying to &#8216;optimize&#8217; the code they are writing as they go (me included). It&#8217;s a waste because there&#8217;s no point trying to optimize code until you know where the <a href="http://www.markj.net/bottlenecks-disk-cpu-synchronization-etc/">bottlenecks</a> are, and when programmers &#8216;optimize&#8217; code, we usually make that code harder to understand, harder to maintain, introduce additional bugs. This doesn&#8217;t mean you shouldn&#8217;t make good choices concerning performance as you go &#8211; you should pay attention to patterns of access to data and concurrency contention. However it&#8217;s almost never necessary to &#8216;optimize code&#8217;, code is nearly always fast enough.</p>
<div style="display:block"><small><em>by Markj <a href="http://www.markj.net/markjs-rules-of-good-software-performance/#comments">Leave A Comment</a><br />&copy;2012 <a href="http://www.markj.net">MarkJ.net &amp; Focused Apps</a>. All Rights Reserved.</em></small></div>]]></description>
			<content:encoded><![CDATA[<p>To get good performance from your software applications your team needs to follow MarkJ&#8217;s Rules of Good Software Performance:</p>
<p><strong>1) Measure first and optimize second &#8211; find bottlenecks</strong> , ie don&#8217;t guess where a performance problem might be before you have one, find the slow part of the system through testing. In performance engineering it&#8217;s time you have to follow &#8211; find out <span style="font-style: italic;">where the time goes</span> and make that part faster. The slowest part of the system is it&#8217;s bottleneck, the part that maxes out first and limits performance of the entire system. Making another part of the system faster but leaving the bottleneck alone isn&#8217;t going to make much difference. Steve Sounders gives an excellent example of this in &#8216;High Performance Web Sites: Essential Knowledge for Front-End Engineers&#8217;, explaining how Yahoo optimized page response time. They found that 10% of the page load time came from Yahoo&#8217;s back end servers, and 90% came from page download and rendering time on the browser. To improve page load time there was little point trying to optimize the back end server code any more because it only accounted for 10% of the time, instead they spent their time finding ways to optimize page download and rendering time because that&#8217;s where 90% of the time was going.</p>
<p><strong>2) Use I/O efficiently &#8211; it&#8217;s much slower than code. <span style="font-weight: normal;">Inefficient use of I/O</span></strong> is the underlying cause for 50-75% of all performance problems in typical business software, web apps, and most software I&#8217;ve come across. The data the application uses is in some place that has to be accessed via disk I/O or network I/O. I/O to disk is really really slow. I/O to the network is quite slow, and even accessing data in RAM is slower than using data in the CPU and cache. Obviously you can&#8217;t just skip the I/O altogether, you have to access the data in an efficient way. This comes down to designing the software so that it gets a large amount of data with a small number of I/O calls, rather a large number of I/O calls each getting a small amount of data. The classic example, which is seen in software over and over again, is SQL select calls to the database inside a loop. Ie code inside a loop keeps doing another I/O to get another row from a table. This slow. The correct way to code this is to select all the data needed in one go, then step through a single large result set inside the loop.</p>
<p><strong>3) Use shared resources sparingly &#8211; or don&#8217;t share them. <span style="font-weight: normal;">Shared resources usually have to be protected against concurrent use by multiple threads by synchronization locks, but the synchronization makes threads wait to use the resource. Synchronization is the underlying cause for the</span></strong> other 25-50% of performance problems, and concurrency contention is at the heart of <a href="http://www.markj.net/scalability-and-other-meanings-of-performance/">scalability</a>. If software has high concurrency contention, aka poor concurrency, then many users requests, many threads, many CPUs, etc will all be waiting to get a lock on a shared resource before they can execute. All that waiting adds up to poor performance. Software that has low concurrency contention, aka good concurrency, allows lots of different things to be going on at once in parallel without all the tasks waiting for each other. Synchronization brings thread safety to shared data, but it also increases concurrency contention.</p>
<p><strong>4)</strong> <strong>Learn how you are <span style="font-style: italic;">supposed</span> to use APIs and third party components</strong>. It seems obvious, but this is the cause of many performance problems. When you use something in a way in that its original designers did not intend, then you often end up tripping on rules 2, 3, or both. (Where this something might be a third party API, a piece of code written by your colleague, or your database.) Programmers are very creative people. A programmers natural tendency when using an API is first to get a basic understanding what it does, and then to dream up no end of &#8216;clever&#8217; new ways to use it. Unfortunately if you don&#8217;t understand exactly how the insides of this component work then once you stray away from the intended uses you end up causing the component to use inefficient patterns of access to data and/or have poor concurrency. A classic example in business software that uses Oracle is using dynamic SQL instead of prepared statements. Oracle is designed so that frequently used queries can execute with good concurrency if they are issued using prepared statements. The part of Oracle that makes it have great performance with prepared statements means that if you instead perform every query as a brand new piece of SQL, then Oracle has high concurrency contention in the statement cache (rule 3) and performance is terrible.</p>
<p><strong>5) Use a realistic amount of test data and a realistic workload &#8211; don&#8217;t test against and empty database. <span style="font-weight: normal;">It&#8217;s a classic problem that occurs again and again. The code works fine on the developer&#8217;s PC where his database contains just a few hundred rows of test data, but when the system goes into production with millions of rows in the database performance is a disaster. P</span></strong>erformance engineering is just too hard to get right without good testing. There will always be something you overlooked or underestimated, or some place where you broke rules 2, 3, or 4 in your code that you need to uncover. But if you test with a practically empty database then you&#8217;ll fail to uncover these surprises because guess what &#8211; your application will go really fast when the database is empty. Further, what you really have to do is some basic capacity planning (rule 6) to forecast what the workload will be, how much data there will be in the database, and how many concurrent users you&#8217;ll have, and design a test that simulates all of that.</p>
<p><strong>6) Do performance engineering work throughout your project</strong>. Doing this means you can have visibility to potential performance problems as you go, while you have a chance to redesign the problem away. If you leave performance testing to the end of the project you&#8217;ll discover multiple cases of breaking rules 2, 3, and 4 that will require redesign, recoding, and retesting &#8211; which will take you over budget and you&#8217;ll miss your delivery date. If you are introducing a new technology, design, or algorithm its a good idea to do a technical prototype early on and performance test it. Also you need to start with some simple capacity planning: How many users? How much data? What performance characteristics do you need? What kind of hardware can you run it on? Without having a rough answer to these questions you won&#8217;t know if your performance is good enough or not. If you miss you&#8217;ll either have a system that is too slow or you&#8217;ll have wasted money building something that is faster than needed.</p>
<p><strong>7) Don&#8217;t optimize coding while coding.</strong> It&#8217;s a direct violation of rule 1, but I&#8217;m restating it as the last rule because programmers often forget this and waste their time trying to &#8216;optimize&#8217; the code they are writing as they go (me included). It&#8217;s a waste because there&#8217;s no point trying to optimize code until you know where the <a href="http://www.markj.net/bottlenecks-disk-cpu-synchronization-etc/">bottlenecks</a> are, and when programmers &#8216;optimize&#8217; code, we usually make that code harder to understand, harder to maintain, introduce additional bugs. This doesn&#8217;t mean you shouldn&#8217;t make good choices concerning performance as you go &#8211; you should pay attention to patterns of access to data and concurrency contention. However it&#8217;s almost never necessary to &#8216;optimize code&#8217;, code is nearly always fast enough.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markj.net/markjs-rules-of-good-software-performance/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Scalability and Other Meanings of Performance</title>
		<link>http://www.markj.net/scalability-and-other-meanings-of-performance/</link>
		<comments>http://www.markj.net/scalability-and-other-meanings-of-performance/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 09:21:11 +0000</pubDate>
		<dc:creator>markj</dc:creator>
				<category><![CDATA[Performance]]></category>
		<category><![CDATA[scalability]]></category>
		<category><![CDATA[terminology]]></category>

		<guid isPermaLink="false">http://www.markj.net/wp/scalability-and-other-meanings-of-performance/</guid>
		<description><![CDATA[<p>In <a href="http://www.markj.net/wp/throughput-and-response-time/">Throughput and Response Time</a> I described the essence of what we mean by software performance, but there are some additional meanings that are important to consider in many cases. So here is a bigger list of what we mean when we talk about performance:</p>
<ul>
<li style="list-style: none"></li>
<li>Response Time</li>
<li>Throughput</li>
<li>Scalability</li>
<li>Stability</li>
<li>Resource Utilization, eg memory footprint</li>
<li>Overload or failure characteristics</li>
<li>Capacity planning</li>
</ul>
<p>
So lets take these one by one, starting with Scalability. <strong>Scalability</strong> is how well performance of the system can be improved by adding more hardware. Every software system has limitations to performance, and the underlying cause is often a limit to how fast part of the hardware can go. If the software has good scalability then you can add more of whatever is maxed out and get better performance. Often times we think about scalability simply as the ability to add more servers. For example, Google&#8217;s system is highly scalable, they have thousands of servers running all their apps, and as usage grows they just keep adding more servers to keep up with demand. They &#8216;scale up&#8217;. Scalability doesn&#8217;t have to be only about scaling across separate servers, we may want run some software on one individual server, but care if it is scalable as we add more CPUs or more disks. Relational databases are the classic example of this, its hard to run a cluster of database servers operating as one, so when we need better performance from a database its cheaper to upgrade to a more powerful server with more CPUs, RAM, and disks. Good scalability often comes with a small compromise in response time or throughput for one individual server. Ie, designing your software without caring about scalability might mean its performance is better then the same application designed with high scalability when both versions are running on just one server. But the scalable design can be scaled up to support more users, more work, or respond more quickly by adding more hardware, where the unscalable design will be stuck with the performance of a single server.<br />
<strong><br /></strong><strong><br /></strong><strong>Stability</strong> is concerned with how the software stands up to heavy use by lots of users doing lots of work for a long period of time. Stable software crashes rarely and has few errors, unstable software crashes a lot and has problems completing work correctly. Stability is tied up with other performance topics because many stability problems only show up when performance testing with lots of users, and a high load on the system, so whoever is doing performance testing work usually has to also work on the stability of the system.</p>
<p>
When looking at <strong>resource utilization</strong>, we care about how the software uses CPU, RAM, disk IO, disk space, and network capacity. All of these hardware resources are limited, and its desirable for our software to use these resources carefully. Under high load resource utilization will be higher than testing just one user with one use case, so just like stability, studying resource utilization is in the domain of performance testing.</p>
<p>Every software application has a limit to how fast it can go, how many users it can support, etc. When the system is overloaded by going beyond these limits then the software may fail by crashing, causing data loss, incorrectly completing work, dropping users, etc. These are the <strong>failure modes</strong> or <strong>overload characteristics</strong> of the application. The most desirable failure mode is that work backlogs and response time goes down, while throughput stays close to 100% of its max. The least desirable failure modes are when the system totally locks up during an overload, and throughput drops to 0. Understanding the overload characteristics are important for capacity planning.<br />
<strong><br /></strong><strong><br /></strong><strong>Capacity planning</strong> is preparing for the demands on the software system in the future by understanding the performance characteristics of the application, predicting how many users and what kind of workload that application will have, and then setting up the right hardware to be able to run the software with the needed performance, without spending more money on hardware then you need to.</p>
<div style="display:block"><small><em>by Markj <a href="http://www.markj.net/scalability-and-other-meanings-of-performance/#comments">Leave A Comment</a><br />&copy;2012 <a href="http://www.markj.net">MarkJ.net &amp; Focused Apps</a>. All Rights Reserved.</em></small></div>]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://www.markj.net/wp/throughput-and-response-time/">Throughput and Response Time</a> I described the essence of what we mean by software performance, but there are some additional meanings that are important to consider in many cases. So here is a bigger list of what we mean when we talk about performance:</p>
<ul>
<li style="list-style: none"></li>
<li>Response Time</li>
<li>Throughput</li>
<li>Scalability</li>
<li>Stability</li>
<li>Resource Utilization, eg memory footprint</li>
<li>Overload or failure characteristics</li>
<li>Capacity planning</li>
</ul>
<p>
So lets take these one by one, starting with Scalability. <strong>Scalability</strong> is how well performance of the system can be improved by adding more hardware. Every software system has limitations to performance, and the underlying cause is often a limit to how fast part of the hardware can go. If the software has good scalability then you can add more of whatever is maxed out and get better performance. Often times we think about scalability simply as the ability to add more servers. For example, Google&#8217;s system is highly scalable, they have thousands of servers running all their apps, and as usage grows they just keep adding more servers to keep up with demand. They &#8216;scale up&#8217;. Scalability doesn&#8217;t have to be only about scaling across separate servers, we may want run some software on one individual server, but care if it is scalable as we add more CPUs or more disks. Relational databases are the classic example of this, its hard to run a cluster of database servers operating as one, so when we need better performance from a database its cheaper to upgrade to a more powerful server with more CPUs, RAM, and disks. Good scalability often comes with a small compromise in response time or throughput for one individual server. Ie, designing your software without caring about scalability might mean its performance is better then the same application designed with high scalability when both versions are running on just one server. But the scalable design can be scaled up to support more users, more work, or respond more quickly by adding more hardware, where the unscalable design will be stuck with the performance of a single server.<br />
<strong><br /></strong><strong><br /></strong><strong>Stability</strong> is concerned with how the software stands up to heavy use by lots of users doing lots of work for a long period of time. Stable software crashes rarely and has few errors, unstable software crashes a lot and has problems completing work correctly. Stability is tied up with other performance topics because many stability problems only show up when performance testing with lots of users, and a high load on the system, so whoever is doing performance testing work usually has to also work on the stability of the system.</p>
<p>
When looking at <strong>resource utilization</strong>, we care about how the software uses CPU, RAM, disk IO, disk space, and network capacity. All of these hardware resources are limited, and its desirable for our software to use these resources carefully. Under high load resource utilization will be higher than testing just one user with one use case, so just like stability, studying resource utilization is in the domain of performance testing.</p>
<p>Every software application has a limit to how fast it can go, how many users it can support, etc. When the system is overloaded by going beyond these limits then the software may fail by crashing, causing data loss, incorrectly completing work, dropping users, etc. These are the <strong>failure modes</strong> or <strong>overload characteristics</strong> of the application. The most desirable failure mode is that work backlogs and response time goes down, while throughput stays close to 100% of its max. The least desirable failure modes are when the system totally locks up during an overload, and throughput drops to 0. Understanding the overload characteristics are important for capacity planning.<br />
<strong><br /></strong><strong><br /></strong><strong>Capacity planning</strong> is preparing for the demands on the software system in the future by understanding the performance characteristics of the application, predicting how many users and what kind of workload that application will have, and then setting up the right hardware to be able to run the software with the needed performance, without spending more money on hardware then you need to.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markj.net/scalability-and-other-meanings-of-performance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Throughput and response time</title>
		<link>http://www.markj.net/throughput-and-response-time/</link>
		<comments>http://www.markj.net/throughput-and-response-time/#comments</comments>
		<pubDate>Wed, 16 Apr 2008 20:25:04 +0000</pubDate>
		<dc:creator>markj</dc:creator>
				<category><![CDATA[Performance]]></category>
		<category><![CDATA[response time]]></category>
		<category><![CDATA[terminology]]></category>
		<category><![CDATA[throughput]]></category>

		<guid isPermaLink="false">http://www.markj.net/wp/?p=12</guid>
		<description><![CDATA[<p>What does &#8216;performance&#8217; mean? Software performance is mostly about how fast the software goes and how much work it can handle. To discuss performance we need more accurate terms than ‘speed’. The two most important concepts are:</p>
<ul>
<li>Response time &#8211; how quickly the system responds to request</li>
<li>Throughput &#8211; how much work can it do in some period of time</li>
</ul>
<p>Response time is a measure of how quickly the system responds to a request for it to do something. Put another way, response time is how long it takes before it finishes what you told it to do. Response time is really important for any software that has real people sitting there interacting with it, eg a web application like Ebay. Users want the next page to come back quickly when they click on stuff. Response time for interactive software is often measured in seconds.</p>
<p>Throughput is a measure of how much work the system can do in a given period of time &#8211; eg if in one minute my mp3 software can encode 6 songs from a CD, then its throughput is 6 songs per minute. Throughput is really important to software that has to process a lot of data in some way, eg the electric company generating all the electricity bills for its millions of customers. Throughput is also critical for interactive software that has many users, eg how many web pages can Ebay serve up every second.</p>
<p>Response time and throughput are usually not independent of each other. If you are developing software you often have to trade one for the other in your architecture choices. Often times you can make a choice that will increase throughput by a large %, but it makes your response times increase a little (typically when you use request queues in your system). In that case, should you say that the software is faster because it does more work, or slower because it doesn&#8217;t react as fast? Both are true, so when you talk about performance it is confusing to talk about &#8216;speed&#8217;, you have to talk about response time and/or throughput.</p>
<p>Another side of throughput vs response time is who cares. If you are using ebay.com to buy a stuffed cat, you don&#8217;t care how many millions of pages ebay severed up while you were on the site (throughput), you only care about how fast your pages came back (response time). On the other hand, ebay management really care if their system can generate 1,000 or 10,000 page views a second (throughput), because they have tons of stuff they want everyone to keep everyone bidding on and they want to use the fewest servers possible to keep costs under control.</p>
<div style="display:block"><small><em>by Markj <a href="http://www.markj.net/throughput-and-response-time/#comments">Leave A Comment</a><br />&copy;2012 <a href="http://www.markj.net">MarkJ.net &amp; Focused Apps</a>. All Rights Reserved.</em></small></div>]]></description>
			<content:encoded><![CDATA[<p>What does &#8216;performance&#8217; mean? Software performance is mostly about how fast the software goes and how much work it can handle. To discuss performance we need more accurate terms than ‘speed’. The two most important concepts are:</p>
<ul>
<li>Response time &#8211; how quickly the system responds to request</li>
<li>Throughput &#8211; how much work can it do in some period of time</li>
</ul>
<p>Response time is a measure of how quickly the system responds to a request for it to do something. Put another way, response time is how long it takes before it finishes what you told it to do. Response time is really important for any software that has real people sitting there interacting with it, eg a web application like Ebay. Users want the next page to come back quickly when they click on stuff. Response time for interactive software is often measured in seconds.</p>
<p>Throughput is a measure of how much work the system can do in a given period of time &#8211; eg if in one minute my mp3 software can encode 6 songs from a CD, then its throughput is 6 songs per minute. Throughput is really important to software that has to process a lot of data in some way, eg the electric company generating all the electricity bills for its millions of customers. Throughput is also critical for interactive software that has many users, eg how many web pages can Ebay serve up every second.</p>
<p>Response time and throughput are usually not independent of each other. If you are developing software you often have to trade one for the other in your architecture choices. Often times you can make a choice that will increase throughput by a large %, but it makes your response times increase a little (typically when you use request queues in your system). In that case, should you say that the software is faster because it does more work, or slower because it doesn&#8217;t react as fast? Both are true, so when you talk about performance it is confusing to talk about &#8216;speed&#8217;, you have to talk about response time and/or throughput.</p>
<p>Another side of throughput vs response time is who cares. If you are using ebay.com to buy a stuffed cat, you don&#8217;t care how many millions of pages ebay severed up while you were on the site (throughput), you only care about how fast your pages came back (response time). On the other hand, ebay management really care if their system can generate 1,000 or 10,000 page views a second (throughput), because they have tons of stuff they want everyone to keep everyone bidding on and they want to use the fewest servers possible to keep costs under control.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markj.net/throughput-and-response-time/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

