From owner-freebsd-fs@freebsd.org Sat Aug 8 18:26:43 2015 Return-Path: Delivered-To: freebsd-fs@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 D4B889B5D77 for ; Sat, 8 Aug 2015 18:26:43 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id BAA2DBB7 for ; Sat, 8 Aug 2015 18:26:43 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: by mailman.ysv.freebsd.org (Postfix) id B7B589B5D76; Sat, 8 Aug 2015 18:26:43 +0000 (UTC) Delivered-To: fs@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 B74C79B5D75 for ; Sat, 8 Aug 2015 18:26:43 +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 7952BBB6 for ; Sat, 8 Aug 2015 18:26:43 +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 t78IQdGH042727 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 8 Aug 2015 12:26:39 -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 t78IQcJ5042720; Sat, 8 Aug 2015 12:26:39 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Sat, 8 Aug 2015 12:26:38 -0600 (MDT) From: Warren Block To: Willem Jan Withagen cc: Konstantin Belousov , fs@freebsd.org Subject: Re: Using SSDs as swap In-Reply-To: <55C60441.7040906@digiware.nl> Message-ID: References: <55C5D48E.6010605@digiware.nl> <20150808102900.GA2072@kib.kiev.ua> <55C5E34B.9010905@digiware.nl> <20150808113750.GC2072@kib.kiev.ua> <55C60441.7040906@digiware.nl> 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]); Sat, 08 Aug 2015 12:26:39 -0600 (MDT) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Aug 2015 18:26:43 -0000 On Sat, 8 Aug 2015, Willem Jan Withagen wrote: > > So perhaps the nicest thing to do for the SSDs is TRIM swap at > startup??? So the the SSD controller van do its garbage collection and > then keep the remainder of the stuff as it is. This can be done now by using a swap file on a UFS partition with trim enabled. The catch is that the swap file has to be deleted and recreated to trigger the trim. The delete is quick, but the create depends on the size of the file and the speed of the hardware. (And no, sparse files do not work as swap files.) Maybe rotate swap files like log files, so they could be created when the system is idle.