Score:3

how to find page size of my SSD?

de flag

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?

diya avatar
la flag
"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. - https://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.
Ray Butterworth avatar
sd flag
As a side question, how significant is the effect of having mismatched sizes (e.g. 512 vs 4k)?
de flag
@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.
de flag
@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.
Violet Giraffe avatar
pk flag
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.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.