physical vs logical sector size

Octopuss

Patron
Joined
Jan 4, 2019
Messages
461
I am currently copying back 4TB of data and have started digging into this and that out of boredom and curiosity, and something has caught my eye.
Smartctl says the SSDs I have in the pool are 4096 physical and 512 logical sector size.
I guess this was done automatically during the creation of the pool, but it doesn't seem to make much use. Not saying the real world difference is even measurable, but... doesn't this like, add overhead or something?
 

Davvo

MVP
Joined
Jul 12, 2022
Messages
3,222
Last edited:

artlessknave

Wizard
Joined
Oct 29, 2016
Messages
1,506
doesn't this like, add overhead or something?

no. ZFS will write to the drives in applicable ways for the sector size for the best efficiency. where you see overhead with 4kn/512 mismatches is if you write 512 data to a 4kn drive, the drive must read 4kn, change 512b of it, and then write the 4b block. since zfs knows this, it instead will just write a 4b block directly to the drive, eliminating that read/change/write cycle.

additionally, with SSDs the read/write speeds make such a step irrelevant, and the way they work is very different.
 
Top