0

TLC flash memory has three bits per cell, so block sizes (at various levels) are divisible by three. As a result, when you align the partition just like “use a power of two, 1GiB will be surely enough”, you can easily end up with a wrongly aligned partition, as no power of two is divisible by three.

But aligning for a block size seems to be tricky in general. Well, I might start partition on a position divisible by three. But I can't set an allocation block size to multiple of three on some filesystems (e.g. ext4). Actually, I am not sure that there is any filesystem capable of setting such allocation block size.

Is this solved somehow on today's MicroSD and SSD drives? FWIW, I have both TLC MicroSD and SSD.

By the way, both of them seem to lie the OS about their actual block size. The fdisk shows sector size (logical/physical) 512B/512B.

v6ak
  • 111
  • 6
  • It’s pointless because block sizes in modern filesystems are always powers of two. – Daniel B Mar 24 '15 at 18:48
  • @DanielB I knothe fact. I just wonder if that is an issue with TLC. – v6ak Mar 24 '15 at 18:55
  • Of course it is. Two out of three blocks will be misaligned, theoretically. Of course, you don’t know anything about a SSD’s internal storage topology and you never will. Trade secret etc blah. – Daniel B Mar 24 '15 at 18:58

1 Answers1

0

SSDs that are not aligned will suffer a serious performance degradation - up to 3 times slower than an aligned SSD. You can align a SSD with Windows command prompt. These are the commands:

Diskpart

List disk

Select disk n (where n is the number that was given for your SSD in List disk)

Clean

Create partition primary align=1024

Format fs=ntfs quick

Active (assuming you want to install an OS)

Exit

The Format can also be FS=Fat or FS=Fat32 and 'Active' is optional.

Note that the FAT and FAT32 files systems impose the following restrictions on the number of clusters on a volume:

FAT: Number of clusters <= 65526 FAT32: 65526 < Number of clusters < 4177918

There are also a variety of programs that have an alignment function - e.g. Partition Wizard.

And when you install a Windows7 system or higher, the installer aligns the SSD automatically.

I am not aware of an alignment requirement for MicroSD cards

whs
  • 1,301
  • 9
  • 10
  • I rather ask what alignment should I use than how to align it. BTW I use Ubuntu and Android, not Windows. But the OSes I use are not probably much important in this question. – v6ak Mar 24 '15 at 18:29
  • the 1024 that I stated in the commands is the most commonly used and OK. But 64 would be OK too. The number has to be divisible by 4 at the KB level. I have a couple of tutorials that I made about that. But since you are not on Windows, they will be no help. – whs Mar 24 '15 at 20:10
  • AFAIK these numbers depend on the drive used and can’t be stated so generically. – v6ak Mar 24 '15 at 20:20
  • Wrong, the numbers have nothing to do with the drive. see here ==> http://www.sevenforums.com/tutorials/113967-ssd-alignment.html?ltr=S – whs Mar 24 '15 at 23:20
  • The article just picks an arbitrary number without reasoning about where the number comes from. It might be good for most SSDs on the market when the tutorial was released (seemingly in 2010). I am not sure if there were any TLC SSDs in 2010. But there is no indication if that remains true for today’s SSDs. – v6ak Mar 25 '15 at 10:37
  • If you have any proof for your theory, please post it here. Up to now you have only posted motherhood. The number 1024 is not arbitrary as it is divisible by 4. I have 10 SSDs and am using them since 2008. I never had a problem aligning them the way I describe in my tutorial. – whs Mar 25 '15 at 20:19
  • I don’t have posted proof, but neither have you. – v6ak Mar 25 '15 at 20:21
  • My proof is 7 years experience with SSDs and e.g. this ==> http://superuser.com/questions/718505/is-my-ssd-disk-aligned-to-4k-sectors-and-if-not-how-do-i-fix-it – whs Mar 26 '15 at 22:57