8

I have a Samsung 840 SSD and an 840 EVO. Both are reporting 512-byte as the logical and physical sector size. A datasheet for the similar-but-not-identical 840 Pro also states 512B.

In reality sector size for SSDs is a compatibility measure, page size (8KiB for these drives) is what is read/written. Intel provides a tool to change the sector size and claims it as a performance optimisation. This makes sense to me - if the OS is issuing 16 commands per page instead of one, it is at least adding overhead in the OS, perhaps also in the driver, and perhaps reducing durability (dependent on protocol/controller optimisation).

  • is matching sector size to page size indeed a performance/durability optimisation?
  • is it possible to change on Samsung drives?

1 Answer 1

2

I don't think you can "tune" the sector size of your drive. Intel only provides a way to switch between the very small "legacy" 512 bytes sector size and the "new industry standard" of 4096 bytes per sector. This is probably only for people having compatibility or performance issues with the new size.

Indeed, nowadays, several filesystems can use a 4 kB fs block size.

So, what you can sometimes do, is to use a customized filesystem block size value. You may want to try 8 kB here, if possible. You may only be able to choose this at formatting time.

Even if you can't, you may be able to tweak other fs parameters which could help. The ext4 filesystem, for example, only handles 1, 2 and 4 kB blocks but can use the stride and stripe_width parameters to change it's behavior in a way that could improve performance on SSDs or RAID arrays.

Note that making things worse by tweaking default parameters without a good understanding of the way things work is easy. I suggest you test performance of different configuration.

2
  • 1
    This question is about the abstraction of the sizes done by SSDs. You can't change the "real" SSD page mechanics of course: I mean changing the reported size so that the OS batches requests differently, or matching FS/OS to the reported size. It seems ideal for all to match to reduce any overhead, I'm looking for benchmarks or reasons why this would be/not be the case. So far people claim various forms of caching eliminate most overhead, but few solid benchmarks. Oct 12, 2016 at 17:40
  • 1
    @SamBrightman Well, you can either change the disk reported sector size, or change the filesystem behavior. IMHO, the latter is easier on "open" OS like Linux. Moreover, I guess the "hardware" 512 bytes (and possibly 4 kB) per sector value is still hardcoded in many places. A "non standard" change may lead to troubles depending on software. Finally, did you study disk communication protocols like ATA and SCSI? Maybe they already allow to write several sectors in one single request... This would void your "X commands per page" concern.
    – Totor
    Oct 12, 2016 at 18:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .