Preparing a SSD disk with the correct geometry

A forum for general AmigaOS 4.x support questions that are not platform-specific
Post Reply
Roland
Posts: 824
Joined: Tue May 02, 2017 7:23 am

Preparing a SSD disk with the correct geometry

Post 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?
Attachments
SSD-Geometry.jpg
Last edited by Roland on Mon May 17, 2021 1:55 pm, edited 1 time in total.
- Roland -
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: Low-level formatting of a SSD disk

Post 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
Roland
Posts: 824
Joined: Tue May 02, 2017 7:23 am

Re: Preparing a SSD disk with the correct geometry

Post 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.
Last edited by Roland on Mon May 17, 2021 1:55 pm, edited 1 time in total.
- Roland -
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: Low-level formatting of a SSD disk

Post 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.
User avatar
thomasrapp
Posts: 310
Joined: Sat Jun 18, 2011 11:22 pm

Re: Low-level formatting of a SSD disk

Post 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).
Roland
Posts: 824
Joined: Tue May 02, 2017 7:23 am

Re: Preparing a SSD disk with the correct geometry

Post 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.
- Roland -
xenic
Posts: 1185
Joined: Sun Jun 19, 2011 12:06 am

Re: Preparing a SSD disk with the correct geometry

Post 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 :-)
AmigaOne X1000 with 2GB memory - OS4.1 FE
User avatar
Raziel
Posts: 1170
Joined: Sat Jun 18, 2011 4:00 pm
Location: a dying planet

Re: Preparing a SSD disk with the correct geometry

Post 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.
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Post Reply