16
Condor
5y

What the actual fuck. I just found out that on one of the SSD's I bought, the optimal partition start / finish sizes which apparently on that unit only occur every 65 THOUSAND 4kB sectors (which translates to about a quarter GB) means that I have to throw away half a GB worth of space on that disk in order to align it. Very optimized indeed, dear SSD manufacturer! Huge alignment numbers for just that much extra wastage in the name of optimization. Something like 4x sector size on 512 byte sectors or 1x sector size on 4k sectors.. ain't nobody gonna need that. Let's make it a quarter GB.

And that's what they call engineering?

Comments
  • 2
    Cheap SSDs doesn't seem to be very well optimized
  • 2
    @joas another reason to not buy off-brands, haha. Good thing that now the prices in the name brands have plummeted as well.
  • 8
    Is that really a problem? I don't know anything about SSD controllers apart form the basics, so, an economic argument instead:
    If expensive SSD price is pE and cheap one's price is pC, assuming they have the same size X GBs

    The expensive SSD per GB would cost pE/X while the cheap SSD per GB would cost pC/X ideally but it's actually pC/(X - 0.5) (effectively costs more per GB if you get less GBs)

    As long as the cheaper one is cheaper per GB, you got a good deal, so,

    pE/X > pC/(X - 0.5)
    pE(X - 0.5) > pC*X
    pE*X - pC*X > 0.5*pE
    X > 0.5pE/(pE - pC)
    X > 0.5/(1 - pC/pE)
    Is the lower bound on the number of GBs you must buy for it to be a good deal.

    If the cheap SSD is half as expensive, this reduces to X > 1. 3/4 as expensive and you get X > 2.

    Assuming you only care about number of GBs (why else would you go after a cheap SSD) I think you'd have gotten a good deal for any reasonable SSD size :p

    Why numbers? I just wanted to show how less it matters, why manufacturers don't care.
  • 6
    @RememberMe you lost me at 'price is pE <...>'...
  • 0
    @condor what kind/model/manufacturer of SSD's are we talking about?
  • 3
    Surely the controller should take care of that?
  • 2
    To me, the SSD controller is a black box. I don't care what it does if it does what it's supposed to do.
  • 3
    SSDs don't work with sectors with 512B or 4K size, they work on blocks, sometimes also called pages, which are much larger (last I checked 512KB was common). SSDs can't erase/write single 512B or 4K sectors, only whole blocks/pages. Therefore, partitions on SSDs should be aligned to blocks/pages, not sectors (which are still reported by SSDs to tools like fdisk or gparted).
    I haven't seen disks with a page size of 512MB, though, are you sure it was not 512KB? Normally you just align partitions to the 2MB mark and you are fine.
  • 1
    @TobiSGD Yeah, that's why I wanted to align them. Apparently unaligned partitions causes overhead for the system. The block size that I had to align against if memory serves me right was 256MB. Alignment occured every 65535 sectors. Perhaps I should reconsider using this SSD for actual storage instead of putting it as L2ARC for ZFS somewhere and calling it a day though... Probably the only thing it's really gonna be good for.

    @NeatNerdPrime Something from a Chinese brand called Goldenfir that I bought a year or so ago. It's the first SSD I bought back when they were still rather expensive. Nowadays I'm going with Kingston A400's everywhere though.

    Apparently the reason why I had alignment issues with this one and not with any of the other disks is because the reported size in /sys/block/sdb/queue/optimal_io_size is only non-zero in this one. None of the other disks seem to report this value, which is why Parted only complains on this disk I guess.
  • 1
    @StefanH wear-out is a non-issue with modern SSDs, so I wouldn't care about that. There might be a performance impact if the main purpose of the disk is to store many small files in rapid succession, but that should be all that's about it.
    If you go for cheap replaceable hardware anyways, then wear-out and performance weren't that high up on the list of requirements anyways, I would guess, so why bother, just make sure to have backups and go with it.
Add Comment