Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've noticed that some Western Digital hard drives are now sporting 4K sectors, that is, the sectors are larger: 4096 bytes vs. the long-standing standard of 512 bytes. So:

  • What's the big deal with 4K sectors? Is it marketing hype, or a real advantage?
  • Why should somebody building a new PC care, or not, about 4K sectors?
  • Why is this transition taking place now? Why didn't it happen sooner?
  • Are there things to look out for when buying a 4K sector hard drive? e.g. incompatibility?
  • Anything else we should know about 4K sectors?
share|improve this question

4 Answers 4

up vote 8 down vote accepted

Bar none, this is the best article I have read on the topic:

http://www.anandtech.com/show/2888

In a nutshell, to answer your questions:

  • What's the big deal with 4K sectors?

The primary advantage is more efficient use of the raw storage space. The necessary ECC calculations were starting to provide diminishing returns using 512 byte sectors, but they can be done much more efficiently on larger sector sizes.

  • Is it marketing hype, or a real advantage?

The real advantage is that drives larger than 2TB will be more affordable and reliable sooner than without the transition. The same idea holds for smaller drives too, but the returns aren't as dramatic. There are some theoretical advantages to having the sector size map to the common allocation size in a volume (4K for NTFS is about as common as dirt) and memory pages are generally 4K in size as well (makes the pagefile/swap happy).

  • Why should somebody building a new PC care, or not, about 4K sectors?

Today - the only thing you should care about it is probably not getting one. There are still a few kinks that are being worked out that if you aren't aware of might cause you grief. Windows XP support is one, the drives lying about their geometry is another.

  • Why is this transition taking place now? Why didn't it happen sooner?

It has been in transition for many years already, but consumer drives are just starting to appear on the market.

  • Are there things to look out for when buying a 4K sector hard drive? e.g. incompatibility?

You probably won't experience a problem with Windows 7 or Vista, but any of the older Microsoft OS's might cause you grief. There is compatibility built in, but because of sector alignment issues it might cause performance degradation.

  • Anything else we should know about 4K sectors?

Read the article, brush up on your math, and then read it again. Really it is a good thing and will enable the storage industry to continue forward more rapidly.

share|improve this answer
    
Also, I believe it equals more storage for the sticker capacity. arstechnica.com/microsoft/news/2010/03/… –  Nathaniel Apr 21 '10 at 23:55

512 byte sectors started whenever we had really small media, like less than 300k floppy disks. It made sense then, it doesn't really make sense now. The thing about 4k sectors is that a lot of drives are already using it, but they have firmware faking 512 sectors. This is especially true for flash media and SSDs. I believe 4k is the de-facto internal SSD standard.

So manufacturers just figured to cut out the middle man and let the OS handle the 4k sectors in a way it knows how to(which ends up being better once we get full support for it)

If you're building a new PC it does matter. Some OSs may not support 4k sectors at all(read: older) and most OSs and filesystems still are optimized for 512 byte sectors. One thing that comes to mind is OpenBSD. It currently does not perform as well with 4k sectors compared to 512 byte sectors. Among the problems is partition alignment. By default, the first partition is not aligned on a 4k boundary.

The transition is probably taking place now because of the large surge of SSDs. SSDs like I said use 4k sectors internally anyway, so it's much better to let the OS handle these raw than leave it up to the firmware to try to guess what the OS wants.

I'm sure some old motherboards may have problems with such harddrives, but anything you bought recently(past 5 years) should definitely be compatible.

share|improve this answer
    
What if I write my own OS? Do I still need to care about 4k at the beginning or will it work fine? –  Cole Johnson Sep 8 '12 at 4:23
    
@ColeJohnson it depends. If you're writing your own ATA driver, then yes, you'll have to make sure that your sector size isn't assumed to be 512 bytes. If you're using the BIOS(ala int 13h), then it depends on your BIOS. I imagine some may try to emulate 512 byte sectors for compatibility, but I don't know really –  Earlz Sep 8 '12 at 4:59
    
I thought it was the hard drive hardware that emulated it not bios –  Cole Johnson Sep 11 '12 at 23:16
    
@ColeJohnson it is harddrive hardware. Some BIOSs may have problems booting from 4K sector disks though, or only load 512 bytes. I'm not saying that's the case with any motherboard, but it's a possibility since it was a common assumption years ago that sectors are 512 bytes –  Earlz Sep 12 '12 at 4:49

here's an in depth on what and why http://lwn.net/Articles/322777/

Windows XP doesn't support it. Linux userspace tools are not all there yet.

share|improve this answer

It's interesting that the linked article focused on hard drives, when the performance advantages of larger sector sizes with flash media can be even more significant. Unlike a hard drive, where sectors may inherently be written independently, and writing to one sector 31 times per second for a year would pose no more wear than writing 31 different sectors per second for a year, a typical flash chip will be divided into large blocks, each containing many 528-byte pages, subject to the following restrictions:

  1. It is possible to write a blank page, or to erase all pages in a block. It is not possible to write to a page which isn't blank except by erasing all of the pages in the block.

  2. If a block is erased more than a few thousand times, its performance and reliability will degrade to the point that it is no longer usable.

Because of these limitations, nearly all flash drives are designed so that writing a sector does not physically replace the contents of the page which previously held that sector's data, but instead stores a copy of the new data at some other location and then updates some sort of data structure to indicate that the data should be found in a new location, and that the previous copy should be considered "garbage". If the amount of available space on the drive gets low, the drive will identify blocks which contain mostly "garbage", relocate anything on those blocks that isn't garbage, and then erase the blocks. Further, because there is a lifetime limit of the number of times each block can be used, files which haven't been touched for awhile but are sitting on blocks that haven't been used very much may get relocated so as to take advantage of the fact that the drive will then be able to repeatedly use and recycle the blocks they were sitting on.

In cases where the user of a drive would frequently alter individual sectors, the fact that each sector write only requires writing and recycling a single 528-byte page could be an advantage for the smaller sector size compared with having each write force the cycling of eight 528-byte pages. On the other hand, the "bookkeeping" costs associated with a single logical 4096-byte sector update would likely be a fraction of those that would be associated with eight independent 512-byte sector updates [indeed, they could be less than the costs associated with even a single 512-byte sector update, since the drive would only have to manage 1/8 as many total sectors.]

Depending upon access patterns, there would be some cases where a flash drive with 4K sectors would perform less well than one with 512-byte sectors, but there would be others where performance of the 4K drive could end up being noticeably better.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.