From owner-freebsd-fs@FreeBSD.ORG Fri Jun 8 02:45:37 2007 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 59A7A16A421 for ; Fri, 8 Jun 2007 02:45:37 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by mx1.freebsd.org (Postfix) with ESMTP id EF51213C448 for ; Fri, 8 Jun 2007 02:45:36 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c220-239-235-248.carlnfd3.nsw.optusnet.com.au (c220-239-235-248.carlnfd3.nsw.optusnet.com.au [220.239.235.248]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id l582jV9P025622 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 8 Jun 2007 12:45:35 +1000 Date: Fri, 8 Jun 2007 12:45:33 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Richard Noorlandt In-Reply-To: <99c92b5f0706070804p42da0881kfc866b192be60ed5@mail.gmail.com> Message-ID: <20070608120659.E75409@delplex.bde.org> References: <99c92b5f0706070804p42da0881kfc866b192be60ed5@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-fs@freebsd.org Subject: Re: tunefs question X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jun 2007 02:45:37 -0000 On Thu, 7 Jun 2007, Richard Noorlandt wrote: > While reading a bit about tunefs I noticed that UFS reserves 8% of the drive > space for the root user and the system. However, I don't really understand > what this space is actually used for. From the tunefs man page I understand > that it is primarily used to guard against fragmentation, and that's about > it. Is this the only thing that the reserved space is used for? Yes. Laying out files optimally is a hard problem, and leaving lots of unused space simplifies the problem. > And while I'm at it: what is the effect of the expected average file size > option? What are the benefits and dangers of tweaking it? Its main effect is to cause panics when it is set too high. Similarly for the average files per directory option -- set these so high that their product overflows to cause undefined behaviour including panics. Setting these options to non-overflowing values has subtle effects which seem to be limited to limiting the number of directories per cylinder group. IMO, they are mainly debugging options for determining if the subtle effects are ever large enough to be worth tuning for. They are documented mainly in a README or commit message. > From the FreeBSD > handbook I understand that the FS actually optimizes itself as time passes, > but that's about all that's said about it. No, ffs unoptimizes itself (becomes more fragmented) as time passes. The reserved space limits the extent of the fragmentation or at least the rate of growth of the fragmentation. Fragmentation of old, nearly full, ffs file systems can be very bad (maybe 10 times slower than a new one). Note that fsck only reports one sort of fragmentation which is not the main one that slows down old file systems. Bruce