3

Most of my SSD's report 512 as physical sector size when querying with smartctl, nvme-cli and hdparm. But we know these are all fake values. I would like to know the proper page size so I can get the optimal sector size for FS. However, I cannot find any information about it on system or on the product webpages. From only sources, most large SSDs' has sector size more than 4k, they intend to have 16k or even larger. Is there any tool can report the actual internal page size of a SSD? Or is there any database to query this?

5
  • "fake values" is a bit harsh, more correct is that the drive firmware offers backward compatibility by emulating a 512 byte sector size rather than exposing the native sector size. - Note that in addition to whatever actual sector size drives ship with - some models/vendors allow you to change that default (with vendor specific tools) - so a lookup database might not be as useful. - wiki.archlinux.org/title/Advanced_Format suggests several generic tools with the caveat that your mileage may vary with those commands / tools and you might need to use vendor specific tools instead.
    – diya
    Oct 14, 2022 at 12:57
  • As a side question, how significant is the effect of having mismatched sizes (e.g. 512 vs 4k)? Oct 14, 2022 at 13:09
  • @diya the arch wiki merely said: you can set whatever 'fake' value you want if the firmware support this and you do not want to manually set block size when creating the FS. Ideally you want to set it to the actual page size. My question is about how to find the actual page size.
    – Wang
    Oct 14, 2022 at 21:42
  • 2
    @RayButterworth This is what I am about to find out. It depends on your application, file system and actual firmware I guess. So far for my test environment, on some products, I see > 50% drop of performance if the sector size does not match the page size. However, it is very difficult to find out the actual page sizes for most products, thus I cannot really conclude anything.
    – Wang
    Oct 16, 2022 at 22:32
  • Have you found anything yet? I'm developing a DBMS, and if my block size is smaller than the target SSD's page, it will cause significant write amplification, as well as slowdowns. Feb 28 at 18:14

0

You must log in to answer this question.

Browse other questions tagged .