From owner-freebsd-questions Thu Feb 8 7:26:52 2001 Delivered-To: freebsd-questions@freebsd.org Received: from goliath.siemens.de (goliath.siemens.de [194.138.37.131]) by hub.freebsd.org (Postfix) with ESMTP id 5114137B401 for ; Thu, 8 Feb 2001 07:26:34 -0800 (PST) X-Envelope-Sender-Is: andre.albsmeier@mchp.siemens.de (at relayer goliath.siemens.de) Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by goliath.siemens.de (8.11.0/8.11.0) with ESMTP id f18FQSC13488; Thu, 8 Feb 2001 16:26:28 +0100 (MET) Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.42.7]) by mail1.siemens.de (8.11.0/8.11.0) with ESMTP id f18FQRN08336; Thu, 8 Feb 2001 16:26:27 +0100 (MET) Received: (from localhost) by curry.mchp.siemens.de (8.11.2/8.11.2) id f18FQRg34150; Date: Thu, 8 Feb 2001 16:26:27 +0100 From: Andre Albsmeier To: Cliff Sarginson Cc: Andre Albsmeier , freebsd-questions@FreeBSD.ORG Subject: Re: minfree: Which is wrong: newfs(8) or tunefs(8) ? Message-ID: <20010208162627.A98695@curry.mchp.siemens.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from cliff@raggedclown.net on Thu, Feb 08, 2001 at 03:23:38PM +0000 X-Echelon: BND CIA NSA Mossad KGB MI6 IRA detonator nuclear assault strike Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 08-Feb-2001 at 15:23:38 +0000, Cliff Sarginson wrote: > I worked for a company once whose *only* technical documentation > was a line for each program that said: > > "Documentation: Refer to source for more info" Hmm, you are right. According to ffs_alloc.c I would assume that 5% is correct: /* * Allocate an exact sized fragment. Although this makes * best use of space, we will waste time relocating it if * the file continues to grow. If the fragmentation is * less than half of the minimum free reserve, we choose * to begin optimizing for time. */ request = nsize; if (fs->fs_minfree <= 5 || fs->fs_cstotal.cs_nffree > (off_t)fs->fs_dsize * fs->fs_minfree / (2 * 100)) break; log(LOG_NOTICE, "%s: optimization changed from SPACE to TIME\n", -Andre > > :) > > > Regarding minfree in FFS: > > > > tunefs(8) says: > > > > threshold. Settings of 5% and less force space optimization to > > always be used which will greatly increase the overhead for file > > writes. Note that if the value is raised above the current usage > > > > newfs(8) says: > > > > mize the space fragmentation on the disk. If the value of min- > > free (see above) is less than 8%, the default is to optimize for > > space; if the value of minfree is greater than or equal to 8%, > > the default is to optimize for time. See tunefs(8) for more de- > > tails on how to set this option. > > > > So do we have to set minfree below 5% or 8% in order that space > > optimization is used always? > > > > Thanks, > > > > -Andre > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message