Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Aug 2015 10:07:10 -0600 (MDT)
From:      Warren Block <wblock@wonkity.com>
To:        Quartz <quartz@sneakertech.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Replacing Drive with SSD
Message-ID:  <alpine.BSF.2.20.1508311000550.42983@wonkity.com>
In-Reply-To: <55E45973.2050103@sneakertech.com>
References:  <CEAD84AD-341A-4FB9-A3A1-D0D5A550AFFD@lafn.org> <alpine.BSF.2.20.1508281235390.74312@wonkity.com> <20150829220311.c7608be1.freebsd@edvax.de> <alpine.BSF.2.20.1508300633160.44682@wonkity.com> <55E45973.2050103@sneakertech.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 31 Aug 2015, Quartz wrote:

>> Making a partition for free space is one way. Another way is to leave
>> part of the drive unpartitioned. Either one just guarantees there is a
>> good supply of unused blocks available to the drive.
>
> I'm not super well versed on exactly how SSD TRIM works. How does the drive 
> in question know which blocks are or aren't free, isn't that a function of 
> the filesystem? For that matter, how does the drive even "know" which parts 
> are or aren't partitioned, it's not like they're programmed to understand MBR 
> vs GPT, etc. How does the system communicate to the drive firmware layer 
> which blocks are in use?

That is exactly what TRIM is, a mechanism for a filesystem to tell the 
drive "this block is no longer in use".  Otherwise, the only thing the 
drive has to determine whether a block is in use is whether it has ever 
been written.

> Simply assuming based on if or how long ago it was written to can't 
> possibly be a workable solution. I'm not convinced that leaving large 
> chunks of the drive 'free' has any effect on wear leveling.

It provides a pool of blocks that have not and will not be written.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.20.1508311000550.42983>