2018-02-07
Consumer SSDs and their nominal physical block sizes, now and in the future
Recently, D. Ebdrup left a comment here asking a question about the behavior of ZFS on 'advanced format' disk drives with 4 Kbyte physical block (or sector) sizes. I figured I'd have no problems answering it, since at this point I should have any number of ZFS pools on such drives. Then I started actually looking for them.
For years, I've been strongly advocating that people should set up ZFS pools as if they were on 4k sector advance format drives in order to future-proof your pools against the day when the only drives you could get were 4k sector ones. I set up my initial Linux ZFS pools this way, for example. But when I create a ZFS pool on SSDs on my home machine a while back (using SSDs that are now about a year old), I was surprised to discover that my SSDs were claiming to be 512 byte physical sector devices.
You can probably guess where this is going. Most of our SSDs are consumer SSDs, and it seems very hard to find one that claims to have a 4k physical sector size. Intel's SSDs usually claim a 4k sector size (although this is switchable on some models, with official support these days), but Crucial, SanDisk, Samsung 850s, SPCC, one Intel SSD, and old OWC SSDs all claim to have 512 byte physical sectors (the sole exception is an old Crucial 'CT120M50'). It turns out that we do have 4k advance format disks, but they're hard drives, not SSDs. Even the NVMe SSD in my Dell XPS 13 laptop claims to be a 512 byte physical sector device (it says it's a SK hynix NVMe drive, although who knows what modifications Dell had made to it).
For years I've been expecting that at some point in the future SSDs would report themselves as advance format drives, even if current ones didn't do so. But at this point neither advance format drives nor SSDs are new things, yet SSD makers are still having consumer SSDs report in as '512n' drives despite the fact that any number of (consumer) HDs have been advance format drives for years (I'm not sure if there are any non-AF consumer HDs left). Given this, now I wonder if SSDs are ever going to switch over to claiming to be advance format drives or if the SSD makers have concluded that keeping them reporting as 512n drives is easier in various ways.
(Given my ZFS pool setup mistake plus that I still haven't fixed it, I would be perfectly happy if this was the case.)
PS: This matters somewhat for ZFS because a few things in ZFS work
better in ZFS pools that are set up assuming 512n drives (ie, with
ashift=9
). If you're going to be able to use 512n drives for the
lifetime of your pool, you might as well take advantage of this.
But I don't know if this is a really safe assumption that you want
to make, especially if you have especially long-lived ZFS pools the
way I may have.
(For my still entirely theoretical new home machine, this also depends on what sort of midlife upgrades I'll do.)