From owner-freebsd-current@FreeBSD.ORG Tue Sep 30 18:05:29 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 58B6F16A4B3 for ; Tue, 30 Sep 2003 18:05:29 -0700 (PDT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E1EE43FBD for ; Tue, 30 Sep 2003 18:05:27 -0700 (PDT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.9p2/8.12.9) with ESMTP id h9114c7R009852; Tue, 30 Sep 2003 21:04:38 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)h9114cvZ009849; Tue, 30 Sep 2003 21:04:38 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Tue, 30 Sep 2003 21:04:37 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: "Marc G. Fournier" In-Reply-To: <20030930194544.H94686@ganymede.hub.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-current@freebsd.org Subject: Re: Improvements to fsck performance in -current ...? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.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: Wed, 01 Oct 2003 01:05:29 -0000 On Tue, 30 Sep 2003, Marc G. Fournier wrote: > > Current has two major changes re speeding up fsck. > > > > The most significant is the background operation of fsck on file system > > with soft updates enabled. Because of the way softupdates works, you are > > assured of metadata consistency on reboot, so the file systems can be > > mounted and used immediately with fsck started up in the background > > about a minute after the system comes up. > > Actually, I had this blow up on my -CURRENT desktop once ... didn't have > a clue on how to debug it, so I switched from fsck -p to fsck -y to > prevent it from happening again :( No idea when this happened to you, but background fsck/snapshots have become dramatically more stable since about half way between 5.0-release and 5.1-release. Kirk chased down a lot of serious bugs and issues with hangs. So experience from before that time may not be characteristic of current behavior. > Now,I don't/wouldn't have softupdates enabled on / .. does the > 'background fsck' know to not background if softupdates are not enabled? > I'm going to switch back to -p and look a bit closer the next time it > happens (if it happens) to see if it is/was a softupdate file system > that failed, now that I have a better idea of what I'm looking for ... sysinstall doesn't enable soft updates on / by default, as for small partitions you increase the chance of running into space concerns. Many of the space concerns have been resolved by some more recent behavioral changes in UFS. The issue in question is that soft updates trickles out changes in a write-behind, and in the event of a large delete followed by an immediate large allocation, the deleted storage may not have been reclaimed when the allocation comes along. For example, if you had a really small / and did an installkernel. In more recent 5.x, UFS now tracks the space that "will be freed" and reports it as freed, and includes some support for waiting for space to become available (which it inevitably will in that situation, once the soft updates have been processed). So the picture may have improved a lot since you last used it, depending on when that was. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Network Associates Laboratories