From owner-freebsd-current@FreeBSD.ORG Sun Sep 21 17:12:18 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C689DE02; Sun, 21 Sep 2014 17:12:18 +0000 (UTC) Received: from smtp1.multiplay.co.uk (smtp1.multiplay.co.uk [85.236.96.35]) by mx1.freebsd.org (Postfix) with ESMTP id 8950AFF9; Sun, 21 Sep 2014 17:12:18 +0000 (UTC) Received: by smtp1.multiplay.co.uk (Postfix, from userid 65534) id 0890920E7088E; Sun, 21 Sep 2014 17:12:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.multiplay.co.uk X-Spam-Level: ** X-Spam-Status: No, score=2.2 required=8.0 tests=AWL,BAYES_00,DOS_OE_TO_MX, FSL_HELO_NON_FQDN_1,RDNS_DYNAMIC,STOX_REPLY_TYPE autolearn=no version=3.3.1 Received: from r2d2 (82-69-141-170.dsl.in-addr.zen.co.uk [82.69.141.170]) by smtp1.multiplay.co.uk (Postfix) with ESMTPS id 8159D20E7088A; Sun, 21 Sep 2014 17:12:14 +0000 (UTC) Message-ID: From: "Steven Hartland" To: "Peter Wemm" , References: <1411289830171-5950788.post@n5.nabble.com> <541EE962.2000801@freebsd.org> <1691600.4gjp5IhhyR@overcee.wemm.org> Subject: Re: zpool frag Date: Sun, 21 Sep 2014 18:12:09 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Cc: Allan Jude X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Sep 2014 17:12:18 -0000 ----- Original Message ----- > From: "Peter Wemm" > On Sunday, September 21, 2014 11:06:10 AM Allan Jude wrote: > > On 2014-09-21 04:57, Beeblebrox wrote: > > > FRAG means fragmentation, right? Zpool fragmentation? That's news to me. > > > If > > > this is real how do I fix it? > > > > > > NAME SIZE ALLOC FREE FRAG EXPANDSZ CAP DEDUP HEALTH > > > ALTROOT pool1 75.5G 53.7G 21.8G 60% - 71% 1.00x > > > ONLINE - pool2 48.8G 26.2G 22.6G 68% - 53% 1.00x > > > ONLINE - pool3 204G 177G 27.0G 53% - 86% 1.11x > > > ONLINE - > > It is not something you 'fix', it is just a metric to help you > > understand the performance of your pool. The higher the fragmentation, > > the longer it might take to allocate new space, and obviously you will > > have more random seek time while reading from the pool. > > > > As Steven mentions, there is no defragmentation tool for ZFS. You can > > zfs send/recv or backup/restore the pool if you have a strong enough > > reason to want to get the fragmentation number down. > > > > It is a fairly natural side effect of a copy-on-write file system. > > > > Note: the % is not the % fragmented, IIRC, it is the percentage of the > > free blocks that are less that a specific size. I forget what that size is. > > I fear that the information presented in its current form is going to generate > lots of fear and confusion. > > The other thing to consider is that this gets much, much worse as the pool > fills up. Even UFS has issues with fragmentation when it fills, but ZFS is far > more sensative to it. In the freebsd.org cluster we have a health check alert > at 80% full, but even that's probably on the high side. This "should" be less of an issue if you have the spacemap_histogram feature enabled on the pool, which IIRC if your seeing FRAG details should be the case. Regards Steve