<?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; Disk</title>
	<atom:link href="http://www.loadrunnertnt.com/tag/disk/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>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>% Disk Time may exceed 100 percent in Controller</title>
		<link>http://www.loadrunnertnt.com/analyze/disk-time-may-exceed-100-percent-in-controller/</link>
		<comments>http://www.loadrunnertnt.com/analyze/disk-time-may-exceed-100-percent-in-controller/#comments</comments>
		<pubDate>Tue, 22 Apr 2008 04:36:24 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[Analyze]]></category>
		<category><![CDATA[Disk]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=359</guid>
		<description><![CDATA[When you are running a load test and you may have encounter that the % Disk Time exceeds 100% in Controller or when you are analyzing the graphs in Analysis. Over 100%? Weird right? And when you open perfmon to verify, and it’s still more than 100%. Is it a bug of Windows?  What&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>When you are running a <span style="font-weight: bold;">load test</span> and you may have encounter that the <span style="font-weight: bold;">% Disk Time</span> exceeds 100% in <span style="font-weight: bold;">Controller</span> or when you are analyzing the graphs in <span style="font-weight: bold;">Analysis</span>. Over 100%? Weird right? And when you open <span style="font-weight: bold;">perfmon</span> to verify, and it’s still more than 100%. Is it a bug of Windows?  What&#8217;s the cause behind this?<span id="more-359"></span></p>
<p>Usually, this happens when the the <span style="font-weight: bold;">disk</span> is very busy such as copying of large amount of files out copying multiple files, etc. We must first understand that whatever monitoring data Controller is displaying for Windows is based on <span style="font-weight: bold;">Windows Perfmon</span>. You can refer to the article titled, <a title="How does the monitoring work in LoadRunner?" href="http://www.loadrunnertnt.com/?p=301" target="_blank">&#8220;How does the monitoring work in LoadRunner?&#8221;</a> if you need some explanation. This is actually by design of the <span style="font-weight: bold;">Windows</span> OS.</p>
<p>The behavior can occur because the OS uses <span style="font-weight: bold;">overlapping</span> input/output operations for multiple outstanding requests. The disk performance counters time the responses by using a 100 nanosecond precision counter, and then report the cumulative statistics for a given sample time. This sample time could go over 100 percent if, for example, you have 10 requests that completed in 2 milliseconds each in a 10 millisecond sampling interval. If you have multiple disks in a <span style="font-weight: bold;">Raid</span> arrangement, the overlapped input/output happens because the operating system can read and write to <span style="font-weight: bold;">multiple disks</span>, and this could show values that are higher than 100 percent for this counter.</p>
<p><a href="http://support.microsoft.com/kb/310067" target="_blank"><span style="text-decoration: underline;"><span style="color: #0066cc;">(Source: Microsoft Help and Support)</span></span></a></p>
<p>There is no quick fix to this as of this writing and the most accurate way to determine disk utilization is to use <span style="font-weight: bold;">% Idle Time</span> in the below formula:</p>
<ul>
<p style="font-weight: bold;">100% &#8211; % Idle Time = Actual % Disk Utilization</p>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/analyze/disk-time-may-exceed-100-percent-in-controller/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Are the disks fast enough?</title>
		<link>http://www.loadrunnertnt.com/analyze/are-the-disks-fast-enough/</link>
		<comments>http://www.loadrunnertnt.com/analyze/are-the-disks-fast-enough/#comments</comments>
		<pubDate>Tue, 22 Apr 2008 04:27:21 +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=350</guid>
		<description><![CDATA[Physical Disk (instance)\Disk Transfers/sec

To monitor disk activity, we can use this counter. When the measurement goes above 25 disk I/Os per second then you’ve got poor response time for your disk (which may well translate to a potential bottleneck. To further uncover the root cause we use the next mentioned counter.
Physical Disk(instance)\% Idle Time
This counter [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Physical Disk (instance)\Disk Transfers/sec</p>
<p></strong></p>
<p>To monitor <strong>disk activity</strong>, we can use this counter. When the measurement goes above <strong>25 disk I/Os per second</strong> then you’ve got poor response time for your disk (which may well translate to a potential <strong>bottleneck</strong>. To further uncover the root cause we use the next mentioned counter.<span id="more-350"></span></p>
<p><strong>Physical Disk(instance)\% Idle Time</strong></p>
<p>This counter measures the <strong>percent time</strong> that your hard disk is idle during the measurement interval, and if you see this counter fall <strong>below 20%</strong> then you’ve likely got <strong>read/write requests</strong> queuing up for your disk which is unable to service these requests in a timely fashion. In this case it’s time to upgrade your hardware to use faster disks or scale out your application to better handle the load. Why not use <strong>Physical Disk(instance)\% Disk Time</strong> instead? Well, we will cover this in details in future post.</p>
<p><a href="http://www.windowsnetworking.com/articles_tutorials/Key-Performance-Monitor-Counters.html" target="_blank"><span style="text-decoration: underline;"><span style="color: #0066cc;">(Source: Mitch Tulloch, Windows Networking)</span></span></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/analyze/are-the-disks-fast-enough/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>% Disk Read Time + % Disk Write Time not equals to % Disk Time?</title>
		<link>http://www.loadrunnertnt.com/analyze/disk-read-time-disk-write-time-not-equals-to-disk-time/</link>
		<comments>http://www.loadrunnertnt.com/analyze/disk-read-time-disk-write-time-not-equals-to-disk-time/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 08:30:58 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[Analyze]]></category>
		<category><![CDATA[Disk]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=355</guid>
		<description><![CDATA[These article is an extract of “Top Six FAQs on Windows 2000 Disk Performance” by Mark Friedman who also is the author of “Windows 2000 Performance Guide” that explains why the sum of % Disk Read Time and % Disk Write Time is not equal to % Disk Time. Why do we have to explain [...]]]></description>
			<content:encoded><![CDATA[<p>These article is an extract of <a href="http://www.oreillynet.com/pub/a/network/2002/01/18/diskperf.html" target="_blank"><span style="text-decoration: underline;"><span style="color: #0066cc;">“Top Six FAQs on Windows 2000 Disk Performance”</span></span></a> by Mark Friedman who also is the author of <a href="http://oreilly.com/catalog/w2kperf/" target="_blank"><span style="text-decoration: underline;"><span style="color: #0066cc;">“Windows 2000 Performance Guide”</span></span></a> that explains why the sum of <span style="font-weight: bold;">% Disk Read Time</span> and <span style="font-weight: bold;">% Disk Write Time</span> is not equal to <span style="font-weight: bold;">% Disk Time</span>. Why do we have to explain this? There are times that in Controller and Analysis, your client/user may observed that the total of % Disk Read Time and % Disk Write Time is not 100% and may question this to you. Therefore, a good understanding behind this will give you a build a positive credential to your client/user.</p>
<p>Often when you add the <span style="font-weight: bold;">% Disk Read Time</span> and <span style="font-weight: bold;">% Disk Write Time</span> counters together, they do not add up to % Disk Time. Furthermore, the % Disk Time counters are <span style="font-weight: bold;">capped</span> in the System Monitor at 100 percent because it would be confusing to report disk utilization greater than 100 percent. This occurs because the <span style="font-weight: bold;">% Disk Time</span> counters do not actually measure disk utilization. The Explain text that implies that they do represent disk utilization is very misleading.<span id="more-355"></span></p>
<p>What the <span style="font-weight: bold;">% Disk Time</span> counters actually do measure is a little complicated to explain but Mark provided a detail explanation in the following paragraphs which required your attention to read through.</p>
<p>The <span style="font-weight: bold;">%Disk Time</span> counter is not measured directly instead it is a value derived by the <span style="font-weight: bold;">diskperf filter driver</span> that provides disk performance statistics. diskperf is a layer of software sitting in the disk driver stack. As <span style="font-weight: bold;">I/O Request packets (IRPs)</span> pass through this layer, diskperf keeps track of the time I/O’s start and the time they finish. On the way to the device, diskperf records a timestamp for the IRP. On the way back from the device, the completion time is recorded. The difference is the duration of the I/O request.</p>
<p>Averaged over the collection interval, this becomes the <span style="font-weight: bold;">Avg. Disk sec/Transfer</span>, a direct measure of <span style="font-weight: bold;">disk response time</span> from the point of view of the device driver. diskperf also maintains byte counts and separate counters for reads and writes, at both the <span style="font-weight: bold;">Logical</span> and <span style="font-weight: bold;">Physical</span> Disk level. (This allows Avg. Disk sec/Transfer to be broken out into reads and writes.)</p>
<p>The <span style="font-weight: bold;">Avg. Disk sec/Transfer</span> measurement reported is based on the <span style="font-weight: bold;">complete roundtrip time of a request</span>. It is a direct measure of <span style="font-weight: bold;">disk response time</span>- which means it <span style="font-weight: bold;">includes queue time</span>. Queue time is the time spent waiting for the device because it is busy with another request or waiting for the SCSI bus to the device because it is busy.</p>
<p><span style="font-weight: bold;">% Disk Time </span>is a value derived by diskperf from the sum of all <span style="font-weight: bold;">IRP roundtrip times (Avg.Disk sec/Transfer)</span> multiplied by <span style="font-weight: bold;">Disk Transfers/sec</span>, and divided by duration, or essentially:</p>
<ul>% Disk Time = Avg Disk sec/Transfer * Disk Transfers/sec</ul>
<p>which is a calculation (subject to capping when it exceeds 100 percent).</p>
<p>Because the <span style="font-weight: bold;">Avg. Disk sec/Transfer</span> that <span style="font-weight: bold;">diskperf</span> measures includes disk queuing, <span style="font-weight: bold;">% Disk Time</span> can grow <span style="font-weight: bold;">greater than 100 percent</span> if there is <span style="font-weight: bold;">significant disk queuing</span> (at either the Physical or Logical Disk level). The Explain text in the official documentation suggests that this product of <span style="font-weight: bold;">Avg. Disk sec/Transfer</span> and <span style="font-weight: bold;">Disk Transfers/sec</span> measures <span style="font-weight: bold;">% Disk busy</span>. If (and this a big “if”) the IRP roundtrip time represented only service time, then the % Disk Time calculation would correspond to disk utilization. But Avg. Disk sec/Transfer includes queue time, so the formula used actually calculates something entirely different.</p>
<p><a href="http://www.oreillynet.com/pub/a/network/2002/01/18/diskperf.html" target="_blank"><span style="text-decoration: underline;"><span style="color: #0066cc;">(Source: O’Reilly Network)</span></span></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/analyze/disk-read-time-disk-write-time-not-equals-to-disk-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
