From owner-freebsd-questions@freebsd.org Mon Aug 31 16:07:12 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 741669C6195 for ; Mon, 31 Aug 2015 16:07:12 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2FCDCCD1 for ; Mon, 31 Aug 2015 16:07:11 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.15.2/8.15.2) with ESMTPS id t7VG7Abo093648 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 31 Aug 2015 10:07:10 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.15.2/8.15.2/Submit) with ESMTP id t7VG7Adf093645; Mon, 31 Aug 2015 10:07:10 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Mon, 31 Aug 2015 10:07:10 -0600 (MDT) From: Warren Block To: Quartz cc: freebsd-questions@freebsd.org Subject: Re: Replacing Drive with SSD In-Reply-To: <55E45973.2050103@sneakertech.com> Message-ID: References: <20150829220311.c7608be1.freebsd@edvax.de> <55E45973.2050103@sneakertech.com> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Mon, 31 Aug 2015 10:07:10 -0600 (MDT) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2015 16:07:12 -0000 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.