Lähettäjä: Martin Steigerwald Päiväys: Vastaanottaja: dng Aihe: Re: [DNG] noatime by default
Alessandro Selli - 29.08.17, 19:11: > On 29/08/2017 at 15:20, Simon Hobson wrote:
> > Alessandro Selli <alessandroselli@???> wrote:
> >>> I figure that over sizing the
> >>> drive will help with wear leveling. I'm not sure if that is a valid
> >>> assumption, however.
> >>>
> >> I am convinced it is. The more cells to pseudo-randomically spread
> >> writes
> >>
> >> to, the lower the number of write operations that are performed on each
> >> one
> >> of them.
> >
> > Provided that the drive knows the block is "unused" - which requires that
> > the OS support TRIM. Without TRIM, when a block changes from in-use to
> > free, the drive will still see it as "a block with data in it" - and thus
> > it cannot erase it and put it in it's free pool.
> Wear-levelling today is handled by the firmware transparently to the OS.
> Trimming only affect the filesystem's block-allocator algorithm, not
> wear-levelling.
How should the drive know that a deleted block is a block is can use again
without the operating system telling it through trimming?
Wear leveling the firmware of usual consumer SSDs does itself… but it can work
better when the operating informs it of blocks which got freed by deletion.
While the firmware can know that an overwritten block is free to use again as
it always does copy on write… it has no way of knowing whether the filesystem
freed blocks by deletion of a file without the operating system telling it. So
trimming does affect the capacity of free space the SSD can use to shuffle
blocks around. And so far I have seen no amount of arguing that convinced me
otherwise so far… although I have seen your argument before again.
The impact of trimming… is arguable… I think a fstrim -a once a week is
helpful to prolong long-evity of SSDs.
(Open channel SSDs expose their flash layout to the operating system, which
then does the wear leveling itself.)