Consumer SSDs and their nominal physical block sizes, now and in the future

February 7, 2018

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.)


Comments on this page:

By Ben Hutchings at 2018-02-07 13:06:21:

"You want the truth? You can't handle the truth!" The real native sector sizes on SSDs are likely to be much larger than 4K. Although Advanced Format allows for that, I don't think filesystems, drivers, etc. are generally capable of dealing with it. So they lie, and they choose the most compatible lie.

By cks at 2018-02-07 17:02:29:

My understanding is that SSDs effectively have multiple native block sizes depending on what you're doing, between the erase block size and the write and/or read block size (I don't know if these are the same on SSDs). On top of that there's an entire remapping layer happening in the SSD between our system-level disk IO to fixed sectors and the actual storage on flash (where a given fixed sector will wander around the flash storage as it's written and rewritten), and who knows how this mapping works (for instance, fixed size chunks versus variable sized extents).

(This source implies that flash-level read and write sizes are the same, for what that's worth.)

Written on 07 February 2018.
« I should remember that sometimes C is a perfectly good option
What the Linux kernel's messages about segfaulting programs mean on 64-bit x86 »

Page tools: View Source, View Normal, Add Comment.
Search:
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Wed Feb 7 00:51:30 2018
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.