Western Digital Out First With 4K Sectored Drives

In a move planned since the turn of the century, Western Digital's latest Caviar Green drives use 4K data sectors rather than the 512 (and occasionally 520) byte sectors that have been the norm. The larger sector size both boosts the formatted capacity and enables better ECC that can correct larger errors than today's drives could. Since today's operating systems and RAID controllers are expecting 512 byte blocks, the Caviar Green does 512 byte emulation, but as most of us would suspect, there a

Howard Marks

January 4, 2010

5 Min Read
NetworkComputing logo in a gray background | NetworkComputing

In a move planned since the turn of the century, Western Digital's latest Caviar Green drives use 4K data sectors rather than the 512 (and occasionally 520) byte sectors that have been the norm. The larger sector size both boosts the formatted capacity and enables better ECC that can correct larger errors than today's drives could. Since today's operating systems and RAID controllers are expecting 512 byte blocks, the Caviar Green does 512 byte emulation, but as most of us would suspect, there are a few pitfalls awaiting blind installation of a 4K drive in a system that's not ready for it.

While the jump from 512 byte to 4K sectors is the first change to disk sector size in a couple of decades, using larger sector sizes to reduce the overhead of sector headers and trailers is an old technique.  Back in the '80s, I made a few dollars writing BIOS hacks for CP/M machines that allowed them to format their floppies with 1024 byte sectors for a 20 percent capacity boost over the default 128 or 256 byte sectors. Back then, larger sectors had the drawback of increasing the minimum allocation block size wasting disk space in breakage as the small files of the time had to be allocated in 1K blocks. A 1200 byte letter written in WordStar would use 2048 bytes on disk formatted for 1K sectors but just 1280 bytes on a disk with 256 byte sectors.  

While the capacity boost from bigger sectors is nice, WD gets about 11 percent more data on the drive from using 4K sectors they've dubbed Advanced Formatting, the driving force to 4K sectors is the improved error correction. As drive vendors cram more bits into the same space, the strength of the electrical signal in the drive's heads decreases. Unfortunately the background noise level remains the same, so picking out data from amongst the noise becomes harder in each generation of drive. Some report that the bit error rate of data for today's drives is around one in a million (10^6), so drives are already highly dependent on ECC to deliver their expected 10^14 error rate. Smaller bits also means that a surface defect, even one just a micron in size, wallops more bits, so the ECC needs to be more robust.  

Vendors could have added extended ECC to the 512 data block in each sector, but that would reduce the available space for user data.  Since ECC algorithms are more efficient for larger data blocks, a drive with 4K sectors could use 100 bytes per sector of ECC and be able to correct errors up to 1000 bits long, while a drive with 80 bytes of ECC per 512 byte data sector, which is twice what today's drives use, could only correct an 800 bit error. Bigger sectors means better ECC and more user data. Who could complain about that?  Okay, some have complained that WD hasn't boosted the spec sheet BER to reflect the better ECC, but from where I sit the spec sheet is just marketing anyway.

The other good news is that 4K turns out to be something of a magic number for today's computers. X86 processors work in 4K memory pages, and most file systems, including NTFS and HFS+, use 4K allocation clusters and database applications from Oracle to Exchange to read and write data to the disk in pages that are 4K or a multiple of 4K bytes. Once we clear the startup phase, and servers are actually reading and writing their disks in native 4K blocks, we could get additional marginal efficiency by managing resources in 4K chunks.Until then drives will provide 512 byte sector emulation by translating requests for 512 byte blocks to 512 byte regions of the physical 4K sector.  Since most reads and writes are for eight or more 512 byte blocks anyway, the translation should be a simple matter. The problem, as any admin that's set up Windows servers to use SAN storage knows, is alignment. Tell a drive formatted for 4K sectors to write data to 512 byte blocks number 64-72, and it will write one 4K sector. However, if you tell it to write the same data to blocks 63-71 and it has to read, update and write two 4K sectors, it will take at least two disk rotation times. Properly aligning data pages to disk blocks can have a significant impact on system performance.

Early versions of Windows, including the still widely used XP and Server 2003, allocate the first 62 blocks for partition tables, boot sectors and other housekeeping starting their data on block 63. Microsoft, knowing 4K blocks were coming, added support in Vista and Server 2008 so new systems will align their data properly. The problem can still crop up with drive imaging.  If you install Windows on a 512 byte per sector drive and clone it to a 4K drive your system may end up misaligned. Hopefully, Symantec, Acronis and the rest of the imaging vendors will add re-alignment to their products soon. OSX and Linux have been aligning their data on 4K boundaries for a while giving their users another reason to be smug.

Since enterprise vendors carefully vet drives before using them, most array users are safe. Those using add your own drive or roll your own arrays, on the other hand, should be careful.  Data Robotics has already recommended Drobo users not install drives with Advanced Formatting until a firmware update supports it explicitly. Those looking for more details should see Western Digital's white paper here and the excellent write up at Anandtech.com here.

About the Author

Howard Marks

Network Computing Blogger

Howard Marks</strong>&nbsp;is founder and chief scientist at Deepstorage LLC, a storage consultancy and independent test lab based in Santa Fe, N.M. and concentrating on storage and data center networking. In more than 25 years of consulting, Marks has designed and implemented storage systems, networks, management systems and Internet strategies at organizations including American Express, J.P. Morgan, Borden Foods, U.S. Tobacco, BBDO Worldwide, Foxwoods Resort Casino and the State University of New York at Purchase. The testing at DeepStorage Labs is informed by that real world experience.</p><p>He has been a frequent contributor to <em>Network Computing</em>&nbsp;and&nbsp;<em>InformationWeek</em>&nbsp;since 1999 and a speaker at industry conferences including Comnet, PC Expo, Interop and Microsoft's TechEd since 1990. He is the author of&nbsp;<em>Networking Windows</em>&nbsp;and co-author of&nbsp;<em>Windows NT Unleashed</em>&nbsp;(Sams).</p><p>He is co-host, with Ray Lucchesi of the monthly Greybeards on Storage podcast where the voices of experience discuss the latest issues in the storage world with industry leaders.&nbsp; You can find the podcast at: http://www.deepstorage.net/NEW/GBoS

SUBSCRIBE TO OUR NEWSLETTER
Stay informed! Sign up to get expert advice and insight delivered direct to your inbox

You May Also Like


More Insights