Sign in with
Sign up | Sign in
Your question
Solved

4k sectors in Win7

Last response: in Storage
Share
September 23, 2010 6:19:53 PM

Hello,
I have been reading about the new 4k sector format. It is said that Windows 7 supports 4k sectors. But then, it is also said that ALL 4k drives on the market today still interface with 512 bytes.

These two statements do not add up? If the HDD talks 512 bytes, then there is no difference between Win7 and WinXP except for the alignment problem?

More about : sectors win7

a c 232 $ Windows 7
a c 383 G Storage
September 23, 2010 7:07:54 PM

They are using 512k emulation for now until all the vendor can update their software to work with 4K sectors, especially the backup/cloning software vendors. Then they will switch to native 4K sectors.

Quote:
Will 4k sectors use capacity faster?
If you write 500 bytes and the minimum sector is 4k, will that write take up the full 4k, wasting 3.5 KB? No.

The initial WD drives - and I assume other vendors as well - will operate in a 512 byte emulation mode. Eventually new disks will operate in native 4k mode, and then you might have a concern. But many operating systems already do 4k IO, and at a couple of cents per future GB, who cares?

The emulation mode puts 8 512 byte writes into a single 4k sector. There is no loss at all. Here’s a picture:


Read this article.
http://www.zdnet.com/blog/storage/are-you-ready-for-4k-...
m
0
l
a c 209 $ Windows 7
a c 415 G Storage
September 23, 2010 7:40:37 PM

The newer versions of Windows work with disks that have 4K sector sizes, but older versions don't. The industry is loath to deal with support calls that will come from people who buy disks that won't work with older systems - that's why we've been stuck with disks no larger than 2TB for such a long time.
m
0
l
Related resources
September 23, 2010 8:41:55 PM

sminlal said:
The newer versions of Windows work with disks that have 4K sector sizes, but older versions don't.


Wait, I'm assuming newer Windows means Vista and Seven. I know these drives can be used in XP too as long as it's aligned correctly. Even if not aligned, it still works though performance suffers. So I don't get your point here.
m
0
l
a c 209 $ Windows 7
a c 415 G Storage
September 24, 2010 2:53:03 AM

When I talk about OS support for drives with 4K sector sizes, I'm not taking about the current crop of "advanced format" drives that have 4K sectors internally but which emulate 512-byte sector drives. From the OS point of view, there's no difference - they both look like drives that store 512 bytes per sector.

Windows 7 & Vista support drives which actually accept I/O commands in which 4K bytes are read or written to a single sector. Nobody's making these drives yet because they're not backward compatible with older operating systems.

So in terms of the your original question - yes, Windows 7 does support drives with 4K-byte sectors - drives that not only store that much per sector internally but also expect the OS to read or write 4K bytes for every "logical block" on the drive.

But the current crop of 4K-sector drives all emulate a 512-byte-per-sector device. That's why they work with XP. The reason for using the larger sectors internally is that the drives can cram around 10% more bytes into a track by using fewer, larger sectors and eliminating the per-sector overhead of gaps, preambles (and to a lesser extent, ECC).

The issue with XP is that it doesn't align it's partitions on a 4K-byte sector boundary, so the emulation is very inefficient. That's why you need to either use the drive's "XP alignment" jumper or partition them using a newer OS or other tool that aligns the sectors properly.
m
0
l
September 24, 2010 6:42:27 PM

sminlal said:
When I talk about OS support for drives with 4K sector sizes, I'm not taking about the current crop of "advanced format" drives that have 4K sectors internally but which emulate 512-byte sector drives. From the OS point of view, there's no difference - they both look like drives that store 512 bytes per sector.


In addition, if I remember correctly Windows uses a default 4k block size on NTFS for disks over a couple of gigabytes, so it should always be writing complete 4k sectors even if the disk pretends it's really 512 bytes.

The big issue is the partition alignment, which Windows 7 gets right and XP always gets wrong unless you force it to do it right.
m
0
l
September 24, 2010 6:51:59 PM

MarkG said:
In addition, if I remember correctly Windows uses a default 4k block size on NTFS for disks over a couple of gigabytes, so it should always be writing complete 4k sectors even if the disk pretends it's really 512 bytes.

The big issue is the partition alignment, which Windows 7 gets right and XP always gets wrong unless you force it to do it right.


Yes, NTFS sets cluster size to 4kb. However, if the HDD interface is 512b, is it not going to be 'throttled'? If not, then in theory there is no performance difference between 4knative and 512emu in Win7?

I'm already on Win7, but am pondering if I will regret buying a HDD now considering everything is 512emu.
m
0
l

Best solution

a c 209 $ Windows 7
a c 415 G Storage
September 24, 2010 9:15:49 PM

divac said:
Yes, NTFS sets cluster size to 4kb. However, if the HDD interface is 512b, is it not going to be 'throttled'? If not, then in theory there is no performance difference between 4knative and 512emu in Win7?
No, there will be no performance difference.

Even if there were such as thing as a "true" 4KByte sector drive made today, there wouldn't be a performance difference. There's no difference between sending a commands that says:

- "write eight 512-byte sectors starting at LBN 123456" followed by 4Kbytes of data

or

- "write one 4096-byte sector starting at LBN 123456" followed by 4Kbytes of data

Both actions take one command, the command itself is the same size, and the amount of data transferred over the SATA connection is the same. So no performance difference is attributable to the difference between "native" 4K commands to a 4K drive versus 512-byte commands to a 4K drive emulating a 512-byte drive.

The reason for the 4K-byte sectors is to get more capacity per track, not because it's faster.

Mind you, because 4K sectors cram a little more data in each track, the data IS transferred a little faster than with 512-byte sectors (more data per track = more data transferred with each rotation of the platter). But that's true of ANY 4KByte/sector drive whether it emulates a 512-byte sector drive or not. The performance difference isn't about the commands used to transfer the data or the sector size that the OS thinks is being used, it's about the physical layout of data on the track.
Share
September 24, 2010 10:45:24 PM

Thank you.
m
0
l
September 24, 2010 10:45:35 PM

Best answer selected by divac.
m
0
l
September 25, 2010 11:08:43 AM

sminlal said:
No, there will be no performance difference.

Even if there were such as thing as a "true" 4KByte sector drive made today, there wouldn't be a performance difference. There's no difference between sending a commands that says:

- "write eight 512-byte sectors starting at LBN 123456" followed by 4Kbytes of data

or

- "write one 4096-byte sector starting at LBN 123456" followed by 4Kbytes of data

Both actions take one command, the command itself is the same size, and the amount of data transferred over the SATA connection is the same. So no performance difference is attributable to the difference between "native" 4K commands to a 4K drive versus 512-byte commands to a 4K drive emulating a 512-byte drive.

The reason for the 4K-byte sectors is to get more capacity per track, not because it's faster.

Mind you, because 4K sectors cram a little more data in each track, the data IS transferred a little faster than with 512-byte sectors (more data per track = more data transferred with each rotation of the platter). But that's true of ANY 4KByte/sector drive whether it emulates a 512-byte sector drive or not. The performance difference isn't about the commands used to transfer the data or the sector size that the OS thinks is being used, it's about the physical layout of data on the track.



This is not quite correct. Writing 8 sectors of 512 bytes will most likely require more head movements then 1 write of 4k. All depends on disk fragmentation, but more likely then not the 8 writes will not be contiguous all the time nor even most of the time unless you are continously defraging your disk.
m
0
l
a c 209 $ Windows 7
a c 415 G Storage
September 25, 2010 4:36:08 PM

lafontma said:
This is not quite correct. Writing 8 sectors of 512 bytes will most likely require more head movements then 1 write of 4k. All depends on disk fragmentation, but more likely then not the 8 writes will not be contiguous all the time nor even most of the time unless you are continously defraging your disk.
The default cluster size for NTFS is 4K bytes - that means the file system always reads and writes information in contiguous 4K chunks. This is the big reason that 4Kbyte-sector drives that emulate 512-byte sector drives are practical - the drive never has to update just one 512-byte piece of information in one of it's 4K sectors because the file system never makes such a request. The only time that rule breaks is if the partitions aren't aligned on 4K boundaries, and that's why XP-partitioned disks have an issue.

Reading or writing a 4K chunk will never require head movement on a drive that has 4K-byte sectors. It could only potentially require a 1-track seek on disks with 512-byte sectors if the 8 consecutive sectors happen to span from the end of one cylinder to the start of the next.
m
0
l
July 31, 2012 8:56:25 PM

I'm trying to follow you guys about this 4k thingie but my head is already spinning. I do however understand why the need is for the 4k sectors on modern hard-drives (I did some reading). I also understand hard drives now do 512 sector emulation when communicating to the host-system. But physically translate the incoming 512 logical sector data to physical 4k sectors or something. But then it gets blurry.

Would you all be so kind to help me keep it practical?

I got this brand new Samsung HD204UI harddrive which uses 4k sectors. Now what do I do now to get this new hard drive up- and running at it's best?

My system runs Windows 7 64-bit, MSI E65 AMD AM3 motherboard, with Athlon II 440 3* core processor.


Will I need to setup special BIOS options?
Do I need special BIOS functions?
What sector size to choose to format the drive corrrectly?
Do I neeed to set jumpers on the drive beforehand?
Do I need special software to format this drive properly or just 'disk management' in windows?
What software do I use to test this drive for bad sectors and performance (I do have HD-Tune Pro 4.60)

TIA for all the useful help!
m
0
l
!