{"id":13179,"date":"2012-07-26T09:00:00","date_gmt":"2012-07-26T08:00:00","guid":{"rendered":"https:\/\/aidanfinn.com\/?p=13179"},"modified":"2012-07-26T09:00:00","modified_gmt":"2012-07-26T08:00:00","slug":"why-windows-server-2012-hyper-v-vhdx-4k-alignment-is-so-important","status":"publish","type":"post","link":"https:\/\/aidanfinn.com\/?p=13179","title":{"rendered":"Why Windows Server 2012 Hyper-V VHDX 4K Alignment Is So Important"},"content":{"rendered":"<p>Back in 2009, ZDNet asked if we were <a href=\"http:\/\/www.zdnet.com\/blog\/storage\/are-you-ready-for-4k-sector-drives\/731\" target=\"_blank\">ready for 4K sector drives<\/a>.\u00a0 That was because the storage industry is shifting from 512 byte sector drives to 4K sector drives.\u00a0 And that is going to cause a problem for operating systems and virtualisation that are not ready for 4K sector disks.<\/p>\n<p>To smooth the shift, the storage industry is giving us Advanced Format 512e disks that are physically 4096 byte (4K) sector aligned but emulate 512 byte disks in their firmware.\u00a0 This <a href=\"http:\/\/en.wikipedia.org\/wiki\/Advanced_Format#Advanced_Format_512e\" target=\"_blank\">wiki page<\/a> describes how this emulation works.\u00a0 Note that the read process <em>should<\/em> not cause performance issues (but might) but the emulated read-modify-write (RMW \u2013 4K is read in, 512 bytes are modified in the 4K, disk is spun, and old 4K is overwritten) process could actually have a significant performance price (Microsoft <a href=\"http:\/\/technet.microsoft.com\/en-us\/library\/hh831459\" target=\"_blank\">say<\/a> 30% to 80%).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"display: block; float: none; margin-left: auto; margin-right: auto;\" src=\"http:\/\/blogs.msdn.com\/cfs-file.ashx\/__key\/communityserver-blogs-components-weblogfiles\/00-00-01-29-43-metablogapi\/0878.Read_2D00_Modify_5F00_Write_5F00_thumb_5F00_20CC9841.png\" alt=\"4K Physical Sector is shown with 8 chunks of 512 each. Step 1: Read 4K Sector into Cache from Media. Arrow. Step 2: Update 512-byte Logical Sector in Cache (one of 512 blocks highlighted). Step 3: Overwrite previous 4 K Physical Sector on Media.\" width=\"400\" height=\"200\" \/><\/p>\n<p>The following OS\u2019s <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/hh848035(v=vs.85).aspx\" target=\"_blank\">support<\/a> 512e drives:<\/p>\n<ul>\n<li>Windows 8<\/li>\n<li>Windows Server 2012<\/li>\n<li>Windows 7 w\/ MS KB 982018<\/li>\n<li>Windows 7 SP1<\/li>\n<li>Windows Server 2008 R2 w\/ MS KB 982018<\/li>\n<li>Windows Server 2008 R2 SP1<\/li>\n<li>Windows Vista w\/ MS KB 2553708<\/li>\n<li>Windows Server 2008 w\/ MS KB 2553708<\/li>\n<\/ul>\n<p>Eventually we\u2019ll start to see native 4K disks with no emulation.\u00a0 Microsoft <a href=\"http:\/\/technet.microsoft.com\/en-us\/library\/hh831459\" target=\"_blank\">says<\/a>:<\/p>\n<blockquote><p>The current VHD driver assumes a physical sector size of 512 bytes and issues 512-byte I\/Os, which makes it incompatible with these disks. As a result, the current VHD driver cannot open VHD files on physical 4 KB sector disks. Hyper-V makes it possible to store VHDs on 4 KB disks by implementing a software RMW algorithm in the VHD layer to convert the 512-byte access and update request to the VHD file to corresponding 4 KB accesses and updates.<\/p><\/blockquote>\n<p>RMW is bad, mmm-kay!\u00a0 If you\u2019re on 4K disks (either native or 512e) then you\u2019re going to want 4K aligned virtualised storage to maintain performance.<\/p>\n<p>Only Windows Server 2012 and Windows 8 support native 4K disks (with no 512 emulation) with no emulation.\u00a0 They also offer us the 4K aligned VHDX file.\u00a0 That means if you\u2019re using 4K disks (native or 512e) and you want performance, then you should use VHDX files.<\/p>\n<p>Note that vSphere 5.0 does not support 4K disks yet.<\/p>\n<div id=\"scid:0767317B-992E-4b12-91E0-4F059A8CECA8:b2ca97ed-9b9c-41b6-b2b2-6ed9a2734839\" class=\"wlWriterEditableSmartContent\" style=\"margin: 0px; display: inline; float: none; padding: 0px;\">Technorati Tags: <a rel=\"tag\" href=\"http:\/\/technorati.com\/tags\/Windows+Server+2012\">Windows Server 2012<\/a>,<a rel=\"tag\" href=\"http:\/\/technorati.com\/tags\/Hyper-V\">Hyper-V<\/a>,<a rel=\"tag\" href=\"http:\/\/technorati.com\/tags\/Virtualisation\">Virtualisation<\/a>,<a rel=\"tag\" href=\"http:\/\/technorati.com\/tags\/Storage\">Storage<\/a>,<a rel=\"tag\" href=\"http:\/\/technorati.com\/tags\/Windows+Server+8\">Windows Server 8<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Back in 2009, ZDNet asked if we were ready for 4K sector drives.\u00a0 That was because the storage industry is shifting from 512 byte sector drives to 4K sector drives.\u00a0 And that is going to cause a problem for operating systems and virtualisation that are not ready for 4K sector disks. To smooth the shift, &hellip; <a href=\"https:\/\/aidanfinn.com\/?p=13179\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Why Windows Server 2012 Hyper-V VHDX 4K Alignment Is So Important&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[20],"tags":[181,99,195,118],"class_list":["post-13179","post","type-post","status-publish","format-standard","hentry","category-hyper-v","tag-hyper-v","tag-storage","tag-virtualisation","tag-windows-server-2012"],"aioseo_notices":[],"jetpack_featured_media_url":"","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/posts\/13179","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=13179"}],"version-history":[{"count":0,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/posts\/13179\/revisions"}],"wp:attachment":[{"href":"https:\/\/aidanfinn.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=13179"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=13179"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=13179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}