I have an SSD that can be configured to report its physical sector size to an OS in two different ways:
Option 1: Logical = 512 Bytes, Physical = 512 Bytes
Option 2: Logical = 512 Bytes, Physical = 4096 Bytes (4K)
What benefit does an OS gain by being aware of the 4K physical sector size, considering:
-
The OS must talk to the drive in 512-byte sectors regardless
-
All modern OSes align to 4K and utilize 4K or multiples of 4K I/O regardless
The setting seems pointless, because modern OSes are already optimized for 4K sector drives. Modern OSes don't need to "ask" a drive whether its sectors are 512b or 4K, because the OS does everything in a 4K-friendly way by default.
For example, Windows 7 aligns partitions to 1MB (a multiple of 4K), NTFS cluster size is 4K or multiple thereof, and all I/O is done in 4K or multiple thereof. Windows doesn't give a damn what hard drive you have, it will apply the above behavior in all cases.
Anyway… my SSD has this "physical sector size" setting and so it must be there for some good reason… it's the reason for this I'm looking for.
BTW, for what it's worth, the drive is an Intel SSD DC S3510. The drive's datasheet says this (page 27):
By using SCT command 0xD801 with State=0, Option=1, ID Word 106 can be changed from 0x6003 to 0x4000 (4KB physical sector size to 512B physical sector size support change).
Best Answer
The 512-byte emulation is intended for compatibility with older systems. However, writes involving only part of a physical 4K sector can cause reduced performance because the sector needs to be read and modified before it can actually be written.
When a legacy operating system tries to write to an Advanced Format disk, performance issues can arise because the logical sectors written may not match up with the physical sectors.
Disk partitions that are not aligned to a 4K boundary can cause degraded performance as well.
Traditionally, the first partition on a hard disk starts at sector 63. Windows XP and older operating systems partitioned disks in this manner. Newer versions of Windows will create partitions on a 1 MB boundary, ensuring proper alignment to the physical sectors. This is called Alignment 0.
Because LBA 63 is not a multiple of 8 (eight 512-byte legacy sectors fit into a 4K sector), an Advanced Format disk which is formatted in the old manner will have clusters (the smallest unit of filesystem data allocation, typically 4K in size) that are not aligned to the physical sectors on a 4K disk, a condition called Alignment 1. As a result, an I/O operation that otherwise involves 4K of data now spans two sectors leading to a read-modify-write operation that reduces performance.
While information about physical sector size is unnecessary if the OS always writes data on a 4K boundary, this information may still be needed by applications which perform low-level I/O.
Your SSD provides the ability to change the reported physical sector size because it is necessary for compatibility with certain storage arrays.
Datacenters often have storage arrays consisting of legacy 512n drives. 4K drives, even those that emulate 512-byte sectors, may not be compatible with such arrays, so this feature is necessary to ensure compatibility. See this forum thread:
Note that better performance will be attained on modern systems if the drive is configured to use 4K sectors.