{"id":1598,"date":"2014-02-21T09:16:52","date_gmt":"2014-02-21T15:16:52","guid":{"rendered":"http:\/\/www.poweradmin.com\/blog\/?p=1598"},"modified":"2015-04-24T16:41:44","modified_gmt":"2015-04-24T21:41:44","slug":"measuring-disk-latency-windows-performance-monitor","status":"publish","type":"post","link":"https:\/\/www.poweradmin.com\/blog\/measuring-disk-latency-windows-performance-monitor\/","title":{"rendered":"Measuring Disk Latency-Windows Performance Monitor"},"content":{"rendered":"<p>\n\t<a href=\"\/blog\/wp-content\/uploads\/2014\/02\/windows-performance-monitor-perfmon.png\" rel=\"\" style=\"\" target=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" alt=\"Windows Performance Monitor - Perfmon\" class=\"alignleft size-medium wp-image-1603\" height=\"200\" src=\"\/blog\/wp-content\/uploads\/2014\/02\/Windows-Performance-Monitor-Perfmon-300x235.png\" style=\"margin-right: 20px; margin-top: 5px; margin-bottom: 5px;\" title=\"Windows Performance Monitor - Perfmon\" width=\"256\"><\/a><span style=\"font-size:16px;\"><span style=\"font-family: tahoma,geneva,sans-serif;\">Physical Disk Latency is, in a nutshell, a measure of the delay from when a disk Input\/output (I\/O) request is created until it\u2019s completed. It determines how fast a computer responds to various tasks and increased latency can be a sign of a problem with the system, or simply that it\u2019s overworked.<\/span><\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:16px;\"><span style=\"font-family: tahoma,geneva,sans-serif;\">In the old days of floppy drives, a disk I\/O bottleneck was more obvious. As the drive read data from the disk, the CPU would sit and wait for the data to arrive. Now that the disk is integrated things are more complex, but the I\/O bottleneck conundrum still exists and the processor still has to wait for data to physically arrive. As hard disks are mechanical, it has to rotate to the correct sector for a start.<\/span><\/span>\n<\/p>\n<h2>\n\t<span style=\"font-size:16px;\"><span style=\"font-family: tahoma,geneva,sans-serif;\"><span style=\"color:#008000;\"><strong>How slow is your System?<\/strong><\/span><\/span><\/span><br>\n<\/h2>\n<p>\n\t<span style=\"font-size:16px;\"><span style=\"font-family: tahoma,geneva,sans-serif;\">As a rule of thumb <a href=\"http:\/\/www.msexchange.org\/articles-tutorials\/exchange-server-2013\/planning-architecture\/disk-performance-testing-jetstress-2013.html\" rel=\"nofollow\" target=\"_blank\"> less than 10 milliseconds is a good time <img class=\"extlink-icon\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/plugins\/external-links-nofollow-open-in-new-tab-favicon\/images\/extlink.png\"><\/a> and more than 20 milliseconds shows the system is running slowly, although there are exceptions and this is merely a guide.<\/span><\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:16px;\"><span style=\"font-family: tahoma,geneva,sans-serif;\"><a href=\"http:\/\/blogs.msdn.com\/b\/ntdebugging\/archive\/2013\/09\/30\/performance-monitor-averages-the-right-way-and-the-wrong-way.aspx\" rel=\"nofollow\" target=\"_blank\">Windows Performance Monitor (Perfmon) is the standard means of testing the disk latency <img class=\"extlink-icon\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/plugins\/external-links-nofollow-open-in-new-tab-favicon\/images\/extlink.png\"><\/a> and measures the whole latency, including time spent in the hardware, as well as in the Microsoft Port Driver queue. The latter is a potential bottleneck. If a number of processes are in action at once it causes a large storport queue. This forces the IO to a halt until it can be sent to the hardware layers.<\/span><\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:16px;\"><span style=\"font-family: tahoma,geneva,sans-serif;\">Windows Performance Monitor is the standard way of measuring disk performance in Windows. It can capture data over lengthy time periods, does a solid job with averages and is also a solid tool for creating a baseline and doing basic troubleshooting. Perfmon is its accepted nickname and comes from the name of the executable file.<\/span><\/span>\n<\/p>\n<h2>\n\t<span style=\"color:#006400;\"><span style=\"font-size: 16px;\"><span style=\"font-family: tahoma,geneva,sans-serif;\"><strong>Physical &amp; Logical<\/strong><\/span><\/span><\/span><br>\n<\/h2>\n<p>\n\t<span style=\"font-size:16px;\"><span style=\"font-family: tahoma,geneva,sans-serif;\">Perfmon has two objects related to disk performance: Physical Disk and Logical Disk. The Physical Disk performance object monitors disk drives on the computer. It identifies the instances representing the physical hardware, while the Logical Disk performance object monitors logical partitions and identifies them by their mounting point. Logical volumes can span more than one physical disk.<\/span><\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:16px;\"><span style=\"font-family: tahoma,geneva,sans-serif;\">There are some things Perfmon cannot do, but it is a good, basic, all-purpose tool.<\/span><\/span>\n<\/p>\n<h2>\n\t<span style=\"font-size:16px;\"><span style=\"font-family: tahoma,geneva,sans-serif;\"><span style=\"color:#006400;\"><strong>Create Charts and Metrics<\/strong><\/span><\/span><\/span><br>\n<\/h2>\n<p>\n\t<span style=\"font-size:16px;\"><span style=\"font-family: tahoma,geneva,sans-serif;\">Perfmon can be used to create a chart and metrics of the Last, Average, Minimum and Maximum values, which are all useful. When you\u2019re looking for things like memory leak then a sudden dip or spike in the mean line is a clear indicator of an issue.<\/span><\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:16px;\"><span style=\"font-family: tahoma,geneva,sans-serif;\">There are three counters:<\/span><\/span>\n<\/p>\n<ul>\n<li>\n\t\t<span style=\"font-size:16px;\"><span style=\"font-family: tahoma,geneva,sans-serif;\">Read counter<\/span><\/span>\n\t<\/li>\n<li>\n\t\t<span style=\"font-size:16px;\"><span style=\"font-family: tahoma,geneva,sans-serif;\">Write counter<\/span><\/span>\n\t<\/li>\n<li>\n\t\t<span style=\"font-size:16px;\"><span style=\"font-family: tahoma,geneva,sans-serif;\">Transfer Counter<\/span><\/span>\n\t<\/li>\n<\/ul>\n<p>\n\t<span style=\"font-size:16px;\"><span style=\"font-family: tahoma,geneva,sans-serif;\">The Transfer Counter is the combined average of Read and Write latency. The data is taken at the Partition Manager, so the readings concern the time spent beneath the Partition Manager level. So the latency measurement includes time spent in the Class Driver, Port Driver, Device Miniport Driver, and Disk Subsystem.<\/span><\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:16px;\"><span style=\"font-family: tahoma,geneva,sans-serif;\">The disk can only take a set number of IO requests before it starts a queue and the Windows Performance Monitor includes time spent in queues in the latency measurement.<\/span><\/span>\n<\/p>\n<h2>\n\t<span style=\"color:#006400;\"><span style=\"font-size: 16px;\"><span style=\"font-family: tahoma,geneva,sans-serif;\"><strong>Bigger Queues, Larger Latency Reading<\/strong><\/span><\/span><\/span><br>\n<\/h2>\n<p>\n\t<span style=\"font-size:16px;\"><span style=\"font-family: tahoma,geneva,sans-serif;\">So bigger queues mean a bigger latency reading, and the queues can occur in the following places:<\/span><\/span>\n<\/p>\n<ul>\n<li>\n\t\t<span style=\"font-size:16px;\"><span style=\"font-family: tahoma,geneva,sans-serif;\">Microsoft Port Driver Queue<\/span><\/span>\n\t<\/li>\n<li>\n\t\t<span style=\"font-size:16px;\"><span style=\"font-family: tahoma,geneva,sans-serif;\">Vendor Supplied Device Driver Queue.<\/span><\/span>\n\t<\/li>\n<li>\n\t\t<span style=\"font-size:16px;\"><span style=\"font-family: tahoma,geneva,sans-serif;\">Hardware Queues.<\/span><\/span>\n\t<\/li>\n<\/ul>\n<p>\n\t<span style=\"font-size:16px;\"><span style=\"font-family: tahoma,geneva,sans-serif;\">\u00b7 The hard disk spends time servicing the IO and this, as well as the travel time to the Partition Manager, is included as a queue.<\/span><\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:16px;\"><span style=\"font-family: tahoma,geneva,sans-serif;\">The Port Driver is the last Microsoft component in the chain before the Device Miniport Driver takes over. If there\u2019s a logjam and a queue there because the Device Miniport Driver can\u2019t take more IO at that moment, IO starts to back up and gather on the Port Driver Queue.<\/span><\/span>\n<\/p>\n<h2>\n\t<span style=\"color:#006400;\"><span style=\"font-size: 16px;\"><span style=\"font-family: tahoma,geneva,sans-serif;\"><strong>RAID <\/strong><\/span><\/span><\/span><br>\n<\/h2>\n<p>\n\t<span style=\"font-size:16px;\"><span style=\"font-family: tahoma,geneva,sans-serif;\">Microsoft\u2019s Port Driver queue is limited only by the RAM and so can grow fast, as the RAM is in a different league to the hard disk in terms of speed, too. This produces large measured latency readings. Queues can be controlled, but in terms of measurement it\u2019s important to simply understand how the queues build up between the Microsoft and proprietary hardware in particular.<\/span><\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:16px;\"><span style=\"font-family: tahoma,geneva,sans-serif;\">For SCSI, as found in a RAID system, Storport tracing can be used to measure latency. This only works to measure the latency beneath the Port Driver, however, and doesn\u2019t apply to time spent above the Storport queue. It\u2019s the lowest level where it\u2019s possible to monitor the latency inside Windows, though, before the IO is passed across to the third-party components.<\/span><\/span>\n<\/p>\n<h2>\n\t<span style=\"color:#006400;\"><span style=\"font-size: 16px;\"><span style=\"font-family: tahoma,geneva,sans-serif;\"><strong>Understanding Windows Data<\/strong><\/span><\/span><\/span><br>\n<\/h2>\n<p>\n\t<span style=\"font-size:16px;\"><span style=\"font-family: tahoma,geneva,sans-serif;\">It is worth remembering that Windows Performance Monitor simply filters and interprets data provided by other Windows systems. It does not create anything new bar the readings. Understanding the latency of the system can be the first step in speeding up the system, though, and Perfmon averages results and rounds numbers to provide small log files and useful information in a hurry.<\/span><\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:16px;\"><span style=\"font-family: tahoma,geneva,sans-serif;\">For more precise information, there are other, more powerful, tools available. But Windows Performance Monitor is an accessible diagnostic tool that can answer most questions about the disk latency without a full system interruption.<\/span><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Physical Disk Latency is, in a nutshell, a measure of the delay from when a disk Input\/output (I\/O) request is created until it\u2019s completed. It determines how fast a computer responds to various tasks and increased latency can be a sign of a problem with the system, or simply that it\u2019s overworked. In the old [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":1600,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,5,9,8],"tags":[],"class_list":["post-1598","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-general-it","category-how-to","category-technical","category-windows"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/posts\/1598","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/comments?post=1598"}],"version-history":[{"count":5,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/posts\/1598\/revisions"}],"predecessor-version":[{"id":3534,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/posts\/1598\/revisions\/3534"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/media\/1600"}],"wp:attachment":[{"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/media?parent=1598"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/categories?post=1598"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/tags?post=1598"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}