From owner-freebsd-hackers Fri Mar 3 11: 9:48 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from bingnet2.cc.binghamton.edu (bingnet2.cc.binghamton.edu [128.226.1.18]) by hub.freebsd.org (Postfix) with ESMTP id 99F0837B64E for ; Fri, 3 Mar 2000 11:09:45 -0800 (PST) (envelope-from zzhang@cs.binghamton.edu) Received: from sol.cs.binghamton.edu (sol.cs.binghamton.edu [128.226.123.100]) by bingnet2.cc.binghamton.edu (8.9.3/8.9.3) with SMTP id OAA02511; Fri, 3 Mar 2000 14:09:30 -0500 (EST) Date: Fri, 3 Mar 2000 11:45:11 -0500 (EST) From: Zhihui Zhang 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. > If I remember correctly, I read a paper on how to create a snapshot of a file system. They use the COW technique in the filesystem. Now for each block in the filesystem, you need more than one bit to indicate its status (right now we use one bit to record whether this block is allocated or not). This can be tricky. -Zhihui To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message