From owner-freebsd-hackers Fri Mar 3 10:55:23 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mail4.aracnet.com (mail4.aracnet.com [216.99.193.36]) by hub.freebsd.org (Postfix) with ESMTP id 7CFDD37B677 for ; Fri, 3 Mar 2000 10:55:18 -0800 (PST) (envelope-from beattie@aracnet.com) Received: from shell1.aracnet.com (IDENT:root@shell1.aracnet.com [216.99.193.21]) by mail4.aracnet.com (8.9.3/8.9.3) with ESMTP id KAA12359; Fri, 3 Mar 2000 10:55:26 -0800 Received: by shell1.aracnet.com (8.9.3) id KAA05437; Fri, 3 Mar 2000 10:57:08 -0800 Date: Fri, 3 Mar 2000 10:57:08 -0800 (PST) From: Brian Beattie To: Michael Bacarella Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Copy-on-write filesystem In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 3 Mar 2000, Michael Bacarella wrote: > > > Upon reading of Microsoft's fabulous innovations in the filesystem arena, > I started playing with some ideas of my own (not to be confused with > ORIGINAL ideas) > > Can someone tell me why copy-on-write filesystems would be bad? > > Imagine: cp file file2, file and file2 reference the same exact blocks, > but modified chunks of file2 would be given their own private blocks. > > This probably won't fit into current filesystems, but is it a sane idea > worth pursuing in a new filesystem? I performed an analysis on a > non-production server and determined that about 66 megs of a typical > FreeBSD install is duplicate files (and yes, I ignored hard links and > symlinks and non-regular files). > > This was on a system without a ports tree, also. > > I think the benefits would be sexy. Copies are closer to instant. More > cache hits. Space benefits. Copying /etc/skel to a user's home directory > won't take up any blocks at all unless users edit their files, which, if > you're an ISP, you know that 95% of users don't do anyway. > > There's probably a stockpile of drawbacks to this as well. Fire away. > Sounds very intriquing. The biggest problem I see, right away is fitting it's use into a UNIX environment, were, file copies are made with the write system call, making it impossible to implement for the general case. You could certainly rewrite the "cp" command and that would get a majority of cases, though it is hard to say how many. The answer would depend on how the copies were made. I suspect that a large number of copies on most systems are made by going to the original source (tar file, etc...), these would not be helped by a copy-on-write filesystem. Brian Beattie | The only problem with beattie@aracnet.com | winning the rat race ... www.aracnet.com/~beattie | in the end you're still a rat To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message