Aligning your Samsung 840 EVO – Slow disk problem

This probably applies to both 840 evo and 850 evo, but not the EVO 840 PRO and the 850 evo pro because the pro are not TLC

All over the internet, people are saying that solid state drives don’t need to be aligned because they will scramble the used flash cells anyway for wear leveling.

This is absolutely NOT TRUE, although wear leveling does work that way (to put it in simple terms), the mapping algorithm that levels the writes maps blocks to other blocks.

So here is how it works, let us assume there was no wear leveling, when the partition is not properly aligned to a starting offset which is a multiple of the erase block size, writes and erase operations that should require the erasing of one block could end up erasing and writing to two blocks, now the block is a hardware restriction, so when the wear leveling algorithm selects a new location, the problem of erasing two cells instead of one is still valid.

Don’t take my word for it, mess up the alignment of one of your partitions, then examine reads and writes of 512 or 4K, both will be much slower.

Now, what you need to do is to align the file system to block size

Because this disk has a 1.5M erase block 1536 KiB and to be sure we want it to also align with 2048 KiB (Just in case the erase block is not the whole story), you can set the sector alignment value to 12288 (6144 KiB), which is a multiple of 1536 KiB and 2048 KiB.

So, in LINUX, even though it is usually correctly aligned by the partitioning software (And in windows it is already done for you and if not it can be done by samsung’s magician software), you can check the current alignment with.

fdisk -l /dev/sdb

For your own math, the EBS (Erase block size) on those drives is 1.5MBs

So basically, 12288 is 3*4k, the three comes from the fact that it is a three level cell (TLC)

6 thoughts on “Aligning your Samsung 840 EVO – Slow disk problem

  1. Are you reasonably sure that 850 EVO’s EBS is 1.5 M? Parted aligns my 850 to 1 M, and if I “align check” the partitions I crate, Parted always reported they are algined.. Do you think’s Parted is jut guessing or does it really “ask” the drive for the correct alignment, and it turns out that 850 EVO’s is different to 840?


    1. As far as i know, parted has no way of knowing, I would guess the values of what correctly aligned is are hard coded, parted would simply do the division (Or modulus division) by the hard coded values.

      One simple way to find out would probably be doing various performance tests and see if they are inline with the expected ones.

      I am basing my guess that parted has no way of knowing on the fact that i have never seen the required data in any form of hard drive query such as hdparm or smartmontools or anything other tool, Please do let us know what the results are.

  2. “you can set the sector alignment value to 12288 (6144 KiB)”

    Sorry I don’t understand these two numbers. Is it 12288 or 6144?
    I read another article and they indicated to set sector alignment value to 6144, which is a multiple of 1536 KiB and 2048 KiB. I don’t see the need to jump to a double the value.
    Thanks in advance.

    1. EVO 840 one sector is 512 B. Thus 12288 sectors is 6144 KiB. So you should select all partition starts either dividable by 12288 sectors or 6144 KiB which ever unit you are using when partitioning.

      BTW Samsung has a good reason to be hesitant on giving out this info. If it would be generally known that to get good speed out of their product requires manual partitioning (also for Windows) it would be bad for sales.

Leave a Reply

Your email address will not be published. Required fields are marked *