4 ms·
Doesn't seem to support 4k out of the box? Some drives - like Intel Optane SSDs allow changing this in firmware (and reformatting) with a manufacturer's utility
by tanelpoder 6y ago
Doesn't seem to support 4k out of the box? Some drives - like Intel Optane SSDs allow changing this in firmware (and reformatting) with a manufacturer's utility...
$ lsblk -t /dev/nvme0n1
NAME ALIGNMENT MIN-IO OPT-IO PHY-SEC LOG-SEC ROTA SCHED RQ-SIZE RA WSAME
nvme0n1 0 512 0 512 512 0 none 1023 128 0B
$ sudo nvme id-ns -H /dev/nvme0n1 | grep Size
LBA Format 0 : Metadata Size: 0 bytes - Data Size: 512 bytes - Relative Performance: 0 Best (in use)
- guerby 6y agoHere is an article about nvme-cli tool : https://nvmexpress.org/open-source-nvme-management-utility-nvme-command-line-interface-nvme-cli/ https://nvmexpress.org/open-source-nvme-management-utility-n... On Samsung SSD 970 EVO 1TB it seems only 512 bytes LBA are supported: # nvme id-ns /dev/nvme0n1 -n 1 -H|grep "^LBA Format" LBA Format 0 : Metadata Size: 0 bytes - Data Size: 512 bytes - Relative Performance: 0 Best (in use)
- jeffbee 6y agoThanks for checking. SSD review sites never mention this important detail. For some reason the Samsung datacenter SSDs support 4K LBA format, and they are very similar to the retail SSDs which don't seem to. I have the a retail 970 Evo that only provides 512.
- wtallis 6y agoI just checked my logs, and none of Samsung's consumer NVMe drives have ever supported sector sizes other than 512B. They seem to view this feature as part of their product segmentation strategy. Some consumer SSD vendors do enable 4kB LBA support. I've seen it supported on consumer drives from WD, SK hynix and a variety of brands using Phison or SMI SSD controllers (including Kingston, Seagate, Corsair, Sabrent). But I haven't systematically checked to see which brands consistently support it.
- 1996 6y agoIs it genuine 512? As in, what ashift value do you use with zfs?
- wtallis 6y agoRegardless of what sector size you configure the SSD to expose, the drive's flash translation layer still manages logical to physical mappings at a 4kB granularity, the underlying media page size is usually on the order of 16kB, and the erase block size is several MB. So what ashift value you want to use depends very much on what kind of tradeoffs you're okay with in terms of different aspects of performance and write endurance/write amplification. But for most flash-based SSDs, there's no reason to set ashift to anything less than 12 (corresponding to 4kB blocks).
- 1996 6y ago> for most flash-based SSDs, there's no reason to set ashift to anything less than 12 (corresponding to 4kB blocks). matching the page size? > the underlying media page size is usually on the order of 16kB I'd say that's a good reason to set ashift=14 as 2^14=16kb
- wtallis 6y agoThere are downsides to forcing the OS/FS to always use larger block sizes for IO. You might simply be moving some write amplification out of the SSD and into the filesystem, while losing some performance in the process. Which is why it really depends on your workload, and to some extent on the specific SSD in question. I'm not convinced that ashift=14 is a sensible one size fits all recommendation, even if we're talking only about recent-model consumer-grade NAND SSDs.
- floatboth 6y agoAt least early WD Black models don't really seem to have 4K LBA support. The format option is listed, but it refuses to actually run the command to reformat the drive to the new "sector" size.
- mgerdts 6y agoFWIW, WD SN850 has similar performance and supports 512 and 4k sectors.