<?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>LoadRunner TnT &#187; Bottleneck</title>
	<atom:link href="http://www.loadrunnertnt.com/tag/bottleneck/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.loadrunnertnt.com</link>
	<description>Performance Testing, LoadRunner Tips &#38; Tricks</description>
	<lastBuildDate>Mon, 08 Mar 2010 07:57:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Planning a Load Test – Part 2</title>
		<link>http://www.loadrunnertnt.com/planning/planning-a-load-test-%e2%80%93-part-2/</link>
		<comments>http://www.loadrunnertnt.com/planning/planning-a-load-test-%e2%80%93-part-2/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 13:36:03 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[Planning]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Bottleneck]]></category>
		<category><![CDATA[Load Testing]]></category>
		<category><![CDATA[Monitoring]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=730</guid>
		<description><![CDATA[Following our previous post on planning a load test, we are throwing in more points that you should consider when planning for a load test.

What is the total user base?  What is the concurrent user base? – Now after working the maths out, do you required a load test.  Example, is a 5 concurrent user [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.loadrunnertnt.com/wp-content/uploads/2010/02/planning-150x150.jpg"><img class="alignright size-full wp-image-731" title="planning-150x150" src="http://www.loadrunnertnt.com/wp-content/uploads/2010/02/planning-150x150.jpg" alt="" width="88" height="88" /></a>Following our previous post on <a href="../planning/planning-for-a-load-test/">planning a load test</a>, we are throwing in more points that you should consider when planning for a load test.<span id="more-730"></span></p>
<ul>
<li><strong>What is the total user base?  What is the concurrent user base?</strong> – Now after working the maths out, do you required a load test.  Example, is a 5 concurrent user base an effective load test?  Is it worth the effort to generate a script that emulates 5 concurrent users?  Your customer may want you to run a load test for 5 users even though it is not effective to run that kind of load test.  However, if it is in the contract, you may have obliged it.  If they are willing to pay for that service, then it’s a plus point!</li>
<li><strong>Do the available load testing tools support your system in a load test?</strong> – A very strange question to ask.  Most tools are unable to support asynchronous application and map applications.  Either you may have to purchase more licenses to run the load test like in LoadRunner, find alternative sources or write scripts to emulate the load.  There are multiple ways to run a load test however may require additional effort (which translates to additional time).  Most tools are useful in coordinating and reporting which your scripts may not be able to achieve.</li>
<li><strong>What is the environment that you will be conducting the load test?</strong> – At times, your load test may be conducted in a scale-down production environment which you may know.  The load test results may not be a good representation of the true performance of the load test.  However, most of the times, running in production is a no-no and it is good to align everyone’s (stakeholders, customers, etc.) expectation of the load test.</li>
<li><strong>Where do you want the load to be generated to?</strong> – For a web application, there are multiple layers that you can access the system.  You can access the normal URL that can be the virtual IP address from a central web server.  You can enter at the load balancer or the web server layer.  Lastly, you can enter at the application server layer.  Where you want the load to enter can help you determine the layer that can be causing the performance problem.  By stepping up from the application layer, you can determine stage-by-stage the layer as the source of bottleneck.</li>
<li><strong>What do you want to monitor?</strong> – There are so many things that you can monitor in an infrastructure.  Which one do you want to focus on your analysis effort on first?  Do you want to monitor all sub-systems or target your effort to the most possible source such as the database?  Setting up monitors takes effort.  What&#8217;s more tedious is the effort required to analyze the monitoring results that you have collected!  Therefore, do take note and factor the duration and effort!</li>
<li><strong>Do you know the backbone network infrastructure?</strong> – This information is usually not available to a load tester.  But if you know this, you can least prepare your team that the load test will bound to meet (or not bound to meet) performance issues during the load test. They can be ineffective load balancing, small bandwidth available, invisible proxy that limits bandwidth, etc.  If you do not know this information, it is best to work on those you know such as the method previously mentioned by running the load test stage-by-stage.</li>
<li><strong>Is your load test conducted in a wireless environment?</strong> -  A wireless environment may be limited by the number of access point and the bandwidth available per wireless network. You need to know if the wireless will become a potential bottleneck in the amount of clients that can be generated into the system before your load test.</li>
<li><strong>Do you have a base set of data to use in a load test?</strong> – Most often after a load test, the data in a database will likely be messed out.  Therefore, it is advisable to create a backup of a working set of data in the database for you to reload after each load test.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/planning/planning-a-load-test-%e2%80%93-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Planning for a Load Test</title>
		<link>http://www.loadrunnertnt.com/planning/planning-for-a-load-test/</link>
		<comments>http://www.loadrunnertnt.com/planning/planning-for-a-load-test/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 07:13:20 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[Planning]]></category>
		<category><![CDATA[Bottleneck]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[Load Testing]]></category>
		<category><![CDATA[LoadRunner]]></category>
		<category><![CDATA[probe]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=662</guid>
		<description><![CDATA[Seldom, we discuss about the planning and implementation of the load test in our site.  As such, we are taking a change in this and will be touching on some considerations you as a performance tester/test manager/consultant should be thinking for every load test.  These considerations enable you to smooth up the process of the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.loadrunnertnt.com/wp-content/uploads/2010/01/planning.jpg"><img class="alignleft size-thumbnail wp-image-663" title="planning" src="http://www.loadrunnertnt.com/wp-content/uploads/2010/01/planning-150x150.jpg" alt="" width="89" height="89" /></a>Seldom, we discuss about the planning and implementation of the load test in our site.  As such, we are taking a change in this and will be touching on some considerations you as a performance tester/test manager/consultant should be thinking for every load test.  These considerations enable you to smooth up the process of the entire load test and reduce any load test risks associated with it.   More than often, we focus on gathering the customers requirements for the load test such as user amount to generate, how long the load test will be conducted, where will it be conducted, the location that the virtual users will generate from, etc… That is basic information.  However, additional information will be required to smoothen the load test project and below are some of the additional considerations, you as a performance tester/test manager/consultant should be asking yourself or client.<span id="more-662"></span></p>
<ol>
<li><strong>Do you have sufficient hardware</strong>? – How may load generators are      required for the entire load test?  Refer      to this document from HP Support, <em><a href="http://support.openview.hp.com/selfsolve/document/KM767319">“Is resource      (cpu and memory) footprint information available to help in estimating the      load generators required for load testing with LoadRunner?”</a> </em>for      estimating the load generators required by multiplying the observations      with the total number of virtual users generated in the test.   In addition to the processor      utilization recommended in the document, do watch the memory and network      consumption of the load generators.        The network interface card (NIC) can become a bottleneck for load      generation.  A 1GB NIC will      definitely generate and receive more load than a 100MB NIC.  Therefore, do a check on the machines      assuming the load generator roles and make appropriate measures to prevent      the NIC in becoming the bottleneck.        With the above, you will get a rough gauge of the required resource      for your test.</li>
<li><strong>Do you need spare hardware?</strong> – Do cater some spare machines if      additional load generators are required, such as an additional of 5 load      generators.  This is to stand by in      the event of increasd virtual users and machine malfunction.</li>
<li><strong>Remember that it’s a team effort!</strong> – Can you secure human resources      for the load test?  You will need      the web, application and database server teams to be around to observe the      system behavior during the test or to assist in any reboot or refresh      activities for the system.  Network      and firewall/security team may be required to ensure that connectivity is      allowed for the load test.    Therefore, in the planning, you have to      get the relevant parties to commit the human resources!</li>
<li><strong>Installation of LoadRunner</strong> – This require administrative or      power users privileges in order for installation to be successful.  That raise another set of questions:      Will you be able to install LoadRunner in the premises?  Who can you look for to install the      LoadRunner program?  Do you need      clearance for installation?  Is the      system being hardened to prevent installation?</li>
<li><strong>Offshore Installation </strong>– Is offshore installation required      for the load test setup?  Can you      perform the installation via remote connection or do you require someone      from the site to assist in the installation?</li>
<li><strong>Running of JVM/.NET Probes for      Diagnostics</strong> – This      will require installation and instrumentation on the application server,      meaning it will be intrusive to the system as a whole.  Do you require additional permissions      for such installation?</li>
<li><strong>Post-installation</strong> – Do remember to test if the      installation is complete and the programs are working before moving on to      the next phase.  Remember to do a      connectivity check between the load generators to the controller to ensure      they communicate prior the load test.</li>
<li><strong>Working in different environments </strong>– Are you required to work in      different stages of a load test project?       Example, you are required to run the test in (A) the  data center followed by (B) the local      client segment and lastly (C) the remote client segment?  In this context, how do you ensure the      scripts worked from A to C?  It will      be easy if it is a change of hostnames and URL addresses that is being      used in these environments as it can be achieved through      parameterization.  But what if there      are additional authentication mechanism introduced in environment B and      C?  Authentication mechanisms such      as additional cookie in the clients are added into the URL or 2-factor      authentication can render the scripts developed in environment A      useless!  How do you go about      it?  Should you cater more time to      re-script for the worst scenario or is it better to disable the      authentication mechansim during the load test?</li>
</ol>
<p>These are some basic considerations we usually asked our ourselves and clients.  Hope it will be useful in your planning.  What are other considerations make for a load test for you?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/planning/planning-for-a-load-test/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find Offending SQL Bottlenecks!</title>
		<link>http://www.loadrunnertnt.com/analyze/find-offending-sql-bottlenecks/</link>
		<comments>http://www.loadrunnertnt.com/analyze/find-offending-sql-bottlenecks/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 07:54:30 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[Analyze]]></category>
		<category><![CDATA[Bottleneck]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[MS SQL]]></category>
		<category><![CDATA[SQL Statements]]></category>
		<category><![CDATA[Stored Procedures]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=650</guid>
		<description><![CDATA[After the tune-able parameters are changed for optimal performance, your system still fails miserably with a poor response time.  The most likely step you should take is to do a deep diagnostics on the system.  Break the system up into different components such as application server where diagnostics using probes is required, database servers where [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.loadrunnertnt.com/wp-content/uploads/2010/01/ms_sql_logo1.gif"><img class="alignleft size-full wp-image-674" title="ms_sql_logo" src="http://www.loadrunnertnt.com/wp-content/uploads/2010/01/ms_sql_logo1.gif" alt="" width="178" height="87" /></a>After the tune-able parameters are changed for optimal performance, your system still fails miserably with a poor response time.  The most likely step you should take is to do a deep diagnostics on the system.  Break the system up into different components such as application server where diagnostics using probes is required, database servers where SQL statements and stored procedures become the next to be scrutinized, etc…<span id="more-650"></span></p>
<p>In this post, we will not be covering on the diagnostics of the application server, but we will cover the basic signs of database bottlenecks at the <strong>SQL statement</strong> level.  The 1<sup>st</sup> symptom is a collective symptom that the application server (and all other servers) with the exception of the database server in the architecture are performing reasonably well.  E.g. memory available is well maintained without any exception decrease of this value, the processor % time is always low for the servers.<br />
<!--adsensestart--><br />
The 2<sup>nd</sup> symptom is a constant high utilization of the processor % time and low memory usage (page faults, page reads and available memory) in the database server.  This provides a tell-tale sign that the database server is processing some instructions, likely to be SQL statement that is taking too long.  It would not be the database buffer or SQL buffer that utilizes the memory as the consumption is low meaning reuse of the buffer is high.</p>
<p>Now with these two symptoms, you are ready to go down deeper.  Access MS SQL and run the following query:</p>
<div class="codecolorer-container sql default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="sql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold;">SELECT</span> scheduler_id<span style="color: #66cc66;">,</span> current_tasks_count<span style="color: #66cc66;">,</span> runnable_tasks_count<br />
<span style="color: #993333; font-weight: bold;">FROM</span> sys<span style="color: #66cc66;">.</span>dm_os_schedulers <span style="color: #993333; font-weight: bold;">WHERE</span> scheduler_id <span style="color: #66cc66;">&lt;</span> <span style="color: #cc66cc;">255</span></div></div>
<p>This query will <strong>sys.dm_os_schedulers</strong> will give you information of how many runnable tasks that exists.  Values other than zero indicate that tasks are waiting to run, and high values are an indication that the CPU is bottlenecking your performance.  Another query that directly targets at SQL statement is the following:</p>
<div class="codecolorer-container sql default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="sql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold;">SELECT</span> TOP 50 SUM<span style="color: #66cc66;">&#40;</span>qs<span style="color: #66cc66;">.</span>total_worker_time<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> total_cpu_time<span style="color: #66cc66;">,</span><br />
<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">&#91;</span>TEXT<span style="color: #66cc66;">&#93;</span> <span style="color: #993333; font-weight: bold;">FROM</span> sys<span style="color: #66cc66;">.</span>dm_exec_sql_text<span style="color: #66cc66;">&#40;</span>plan_handle<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span><br />
SUM<span style="color: #66cc66;">&#40;</span>qs<span style="color: #66cc66;">.</span>execution_count<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> total_execution_count<span style="color: #66cc66;">,</span><br />
COUNT<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> number_of_statements<span style="color: #66cc66;">,</span> qs<span style="color: #66cc66;">.</span>plan_handle<br />
<span style="color: #993333; font-weight: bold;">FROM</span> sys<span style="color: #66cc66;">.</span>dm_exec_query_stats qs<br />
<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> qs<span style="color: #66cc66;">.</span>plan_handle<br />
<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> SUM<span style="color: #66cc66;">&#40;</span>qs<span style="color: #66cc66;">.</span>total_worker_time<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">DESC</span></div></div>
<p>This query shows which batches or procedures are consuming the most CPU and will also include the actual SQL statement. The query aggregates by a specific plan handle. If the plan handle contains more than one SQL statement you must drill into each statement to determine where the greatest CPU contribution comes from.</p>
<p>Codes illustrated in this post are taken from <a href="http://sql.dotnetbob.com/?p=96">DotNet Bob on SQL</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/analyze/find-offending-sql-bottlenecks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Analyzing Client-side Performance Issue with YSlow</title>
		<link>http://www.loadrunnertnt.com/tools/analyzing-client-side-performance-issue-with-yslow/</link>
		<comments>http://www.loadrunnertnt.com/tools/analyzing-client-side-performance-issue-with-yslow/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 07:42:05 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[Add-Ons]]></category>
		<category><![CDATA[Analyze]]></category>
		<category><![CDATA[Bottleneck]]></category>
		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=607</guid>
		<description><![CDATA[YSlow, another popular client-side performance profiling tool for web applications, is an add-on for Firefox.  With YSlow, you will be able to determine how fast (or slow) your web page is loading, breaking down to the individual components on the web page.  One thing to note, YSlow requires another add-on, Firebug to be installed in [...]]]></description>
			<content:encoded><![CDATA[<p><strong><a href="http://www.loadrunnertnt.com/wp-content/uploads/2009/12/1257808290.png"><img class="alignleft size-full wp-image-608" title="1257808290" src="http://www.loadrunnertnt.com/wp-content/uploads/2009/12/1257808290.png" alt="" width="32" height="32" /></a>YSlow</strong>, another popular client-side performance profiling tool for web applications, is an add-on for Firefox.  With YSlow, you will be able to determine how fast (or slow) your web page is loading, breaking down to the individual components on the web page.  One thing to note, YSlow requires another add-on, Firebug to be installed in Firefox before you can install it.  With YSlow you can use to determine the following <strong>website performance problems</strong>:<span id="more-607"></span></p>
<ul>
<li><strong>Download Component      Size</strong> &#8211; YSlow provides the size of the downloaded component and provides      suggestion in keeping the optimum amount of data size that the component      should be. This include images, Javascripts, CSS and cookie size are just      few of the examples.</li>
<li>
<div id="attachment_612" class="wp-caption alignright" style="width: 262px"><a href="http://www.loadrunnertnt.com/wp-content/uploads/2009/01/initial-yslow-stats.png"><img class="size-medium wp-image-612" title="initial-yslow-stats" src="http://www.loadrunnertnt.com/wp-content/uploads/2009/01/initial-yslow-stats-252x300.png" alt="" width="252" height="300" /></a><p class="wp-caption-text">YSlow Screenshot</p></div>
<p><strong>Bad Requests</strong> – It detects missing      components that churns 404 errors.  Addressing      404 errors can help improve performance at the client and server end by      removing requests made on missing objects as well as removing time needed      to handle this requests on missing objects on the server.</li>
<li><strong>Detect duplicate      requests/components</strong> – It detects duplicate HTTP requests made which degrades both the      client and the server performance.  It      also detects duplicate Javascripts which can result in duplicate request      to the server or further slowing down the client browser.</li>
<li><strong>Placement of files</strong> – Another good      feature made by YSlow is the detection of the placement of the Javascripts      and CSS files.  The placement of the      Javascripts and CSS files will help improve the performance at the client      side.</li>
<li><strong>Detect expiry of      components</strong> – YSlow can help determine if a component should be retrieved on      every web page loading.  If a      component such as an image (company banner) does not changed frequently,      it is suggested to it expire at a far later date.  Else, for every time the page loads, a      request will be made to the image.</li>
</ul>
<p><!--adsensestart--><br />
What is great about <strong>YSlow</strong> is it provides you with the best practises for creating high performance web sites.  It helps you detect which components are too big and provide suggestions for you to improve the performance.  The best practises for high performance web sites can be found at <a href="http://developer.yahoo.com/performance/">Yahoo! YSlow Developer Network</a>.</p>
<p>The disadvantage of YSlow is it is not installable on Internet Explorer, unlike <a href="../tools/performance-profiling-using-http-watch/">HTTPWatch</a>.  If you are a fan of the real-time analysing the response (wait) time on HTTPWatch, then you will be disappointed with YSlow on this.  YSlow does not provide any visual indicator on the time taken during loading (or requesting to the server) in real time.  It will only display the time only after the entire web page is downloaded.</p>
<p>The above are just some of the features that are available in YSlow.  You can <a href="https://addons.mozilla.org/en-US/firefox/addon/5369">download YSlow</a> and start profiling your website. We hope to hear your review soon!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/tools/analyzing-client-side-performance-issue-with-yslow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Performance Profiling Using HTTP Watch</title>
		<link>http://www.loadrunnertnt.com/tools/performance-profiling-using-http-watch/</link>
		<comments>http://www.loadrunnertnt.com/tools/performance-profiling-using-http-watch/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 05:01:42 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[Bottleneck]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[profiling]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=602</guid>
		<description><![CDATA[If you need to profile the performance of your web page, HTTPWatch is the tool (plugin) you can count on to do it.  With HTTPWatch, not only can you determine the load time of the web page (web performance profiling), you can also determine the time taken for loading each individual object.  Through this you [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.loadrunnertnt.com/wp-content/uploads/2009/12/httpwatch_logo_graphic.png"><img class="alignleft size-full wp-image-603" title="httpwatch_logo_graphic" src="http://www.loadrunnertnt.com/wp-content/uploads/2009/12/httpwatch_logo_graphic.png" alt="" width="76" height="78" /></a>If you need to profile the performance of your web page, <strong>HTTPWatch</strong> is the tool (plugin) you can count on to do it.  With HTTPWatch, not only can you determine the load time of the web page (web performance profiling), you can also determine the time taken for loading each individual object.  Through this you can determine if there are bottlenecks or under-optimized setting for the web server and apply the corrective resolution to it.<span id="more-602"></span></p>
<p>HTTPWatch is like a traffic sniffer (they termed it traffic viewer).  Once you start a recording a session, you can view almost anything that is sent via the browser, such as the HTTP headers, the response code, cookies, any caching used, methods, redirections, compression, encoding, and authentication.</p>
<p style="text-align: center;"><a href="http://www.loadrunnertnt.com/wp-content/uploads/2009/12/c8eab66d-9a86-4fd7-ae24-77f3d533dc85_2_full.png"><img class="size-medium wp-image-604 aligncenter" title="c8eab66d-9a86-4fd7-ae24-77f3d533dc85_2_full" src="http://www.loadrunnertnt.com/wp-content/uploads/2009/12/c8eab66d-9a86-4fd7-ae24-77f3d533dc85_2_full-300x271.png" alt="" width="300" height="271" /></a></p>
<p><!--adsensestart--><br />
What I like most out of the available information is the header, status codes, errors, cookies, redirections and compression.   HTTPWatch can view the following:</p>
<ul>
<li><strong>Header</strong> – Is a valid header being sent from the client and if the server is returning a valid header as well?</li>
<li><strong>Status Codes</strong> – What is the status code returning?  Is it giving me a correct HTTP 200 or something else (e.g. 302, 404) that may cause degradation of the client side performance?  Note: HTTP codes other than 200 may degrade the web server as well.</li>
<li><strong>Cookies</strong> – Are cookies under-performing?  Are the cookies being retrieved correctly?  Having cookies expired or should they be made to expired?</li>
<li><strong>Redirections</strong> – Are unnecessary redirections made due to invalid requests to invalid objects or missing objects that were removed (e.g. 404 errors)?</li>
<li><strong>Compression</strong> – Have all HTTP requests made from the client returned in compression thus decreasing the throughput?</li>
</ul>
<p>The plugin can be installed for both Internet Explorer and Firefox users.  There is a free version readily available to download which is sufficient for you to conduct most performance troubleshooting and fix problems on the web server.   The problem with HTTP Watch is that it needs to install in to the system, and this can be considered intrusive if your organisation or your client has a policy against installation of non-compliance software.  It has a Firefox version which means you can use a portable version of Firefox with HTTPWatch installed with it.  This is a workaround against the policy.  Personally, I have a preference over YSlow (another HTTP sniffer/viewer in Firefox portable) than HTTPWatch as it has a cleaner interface (in my opinion).</p>
<p>You can use <strong>HTTPWatch</strong> if you need to profile one single user for your web application and considering not using a stop watch (at least it’s more professional than a stopwatch technique in your client’s opinion).</p>
<p><a href="http://download.httpwatch.com/httpwatch.exe">Click here to download HTTPWatch!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/tools/performance-profiling-using-http-watch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Detecting network bottlenecks</title>
		<link>http://www.loadrunnertnt.com/analyze/detecting-network-bottlenecks/</link>
		<comments>http://www.loadrunnertnt.com/analyze/detecting-network-bottlenecks/#comments</comments>
		<pubDate>Sat, 13 Sep 2008 06:44:20 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[Analyze]]></category>
		<category><![CDATA[Bottleneck]]></category>
		<category><![CDATA[network]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=325</guid>
		<description><![CDATA[At the network level, many things can affect performance. The bandwidth (the amount of data that can be carried by the network) tends to be the first culprit checked. Assuming you have determined that bad performance is attributable to the network component of an application, there is more likely cause of bad network performance than [...]]]></description>
			<content:encoded><![CDATA[<p>At the <strong>network</strong> level, many things can affect performance. The <strong>bandwidth</strong> (the amount of data that can be carried by the network) tends to be the first culprit checked. Assuming you have determined that bad performance is attributable to the network component of an application, there is more likely cause of bad network performance than network bandwidth. The most likely cause of network performance is the application itself and how it is handling distributed data and functionality.<span id="more-325"></span></p>
<p>The overall speed of a particular network connection is limited by (a) the slowest link in the connection chain and (b) the length of the chain. Identifying the slowest link is difficult and may not even be consistent: it can vary at different times of the day or for different communication paths. A network communication path lead from an application through a <strong>TCP/IP stack</strong> (which adds various layers of headers, possibly encrypting and compressing data as well), then through the hardware interface, through a modem, over a phone line, through another modem, over to a service provider’s router, through many heavily congested data lines of various carrying capacities and multiple routers with different maximum throughputs and configurations, to a machine at the other end with its own hard interface, TCP/IP stack and application. A typical web download route is just like this. In addition, there are dropped packets, acknowledgments, retries, bus contention, and so on.</p>
<p>Because so many possible causes of bad <strong>network performance</strong> are external to an application, one option you can consider including in an application is a network speed testing facility that reports to the user. This should test the speed of data transfer from the machine to various destinations: to itself, to another machine on the local network, to the Internet Service Provider, to the target server across the network, and to any other destinations appropriate. This type of diagnostics report can tell users that they are obtaining bad performance from something other than your application. If you feel that the performance of your application is limited by the actual network communication speed, and not by other (application) factors, this facility will report the maximum possible speeds to your user.</p>
<p><span style="text-decoration: underline;"><strong>Latency</strong></span></p>
<p><strong>Latency</strong> is different from the load-carrying capacity (<strong>bandwidth</strong>) of a network. <strong>Bandwidth</strong> refers to how much data can be sent down the communication channel for a given period of time and is limited by the link with the lowest bandwidth in the communication chain. The latency is the amount of time a particular data packet takes to get from one end of the communication channel to the other. Bandwidth tells you the limits within which your application can operate before the performance become affected by the volume of data being transmitted. Latency often affects the user’s view of the performance even when bandwidth isn’t a problem.</p>
<p>In most cases, especially Internet traffic, <strong>latency</strong> is an important concern. You can determine the basic round-trip time for a data packets from any two machines using the <em>ping</em> utility. (Refer to <a title="Understanding Network - How Ping Works?" href="index.php?option=com_content&amp;view=article&amp;id=75:understanding-network-how-ping-works&amp;catid=34:concepts&amp;Itemid=41" target="_blank">&#8220;Understanding Network &#8211; How Ping works?&#8221;</a>). However, the time measure is for a basic underlying protocol (ICMP packet) to travel between the machines. If the communication channel is congested and the overlying protocol requires re-transmissions (often the case for Internet traffic), one transmission at the application level can actually be equivalent to many round trips.</p>
<p>It is important to be aware of these limitations however it is also often possible to tune the application to minimize the number of transfers by (a) packing data together, (b) caching and (c) redesigning the distributed application protocol to aim for a less conversational mode of operation. At the network level, you need to monitor the transmission statistics (using the <em>ping</em> and <em>netstat</em> utilities and packet sniffers) and consider tuning any network parameters that you have access to in order to reduce re-transmissions.</p>
<p><span style="text-decoration: underline;"><strong>TCP/IP Stacks</strong></span></p>
<p>The <strong>TCP/IP stack</strong> is the section of code that is responsible for translating each application-level network request (send, receive, connect, etc.) through the transport layers down to the wire and back up to the application at the other end of the connection. Because the stacks are usually delivered with the operation system and performance-tested before delivery (since a slow network connection on an otherwise fast machine and fast network is pretty obvious), it is unlikely that the TCP/IP stack itself is a performance problem.</p>
<p>In addition to the stack itself, stacks include several tunable parameters. One parameter worth mentioning is the <strong>maximum packet size</strong>. When your application sends data, the underlying protocol breaks the data into packets that are transmitted. There is an optimal size for packets transmitted over a particular communication channel, and the packet size actually used by the stack is compromise. Smaller packets are less likely to be dropped, but they introduced more overhead, as data probably has to be broken up into more packets with more header overhead.</p>
<p>If your communication takes place over a particular set of endpoints, you may want to alter the packet sizes. For a LAN segment with no router involved, the packets can be big (e.g. 8KB). For a LAN with routers, you probably want to set the maximum packet size to the size the routers allow to pass unbroken. (Routers can break up the packets into smaller ones; 1500 bytes is the typical maximum packet size and the standard for the Ethernet. The maximum packet size is configurable by the router’s network administrator.) If your application is likely to be sending data over the Internet and you cannot guarantee the route and quality of routers it will pass through, 500 bytes per packet is likely to be optimal.</p>
<p><span style="text-decoration: underline;"><strong>Network Bottlenecks</strong></span></p>
<p>Other causes of slow network I/O can be attributed directly to the load or configuration of the network. For example, a LAN may become congested when many machines are simultaneously trying to communicate over the network. The potential throughput of the network could handle the load, but the algorithms to provide communication channels slow the network, resulting in a lower maximum throughput. A congested Ethernet network has an average throughput approximately one third the potential maximum throughputs. Congested networks have other problems, such as dropped network packets. If you are using TCP, the communication rate on a congested network is much slower as the protocol automatically resends the dropped packets. If you are using UDP, your application must resend multiple copies for each transfer. Dropping packets in this way is common for the Internet. For LANs, you need to coordinate closely with network administrators to alert them to the problem. For single machines connected by a service provider, suggesting improvements. The phone line to the service provider may be noisier than expected: if so, you also need to speak to the phone line provider. It is also worth checking with the service provider, who should have optimal configurations they can demonstrate.</p>
<p>Dropped packets and re-transmissions are a good indication of network congestion problems, and you should be on constant lookup for them. Dropped packets often occur when routers are overloaded and find it necessary to drop some of the packets being transmitted as the router’s buffer overflow. This means that the overlying protocol will request the packets to be resent. The netstat utility lists re-transmission and other statistics that can identify these sorts of problems. Re-transmissions may indicate that the maximum packet size is too large.</p>
<p><span style="text-decoration: underline;"><strong>DNS Lookup</strong></span></p>
<p>Looking up network address is an often-overlooked cause of bad network performance. When your application tries to connect to a network address such as foo.bar.somthing.org, your application first translates foo.bar.somthing.org into a four-byte network IP address such as 10.33.6.45. This is the actual address that the network understands and uses for routing network packets. <strong>DNS</strong> translation works as follows:</p>
<ol>
<li>The machine running the application sends the text string of the hostname (e.g. foo.bar.something.org) to the DNS server.</li>
<li>The DNS server checks its cache to find an IP address corresponding to that hostname. If the server does not find an entry in the cache, it asks its own DNS server (usually further up the Internet domain-name hierarchy) until ultimately the name is resolved. (This may be by components of the name being resolved, e.g. first .org, then something.org, etc, each time asking another machine as the search request is successively resolved.) This resolved IP address is added to the DBS server’s cache.</li>
<li>The IP address s returned to the original machine running the application.</li>
<li>The application uses the IP address to connect to the desired destination.</li>
</ol>
<p>The address lookup does not need to be repeated once a connection is established, but any other connections (within the same session of the application or in other session s at the same time and later) need to repeat the lookup procedure to start another connection.</p>
<p>You can improve this situation by running a <strong>DNS server</strong> locally on the machine, or on a local server if the application uses a LAN. A DNS server can be run as a “caching-only” server that resets its cache each time the machine is rebooted. There would be little point in doing this if the machine used only one or two connections per hostname between successive reboots. For more frequent connections, a local DNS server can provide a noticeable speedup to connections. <strong>Nslookup</strong> is useful for investigating how a particular system does translations.</p>
<p><a title="Java Performance Tuning" href="index.php?view=article&amp;catid=38%3Arecommended-resources&amp;id=66%3Abooks&amp;option=com_content&amp;Itemid=41" target="_blank">(Source: &#8220;Java Performance Tuning&#8221;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/analyze/detecting-network-bottlenecks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Detecting memory bottlenecks</title>
		<link>http://www.loadrunnertnt.com/analyze/detecting-memory-bottlenecks/</link>
		<comments>http://www.loadrunnertnt.com/analyze/detecting-memory-bottlenecks/#comments</comments>
		<pubDate>Tue, 09 Sep 2008 06:46:26 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[Analyze]]></category>
		<category><![CDATA[Bottleneck]]></category>
		<category><![CDATA[Memory]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=327</guid>
		<description><![CDATA[Monitoring the system memory (RAM) is not usually helpful in identifying memory performance problems. A better indicator will be monitoring paging activities to the page/swap file.  Memory paging activities will be covered in another article.  Most current OS have virtual memory comprising of the actual (real) system memory using physical RAM chips, and [...]]]></description>
			<content:encoded><![CDATA[<p>Monitoring the system memory (RAM) is not usually helpful in identifying <strong>memory</strong> performance problems. A better indicator will be monitoring <strong>paging activities</strong> to the page/swap file.  Memory paging activities will be covered in another article.  Most current OS have <strong>virtual memory</strong> comprising of the actual (real) system memory using physical RAM chips, and one or more page/swap files on the system disks. Processes that are currently running are operating in real memory. The OS can take pages from any of the processes currently in real memory and swap them out to disk. This is known as paging. Paging leaves free space in real memory to allocate to other processes that need to bring in a page from disk. Obviously, if all the processes currently running can fit into real memory, there is no need for the system to swap out any pages. However, if there are too many processes to fit into real memory, <strong>paging</strong> allows the system to free up system memory to run more processes.<span id="more-327"></span></p>
<p><strong>Paging</strong> affects system performance in many ways. One, is that if a process moved some some pages to disk and the process becomes runnable, the OS has to retrieve the pages from the disk before that process can be run which results to delays in performance. In addition, both CPU and the disk I/O spend time doing the paging, reducing available processing power and increasing the load on the disks. This cascading effect involving both the CPU and I/O can degrade the performance of the whole system in such a way that it maybe difficult to even recognize that paging is the problem. The extreme version of too much paging is <strong>thrashing</strong>, in which the system is spending too much time moving pages around that it fails to perform any other significant work. (The next step is likely to be a system crash).</p>
<p>A little paging of the system does not affect the performance enough to cause concern. In fact, some paging can be considered good which indicates that the system’s memory resources are fully utilized. But at the point where paging becomes a significant overhead, the system is overloaded. To monitor paging activities is easy. On UNIX, the utilities <em>vmstat</em> and <em>iostat</em> provide details as to the level of paging, disk activity and memory levels. On Windows, the performance monitor has categories to show these details, such as <em>Pages/sec</em>, <em>Page faults/sec</em> and <em>% Page files usage</em>.</p>
<p>If there is more paging than optimal, the system’s RAM is insufficient or processes are too big. To improve this situation, you need to reduce the memory being used by (a) reducing the number of processes or (b) the memory utilization of some processes. Alternatively, you (c) can add RAM.  If the problem is caused by a combination of your application and others, you can partially address the situation by using <strong>process priorities</strong>. By issuing priorities to the processes, you need to be aware that using this option reduces the amount of RAM available to all other processes, which can make overall system performance worse. Therefore measure the trade-offs before deciding the resolution.</p>
<p><a title="Java Performance Tuning" href="index.php?view=article&amp;catid=38%3Arecommended-resources&amp;id=66%3Abooks&amp;option=com_content&amp;Itemid=41" target="_blank">(Source: &#8220;Java Performance Tuning&#8221;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/analyze/detecting-memory-bottlenecks/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Detecting disk bottlenecks</title>
		<link>http://www.loadrunnertnt.com/analyze/detecting-disk-bottlenecks/</link>
		<comments>http://www.loadrunnertnt.com/analyze/detecting-disk-bottlenecks/#comments</comments>
		<pubDate>Thu, 04 Sep 2008 06:50:02 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[Analyze]]></category>
		<category><![CDATA[Bottleneck]]></category>
		<category><![CDATA[Disk]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=329</guid>
		<description><![CDATA[In most cases, applications can be tuned so that disk I/O does not cause any serious performance problems. However, performance problem may still persist even after application tuning. In this article, we will be addressing common disk bottlenecks and their tuning techniques.
Identifying whether the system has a problem with disk utilization first. Each system provides [...]]]></description>
			<content:encoded><![CDATA[<p>In most cases, applications can be tuned so that disk I/O does not cause any serious performance problems. However, performance problem may still persist even after application tuning. In this article, we will be addressing common disk bottlenecks and their tuning techniques.</p>
<p>Identifying whether the system has a problem with disk utilization first. Each system provides its own tools to identify disk usage (Windows: <em>Perfmon</em>, and UNIX: <em>sar, vmstat, iostat utilities</em>). For a start, identify whether the paging is an issue (look at disk-scan rates) and assess the overall utilization of your disks (e.g. Disk Transfers/sec on Windows, output from <em>iostat –D</em> on UNIX). It may be that the system has a problem independent of your application (e.g. unbalanced disks), and correcting this problem may resolve it.<span id="more-329"></span></p>
<p>If the disk analysis does not identify an obvious system problem that is causing the I/O overhead, you could try making a disk upgrade or a reconfiguration. This type of tuning can consist of any of the following:</p>
<ul>
<li>Upgrading to faster disks</li>
<li>Adding more swap space to handle larger buffers</li>
<li>Changing the disk to be striped (where files are striped across several disks, thus providing parallel I/O. e.g. with a RAID system)</li>
<li>Running the data on raw partitions when this is shown to be faster.</li>
<li>Distributing simultaneously accessed files across multiple disks to gain parallel I/O</li>
<li>Using memory-mapped disks or files</li>
</ul>
<p>You can never be sure if any particular disk is local to the user if you have applications running on many systems and unsure of the specification of the target system.  There is significant possibility that the disk used by the application is a <strong>network-mounted disk</strong>. This doubles the variability in response times and throughput. A network disk is a shared resource, as is the network itself, so performance is hugely and unpredictably affected by other users and network load.</p>
<p>We will be touching on the common areas to of performance issue, namely <strong>(a) Disk I/O, (b) Clustering Files, (c) Cache File Systems, (d) Disk Fragmentations</strong> and <strong>(e) Disk Sweet Spots</strong>.</p>
<p><span style="text-decoration: underline;"><strong>Disk I/O</strong></span></p>
<p>Disk writes on the system can impact performance adversely as a whole. System swap files should be placed on a separate disk from their databases (recommended by database vendors). The impact of not doing so can decrease database throughput (and system activity). This performance decreases come from not splitting I/O of two disk-intensive applications (in this case, OS paging and database I/O).</p>
<p>Identifying that there is an I/O problem is usually fairly easy. The most basic symptom is that things take longer than expected, while at the same time the CPU is not at all heavily worked. The disk-monitoring utilities will also show there is a lot of work being done to the disks. At the system level, you should determine the average peak requirements on the disks. Your disks will have some statistics that are supplied by the vendor, including:</p>
<p><strong>Average and peak transfer rates</strong>; normally in megabytes (MB) per seconds, e.g. 5MB/sec. Form this, you can calculate how long an 8K page takes to be transferred from disk, and for example, 5MB/sec is about 5K/ms, so an 8K page takes just under 2ms to transfer.</p>
<p><strong>Average seek time</strong>; normally in milliseconds (ms). This is the time required for the disk head to move radially to the correct location on the disk.</p>
<p><strong>Rotational speed;</strong> normally in revolutions per minutes (rpm), e.g. 7200rpm. From this, you can calculate the average rotational delay in moving the disk under the disk-head reader, i.e., the time taken for half a revolution. For example, for 7200rpm, one revolution takes 60,000ms (60 seconds) divided by 7200rpm, which is about 8.3 ms. So half a revolution takes just over 4ms, which is consequently the average rotational delay.</p>
<p>With the above list, you are able to calculate the total delay for a disk operation to load a random 8K page from disk with the following formula:</p>
<div><em>seek time + rotational delay + transfer time</em></div>
<p>Using the examples given in the list, you have 10 + 4 + 2 = 16 ms to load a random 8K page (almost an order of magnitude slower than the raw disk throughput). This calculation gives you a worst–case scenario for the disk-transfer rates for your application, allowing you to determine if the system is up to the required performance. Note that if you are reading data stored sequentially in disk (as when reading a large file), the<strong> seek time</strong> and <strong>rotational delay</strong> are incurred less than once per 8K page loaded. Basically, these two times are incurred only at the beginning of opening the file and whenever the file is fragmented. But this calculation is confounded by other processes also executing I/O to the disk at the same time. This overhead is part of the reason why swap and other intensive I/O files should not be put on the same disk.</p>
<p>One mechanism for speeding up disk I/O is to <strong>stripe disks</strong>. Disk striping allows data from a particular file to be spread over several disks. Striping allows reads and writes to be performed in parallel across the disks without requiring any application changes. This can speed up disk I/O quite effectively. However, be aware that the seek and rotational overhead previously listed still applies, and there maybe no performance gain if you are making many small random reads.</p>
<p>Finally, note again that using remote disks adversely affects I/O performance. You should not be using remote disks mounted from the network with any I/O-intensive operations if you need good performance.</p>
<p><span style="text-decoration: underline;"><strong>Clustering Files</strong></span></p>
<p>Reading many files sequentially is faster if the files are clustered together on the disk, allowing the disk-head reader to flow from one file to the next. This clustering is best done in conjunction with defragmenting the disks. The overhead in finding the location of a file on the disk (detailed in the previous section) is also minimized for sequential reads if the files are clustered.</p>
<p>If you cannot specify clustering files at the disk level, you can still provide similar functionality by putting all the files together into one large file (as is done with the ZIP file systems). This is fine if all the files are read-only files or if there is just one file that is writable (you place that at the end). However, when there is more than one writable file, you need to manage the location of the internal files in your system as one or more grow. This becomes a problem and is not usually worth the effort. (If the files have a known bounded size, you can pad the files internally, thus regaining the single file efficiency.)</p>
<p><span style="text-decoration: underline;"><strong>Cached File Systems (RAM Disks, tmpfs, cachefs)</strong></span></p>
<p>Most OS provide the ability to map a file system into the system memory . This ability can speed up reads and writes to certain files to control the target environment. Typically, this technique has been used to speed up the reading and writing of temporary files. For example, some compilers (of languages in general, not specifically Java) generate many temporary files during compilation. If these files are created and written directly to the system memory, the speed of compilation is greatly increased. Similarly, if you have a set of external files that are needed by your application, it is possible to map these directly into the system memory, thus allowing their reads and writes to be sped up greatly.</p>
<p>But note that these types of file systems are not persistent and will be cleared (as with system memory) when it&#8217;s rebooted. If the system crashes, anything in a memory-mapped file system is lost. For this reason, these types of file systems are usually suitable only for temporary files or read-only versions of disk-based files (such as mapping a CD-ROM into a memory-resident file system).</p>
<p>Remember that you do not have the same degree of fine control over these file systems that you have over your application. A memory-mapped file system does not use memory resources as efficiently as working directly from your application. If you have direct control over the files you are reading and writing, it is usually better to optimize this within your application rather than outside it. A memory-mapped file system takes space directly from system memory. You should consider whether it would be better to let your application grow in memory instead of letting the file system take up that system memory. For multi-user applications, it is usually more efficient for the system to map shared files directly into memory, as a particular file then takes up just one memory location rather than duplicate in each process.</p>
<p>The creation of memory-mapped file systems is completely system-dependent, and there is no guarantee that it is available on any particular system (though most modern OS do support this feature). For Unix, look up for <em>cachefs</em> and <em>tmpfs</em> while for Windows, look out on how to setup a RAM disk (a portion of memory mapped to a logical disk drive). In a similar way, there are products available that pre-cache shared libraries (DLL) and even executables in memory which allows application to start quicker or loads the quicker, and so may not be much help in speeding up a running system.</p>
<p>But you can apply the technique of memory-mapping file systems directly and quite usefully for applications in which processes are frequently started. Copy the Java distribution and all class files (all JDK, application, and third-party class files) onto a memory-mapped file system and ensure that all executions and classloads take place from the file system. Since everything (executables, DLLs, class files, resources, etc.) is already in memory, the startup time is much faster. Because only the startup (and class loading) time is affected, this technique gives only a small boost to applications that are not frequently starting processes, but can be usefully applied if startup time is a problem.</p>
<p><span style="text-decoration: underline;"><strong>Disk Fragmentation</strong></span></p>
<p>When files are stored on disk, the bytes in the files are note necessarily stored contiguously: their storage depends on file size and contiguous space available on the disk. This non-contiguous storage is called <strong>fragmentation</strong>. Any particular file may have some chunks in one place, and a pointer to the next chunk that may be quite a distance away on the disk.  Hard disks tend to get fragmented over time. This fragmentation delays both reads from files (including loading applications into computer memory on startup) and writes to files. This delay occurs because the disk header must wind on to the next chunk with each fragmentation.</p>
<p>For optimum performance on any system, it is ideal to periodically defragment the disk. This reunites files that have been split up, reducing disk heads time spent searching for data as the file-header locations have been identified, thus speeding up data access. However, defragmenting may not be effective on all systems.</p>
<p><span style="text-decoration: underline;"><strong>Disk Sweet Spots</strong></span></p>
<p>Most disks have a location from which data is transferred faster than from other locations. Usually, the closer the data is to the outside edge of the disk, the faster it can be read from the disk. Most hard disks rotate at constant angular speed. This means that the linear speed of the disk under a point is faster the farther away the point is from the center of the disk. Thus, data at the edge of the disk can be read from (and written to) at the faster possible rate commensurate with the maximum density of data storable on disk.</p>
<p>This location with faster transfer rates usually termed the <strong>disk sweet spot</strong>. Some (Commercial) utilities provide mapped access to the underlying disk and allow you to reorganize files to optimize access. On most server systems, the administrator has control over how logical partitions of the disk apply to the physical layout, and how to position files to the disk sweet spots. Experts for high-performance database system sometimes try to position the index tables of the database as close as possible to the disk sweet spot. These tables consist of relatively small amounts of data that affect the performance of the system in a disproportionately large way, so that any speed improvement in manipulating these tables is significant.</p>
<p>Note that some of the latest OS are beginning to include “awareness” of disk sweet spots, and attempt to move executables to sweet spots when defragmenting the disk. You may need to ensure that the defragmentation procedure does not disrupt your own use of the disk sweet spot.</p>
<p><a title="Java Performance Tuning" href="index.php?view=article&amp;catid=38%3Arecommended-resources&amp;id=66%3Abooks&amp;option=com_content&amp;Itemid=41" target="_blank">(Source: Java Performance Tuning)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/analyze/detecting-disk-bottlenecks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Detecting processor bottlenecks</title>
		<link>http://www.loadrunnertnt.com/analyze/detecting-processor-bottlenecks/</link>
		<comments>http://www.loadrunnertnt.com/analyze/detecting-processor-bottlenecks/#comments</comments>
		<pubDate>Sat, 30 Aug 2008 06:53:26 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[Analyze]]></category>
		<category><![CDATA[Bottleneck]]></category>
		<category><![CDATA[processor]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=332</guid>
		<description><![CDATA[In this article of &#8220;Detecting processor bottlenecks&#8221;, we are providing a general idea of determining the bottleneck with two broad categories, namely (a) Processor Load and (b) Process Priorities. Taken from the book, &#8220;Java Performance Tuning&#8221; written by Jack Shirazi, its recommended to go through it to get a better understanding in determining resource bottlenecks [...]]]></description>
			<content:encoded><![CDATA[<p>In this article of &#8220;Detecting processor bottlenecks&#8221;, we are providing a general idea of determining the <strong>bottleneck</strong> with two broad categories, namely <strong>(a) Processor Load</strong> and <strong>(b) Process Priorities</strong>. Taken from the book, <a title="Java Performance Tuning" href="index.php?view=article&amp;catid=38%3Arecommended-resources&amp;id=66%3Abooks&amp;option=com_content&amp;Itemid=41" target="_blank">&#8220;Java Performance Tuning&#8221;</a> written by Jack Shirazi, its recommended to go through it to get a better understanding in determining resource bottlenecks and the of tuning Java technologies. The term CPU and Processor refers to the same thing are used interchangeably in this article.<span id="more-332"></span></p>
<p><span style="text-decoration: underline;"><strong>Processor Load</strong></span></p>
<p>Two areas of <strong>Processor Load</strong> are worth watching as primary performance points.   They are the <strong>Processor Utilization</strong> (expressed in percentage) and the<strong> Runnable Queue</strong> of processes and threads (often called the load or the task queue).</p>
<p><strong>Processor Utilization;</strong> The first indicator is simply the percentage of the CPU (Or CPUs) being used by all the various threads. If this is up to 100% for significant periods of time, you may have a problem. On the other hand, if it isn’t, the CPU is under-utilized, but that is usually preferred. However, the amount of processes and threads existing in the system can be huge which it will be overwhelming to look at all of them. Therefore, start with known processes and tasks, such as application ones (user tasks), followed by OS tasks.</p>
<p>Some common symptoms can be resulted from the following:</p>
<ul>
<li>Low CPU usage can indicate that your application may be blocked for significant periods on disk or network I/O (High I/O or poor I/O)</li>
<li>Low CPU usage can indicate that contention is on another server in the architecture and it&#8217;s waiting for that server to complete its task and send data back to it.</li>
<li>High CPU usage can indicate thrashing (lack of RAM or too many threads)</li>
<li>High CPU contention can indicate inefficient code which (indicating that you need to tune the code and reduce the number of instructions being processed to reduce the impact on the CPU).</li>
</ul>
<p>A reasonable target is <strong>75% CPU utilization</strong> (which from different authors varies from 75% till 85%). This means that the system is being worked toward its optimum, but also allowing some slacks for spikes due to other system or application requirements. However, note that if more than 50% of the CPU is used by system processes (i.e. administrative and IS process), your CPU is probably under-powered. This can be identified by looking at the load of the system over some period when you are not running any applications (always allow the system to run a normal/no load scenario to log its initial benchmark).</p>
<p><strong>Runnable Queue;</strong> The second performance indicator indicates the average number of processes or threads waiting to be scheduled for the processor by the OS. They are run-able processes, but the processor has no time to run them and is keeping them waiting for some significant amount of time. As soon as the run queue goes above zero, the system may display contention for resources. However, there are still exceptions where runnable queue is above zero and the system is still performing at an acceptable level. A good way to identify the acceptable runnable queue of the system is to graph the Avg. Transaction Response Time with the runnable queue statistics (in Windows is <strong>Processor Queue Length</strong>). Observe any degradation of response time when the runnable queue increases. For capacity planning, a guideline proposed by Adrian Cockcroft is that performance starts to degrade if the <span style="color: #ff0000;">run queue grows bigger than four times the number of CPUs</span>.</p>
<p>If you can upgrade the CPU of the target environment, doubling the CPU speed is usually better than doubling the number of CPUs. And remember that parallelism in an application doesn’t necessarily need multiple CPUs. If I/O is significant, the CPU will have plenty of time for many threads.</p>
<p><span style="text-decoration: underline;"><strong>Process Priorities</strong></span></p>
<p>The OS also has the ability to prioritize the processes in terms of providing processor time by allocating process priority levels. Processor priorities provide a way to throttle high-demand processes, thus giving other processes a greater share of the processes. If there are other processes that need to run on the same machine but it doesn’t matter if they were run slowly, you can give your application processes a (much) higher priority than those other processes, thus allowing your application the lion’s share of CPU time on a congested system. This is worth keeping in mind if your application consists of multiple processes, you should also consider the possibility of giving your various processes different levels of priority. Being tempted to adjust the priority levels of processes, however, is often a sign that the CPU is underpowered for the tasks you have given it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/analyze/detecting-processor-bottlenecks/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Spotting performance metrics in obscure places!</title>
		<link>http://www.loadrunnertnt.com/concepts/spotting-performance-metrics-in-obscure-places/</link>
		<comments>http://www.loadrunnertnt.com/concepts/spotting-performance-metrics-in-obscure-places/#comments</comments>
		<pubDate>Fri, 13 Jun 2008 05:00:33 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[Concepts]]></category>
		<category><![CDATA[Bottleneck]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=244</guid>
		<description><![CDATA[
Performance metrics are often hidden within a seemingly &#8220;Black Box&#8221; application or component. After many successful projects I hope to open the black box and show that it is possible to validate performance testing requirements. The drive behind this white paper is improving the results gathering and reporting of Performance Testing exercise, the ideas and [...]]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter" title="www.sar.cx" src="http://loadrunnertnt.com/images/company_www_sar_cx_com.jpg" alt="" width="525" height="70" /></p>
<p>Performance metrics are often hidden within a seemingly &#8220;Black Box&#8221; application or component. After many successful projects I hope to open the black box and show that it is possible to validate performance testing requirements. The drive behind this white paper is improving the results gathering and reporting of Performance Testing exercise, the ideas and methods discussed are applicable to Test Engineers and Software Engineers a like. I hope to highlight methods to extend the coverage of Performance Testing to include more in depth analysis of the system under test.<span id="more-244"></span></p>
<p><strong>1. Introduction</strong></p>
<p>Can you count?  Let&#8217;s distinguish between Performance Counters and Performance Monitors:</p>
<ul>
<li>Monitoring is referring to the current value of a known measure, such as CPU and Memory utilisation. Monitors are a superset of Counters.</li>
<li>Counting is the number of times a particular event occurs with in a time interval, such as errors per second.</li>
</ul>
<p>Performance counters are often hidden away in application log files, in this whitepaper I hope to explain how to spot a potential counter and how to utilize it in performance test results and analysis. Traditionally these types of counters were either ignored or spot checked after a performance test run. Consider when batch processing and job queues are in the equation &#8211; do you need to know (down to second intervals) how many X&#8217;s you had throughout the 3 hour test?</p>
<p><strong>2. How do you decided what to counters to monitor?</strong></p>
<p>There are many sources of documentation and experiences that may lead you to decide to count something, here are a few examples:</p>
<ul>
<li>Performance Requirements &#8211; always a good place to start.</li>
<li>Quality Assurance – are you sure that the performance test is applying the load as you expect? This can, and should, lead into investigations into test scripts and existing system usage.</li>
<li>Tester Instincts – often after initial runs, you just have the &#8220;feeling&#8221; that an area requires further investigation.</li>
<li>Developer Instincts – speak to the people who developed (or have used) the system.</li>
</ul>
<p>In some cases these points may be addressed by monitors that are already available to you, but quite often custom counters will be required.</p>
<p><strong>3. What can a counter be created from?</strong></p>
<p>This is not an exhaustive list but here goes:</p>
<ul>
<li><strong>Logs</strong> – if the log (or audit trail) is date/time stamped then patterns within it can be counted.</li>
<li><strong>Files</strong> – how many files exist in the output directory throughout the duration of the performance test?</li>
<li><strong>Database</strong> – specific queries on the database can return counters. How many records or criteria Y were there in table X throughout the test?</li>
</ul>
<p>Remember that one information source could contain multiple counters, e.g. you have a directory containing output files these files may contain a status or type. In this case can produce counters for each type of file, the total number of files.</p>
<p><strong>How do I produce graphs from counter files?</strong></p>
<p>Counter files should be generic – the simpler the format the better, we tend to work with CSV files which can easily be opened in spreadsheet application and graphed.</p>
<p>If we are working with proprietary performance test tools then there is usually a method to import the CSV files into that tool. This produces the richest results analysis where custom counter graphs can be overlaid onto standard graphs such as the number of concurrent users and CPU Utilisation of a server.</p>
<p><strong>What are the pitfalls?</strong></p>
<p><span style="text-decoration: underline;">5.1. Logging gets de-prioritised and stops?</span></p>
<p>This affects monitors in general, UNIX based systems display this behaviour more readily. Under load a system will simply de-prioritise logging, this quite correct since the system has better things to do than write logs when under load. If your counters are based on log files then watch out for graphs stopping under peak load. Most people performance test to a level which is projected as a peak, at the same time they would expect the system to be capable of writing logs.</p>
<p>There are several ways forward here:</p>
<ul>
<li>Accept that the system is overloaded and report on the counters which you have.</li>
<li>Arrange to have the logging made into a high priority process.</li>
<li>Refer to the functional requirements to determine of logging is mandatory.</li>
<li>Audit trails may be a high priority requirement from a security point of view, if the audit trail ceases to function under load – raise a security defect.</li>
</ul>
<p><span style="text-decoration: underline;">5.2. Buggy scripts</span></p>
<p>Are you sure you got the design correct for the script to produce counter files? Is it parsing the log file or querying the database correctly?</p>
<p>Like any piece of software – the scripts to produce the counter files should follow your organization&#8217;s/clients&#8217; quality processes. Test the test!</p>
<p><span style="text-decoration: underline;">5.3. Doesn&#8217;t counting impact performance?</span></p>
<p>If scripts are created to produce counter files and these scripts need to be executed during a performance test – they will impact the performance of the system! Monitoring of any kind, yes even the <strong>Linux RSTATD</strong> and <strong>Microsoft PerfMon</strong>, has an impact on the system it is monitoring.</p>
<p>This impact can be reduced by:</p>
<ul>
<li>Making the scripts as light weight as possible.</li>
<li>Increase the sample rate or time interval – consider monitoring every 5 minutes and only recording the &#8220;per minute&#8221; average?</li>
</ul>
<p>Effort should be made to do the counting separately to the performance test runs, log files can always be post processed. Measure the impact of the counter scripts by running two short tests, one with the counting scripts running and one without. Once results have been analysed and requirements validated, consider monitoring less and using the counter scripts in a small set of future test runs.</p>
<p><strong>6. Example: ATM Service Management System</strong></p>
<p>A major banking client was implementing an upgrade to their ATM Service Management System. This system was hooked into back office and infrastructure services such as a fax to email gateway. The business wanted to know facts like: &#8220;How many faxes per hour will the new system generate under the projected future peak load&#8221;. The system wrote faxes in the form of a file in a specific directory, a script was written that simply counted the number of files in that directory every minute.</p>
<p>Knowing the number of faxes that the system would generate meant that they were able to determine if the fax gateway could withstand the load. It was costly to have faxes queued up – a fax not being sent meant an ATM downtime was elongated.</p>
<p style="text-align: center;"><img class="aligncenter" title="Performance Obscure" src="http://loadrunnertnt.com/images/article_performance_obsure.jpg" alt="" width="538" height="395" /></p>
<p><strong>7. Conclusions</strong></p>
<p>Once you have produced graphs that no one thought possible and overlaid them onto standard performance testing output &#8211; you will wonder why you ever thought that this was difficult.</p>
<p>By using these methods we have proved time and again how performance requirements can contradict and invalidate each other, here are two example requirements:</p>
<ul>
<li>n     Requirement A: The system will support 300 concurrent users.</li>
<li>n     Requirement B: The system will capable of outputting 20 PDF admin reports per minute.</li>
</ul>
<p>It is easy to look at Requirement B by counting the PDF files per minute while testing Requirement A. If it is estimated that the scenario to test Requirement B requires 400,000 concurrent users – then you have to question the validity of one of these requirements!</p>
<p>How were you going to test Requirement B anyway? If you are involved in writing performance requirements, like any other requirement, consider if the requirement is testable.<br />
<a title="Stephen A Readman personal site" href="http://www.sar.cx" target="_blank"><br />
(Source: Whitepaper by Stephen A Readman)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/concepts/spotting-performance-metrics-in-obscure-places/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
