Device Mapper Atomic Write Support Patches Posted

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • vitalif
    replied
    Originally posted by numacross View Post
    You're writing about logical sector size, but I meant physical NAND block sizes
    Physical NAND "page" (read/write unit) size is 16kb, "block" (erase unit) is 1536 pages, at least in Micron TLC 3D NAND. I found this in datasheets some time ago

    P.S: Just googled it, for Micron QLC page is 18352 (16k + 1968 bytes), and block is 2816 pages O_o. Extra space is used for ECC probably.
    Last edited by vitalif; 10 January 2025, 10:48 AM.

    Leave a comment:


  • numacross
    replied
    Originally posted by vitalif View Post

    They are. If you use them in 512b mode they just emulate 512b sectors using read-modify-write. 99.99% of software uses 4k and partitions are usually 4k-aligned so usually that doesn't affect application performance. But you can verify yourself (with fio) that unaligned 4k writes are slower than aligned, and than 512b writes aren't faster than 4k writes and may even be slower...

    Some of SSDs are even 8k internally, ZFS knows about them: https://github.com/openzfs/zfs/blob/..._vdev_os.c#L94

    And there are also oversized Solidigm SSDs with 16k and even 64k internal sectors...

    But most SSDs are 4k.
    You're writing about logical sector size, but I meant physical NAND block sizes as that's the smallest unit that can be erased at once. One block contains pages which are sized differently depending on manufacturing, usually in range of 512b to 64KB as you wrote, that can be read and written at once. This complicates atomic operations because erasure still has to happen at block size. I suspect enterprise drives simply have much more overprovisionied flash to accommodate this. There's also controller trickery around the block/page size mismatch. Basically too many factors to make sweeping statements about performance.

    Originally posted by vitalif View Post
    Ooookay. So Micron 7450 is an example indeed, (63+1)*4k = (511+1)*512 = 256k. Thanks for the information :-)

    To be precise, is it reported in AWUPF or in the AWUN field? AWUPF?
    The same value in nawun, nawupf and nacwu for each Micron 7450.
    4K has 0 in npwg, npwa, npdg, npda, and nows while 512b has 7. nsfeat is 0x16 in both.

    Leave a comment:


  • vitalif
    replied
    Originally posted by numacross View Post
    How so? SSDs aren't 4KB internally, at least NAND-based ones. While some can be switched to a format other than 512b I haven't seen any that ship in this configuration.
    They are. If you use them in 512b mode they just emulate 512b sectors using read-modify-write. 99.99% of software uses 4k and partitions are usually 4k-aligned so usually that doesn't affect application performance. But you can verify yourself (with fio) that unaligned 4k writes are slower than aligned, and than 512b writes aren't faster than 4k writes and may even be slower...

    Some of SSDs are even 8k internally, ZFS knows about them: https://github.com/openzfs/zfs/blob/..._vdev_os.c#L94

    And there are also oversized Solidigm SSDs with 16k and even 64k internal sectors...

    But most SSDs are 4k.

    Originally posted by numacross View Post
    My Micron 7450 U.2 in 4K mode reports 63 while Micron 7450 M.2 in 512b mode reports 511.
    And Kioxia CD-6 U.3 in 4K mode reports 0 despite being an enterprise device.
    Ooookay. So Micron 7450 is an example indeed, (63+1)*4k = (511+1)*512 = 256k. Thanks for the information :-)

    To be precise, is it reported in AWUPF or in the AWUN field? AWUPF?
    Last edited by vitalif; 08 January 2025, 08:19 AM.

    Leave a comment:


  • numacross
    replied
    Originally posted by vitalif View Post
    It's in sectors, minus 1. So 7 = 4kb.

    4kb writes are obviously atomic everywhere.
    How so? SSDs aren't 4KB internally, at least NAND-based ones. While some can be switched to a format other than 512b I haven't seen any that ship in this configuration.

    Originally posted by vitalif View Post
    So none of these support atomic writes larger than 4kb
    My Micron 7450 U.2 in 4K mode reports 63 while Micron 7450 M.2 in 512b mode reports 511.
    And Kioxia CD-6 U.3 in 4K mode reports 0 despite being an enterprise device.

    Leave a comment:


  • vitalif
    replied
    Originally posted by numacross View Post
    It's an enterprise feature.
    My Samsung PM9A3 reports "7" in that field while a consumer Samsung 980 PRO reports "0".
    It's in sectors, minus 1. So 7 = 4kb.

    4kb writes are obviously atomic everywhere.

    My drives:

    Micron 7300 - awun & awupf both 0
    Samsung PM983, PM9A3 - awupf = 4 kb
    Desktop Patriot - all 0
    Desktop Samsung - all 0

    So none of these support atomic writes larger than 4kb

    Leave a comment:


  • pal666
    replied
    Originally posted by vitalif View Post
    Pls someone give me an example of ssd actually supporting this. I suspect there are none %)

    You can check it with nvme-cli - nvme id-ns /dev/nvme0n1 - look at "nawupf" (namespace atomic write unit power fail)
    WD Black SN850 1 TB (WDS100T1X0E)

    Leave a comment:


  • numacross
    replied
    Originally posted by vitalif View Post
    Pls someone give me an example of ssd actually supporting this. I suspect there are none %)

    You can check it with nvme-cli - nvme id-ns /dev/nvme0n1 - look at "nawupf" (namespace atomic write unit power fail)
    It's an enterprise feature.
    My Samsung PM9A3 reports "7" in that field while a consumer Samsung 980 PRO reports "0".

    Leave a comment:


  • vitalif
    replied
    Pls someone give me an example of ssd actually supporting this. I suspect there are none %)

    You can check it with nvme-cli - nvme id-ns /dev/nvme0n1 - look at "nawupf" (namespace atomic write unit power fail)

    Leave a comment:


  • phoronix
    started a topic Device Mapper Atomic Write Support Patches Posted

    Device Mapper Atomic Write Support Patches Posted

    Phoronix: Device Mapper Atomic Write Support Patches Posted

    Along with other recent Linux kernel patches around atomic write support, a set of Device Mapper (DM) patches were posted today for implementing said functionality...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite
Working...
X