From owner-freebsd-arch Wed Jul 26 19: 2: 9 2000 Delivered-To: freebsd-arch@freebsd.org Received: from beastie.mckusick.com (beastie.mckusick.com [209.31.233.184]) by hub.freebsd.org (Postfix) with ESMTP id B942F37BFD8 for ; Wed, 26 Jul 2000 19:02:03 -0700 (PDT) (envelope-from mckusick@mckusick.com) Received: from beastie.mckusick.com (localhost [127.0.0.1]) by beastie.mckusick.com (8.9.3/8.9.3) with ESMTP id TAA16258; Wed, 26 Jul 2000 19:01:58 -0700 (PDT) (envelope-from mckusick@beastie.mckusick.com) Message-Id: <200007270201.TAA16258@beastie.mckusick.com> To: Peter Jeremy Subject: Re: Snapshots in the Fast Filesystem Cc: arch@FreeBSD.ORG In-Reply-To: Your message of "Mon, 17 Jul 2000 11:15:39 +1000." <00Jul17.111555est.115264@border.alcanet.com.au> Date: Wed, 26 Jul 2000 19:01:58 -0700 From: Kirk McKusick Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Date: Mon, 17 Jul 2000 11:15:39 +1000 From: Peter Jeremy Subject: Re: Snapshots in the Fast Filesystem In-reply-to: <200007060342.UAA23667@beastie.mckusick.com>; from mckusick@mckusick.com on Wed, Jul 05, 2000 at 08:42:18PM -0700 To: Kirk McKusick Cc: arch@FreeBSD.ORG On 2000-Jul-05 20:42:18 -0700, Kirk McKusick wrote: >I have completed an initial implementation of snapshots for the >fast filesystem (UFS/FFS). Thank you very much. Having used the snapshot mechanisms in Compaq's AdvFS, I can say that this will be wonderful. Having read the README that you committed, I have a few questions: Disk space overheads: Does creating a snapshot require any additional disk space? I realize that updates will require additional space for the `before' image, but what other metadata overheads are there? There is about a 0.1% disk space overhead to initially create a snapshot. Thus on a 10Gb filesystem, the initial snapshot will consume about 10Mb. Running out of space: Is there any special behaviour when an active FS with one or more snaphsots runs out of disk space? Does the (oldest?) snapshot become invalid to free up space, or is the behaviour indistinguishable from running out of space without snapshots? How does this interact with the UFS minfree boundary? I cheated on this one :-) I allow the snapshots to consume space from the minfree reserve. Once the limit is hit, most processes will die with filesystem full errors, so the rate of change on the filesystem comes to a halt. Speed: Is it possible to reduce the time during which FS activity is suspended? As you point out, one use for snapshots is doing point-in- time backups (I do this currently with Compaq Tru64 AdvFS filesystems). From past experience, I've found that Oracle is very sensitive to FS activity blocks - after about 1 sec, Oracle will abort if it's FS activity is blocked. It's possible that other applications have similar behaviour. Peter The bulk of the suspend time is spent flushing out all the dirty buffers and metadata to get a consistent on-disk copy. I do not know any way to make that go faster, nor do I know a way to do it without suspending filesystem operations. Applications that are sensitive to 1-second I/O suspensions are likely to be problematic. Kirk McKusick To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message