From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 4 19:06:10 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from green.homeunix.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 30DC416A4CE; Fri, 4 Mar 2005 19:06:10 +0000 (GMT) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.13.3/8.13.1) with ESMTP id j24J69IU076428; Fri, 4 Mar 2005 14:06:09 -0500 (EST) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.13.3/8.13.1/Submit) id j24J67X8076427; Fri, 4 Mar 2005 14:06:07 -0500 (EST) (envelope-from green) Date: Fri, 4 Mar 2005 14:06:06 -0500 From: Brian Fundakowski Feldman To: Peter Jeremy Message-ID: <20050304190606.GF6011@green.homeunix.org> References: <200503022115.j22LFnWk083926@marlena.vvi.at> <20050304183747.GS57256@cirb503493.alcatel.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20050304183747.GS57256@cirb503493.alcatel.com.au> User-Agent: Mutt/1.5.6i cc: ALeine cc: phk@phk.freebsd.dk cc: hackers@freebsd.org Subject: Re: FUD about CGD and GBDE X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Mar 2005 19:06:10 -0000 On Sat, Mar 05, 2005 at 05:37:47AM +1100, Peter Jeremy wrote: > [CC list pruned] > > On Wed, 2005-Mar-02 13:15:49 -0800, ALeine wrote: > >If only hardware manufacturers were to equip hard drives with > >a mechanism to ensure atomic writes. A capacitor large enough > >to hold enough energy to flush the cache upon detecting the > >power supply was cut would be sufficient. > > I'm not sure thus is readily practical at the drive level. Based > on some back-of-envelope calculations using figures in a Seagate > Barracuda manual (which I happened to have handy): > - Random seek is 9.5 msec. > - Rotational period is 8.3msec > - Power consumption at 50% R/W, 50% seek is 0.82A @ 12V + 0.68A @ 5V > > A single random seek + track write will take 17.8 msec. This translates > to an electrical charge of 0.015C @ 12V and 0.012C @ 5V. > > Assuming the drive is designed to allow the supply rails to droop 20% > whilst functioning correctly during this shutdown phase (which is a > significantly bigger drop than the standard specifications), a single > random seek + track write would require the drive to include a 6000µF > capacitor on the 12V rail and a 12000µF capacitor on the 5V rail. > > As a first order approximation all Unix disk operations are writes > (reads can be satisfied from the buffer cache). Given the size of > current generation drive caches, it's more likely that there are > around 50 writes cached - which requires capacitors 50 times as large > - which would make them significantly larger than the drive itself. This is not what anyone is asking to achieve. What is being asked is not to lose a whole track just because one sector on the track was being written upon power loss. Dealing with many in-order writes being lost (in order), upon power loss, is something the filesystems are already written to assume, and the fsync(2) semantics are designed to work with. -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\