Page 1 of 1

Preparing a SSD disk with the correct geometry

Posted: Mon May 17, 2021 6:11 am
by Roland
I would like to prep a SSD disk so that there would not be any unnecessary writings on on it. In another thread here I found the advice that the "blocks/cylinder" should be set to 2048, and that the "blocksize" should be set to 4096. But there is the 'blocksize' both in the 'geometry' settings of the whole disk (default is 512, see the attachment), and in the individual partition settings. Should the blocksize be set to 4096 in both of these, or only in one of them?

Re: Low-level formatting of a SSD disk

Posted: Mon May 17, 2021 9:42 am
by nbache
My first reaction to your post is - don't do that!

It has long been the rule that modern disks (i.e. those from this millennium or so :-)) should never be low-level formatted.l In the best case, they will just ignore the command, in the worst case, you will ruin the disk. In between is the (normal?) case where the attempt to format will just run forever with nothing happening, until you reset.

I would think this is true for an SSD as well, but if you or anybody know better, I'm all ears (or eyes, as it would be).

The blocksize recommendation is for the partition setup, which would - given the above - be the only place you should tinker. I believe that recommendation is meant exactly to align the partition blocksize with the underlying hardware's fixed (virtual, i.e. what the SSD's firmware emulates) blocksize.

Hope I'm getting this correctly, I'm not a low-level disk/SSD expert.

Best regards,

Niels

Re: Preparing a SSD disk with the correct geometry

Posted: Mon May 17, 2021 10:30 am
by Roland
nbache wrote: Mon May 17, 2021 9:42 am Hope I'm getting this correctly, I'm not a low-level disk/SSD expert.
Sigh... You seem to have the obsession to answer all questions here, even if you don't have the knowledge about the matter! IMO It would then be better to leave answering for those who really know about the subject at hands. There is already enough 'nonsense-information' all around...

What you said is totally opposite what e.g. 'thomasrapp' adviced in this thread: viewtopic.php?p=35647#p35647 . I have already years ago succesfully modified the 'blocks/cylinder' value. But I was not able to figure out whether also the block size should be modified at the geometry level.

Re: Low-level formatting of a SSD disk

Posted: Mon May 17, 2021 11:09 am
by nbache
Okay, that's why I made all those disclaimers. But I decided it would be better to warn about what I know is a danger (or at best futile) on most disks than to be silent and possibly let someone wander blindly into a pit.

Sorry if that offends you.

I do try to differ in my responses between what I know for sure and what I don't.

On the topic at hand, if you know what you're doing about the disk geometry, then fine. As for the partition block size, it is a good idea to let it follow the disk's setting, as I also stated above.

Hope this helps.

Best regards,

Niels

P.S. While I wouldn't call it an obsession, yes, I do try to respond when I have time and even just some knowledge (in which case I try to declare openly the extent and limitations of that knowledge). There are not that many left here who do it.

Re: Low-level formatting of a SSD disk

Posted: Mon May 17, 2021 12:42 pm
by thomasrapp
I *never* recommended low-level formatting of anything. Just like nbache wrote, if you try it, it will at best be ignored by any IDE or SCSI device.

What I recommend is to change the logical geometry which is written into the RDB. Alignment is a topic for SSDs and similar flash memory disks. By defining partition borders on megabyte boundaries, you have the correct alignment automatically. That's what partitioning programs on Linux and Windows do, too.

And by block size I indeed mean the logical file system block size (a.k.a. Sectors Per Block), not the sector size which is reported by the drive itself, which most likely is fixed to 512 for compatibility reasons. Only drives larger than 2 TB reports themselves with sector sizes of 4096 or above (a.k.a. advanced sector format).

Nevertheless SSDs internally work with writable pages (usually 4096 or 8192 bytes) and erasable blocks (usually 128K or 256K).

Re: Preparing a SSD disk with the correct geometry

Posted: Mon May 17, 2021 1:53 pm
by Roland
thomasrapp wrote: Mon May 17, 2021 12:42 pm I *never* recommended low-level formatting of anything. Just like nbache wrote, if you try it, it will at best be ignored by any IDE or SCSI device.

What I recommend is to change the logical geometry which is written into the RDB. Alignment is a topic for SSDs and similar flash memory disks. By defining partition borders on megabyte boundaries, you have the correct alignment automatically. That's what partitioning programs on Linux and Windows do, too.
Yes, what I meant by "low level formatting" was in fact the logical geometry adjustement, in contrast to the partition settings. Sorry for using the term in wrong context... I corrected the title.
And by block size I indeed mean the logical file system block size (a.k.a. Sectors Per Block), not the sector size which is reported by the drive itself, which most likely is fixed to 512 for compatibility reasons. Only drives larger than 2 TB reports themselves with sector sizes of 4096 or above (a.k.a. advanced sector format).

Nevertheless SSDs internally work with writable pages (usually 4096 or 8192 bytes) and erasable blocks (usually 128K or 256K).
Ok, thank you for clarifying the subject! All this information would be good to be also in te amiwiki.

Re: Preparing a SSD disk with the correct geometry

Posted: Tue May 18, 2021 11:46 pm
by xenic
Roland wrote: Mon May 17, 2021 10:30 am Sigh... You seem to have the obsession to answer all questions here, even if you don't have the knowledge about the matter! IMO It would then be better to leave answering for those who really know about the subject at hands. There is already enough 'nonsense-information' all around...
I would call his frequent responses diligence and not obsession.

Keep up the good work nbache :-)

Re: Preparing a SSD disk with the correct geometry

Posted: Wed May 19, 2021 8:54 am
by Raziel
@xenic

Second.

@nbache
I do try to respond when I have time and even just some knowledge (in which case I try to declare openly the extent and limitations of that knowledge). There are not that many left here who do it.
...and please never stop doing that.