{"id":104492,"date":"2020-11-27T07:00:00","date_gmt":"2020-11-27T15:00:00","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/oldnewthing\/?p=104492"},"modified":"2020-11-27T05:15:35","modified_gmt":"2020-11-27T13:15:35","slug":"20201127-00","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20201127-00\/?p=104492","title":{"rendered":"Disk and File I\/O performance with ETW traces: Miscellany"},"content":{"rendered":"<p>Building upon the <a href=\"https:\/\/devblogs.microsoft.com\/oldnewthing\/20201125-00\/?p=104480\"> preliminary notes on analyzing Disk and File I\/O performance with ETW traces<\/a>, I&#8217;ll go into some more of the columns in the data.<\/p>\n<p>The <i>Priority<\/i> column represents the I\/O priority, where higher numbers are more urgent and lower numbers are less urgent. As a general rule, the system will attempt to satisfy higher priority I\/O before low priority I\/O, although it will let some lower priority I\/O trickle through every so often to avoid starvation.<\/p>\n<p>Normal priority is priority 3, and this is the priority for your typical application-initiated I\/O. Applications can also issue I\/O at priority zero, which makes it take a back seat to other I\/O.\u00b9 Search indexers use priority zero, for example, so that indexing operations do not interfere with normal I\/O. Applications do not have access to I\/O priority above 3. Those are reserved for system components.<\/p>\n<p>Another interesting column is <i>Source<\/i>. Values for this column are <i>Original<\/i>, <i>Prefetch<\/i>, <i>VolSnap<\/i>, and <i>Unknown<\/i>.<\/p>\n<p>Most I\/O is marked as <i>Original<\/i>, which means basically that there&#8217;s nothing special going on. The I\/O occurred because somebody explicitly asked for it.<\/p>\n<p>If the I\/O is marked <i>Prefetch<\/i>, then this is I\/O was initiated by <a href=\"https:\/\/docs.microsoft.com\/en-us\/previous-versions\/windows\/desktop\/xperf\/readyboot-quick-start-guide\"> ReadyBoot<\/a>, which should not be confused with <i>ReadyBoost<\/i>. (The similarity in the names is quite unfortunate.) <i>ReadyBoot<\/i> (without the <i>s<\/i>) prefetches data off the disk during boot based on its observations of what data was read from disk during previous boot sessions, hoping to stay one step ahead of the system&#8217;s actual I\/O needs.<\/p>\n<p>Another curiousity of ReadyBoot I\/O is that it occurs below the file system level, so the file name in the events will be <i>Unknown<\/i>. You can use the <i>Source<\/i> column to identify that the I\/O came from ReadyBoot.<\/p>\n<p>I\/O that is marked as <i>VolSnap<\/i> is initiated by volume snapshots. Volume snapshots capture the state of the disk at a moment in time. It would be expensive to make a copy of every byte of the disk when a snapshot is taken, so instead the snapshot is done lazily. The first time a write occurs to a part of the disk that was part of a snapshot, you actually get multiple operations:<\/p>\n<ul>\n<li>A read is issued to the disk to obtain the data that is about to be overwritten.<\/li>\n<li>A write is issued to the disk to write the old data to some other part of the disk for safekeeping.<\/li>\n<li>The original write request is allowed to go through.<\/li>\n<\/ul>\n<p>The I\/O operations resulting from volume snapshot lazy-copies are marked with the <i>VolSnap<\/i> source.<\/p>\n<p>You will see <i>Unknown<\/i> as the source for Flush operations, since they apply to the disk as a whole, not to any individual file.<\/p>\n<p>\u00b9 Notice that disk priority is opposite of bug priority. For bug priority, <a href=\"https:\/\/devblogs.microsoft.com\/oldnewthing\/20081121-00\/?p=20123\"> lower numbers represent greater importance<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A few other columns.<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[26],"class_list":["post-104492","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-other"],"acf":[],"blog_post_summary":"<p>A few other columns.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/104492","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=104492"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/104492\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=104492"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=104492"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=104492"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}