From owner-freebsd-fs Mon Aug 30 20:32:57 1999 Delivered-To: freebsd-fs@freebsd.org Received: from smtp04.primenet.com (smtp04.primenet.com [206.165.6.134]) by hub.freebsd.org (Postfix) with ESMTP id 3716914E9E for ; Mon, 30 Aug 1999 20:32:08 -0700 (PDT) (envelope-from tlambert@usr04.primenet.com) Received: (from daemon@localhost) by smtp04.primenet.com (8.9.3/8.9.3) id UAA00235; Mon, 30 Aug 1999 20:31:28 -0700 (MST) Received: from usr04.primenet.com(206.165.6.204) via SMTP by smtp04.primenet.com, id smtpdAAA7DaOwa; Mon Aug 30 20:31:21 1999 Received: (from tlambert@localhost) by usr04.primenet.com (8.8.5/8.8.5) id UAA13295; Mon, 30 Aug 1999 20:31:35 -0700 (MST) From: Terry Lambert Message-Id: <199908310331.UAA13295@usr04.primenet.com> Subject: Re: fs-locking and fs memory copies questions To: ticso@cicely.de (Bernd Walter) Date: Tue, 31 Aug 1999 03:31:35 +0000 (GMT) Cc: tlambert@primenet.com, ticso@cicely.de, freebsd-fs@FreeBSD.ORG In-Reply-To: <19990829013655.E27811@cicely8.cicely.de> from "Bernd Walter" at Aug 29, 99 01:36:56 am X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > > This is the problem with growing FS's: the hash fill on the > > preexisting cylinger groups will be higher than on the new > > cylinder groups, leading to fragmentation. > > Mmmmm - I can't follow you on this. > The existing cg's are prefilled with old files. > The new ones are empty after growing. > I beleaved ffs would prever the new ones automaticaly because of > the super-blocks summary information. I don't think so. You'd want it to, but it probably won't. The problem that happens if it, in fact, does, is that you'd end up with data for new files clustering in one area of the disk, which is exactly the situation you wanted badly enough to avoid that you picked a hash-like algorithm (think of FFS as hashing to pick the blocks it's allocating) in the first place. This is why I said "Bad:" when referring to doing this on purpose, and not knowing when to stop. Create a couple of large files, and your allocation policy gets see-saw like. 8-(. > > A generic defragger would be a good think to have, if you wanted > > to allow shrinking partitions, too. > > I already need to move blocks around in case the superblock-summary > information needs another frag. > It was one of the more difficult things to do there are still some > erros left about this - the rest was quite easy. > Shrinking is something I don't beleave to get working properly, because > that would mean loosing cg's with all their inodes. > Moving files to different inodes is generaly a mess for NFS-servers. > Another point is that finding the reference for a frag is a real > expensive thing to do :( I agree on the frag, but if you are doing it in the background, you might not really care about the expense. The NFS inode problem can be resolved by virtualizing the inode numbers in the handled, but it's rather a pain to keep a table around for that. Like see-saw allocations, it hard to know when to stop doing it, once you start. 8-(. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message