From owner-freebsd-questions@FreeBSD.ORG Mon May 27 00:20:33 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id BFEE08AD for ; Mon, 27 May 2013 00:20:33 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id 81365622 for ; Mon, 27 May 2013 00:20:33 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.7/8.14.7) with ESMTP id r4R0KP89030016; Sun, 26 May 2013 18:20:25 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.7/8.14.7/Submit) with ESMTP id r4R0KOs6030013; Sun, 26 May 2013 18:20:25 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Sun, 26 May 2013 18:20:24 -0600 (MDT) From: Warren Block To: Adam Vande More Subject: Re: "swap" partition leads to instability? In-Reply-To: Message-ID: References: <1369558712.96152.YahooMailNeo@web165006.mail.bf1.yahoo.com> <20130526160906.4e379016@X220.ovitrap.com> <20130526113235.f5dbe768.freebsd@edvax.de> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) 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]); Sun, 26 May 2013 18:20:25 -0600 (MDT) Cc: Erich Dollansky , Polytropon , "freebsd-questions@freebsd.org" , "M. V." X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 May 2013 00:20:33 -0000 On Sun, 26 May 2013, Adam Vande More wrote: > On Sun, May 26, 2013 at 6:32 PM, Warren Block wrote: > >> Another problem with SSDs is that they can have difficulty with wear >> leveling. This is even worse with swap because there is no way to use TRIM >> to tell the SSD about blocks that have been freed. > > Um, that is wrong. Which part? A FreeBSD swap partition has no way to use TRIM, so I suggest using a swap file on top of UFS, which does support TRIM. > It is in fact the basically the point of TRIM. > And SSD's typically use the best form of wear leveling and it's > usually advisable to leave a bit of the drive unpartitioned/unused to > ensure the wear leveling works optimally. Using TRIM should preserve performance better than leaving unused space and letting the drive wear leveling algorithm move data around without the hint.