From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay1.corp.sgi.com [137.38.102.111]) by oss.sgi.com (Postfix) with ESMTP id 24DBF7F3F for ; Wed, 31 Jul 2013 19:09:18 -0500 (CDT) Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by relay1.corp.sgi.com (Postfix) with ESMTP id 071088F8033 for ; Wed, 31 Jul 2013 17:09:14 -0700 (PDT) Date: Thu, 1 Aug 2013 10:08:45 +1000 From: Dave Chinner Subject: Re: [xfs-masters] how to use fstrim? Message-ID: <20130801000845.GG7118@dastard> References: <51F2BD31.5060301@profihost.ag> <20130727015029.GT13468@dastard> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com To: Greg Freemyer Cc: "xfs-masters@oss.sgi.com" , "xfs@oss.sgi.com" , Stefan Priebe On Wed, Jul 31, 2013 at 09:26:35AM -0400, Greg Freemyer wrote: > On Fri, Jul 26, 2013 at 9:50 PM, Dave Chinner wrote: > > IOWs, the behaviour of fstrim on XFS is entirely dependent on the > > speed of the block layer and hardware implementations of discards. > > And on a lot of SSDs, trim seems to act like a cache flush so it can > hit performance hard. That's because TRIM on SATA3 is an unqueued command. It basically causes the pipeline to be emptied before it can be issued, and no further IO can be issued until it completes. SATA3.1 is supposed to add a queued TRIM command, but it might be some time before we see that appearing in hardware... > It should be scheduled for off-peak times > afaik. It's not critical to run hourly or even daily. If you can > schedule it once a week when other i/o is light that should be enough > for most workloads. I run it once every couple of months on my SSDs, if ever. Most modern SSDs have background defragmentation so if they are left idle for a couple of hours they clean themselves up pretty well without needing TRIM... Cheers, Dave. -- Dave Chinner david@fromorbit.com _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs